Questions on Mechanics of Maps & Trigs

Post Reply
Kidz.Gone.Wild
Terran Settler (Unemployed)
Terran Settler (Unemployed)
Posts: 3
Joined: Sat May 31, 2008 2:57 pm

Questions on Mechanics of Maps & Trigs

Post by Kidz.Gone.Wild »

Thanks to everyone for all the help on the last questions.
I have a few questions on general map mechanics and how things run.
I really do appreciate the support of the forum and all the time it takes to help people with their maps. :)

I know alot of these questions are pretty generic, is there a manual or text file someplace that teaches all the details for map edit and mechanics? Also on some of these I can make a pretty good educated guess, but I would like expert advise and certainty.

Just to note: I'm using absolutely no 'Wait' states anywhere in the map I'm working on. Also, it is not a campaign or total mod but a very fast paced multi-player online game.

1) It was mentioned (by Meta in last post) that I should be more concerned about string limits than trigger limits. Does this mean the custom added text within the map? Does this mean all text, custom unit names, comments on triggers, switch names, location names, etc? Does custom text cause a map to run slower? Would the map run faster if I went through and removed all the custom text?
And, on a side note. What's the deal with custom switch names? SCMdraft says something about changes being irreversible, but then it allows one to reset the switch name to default.

2) If there is a trigger that runs on a time cycle using a 'Death Count Countdown' and within that time cycle there is 1 trigger that has a long series of Conditions, and 9 triggers with a few Conditions each, and the time cycle starts at 6 and counts down to 0 Always. I am thinking that this may cause a slow motion effect since the computer has to check all these conditions on a frequent cycle (especially if using hyper triggers)?

3) [Always]  [Kill all terran control tower for current player]
&
[Current player commands at least 1 terran control tower]  [Kill all terran control tower for current player]
&
[Current player brings at least 1 terran control tower to location]  [Kill all terran control tower for current player]

Will 1 of these triggers run with less system load than the others? My thinking is that the [Always] condition may cause more system load because the computer is always looking to run that trigger even when the conditions of a control tower present aren't met. While the others will let the computer destroy control tower only when the control tower is present. But the 2nd set may cause more system load because the computer has to continually check if the player has a control tower.
Basically the question is, does the [Always] condition cause more system load or does a more complex condition cause more system load?

4) I know 'Wait' states can have unusual effects in a map and that they stack. So far I have absolutely no wait states anywhere in the map. The question is, if I have a trigger that has no 'preserve trigger' action and 1 short 'wait' state. Such as displaying a single text at start of map. Will the presence of that single non-preserved wait state affect anything else in the map ever? In general I'm afraid of wait states and try not to use them ever.
Especially, does that single non-preserved 'wait' state have any affect on the hyper trigger trick?

5) Do triggers with no 'preserve trigger' condition have any affect on system load or the trigger cycle after they have run (besides taking up string space)? Does the computer run through that trigger later and disregard it or does it actually vanish after being run?

6) It seems as if a single location can be in multiple places at once, or does it just move really fast?

7) Is it possible that computers with slower CPU's might have problems playing maps with the hyper trigger trick?
Would a 'Comment' in the place of 1 [wait for 0 milliseconds] condition in each of the 3 hyper triggers affect the effectiveness or function of the hyper triggers?
User avatar
Lavarinth
Xel'naga Administrator
Xel'naga Administrator
Posts: 6539
Joined: Wed Aug 16, 2006 5:21 pm
Location: His Ashworld Planet

Re: Questions on Mechanics of Maps & Trigs

Post by Lavarinth »

1) String limits accounts for every line of text. That includes unit names, spells, locations, triggers, transmissions, etc. Unless your map maxes out on locations, I highly doubt you'll reach this limit. Text should not cause your map to run slower, not that I've noticed at least. I'm not sure what you mean by "custom" text. If colored, that makes no difference. If you removed all text/custom text, it'd make it pretty difficult for the player to understand what they're supposed to do. As for your side note, I haven't messed with SCMdraft, but I believe it has a manual trigger editor where you can type in things yourself instead of using the premade triggers. If you edit a switch name, it probably will not edit the name in the manually entered triggers.
- - Lavarinth
Campaign Creations Administrator
User avatar
Meta
Xel'naga World Shaper
Xel'naga World Shaper
Posts: 431
Joined: Sat May 19, 2007 3:21 am
Location: Belo Horizonte, Brazil

Re: Questions on Mechanics of Maps & Trigs

Post by Meta »

Kidz.Gone.Wild wrote: Thanks to everyone for all the help on the last questions.
I have a few questions on general map mechanics and how things run.
I really do appreciate the support of the forum and all the time it takes to help people with their maps. :)

I know alot of these questions are pretty generic, is there a manual or text file someplace that teaches all the details for map edit and mechanics? Also on some of these I can make a pretty good educated guess, but I would like expert advise and certainty.

Just to note: I'm using absolutely no 'Wait' states anywhere in the map I'm working on. Also, it is not a campaign or total mod but a very fast paced multi-player online game.

1) It was mentioned (by Meta in last post) that I should be more concerned about string limits than trigger limits. Does this mean the custom added text within the map? Does this mean all text, custom unit names, comments on triggers, switch names, location names, etc? Does custom text cause a map to run slower? Would the map run faster if I went through and removed all the custom text?
And, on a side note. What's the deal with custom switch names? SCMdraft says something about changes being irreversible, but then it allows one to reset the switch name to default.
Renaming switches is ok as far as I know. Strings are, as Lav said, all custom text in the map - unit names, switch names, transmissions, briefing texts and so on. Also any wav files that you import into the map automatically generates a string and it can't be deleted through Staredit. Not sure about Scmdraft being able to delete it though, but Scmdraft is excellent for string editing.

There's also a very evil limit in Starcraft (not Staredit or SCMdraft), the "nooks and crannies limit". I think only a few veterans here will have met this limit during their mapmaking career, but it happens when you make large maps full of tight corridors and mazes.
2) If there is a trigger that runs on a time cycle using a 'Death Count Countdown' and within that time cycle there is 1 trigger that has a long series of Conditions, and 9 triggers with a few Conditions each, and the time cycle starts at 6 and counts down to 0 Always. I am thinking that this may cause a slow motion effect since the computer has to check all these conditions on a frequent cycle (especially if using hyper triggers)?


Not sure about slow motion, but if it's an unit spawning trigger, it could generate them so fast that you'd run out of locations to spawn them. :)

I've no experience with hyper triggers though (the whole concept was popularized after all my maps were already triggered, so... ) so you should ask the experts at Staredit.net or maybe be lucky enough to find one such person here in CC.  ;D
3) [Always]  [Kill all terran control tower for current player]
&
[Current player commands at least 1 terran control tower]  [Kill all terran control tower for current player]
&
[Current player brings at least 1 terran control tower to location]  [Kill all terran control tower for current player]

Will 1 of these triggers run with less system load than the others? My thinking is that the [Always] condition may cause more system load because the computer is always looking to run that trigger even when the conditions of a control tower present aren't met. While the others will let the computer destroy control tower only when the control tower is present. But the 2nd set may cause more system load because the computer has to continually check if the player has a control tower.
Basically the question is, does the [Always] condition cause more system load or does a more complex condition cause more system load?
I don't think it'll lag, the "Always" condition means just "every 2 seconds" (approximately) which is the time it takes for the system to check for conditions. Hyper triggers might have an effect on this though.
4) I know 'Wait' states can have unusual effects in a map and that they stack. So far I have absolutely no wait states anywhere in the map. The question is, if I have a trigger that has no 'preserve trigger' action and 1 short 'wait' state. Such as displaying a single text at start of map. Will the presence of that single non-preserved wait state affect anything else in the map ever? In general I'm afraid of wait states and try not to use them ever.
Especially, does that single non-preserved 'wait' state have any affect on the hyper trigger trick?
As far as I know, hyper triggers make some Waits take infinitely less time than they'd usually take (I tried using hyper triggers in one map and it generated units way too fast - it used a 1 second Wait but units were generated by the dozens in one second). It's pretty ok to use Waits, Transmissions and Centerview (these two also count as "Waits") as long as they don't take place at the same time. Waits may also be employed with no fear of bugs as long as you use different human or computer players simultaneously. Of course these players must not be "rescuable" or have a Defeat trigger assigned to them, and they must also have start locations. :)

My own maps use plenty of "Waits" - it's just about splitting them evenly and not allow them to stack. If you need a sample, download my projects at the main page and check it out. ;) [/shameless self-promotion]
5) Do triggers with no 'preserve trigger' condition have any affect on system load or the trigger cycle after they have run (besides taking up string space)? Does the computer run through that trigger later and disregard it or does it actually vanish after being run?
As far as I know, they vanish after being run once. It's as if the trigger checking thingy only checks for triggers with value "0" (hypothetic number), which is only there if the trigger conditions haven't been met yet or if the "preserve trigger" flag is on (preserve trigger apparently just keeps setting the value to 0 again when the trigger conditions are met). :)

If there's lag, it will get better later on (my old computer was a bitch, it couldn't run some of my own maps at top speed until the end, when the trigger cycle was somewhat emptied out). :)
6) It seems as if a single location can be in multiple places at once, or does it just move really fast?
This is probably done by hyper triggers. With these and "move location" command you can probably center it on several units/buildings throughout the map at an incredibly high speed.
7) Is it possible that computers with slower CPU's might have problems playing maps with the hyper trigger trick?
Would a 'Comment' in the place of 1 [wait for 0 milliseconds] condition in each of the 3 hyper triggers affect the effectiveness or function of the hyper triggers?
Not sure. Once again, you'd have to ask a hyper trigger expert. I believe that slower CPUs might not be able to take full advantage of hyper triggers, though.
User avatar
Lavarinth
Xel'naga Administrator
Xel'naga Administrator
Posts: 6539
Joined: Wed Aug 16, 2006 5:21 pm
Location: His Ashworld Planet

Re: Questions on Mechanics of Maps & Trigs

Post by Lavarinth »

Meta wrote: There's also a very evil limit in Starcraft (not Staredit or SCMdraft), the "nooks and crannies limit". I think only a few veterans here will have met this limit during their mapmaking career, but it happens when you make large maps full of tight corridors and mazes.
*Raises hand as victim.* It was one of my most beautiful maps, too...
- - Lavarinth
Campaign Creations Administrator
User avatar
Revan
Terran Dropship Flight Attendant
Terran Dropship Flight Attendant
Posts: 154
Joined: Wed Dec 26, 2007 11:15 am

Re: Questions on Mechanics of Maps & Trigs

Post by Revan »

2) If there is a trigger that runs on a time cycle using a 'Death Count Countdown' and within that time cycle there is 1 trigger that has a long series of Conditions, and 9 triggers with a few Conditions each, and the time cycle starts at 6 and counts down to 0 Always. I am thinking that this may cause a slow motion effect since the computer has to check all these conditions on a frequent cycle (especially if using hyper triggers)?
Nope. For modern day computers these are nothing, just some binary calculations.

The computer checks every trigger which are still active and execute them if all conditions are met. If there are 5000 triggers then it checks 5000 triggers. With hyper triggers it gets repeated 12 times per second. CPUs are meant to do millions of instructions per second, so yeah.
3) [Always]  [Kill all terran control tower for current player]
&
[Current player commands at least 1 terran control tower]  [Kill all terran control tower for current player]
&
[Current player brings at least 1 terran control tower to location]  [Kill all terran control tower for current player]
In the 2nd and 3rd triggers the computer won't do unnecessary actions so they are better. But the difference in time isn't significant.
Especially, does that single non-preserved 'wait' state have any affect on the hyper trigger trick?
No. It waits for the given time and after that it doesn't do anything.
5) Do triggers with no 'preserve trigger' condition have any affect on system load or the trigger cycle after they have run (besides taking up string space)? Does the computer run through that trigger later and disregard it or does it actually vanish after being run?
Ignores them, I guess. No effect, that's for sure.
7) Is it possible that computers with slower CPU's might have problems playing maps with the hyper trigger trick?
Would a 'Comment' in the place of 1 [wait for 0 milliseconds] condition in each of the 3 hyper triggers affect the effectiveness or function of the hyper triggers?
Yeah, 10 year old computers will have problems. One of my computers is 6-7 years old and it never lagged because of Sc triggers.
Actually the only time it lagged when the screen was full of swarming zerglings once, or on Battle.net but that is the fault of the internet connection.
Signature can be found here.
Post Reply