Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: special forces map team based mineral pay
special forces map team based mineral pay
May 13 2023, 12:39 pm
By: Battlemage  

May 13 2023, 12:39 pm Battlemage Post #1



I am working on a special forces style map and I want all of the players to receive equal minerals regardless of how many points they have to cash in. I was thinking that players get points when they kill stuff like normal but when they go to cash it in, it goes to player6/neutral and then gets divided equally to all players. I have tried to work this out but cant figure out the triggers. Is this possible?



None.

May 13 2023, 6:50 pm TheHappy115 Post #2



I assume you want this to by dynamic so that it changes the ratio depending on how many active players there are? It is definitely possible but my method of approach would be a bit "annoying" to to implement (and there may be a better method of executing it).

If you don't care about amount of players, you can just split the points evenly.

I.E.
If Players are slots 1 - 6, you could simply have a trigger that states something like:
For:
Players: 1 - 6
When:
Current Player reaches 1000 points, Current player subtracts 1000 points.
Then:
Preserve Trigger
Give Players 1 +1000 minerals,
Give Player 2 +1000 minerals,
Give Player 3 +!000 minerals, etc.

A more tedious way would involve death triggers. I always had difficulty with dynamically splitting between active players.
It would involve layered steps (and a lot of triggers for each "tier").

What I mean is that you can essentially detect how many death counts an AI player has, and detect which tier it is, before equally allocating the points. The more tiers there are, the more smooth the mineral transition will be but it will involve way more triggers. For smooth mineral transition, you'd also want hyper triggers too.

A Tier may go something along the line of:

Assuming that Players 1 - 6 are Players and Player 7 is an AI, you can do something like:
------
For:
Players 1 - 6
When:
When Current player contains 1000 Points, Add 1000 deaths to "insert unused unit here" for Player 7.
Then:
Subtract 1000 points for current player
Preserve Trigger

------
For:
Players 1 - 6
When:
Player 7 has at least 6000 deaths for "insert unused unit here"
Then:
Subtract 1000 deaths for "insert unused unit here" for Player 7
Add 1000 minerals for current player
Preserve Trigger
------
For:
Players 1 - 6
When:
Player 7 has at least 600 deaths for "insert unused unit here"
Player has at most 5999 deaths for "insert used unit here"
Then:
Subtract 100 deaths for "insert unused unit here" for Player 7
Add 100 minerals for current player
Preserve Trigger


And so on (depends on how high and low you want it to go)

When this dynamic route of tiers and method? Its because when its Players 1 - 6, the trigger will not execute for the player if they aren't present. This would mean if half way through, Player 5 and Player 2 Left, then the trigger will Run for Players 1, 3, 4, and 6. But you also want to have an at least and at most trigger between tiers, otherwise you risk a player getting more minerals than another player. This is because it will trigger ALL of player 1's triggers, then Player 2's, and so on. You wouldn't want to trigger the +100 minerals +1000 minerals and +10000 minerals for players 1, then 2, and then 3. Because there may not be enough "money" left over for Players 5 and 6.

For a frame of reference, Hyper triggers will execute triggers about 12 times per second (I believe EUDs can double it to ~24 times per second).

I'm not entirely sure about neutral stuff just because I haven't really done anything with neutrals. In terms of "giving" money to an AI, you can use that as an alternative to the death trigger as long as you know the AI will not be spending minerals or mining minerals.

Post has been edited 2 time(s), last time on May 13 2023, 11:36 pm by TheHappy115.



None.

May 14 2023, 5:22 pm Battlemage Post #3



I don't understand using the unit deaths. Couldn't you just transfer p1's points to p6 instead?



None.

May 14 2023, 6:25 pm TheHappy115 Post #4



Quote from Battlemage
I don't understand using the unit deaths. Couldn't you just transfer p1's points to p6 instead?

There are many substitutes you can use. But the most important thing you want to ensure is that it doesn't get effected by other things. If Player 6 can get point values by killing stuff (like your marines) then it will give income to team for your units dying as well. Now, if you don't plan on P6 using custom points (which aren't effected by anything except triggers), then yes, you can use that as your alternative. You could simply replace the "insert unused unit here" for "Player 6 Custom Points"

In terms of how unit deaths work, they are basically identical to custom points with the only exception that they increment when the certain type of unit dies while custom points can be displayed (as a result, custom points are often used for lives instead). Considering that there are tons of "units" there are invalid and not usable, they can be substituted as a form of "integer" in coding, allowing you a lot of flexibility.

A huge reason why death triggers are used is namely because they allow flexibility in know which "state" of the game your in, along with having timers that act similarly to "wait" triggers without risk of them "conflicting" with each other. I say conflicting because multiple wait triggers being triggered at the same time for the same player causes issues where one gets priority over the other. (I'm sure you can read more about it somewhere on here, or simply do a test in the editor since its quite obvious. It is most obvious when you have Hyper Triggers active though on preserved triggers)

Final Note: As far as I'm aware of, you shouldn't have to worry about death triggers // custom points // points falling to negative as the lowest point should be 0. So if you have 100 points and you subtract 1000 points, it will just set the point value to 0.

Post has been edited 2 time(s), last time on May 15 2023, 2:24 am by TheHappy115.



None.

May 15 2023, 3:26 pm Battlemage Post #5



Gotcha. I think I will let p6 help the team :)



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:46 am]
RIVE -- :wob:
[2024-4-22. : 6:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
Please log in to shout.


Members Online: Roy, Filmstars, Revenant