trigger limit
Jan 6 2009, 10:30 pm
By: Toothfariy  

Jan 6 2009, 10:30 pm Toothfariy Post #1



if i end up with 5250 triggers when im done with my map, will my map even function? like will it be extremely laggy or will like some triggers not fire?
and is there a limit to the number i have?
and would i need to increase the number of hyper triggers i have in order for it to effect all triggers?

obviously, i would not be using trigger comments as it would go well over my the string limit in SCMDraft, but is there a point where the game itself wont support that amount of triggers?
or is the supportable limit really 653366 that SCMDraft supports, just what about the game? has anyone ever gotton to that point?



None.

Jan 6 2009, 10:33 pm Vrael Post #2



I seriously doubt 5250 triggers will cause any problems, EXCEPT with the locations and string limits. String limit is supposedly 1024 strings, or 65535 characters. This can cause problems. The location limit, depending on your map, you may run out. That limit is 255 locations. However, actuall number of triggers shouldn't affect the map. In my map I'm currently at 1725 or so and haven't had any problems, and apparently TuxedoTemplar's Astrogears and Rush had some crazy high number of triggers in the 10 thousands or something, and Ahli is making a map with thousands as well. You should be fine as long as you don't run out of strings or locations.

Edit: You won't need more hyper triggers, but it may cause lag, depending on your triggers. If you have a bazillion triggers which have "preserve trigger" and run every cycle, that will cause lag. Certain actions, like Kill Unit, Create Unit, Order, and other things like that also can cause lag.



None.

Jan 6 2009, 10:37 pm Morphling Post #3



Scmdraft supports 30,000 triggers according to Ahli. Starcraft can support an amount that no one could ever reach.
Actions dealing with units; give, create, kill, move, and order may cause lag if used constantly or a lot.
It also helps if you have a lot of triggers to put the conditions that will most likely not happen first.
If it still lags then you could set hyper triggers waits from 0 to 100. This will cause the triggers to run half as fast, i think. Although if you have any death counter timers then it will mess up a little.



None.

Jan 6 2009, 10:51 pm Toothfariy Post #4



mmmk...

so the majority of the triggers i have in mind will have a preseve trigger on them
a trigger will use a create/kill function to make an explosion and it will be used very heavily
im not exactly sure of the number of triggers im going to need to use but i know theres guna be a lot
i estimate about 1500ish, and the majority of them will deal with death counters


also, my map is a defense map, so its going to have a lot of units being created

will this cause an unpleasent amount of lag?



None.

Jan 6 2009, 11:07 pm ClansAreForGays Post #5



I think you could have a thousand dc triggers firing every milisecond w/o lag. It's the creation/killing en mass that causes the lag. Although I think at around 5k you might see some slow down from all the conditions being checked.




Jan 6 2009, 11:49 pm NudeRaider Post #6

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Im defense maps you usually don't create units every trigger loop. You only experience lag from that if you really do that all the time or really many at once. Just spread the creation, like 100 per trigger loop and you're fine.




Jan 6 2009, 11:56 pm Toothfariy Post #7



okay

i have another question, a little off topic

but the action "modify unit hp" can u make it so it subtracts the percentage insted of setting it?

what i want to do is have a trigger that can weaken a unit when its brought to a location, then if the unit ends up at the same location again, it is weakend once again and if it subtracts enough hp, it just dies?
and i want to do this on a large scale for a defensive map, so a virtual hp system wouldn't work very well



None.

Jan 7 2009, 12:11 am NudeRaider Post #8

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

This isn't possible without EUD actions which were patched in 1.14.

You gonna have to do a workaround, like physically hitting the units.
Have a location where lurkers are attacking something, then move the units there for some time until they received enough damage, then move them back.
Or, if possible set up this lurker trap in the location you want to have it happening.

Oh and next time please just make a new thread. It's not like it would be a lot of work or something.




Jan 7 2009, 12:14 am Toothfariy Post #9



alrighty

i just didnt wanna make a new one cuz i have like 10 threads posted with various questions
i didnt want the list to say toothfariy the whole way down



None.

Jan 7 2009, 12:21 am NudeRaider Post #10

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from Toothfariy
alrighty

i just didnt wanna make a new one cuz i have like 10 threads posted with various questions
i didnt want the list to say toothfariy the whole way down
Still it's better. When people search for answers to similar question then it's better organized




Jan 7 2009, 9:07 pm Wormer Post #11



On the topic. Astrogears Mk I v3 has got 6106 triggers and barely lags. Astrogears Mk II BETA 2b has got 7807 triggers but the lag is noteable. Of course much depends from the triggers' content but I think that number is also essential. I personally think that the practical high bound on number of triggers is about 10 000.

My observations are based on the folowing fact. Some time ago I decided to create a map with a little more than basic death counter computations. I was not bothered with number of triggers and ended up with a map where I had something like 20 thousands triggers and it lagged like a hell. Of course I haven't created all triggers manually, but used an extended triggers replication tool with which I must have already pestered all of you. Though there *are* numerous triggers that are giveing units between players, but they are *not* executed every trigger loop. Most of triggers in my map are dealing with death counters.

After this sad experience I reduced the number of triggers to 14 thousands and it became better but still was impossible to play. From this I've made a conclusion that many triggers *could* lag the game even if most of them are only checked but not executed. Also I ended up with an idea that even a little more complicated computations with DCs wich work fine in demo maps could not be implemented practically in any real scale map.

One more thing to note. When you are dealing with so many triggers their quantity starts to influence the map size. That map where I have 14k triggers is an 1mb map (no sounds), and more than half of the map size is occupied by triggers. I want to emphasize that I was dealing only with almost basic DCs computations... If one set himself an idea of making a map with complex computations he probably will end up with tens of thousands of triggers and his map size would be amounting in megabytes.

Code
MapStats v1.0  by O)FaRTy1billion

Filename: **********
MPQ Size: 1047542 B   CHK Size: 34799564 B
Version:  Brood War   Tileset: Jungle World
Humans: 5   Computers: 3   Dimensions: 256x256
Units:         1252 / 1700  ( 73%) [   45072 B]
Doodads:         56                [     224 B]
Sprites:         13 / 500   (  2%) [   45072 B]
Strings:        131 /  1024 ( 12%) [    4522 B]
CUWP Slots:       4 / 64    (  6%) [      64 B]
Locations:       26 / 256   ( 10%) [    5120 B]
Triggers:     14217                [34120800 B]
Briefings:        1                [    2400 B]
WAVs:       Section not found.     [       0 B]





Jan 7 2009, 9:56 pm Toothfariy Post #12



dang! well i dont think il hit near that number

but now u said u have a trigger replicator tool? i would definatly like to get my hands on somthin like that

like what exactly does it do and where do i get one?



None.

Jan 7 2009, 9:59 pm Morphling Post #13



Wormer what map were you working on? There is most likely a more simple way to do whatever you tried to accompish in your map.
Edit: Also i found that moving a lot of locations constantly to different area's can cause some lag if.
Edit: Here is the program.

Post has been edited 1 time(s), last time on Jan 7 2009, 10:06 pm by Morphling.



None.

Jan 7 2009, 10:13 pm poiuy_qwert Post #14

PyMS and ProTRG developer

Actually, I think he was talking about MacroTriggers, a neat way to make triggers easier that i'm sad was never picked up by mappers.




Jan 8 2009, 3:27 am NudeRaider Post #15

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Here are more Trigger Duplicators.
Remember to manually fix the links: Replace "www.maplantis.org" with "www.staredit.net/maplantis"




Jan 8 2009, 3:56 am NudeRaider Post #16

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from Wormer
On the topic. Astrogears Mk I v3 has got 6106 triggers and barely lags. Astrogears Mk II BETA 2b has got 7807 triggers but the lag is noteable. Of course much depends from the triggers' content but I think that number is also essential. I personally think that the practical high bound on number of triggers is about 10 000.

More examples

Quote from name:Mayor
22:39| devilesk: From my texas hold'em poker map showcase topic:

Quote
Map Stats

Tileset: Jungle
Map Dimensions: 64x64

Players: 6
Computers: 2
Trigger Count: 8531
String Count: 1558
Unit Count: 469
Location Count: 118
Sprite Count: 42
WAV Count: 152 (virtual SC sounds)

I have not included the playing cards mod.
Current v1.09 filesize after Ube2 compression is 497kb.
22:39| devilesk: post that
22:39| devilesk: or quote me
22:40| devilesk: in this topic http://www.staredit.net/topic/5765/
22:40| devilesk: because im suspended :P
22:41| devilesk: also refute wormer's post
22:41| devilesk: because my texas hold'em poker map makes extensive use of
22:41| devilesk: dc counter manipulation
05:49| devilesk: also note that the sounds in the map are all virtual


Post has been edited 1 time(s), last time on Jan 8 2009, 5:36 am by NudeRaider.




Jan 8 2009, 4:12 am Toothfariy Post #17



dang, with 150+ sounds, im pretty sure that'd create an incredible amount of lag wouldnt it?



None.

Jan 8 2009, 4:19 am NudeRaider Post #18

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Sounds hardly cause lag since sc can't play more than 8 (i think) voices at a time anyway.

Sounds simply increase map size, which causes longer dl times.




Jan 8 2009, 4:23 am Roy Post #19

An artist's depiction of an Extended Unit Death

Sounds don't create lag; it would just take a long time to download (Unless it's from the wav list out of the SC mpqs).

Nude beat me to it... I shouldn't have read the whole thread and then post without refreshing :P




Jan 8 2009, 4:34 am Toothfariy Post #20



ah

well its been a long time i since i played on a map with sound

cant u compress sounds to make them virtually sizeless tho?



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[06:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[04:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[2024-4-27. : 3:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
Please log in to shout.


Members Online: porteredavila