Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Locked alliances? SCMdraft2
Locked alliances? SCMdraft2
Mar 21 2019, 5:12 pm
By: pallfy  

Mar 21 2019, 5:12 pm pallfy Post #1



Im making a 2v2v2v2 ums, so it allies u with a partner in lobby and in game, but I want to disable re-allying, so your locked to 1 ally the whole game.

Nothing works.

I tried the trigger NEVER:
Player1 Never Set Alliance to Player3 to Ally

That seems to be the only way, but I cant find any variation of it that works.



None.

Mar 21 2019, 6:25 pm Suicidal Insanity Post #2

I see you !

NEVER means the trigger is NEVER run, not that the condition is never allowed to be true




Mar 21 2019, 7:13 pm pallfy Post #3



I wonder what the Set Alliance action is used for then. I guess if a condition is met then you can activate Set Alliance.

But I'm just trying to disable alliance changing, or at least cause a penalty if they do. Set Alliance is a action not a condition so I cant really do that.



None.

Mar 21 2019, 7:26 pm pallfy Post #4



Someone said theres a trigger to constantly unally, I found something about switches.

I tried setting Switch 1 to set when Player 1 is enemy of Player 2.
Then I set Always Set Switch 1.

but this didnt work.

Post has been edited 1 time(s), last time on Mar 21 2019, 7:58 pm by pallfy.



None.

Mar 21 2019, 8:03 pm NudeRaider Post #5

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

Uhm okay, I'll explain a few basic concepts about triggers, just in case. Because triggers do work. Always. So there might be some misunderstanding.

Owner: This player will run the trigger if they are in the game and have not been defeated when it's their turn during their trigger loop. When you have multiple players or forces that own a trigger a copy of that trigger will be created for each.

Trigger loop: Triggers are run periodically. Normally about every 1.5s, or every 84ms with hyper triggers, the whole trigger list will be processed. First Player 1 runs all their triggers, then Player 2 all their triggers and so forth. Gameplay is halted during a trigger loop.

Conditions: If ALL conditions are true, ALL trigger actions will be run in sequence, before the next trigger will be checked. So having Always with other conditions does nothing. It's only useful as a single condition if a trigger is supposed to be repeated all game, or run once at map start. Adding a Never will invalidate all other conditions, as Never will never be true, so that's just a quick tool to disable a trigger for testing.

Actions: Once a trigger loop started, your trigger has valid trigger owner and all its conditions are met, every action will be executed in sequence, and then the next trigger is picked.

Forcing alliances, a few pointers:
- It's important that you disable random start locations in the Forces settings, because otherwise player numbers will get shuffled around.
- You have to repeat the triggers all the time to overwrite any tampering from humans. This is where the condition Always comes into play. Make sure the trigger is preserved. Hyper triggers recommended.
- IIRC setting alliance status unselects units (I might be wrong, so you should test that first). To prevent unnecessary allying you can check if your partner player unallied you via the opponents condition or "enemy brings x [unit] to location x".
- make sure your triggers are not wait blocked. Basically a player may only run at most 1 wait at the same time or their triggers will stop firing. So that means if that player owns hyper triggers that's a ban on any waits. Use death counters for your timing needs.




Mar 21 2019, 8:15 pm pallfy Post #6



Quote from NudeRaider
Uhm okay, I'll explain a few basic concepts about triggers, just in case. Because triggers do work. Always. So there might be some misunderstanding.

Owner: This player will run the trigger if they are in the game and have not been defeated when it's their turn during their trigger loop. When you have multiple players or forces that own a trigger a copy of that trigger will be created for each.

Trigger loop: Triggers are run periodically. Normally about every 1.5s, or every 84ms with hyper triggers, the whole trigger list will be processed. First Player 1 runs all their triggers, then Player 2 all their triggers and so forth. Gameplay is halted during a trigger loop.

Conditions: If ALL conditions are true, ALL trigger actions will be run in sequence, before the next trigger will be checked. So having Always with other conditions does nothing. It's only useful as a single condition if a trigger is supposed to be repeated all game, or run once at map start. Adding a Never will invalidate all other conditions, as Never will never be true, so that's just a quick tool to disable a trigger for testing.

Actions: Once a trigger loop started, your trigger has valid trigger owner and all its conditions are met, every action will be executed in sequence, and then the next trigger is picked.

Forcing alliances, a few pointers:
- It's important that you disable random start locations in the Forces settings, because otherwise player numbers will get shuffled around.
- You have to repeat the triggers all the time to overwrite any tampering from humans. This is where the condition Always comes into play. Make sure the trigger is preserved. Hyper triggers recommended.
- IIRC setting alliance status unselects units (I might be wrong, so you should test that first). To prevent unnecessary allying you can check if your partner player unallied you via the opponents condition or "enemy brings x [unit] to location x".
- make sure your triggers are not wait blocked. Basically a player may only run at most 1 wait at the same time or their triggers will stop firing. So that means if that player owns hyper triggers that's a ban on any waits. Use death counters for your timing needs.


Dear god, it pauses the game.

1.5s is good enough I think.

I have to keep randomized positions, its part of the game.

Can this even be done effectively?

Maybe I can just penalise someone for allying an enemy.



None.

Mar 21 2019, 8:50 pm NudeRaider Post #7

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
I have to keep randomized positions, its part of the game.

Can this even be done effectively?
You can do the randomization through triggers, if predetermined colors are not an issue.

Otherwise I'm not exactly sure how you are gonna determine who is supposed to ally who. An example:
In the editor you put P1 and P2 in Force 1. In the lobby those are the first 2 slots. But in game (I think) the first 2 players might end up being player 3 and 8 or any other player, and thus not even be in the same force, let alone Force 1.

If you figure it out some way you could use the "allies brings unit to location x trigger" to determine the player numbers that are allied, and build your triggers from there. (Hint: That will get messy.)

Or, if you still insist on (automatically) randomized start locations, you could sacrifice the idea that players choose their alliances in the lobby, but that they will be determined in game by the map, or you could even set up a voting system at map start.

Post has been edited 1 time(s), last time on Mar 22 2019, 7:11 am by NudeRaider.




Mar 21 2019, 9:00 pm pallfy Post #8



I think its time to bow out, im not an expert and can only spend a few hours on making a map edit.

Not getting ppl to re-ally would be great for 2v2v2v2, often ppl cheat and re-ally, its the worst.

But with a 2v2v2v2 ums I can at least start the game with ppl allied properly, and mt other goal was to secretly make carriers weaker, god I hate carrier nubs.



None.

Mar 21 2019, 10:14 pm Suicidal Insanity Post #9

I see you !

Mass battlecruisers all the way?




Mar 22 2019, 7:16 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 pallfy
I think its time to bow out, im not an expert and can only spend a few hours on making a map edit.
Doing your own randomization is easy. And the only side effect is mixed up colors.

Quote
pallfy has whispered to you -- is there a easy way to do soemthign else, like penalise someone for chaning enemy to ally
please keep all relevant discussion in the topic.
Sure. Detect when a player has 2 (allied someone) or 0 (unallied their ally) opponents.

But I'm not exactly sure how the ally panel works: If you can just unally your ally and ally someone else, and it only comes into effect upon pressing ok, the number of allies would remain the same. If it comes into effect immediately it would be viable. Nobody will be fast enough to do it within 84ms of a hyper trigger loop.

Post has been edited 3 time(s), last time on Mar 22 2019, 7:25 am by NudeRaider.




Mar 23 2019, 3:27 am sethmachine Post #11



NEVER means the trigger is NEVER run, not that the condition is never allowed to be true

Ah that would be both hilarious and insane if NEVER worked the way most people think.

It would be a nightmare to code that!



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[02:58 pm]
Pr0nogo -- Suicidal Insanity
Suicidal Insanity shouted: Moose Naw - if that is an option, it should be a global option
agreed
[02:58 pm]
Pr0nogo -- no problem
[11:47 am]
rnDPrc -- Pr0nogo
Pr0nogo shouted: though idk if you can extract them from scr anymore since casc took effect, so you can download them here
Thank you :)
[11:28 am]
Suicidal Insanity -- Pr0nogo
Pr0nogo shouted: though idk if you can extract them from scr anymore since casc took effect, so you can download them here
SC:R still ships with all the old MPQs
[11:26 am]
Suicidal Insanity -- Otherwise it clutters up the UI and you have inconsistent names from location to location
[11:26 am]
Suicidal Insanity -- Moose
Moose shouted: Basically, anywhere that supports custom unit names should have an option to use the originals imo
Naw - if that is an option, it should be a global option
[11:10 am]
Pr0nogo -- though idk if you can extract them from scr anymore since casc took effect, so you can download them here
[11:08 am]
Pr0nogo -- rnDPrc
rnDPrc shouted: Where can I learn more about the default AI Scripts behavior? I'm having some problems here
extract the scripts using pympq and open them in pyai (using the python modding suite) and use nekron's guide as a reference
[10:57 am]
NudeRaider -- http://www.staredit.net/372001/ thou shalt not judge
[10:18 am]
rnDPrc -- I mean the Run AI Script trigger choices
Please log in to shout.


Members Online: Roy, Pr0nogo, jun3hong