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.

May 30 2019, 6:32 pm pallfy Post #12



I cant attempt to try this, if anyone can make it so ppl cant re-ally and send me that file, I will paypal you $10.



None.

May 30 2019, 9:38 pm MTiger156 Post #13

Veteran Mapper

Oh crap. I totally forgot about this problem.
I was in the process of making an example, but real-life and personal projects got in the way.
I got an idea of a new, genius approach. Its an easier setup, but I need to make sure its unbreakable.




May 30 2019, 10:41 pm pallfy Post #14



Whatever works, a few dozen people playing sc1 2v2v2v2 will be happy for this ums to replace the melee mode we usual use



None.

May 31 2019, 3:21 am MTiger156 Post #15

Veteran Mapper

Alright, the long-awaited example is complete.
Currently runs with 1 Human, 7 CPU so its functionality can be seen through Single Player.
Starting places are pure-random (any of the 8 spots, much better than a typical "randomize start locations" command, which would be limited to randomizing from 2 pre-determined spots).
Alliance + Vision locking is implemented as desired.

This map utilizes the "Big Game Hunters" terrain. Hopefully that is satisfactory. Otherwise, there would be some additional work moving start locations and trigger locations to accommodate different terrain.

Attachments:
BGH 2v2v2v2.scm
Hits: 4 Size: 76.16kb




May 31 2019, 6:29 am pallfy Post #16



Wow he did it. It reverses your change in alliance instantly.

Post has been edited 1 time(s), last time on May 31 2019, 6:51 am by pallfy.



None.

May 31 2019, 9:04 pm pallfy Post #17



Well now, I owe you some money. ehehehe



None.

May 31 2019, 11:06 pm MTiger156 Post #18

Veteran Mapper

K, I sent you a PayPal address through Private Message ("Messages" button at top-right of page, in case you didn't know this existed).




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[10:41 am]
v9bettel -- Nice
[01:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[10:11 pm]
Ultraviolet -- :P
[10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
Please log in to shout.


Members Online: IlyaSnopchenko, Roy, jun3hong