I am currently working on a level that requires about 850 lines of script, and Myth II is making it painfully clear to me that it doesn't like that amount. Each individual piece of script works, but when I run the whole level things start going wrong. Antero says that a level shouldn't go over 700 lines, but that it can be done. Does actual line count matter, or is it only based on how many actions are running at a given time? Would it help to delete blank spacer actions and organizational text lines? Would it help to have some Mungers that delete a whole bunch of opening actions that are no longer in use? Is there anything non-script related (object counts, etc) that might cut down on the problem? Any other suggestions? I really can't afford to just remove a couple hundred lines of script.
Any help would be appreciated.
A-Red
EDIT: In case it helps, here's the Antero log:
There are 855 map actions, of which:
53 are Organisational Text
60 are spaces
NONE = 71
ACLI = 26
ATTA = 154
CTRL = 101
ENDG = 2
GENE = 7
GEOM = 92
GIRL = 8
MOEF = 8
MOMA = 22
MOVT = 18
MUNG = 24
OBMO = 15
PLAT = 13
PLMO = 13
SOUN = 32
SQUA = 44
TUNI = 33
MEAN = 4
ANIM = 2
Now for warning messages (if any):
Unknown statement 'Uncontrollable', line 338
Unknown statement 'true', line 339
Unknown statement 'Switch Artifact', line 1810
Unknown statement 'null', line 1811
Unknown statement 'Received User Control Flag', line 2290
Unknown statement 'true', line 2291
NONE 'Peasants All', line 2383, list '(subj, monster_identifier)' has more than 32 members.
Unknown statement 'Tests for Idle Monsters', line 2659
Unknown statement 'Received User Control Flag', line 2861
Unknown statement 'true', line 2862
Unknown statement 'Received User Control Flag', line 2955
Unknown statement 'true', line 2956
Unknown statement 'Received User Control Flag', line 3122
Unknown statement 'true', line 3123
Unknown statement 'Timid Flag', line 3861
Unknown statement 'true', line 3862
Unknown statement 'Timid Flag', line 4186
Unknown statement 'true', line 4187
Unknown statement 'Timid Flag', line 4559
Unknown statement 'true', line 4560
Unknown statement 'Timid Flag', line 4897
Unknown statement 'true', line 4898
Unknown statement 'Timid Flag', line 6780
Unknown statement 'true', line 6781
Unknown statement 'Timid Flag', line 7110
Unknown statement 'true', line 7111
Unknown statement 'Timid Flag', line 7296
Unknown statement 'true', line 7297
Unknown statement 'Timid Flag', line 7794
Unknown statement 'true', line 7795
NONE 'West Gate Enemy', line 200, is never referenced.
NONE 'North Gate Enemy', line 218, is never referenced.
Your script identifies 425 units in total.
Scripting Limitations - Too good for the Myth engine
removing spacing and organisational text will help, as will deleting the opening script lines.
if you can track him down and corner him on hotline, khellek might be able to give you a few pointers about using mungers for more complicated script-reducing purposes (things like re-using actions by replacing parameters, etc.).
if you can track him down and corner him on hotline, khellek might be able to give you a few pointers about using mungers for more complicated script-reducing purposes (things like re-using actions by replacing parameters, etc.).
*toot*
if i remember correctly something khellek told me when he was working on siege, then by my guess, no. the actual situation was different - he was replacing a very large number of parameters and such-like - but the principle is the same. there probably is in fact a limit (some power of two, perhaps), and if so perhaps myrd or cik can find it and tell you. my guess is that it's reasonably high, though.
*toot*
A-Red, here's a warning about too many map actions that I doubt will make you happy. As you know, somewhere after 680 map actions, things can start to break. But even worse [than it being merely the more map actions, the more likely it totally breaks] being just over the safe limit means it can work most of the time, but still break occasionally. I've had a map with just under 700 map actions work fine, but mb one in every thirty tests, the script would start doing bizzare things like triggering events out of order. Eventually I had to find ways to condense the script down to 681 map actions to insure stability.
On a positive note, as lank suggested, using MUNG to re-use map actions by swapping parameters can be a huge space saver if you're doing a lot of repetative scripting. Crack open Mazz 4 for some good examples of how scores of waves of monsters can all be scripted to attack using only a few ATTA actions.
Good luck.
On a positive note, as lank suggested, using MUNG to re-use map actions by swapping parameters can be a huge space saver if you're doing a lot of repetative scripting. Crack open Mazz 4 for some good examples of how scores of waves of monsters can all be scripted to attack using only a few ATTA actions.
Good luck.
I had been planning to implement the parameter-swapping at some point, in order to free up more space to do some of the things I've really been wanting to do with this level (enemy AI and some other interesting stuff). I've got a pretty good idea how to do it (and if not I know who to ask). But right now, I'm just happy that I can play it all the way through. That makes it easier to leave it for awhile, do some less harrowing scripting, and then come back to it.
A-Red
A-Red