Page 5 of 5

Re: [Poll] Raising the Limit on Active Units

Posted: Fri Jun 06, 2014 1:18 am
by Pyro
fildred13 wrote:I brought up that limits display in-game (what is that command btw, I've forgotten...) and sure enough I was maxed out.
Shift F12 or Shift F5 if you prefer.

Re: [Poll] Raising the Limit on Active Units

Posted: Fri Jun 06, 2014 3:01 pm
by fildred13
Ah! I was using the wrong term. I didn't hit the projectiles limit, now your comment about the attacks makes more sense. I meant the OBJECT limit. I was using the wrong term.

Re: [Poll] Raising the Limit on Active Units

Posted: Sat Jun 07, 2014 7:09 pm
by Graydon
I've run into Map Action and MA Param limits before myself. There are a few tricks you can employ to reduce the total MA Param count for a given Map Action. Every detail in a map action contributes towards it's Parameter value... obviously MA's that have more _default must be listed_ params (like a GEOM or PLAT) can only be reduced so much, but there's a number of little things you can do to re-collect some of them.

For any action that requires a true or false flag, in the instances where you want to use the flag's default (say a visible flag, it always defaults to true) you don't need to add the 'true' flag into the 3rd box, it's redundant; the only thing it'll do is add an additional 4 params to the MA's count. Be careful with this though, if you're unsure what the default is (it's not always stated) do a trial and error test of just that map action, possibly on a separate test mesh for sanity's sake (having to test play 20 mins of level just to test one script line is a little heinous sometimes).

Make Monster Containers! This one is huge, and I never realized the benefits until I was absolutely maxed out on the limits. Most mapmakers will make generic unit containers for their player units... Player as SUBJ and generally a Player as OBJ list as well. Meaning for every attack action you're going to have a Monsters param listing the enemies you want to be attackers, and a link linked to the Player as OBJ. 9 times out of 10, the scripter precedes that ATTA with a CTRL, making the enemy monsters visible first. You've now listed those enemy monsters as subjects twice in two separate places (wasteful param usage, remember anything and everything within a map action contributes to param count) and you're adding an extra command in the ATTA that you could avoid by making a 'Enemy Wave 1' container listing the enemies as subjects. Now you can link it to the CTRL and the ATTA. These types of fixes are the biggest param saver.

Finally, once you're completely 100% finished with a script, and you no longer _need_ to be able to read and follow it quickly and fluidly (we often name map actions so that it reads like a book, giving information in the MA name as to what it's doing), remove all your blank spacer organization actions, and then abbreviate everything. "North Thrall Wave 1" (19 param count) vs "NT W1" (5 param count). If you really have maxed out the Map Actions, you can probably do this to something like 900 lines of script and save a few thousand params.

Using all these methods when I had maxed out param count, I managed to salvage something like 16000.


And of course, there's often more than 1 way to script the same outcome, there might simply be more efficient ways to test and execute what you're trying to test and execute. If you've got repeating sections of script that you think could be done cleaner, just ask and we might be able to make some suggestions. Obviously that is the biggest and best param saver... deleting actions entirely. :)

Re: [Poll] Raising the Limit on Active Units

Posted: Sat Jun 07, 2014 7:59 pm
by fildred13
I appreciate the input. Thankfully, I do everything you mention already, so it seems my practices are sound, which is nice. No need to go about a massive refactoring =P.

I think I'm doing most of the stuff as efficiently as possible. I have tons of mungers to reuse whole platoons with just changed out groups of units and stuff - I try to keep my MA and PARAM ratios even - so if I've used 50% of the MA, I target having also used 50% of the PARAMS.

I do have a few sections that - I BELIEVE - are done as efficiently as possible, but I'll start a thread or two about them soon. Mostly recreating Netgame types in single player (Which would be alleviated with a flag to allow teams with no player to still spawn and score in a net game! 1.9, eh? EH!?) I'll see what you guys think of my code though when I get around to doing a write up on what I have so far.

I appreciate the suggestions, though!

Re: [Poll] Raising the Limit on Active Units

Posted: Thu Jun 19, 2014 11:37 pm
by Gmork
A bit late.