I'm really pissed off now... ok Hive Keeper is a huge project but I continue to find stupid editor limits that block my work every time.
I recently worked on a new UI so you can imagine I created a bunch of long scripts. I did it in an empty map to work faster and then I copied all the triggers inside the Hive Keeper map... just to discover this nice error: script load failed: execution took too long
It seems related to the amount of triggers inside the map and not to the triggers running at initialization (I tried disabling all of them).
Even disabling all of this new triggers I added I still get the error. Deleting all of them the map to works again...
I didn't even reach the 2MB triggers file limit :(
So my questions are:
- Do you know more details about this?
- Do you know how can I fix it?
- If I decide to move some triggers into a mod, will I still get the error?
@zenx1
As I said it's not related to the running triggers because I tried disabling all of them. It seems that just having a lot of scripts makes the whole trigger system crash on map initialization.
Well you could try to paste like half of the new triggers and see what happens. If it still crashes perhaps try to paste like 1/4th and try to figure out slowly whats going on... :/
You have still a lot of space for triggers left. As an example I post my map's stats:
uncompressed Triggers: 25.5 mb
compressed Triggers: 3.95 mb
MapScript uncompressed: 1572 kb
My map is still working fine.
There is an uncompressed map script limit of 2mb (ask DarkRevenant and his mafia map for more details).
I guess that your map script should be around 600kb. You can check it out by opening your map with a mpq editor like winMPQ.
You really got a confusing error there... I fear you found an error in the engine...
I encountered this error on several occasions, usually when messing around with initializer functions in plain galaxy script. For me, it was human error in 100% of the cases, usually infinite loops or invalid parameters.
I cannot tell you much more without a look at the specific triggers causing the problem. Try to nail it down further; gradually delete triggers, until the problem disappears.
I already encountered this error when running too many scripts at map initialization, in fact I had to split them in more scripts adding a wait timer.
BTW as I said this is NOT related to execution but only to the amount of scripts inside the map. Maybe the editor tries to initialize disabled triggers too, who knows :|
@Ahli634
In my first post I already attached my overview of triggers and the file size is 1,2MB. BTW how did you manage to go over the 2MB limit?
The trigger size that you can see in the editor is the GUI trigger file which will be deleted, if you publish the map as a locked map. The real trigger size is the MapScript.galaxy file in the map's mpq.
The 2MB .galaxy file limit is a bug in the game, not a true limitation. There is another 2MB limit (the real limit) for actual interpreted script size, but it's very hard to know what that size really is. It's possible that Bibendus managed to exceed that already, though it's very unlikely. It took me until my unoptimized .galaxy was around 2.3MB before I ran into the true limit.
If your .galaxy is over 2MB, ask me and I might be able to give you a copy of the program my friend made to optimize it. It does not break compatibility with the editor; you can open and edit triggers at will, but doing so will reset the optimizations.
If your .galaxy is over 2MB, ask me and I might be able to give you a copy of the program my friend made to optimize it. It does not break compatibility with the editor; you can open and edit triggers at will, but doing so will reset the optimizations.
The problem is that the map won't start without running the optimizer first, this slow down tests a lot.
BTW I managed to reduce the amount of triggers to find the limit on my map.
This is a screenshoot of the triggers list that causes the initialization to fail
As you can see the trigger content is disabled.
Then I just removed the disabled function call and it works
The bug is related to the GUI somehow... so I tried to play with the triggers file but I found opposite results so I need more time to figure it out.
Well, I think I found it!
The problem is located in the first rows of the MapScript.galaxy file!
The function call you can see in the previous screenshot (Move Dialog Item In Grid) requires the campaign library.
Beeing the only function I use from this mod, it seems that the editor decided to include it in the map initialization even if the function call was disabled.
So what should I do now to make it work while continuing to use grid function?
I'm really pissed off now... ok Hive Keeper is a huge project but I continue to find stupid editor limits that block my work every time.
I recently worked on a new UI so you can imagine I created a bunch of long scripts. I did it in an empty map to work faster and then I copied all the triggers inside the Hive Keeper map... just to discover this nice error:
script load failed: execution took too long
It seems related to the amount of triggers inside the map and not to the triggers running at initialization (I tried disabling all of them).
Even disabling all of this new triggers I added I still get the error. Deleting all of them the map to works again...
I didn't even reach the 2MB triggers file limit :(
So my questions are:
- Do you know more details about this?
- Do you know how can I fix it?
- If I decide to move some triggers into a mod, will I still get the error?
You sure you dont have while loops with no wait?
Since I sometimes forgot to add waits and right contditions so its endless none waiting loop that causes same error.
@Bibendus: Go
whats the script about; if its possible can u post the triggers here?
Either try and optimize your MapScript.galaxy file (not manually, youll go insane), or take a look at the main function in your MapScript.galaxy.
Optimizing usually breaks the map for the editor, so make sure you have copies.
See if the main function is very long, or performs very intensive actions. If so, try and offload stuff to other threads.
@zenx1
As I said it's not related to the running triggers because I tried disabling all of them. It seems that just having a lot of scripts makes the whole trigger system crash on map initialization.
@Zolstice
It's a simple list of trigger I used to make the UI you can see here:
http://www.sc2mapster.com/maps/hive-keeper/forum/23144-dungeon-keeper-research-mechanic-change/
Nothing special and it works in its standalone map.
BTW, I repeat, the error is given even with these triggers disabled, I'm forced to delete them to make the map work again
@Deaod
I can't affort to run an optimizer each time I want to test my map, that would greatly increase the development time.
BTW anyone knows what happens if I move some triggers to a mod? Will the trigger size / load time limit be the same?
Well you could try to paste like half of the new triggers and see what happens. If it still crashes perhaps try to paste like 1/4th and try to figure out slowly whats going on... :/
You have still a lot of space for triggers left. As an example I post my map's stats: uncompressed Triggers: 25.5 mb compressed Triggers: 3.95 mb MapScript uncompressed: 1572 kb My map is still working fine.
There is an uncompressed map script limit of 2mb (ask DarkRevenant and his mafia map for more details). I guess that your map script should be around 600kb. You can check it out by opening your map with a mpq editor like winMPQ.
You really got a confusing error there... I fear you found an error in the engine...
I encountered this error on several occasions, usually when messing around with initializer functions in plain galaxy script. For me, it was human error in 100% of the cases, usually infinite loops or invalid parameters.
I cannot tell you much more without a look at the specific triggers causing the problem. Try to nail it down further; gradually delete triggers, until the problem disappears.
I already encountered this error when running too many scripts at map initialization, in fact I had to split them in more scripts adding a wait timer.
BTW as I said this is NOT related to execution but only to the amount of scripts inside the map. Maybe the editor tries to initialize disabled triggers too, who knows :|
@Ahli634
In my first post I already attached my overview of triggers and the file size is 1,2MB. BTW how did you manage to go over the 2MB limit?
I thought the 2MB limit had nothing to do with the actual trigger file, but with the amount of used variables and stuff?
The trigger file itself is obsolete anyway. You can delete it and still publish and play the map.
@Bibendus: Go
The trigger size that you can see in the editor is the GUI trigger file which will be deleted, if you publish the map as a locked map. The real trigger size is the MapScript.galaxy file in the map's mpq.
The 2MB .galaxy file limit is a bug in the game, not a true limitation. There is another 2MB limit (the real limit) for actual interpreted script size, but it's very hard to know what that size really is. It's possible that Bibendus managed to exceed that already, though it's very unlikely. It took me until my unoptimized .galaxy was around 2.3MB before I ran into the true limit.
If your .galaxy is over 2MB, ask me and I might be able to give you a copy of the program my friend made to optimize it. It does not break compatibility with the editor; you can open and edit triggers at will, but doing so will reset the optimizations.
The problem is that the map won't start without running the optimizer first, this slow down tests a lot.
BTW I managed to reduce the amount of triggers to find the limit on my map.
This is a screenshoot of the triggers list that causes the initialization to fail
As you can see the trigger content is disabled.
Then I just removed the disabled function call and it works
The bug is related to the GUI somehow... so I tried to play with the triggers file but I found opposite results so I need more time to figure it out.
Does anyone have an idea of what's happening? :|
Take a look at the generated map script, especially the InitMap() function and how much stuff is processed in there.
Well, I think I found it!
The problem is located in the first rows of the MapScript.galaxy file!
The function call you can see in the previous screenshot (Move Dialog Item In Grid) requires the campaign library.
Beeing the only function I use from this mod, it seems that the editor decided to include it in the map initialization even if the function call was disabled.
So what should I do now to make it work while continuing to use grid function?