Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: 1.19 and trigger cycles
1.19 and trigger cycles
Aug 1 2017, 1:01 pm
By: KimsKams  

Aug 1 2017, 1:01 pm KimsKams Post #1



Hey gents,

so we are playing on this ww2 map. Years ago i patched an anticcmu into the map. It works like that:
Constantly tries to place 20 burrowed drones.
If managed to do so, sets a switch.

Now before a player receives reinforcement, a (second) trigger checks if the "no ccmu"-switch is set, removes those 20 drones, sets a switch รก la "currently reinforcements happen"
Only if this switch is set, the reinforcements will actually happen.

Thing work flawlessly, but now with 1.19 we experience weird delays in when triggers happen. It appears like starcraft skipped on certain trigger cycles or something like that. All kind of weird bugs happen in this regard.

Did someone else experience similiar? Is this a known issue?

many thanks in advance!

-KimsKams



None.

Aug 1 2017, 1:38 pm jjf28 Post #2

Cartography Artisan

I haven't seen this issue in 1.19 specifically, but if it's not due to a version difference then wait blocks (due to wait/transmission actions) would be the likely culprit - are you using those actions at all?



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Aug 1 2017, 4:04 pm KimsKams Post #3



I deleted all wait actions apart from the hypertriggers.
The interesting thing is that the anticcmu works worse on 1.19 then it has worked for years on 1.16.
An observation that I have made was that games with a lot of lag (+ eventually pauses and save games) is more likely to have the anticcmu not working properly. So I figured that in these scenarios starcraft might interrupt trigger cycles.



None.

Aug 2 2017, 9:52 am Veta Post #4



When a countdown timer reaches 0:00, a wait cycle is triggered. You can get around this by resetting a countdown before it reaches 0:00.



None.

Aug 4 2017, 8:23 am KimsKams Post #5



Quote
When a countdown timer reaches 0:00, a wait cycle is triggered. You can get around this by resetting a countdown before it reaches 0:00

wow, is that actually true, I actually am under the impression that triggers shortly after the reset of the countdown timer (which is 5 mins) are more affected than later ones.
what would be the most reliable method to restart the countdowntimer at something like 0,05 seconds?



None.

Aug 4 2017, 1:32 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

Not possible. Countdown timer decrements only in full seconds (game time). So you detect when countdown timer = 1s.




Aug 4 2017, 1:49 pm KimsKams Post #7



but i could so something like
trigger 1
-if countdowntimer at most 1 sec
-if deathcount x at max 8
--> add 1 to deathcounter x
--> preserve trigger

trigger 2
if deathcount x at least 8
--> reset countdown timer

(while using hypertriggers which should excecute the cycle 12 times per second?)

right?
But what i am mostly interest in is, wehter or not countdowntimer at 0 actually causes wait blocks.



None.

Aug 5 2017, 12:17 am Tassaar930 Post #8



1) Zero-wait hypered trigger cycle interval is 8 (cycles) per game second.
2) Countdown timer probably doesn't cause wait blocks but I don't actually have total verification of this
3) I've noticed that SC seemingly fails to update unit owner properties properly between sequential trigger execution. It seems to be a very rare bug, and the weird thing is, if I recall correctly the same bug also appeared as present on 1.16 (I downgraded to test). I don't think I've missed anything in my code, so if that's the case, then it's an engine bug. It still doesn't account for why it all of a sudden seems to happening a lot more in 1.19 now though. edit: so if it really is new to 1.19, then there could be other bugs with triggersequencing - most probably inferentially linked to very fast (hypered) trigger cycles.



None.

Aug 5 2017, 2:07 am jjf28 Post #9

Cartography Artisan

It would be nonsense for a countdown timer to cause a wait block, at worst I see it causing an early trigger cycle (hypers run every 2 frames, if your timer happened to end on an odd frame it could mean your trigger cycle would be 42ms early, or as much as 1218ms early if on normal trigger cycles). Still, I always stop the countdown timer before it ends cause paranoia about random bugs cropping up with timers and whatnot.



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Aug 5 2017, 8:13 pm KimsKams Post #10



I'll just post my entire anticcmu trigger system. If one of you aweseome guys likes riddles it would be great if we could brainstorm what causes the errors ;-)

CCMU-detection part (p8 = computer)
//-----------------------------------------------------------------//

Trigger("Player 8"){
Conditions:
Bring("Player 8", "Drohne (Zerg)", "Anticcmu", At least, 20);

Actions:
Set Switch("Switch50", set);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 8"){
Conditions:
Bring("Player 8", "Drohne (Zerg)", "Anticcmu", At most, 19);
Switch("Switch51", not set);

Actions:
Set Switch("Switch50", clear);
Remove Unit At Location("Player 8", "Drohne (Zerg)", All, "Anywhere");
Create Unit with Properties("Player 8", "Drohne (Zerg)", 20, "Anticcmu", 3);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Triggers/reinforcement part:
//-----------------------------------------------------------------//

Trigger("Player 6"){
Conditions:
Elapsed Time(At least, 4000);
Switch("Switch50", set);

Actions:
Remove Unit("Player 8", "Drohne (Zerg)");
Set Switch("Switch50", clear);
Set Switch("Switch51", set);
}

//-----------------------------------------------------------------//

Trigger("Player 6"){
Conditions:
Elapsed Time(At least, 4000);
Switch("Switch51", set);
Command("Player 8", "Drohne (Zerg)", At most, 0);

Actions:
Center View("ZRussian Tank");
Create Unit("Player 6", "Belagerungspanzer (Terraner) (Panzermodus)", 12, "ZRussian Tank");
Display Text Message(Always Display, "\x007More Tanks have been produced for the war with Germany.");
Set Switch("Switch51", clear);
}

//-----------------------------------------------------------------//

So the system simplified is like this:
-If computer was able to place 20 drones --> switch50 set (=no ccmu present).
-before reinforcments get placed: if switch50 is set -> remove all drones, clear switch50, set switch51 (=currently processing a trigger - do not replace drones!)
-if switch51 is set --> place the reinforcments, clear switch51.

Alright, now the weird thing is, that from time to time - like in 15% of the games - a trigger/reinforcement does not occur when it should - despite no ccmu being present.
Particularities I have observed about this:
- The reinforcement most of the times happens at a later stage of the game (usually when another reinforcement gets processed). This can take up to 10 mins (delay).
- The Anticcmu system - also after having missed 1 reinforcement - continues to work just fine. Other reinforcements get processed as the should.
- I am under the impression that reinforcement nearly exclusively of players with a higher number (5,6,7) are effected.
- There is no consitency which triggers are effected.

Do you think I should slow down the hypertriggers?
Would be really grateful for every piece of advice you guys could provide me with! Thank you very much



None.

Aug 6 2017, 6:46 pm KimsKams Post #11



so one though i had: In the exceution of the reinforcements (second part above) it is not only a condition that switch51 is set, it also is a condidtion that p8 commands 0 drones. From what i have read it is possible that the commands unit count doesnt update properly. but then switch51 keeps being set, so that the trigger should excecute once the correct unit amount gets read...



None.

Aug 6 2017, 8:17 pm Ahli Post #12

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

Take what I am writing with a grain of salt as I stopped creating SC1 maps in 2010. However:

AfaIk, commands condition can be delayed (-> Commands is not necessarily true when brings is true within the same trigger update. But the scenario that I remember was units completing training).

Also, you should keep in mind the trigger execution order using the player numbers: p1,2,3,...,7,8.
Thus, p8 setting the switch50 can be insufficient. Between p8 setting switch51 and p6 spawning reinforcements, a few units could have spawned as the check appeared one hypertrigger execution before.
Potentially, the delay is wanted in case removing the drones does not instantly make the unit slots usable in the same trigger update run.

I would try to create/check/remove units in triggers for all players that have reinforcements which are located above all reinforcement triggers. Thus, the check and the spawn are executed in the same update cycle.
For performance reasons, the check is ideally only executed when necessary (= when reinforcements should be spawned for a player).




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[06:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[06:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[06:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[06:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
[06:48 pm]
Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
[06:47 pm]
Vrael -- Do you know anyone with a deep understanding of the unique characteristics of your carpets, ensuring they receive the specialized care they deserve?
[06:45 pm]
NudeRaider -- Vrael
Vrael shouted: I've also recently becoming interested in Carpet Cleaning, but I'd like to find someone with a reputation for unparalleled quality and attention to detail.
beats me, but I'd make sure to pick the epitome of excellence and nothing less.
[06:41 pm]
Vrael -- It seems like I may need Introductions to multiple companies for the Topics that I care deeply about, even as early as Today, 6:03 am.
[06:38 pm]
Vrael -- I need a go-to solution and someone who understands that Carpets are more than just decorative elements in my home.
Please log in to shout.


Members Online: Roy