Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Randomized Order
Randomized Order
Jan 20 2022, 11:40 pm
By: Prankenstein
Pages: < 1 2 3 4 >
 

Feb 3 2022, 2:40 am Prankenstein Post #41



Quote from NudeRaider
The presented solutions seem pretty complicated, so here's how I'd do it. It's essentially only 4 unique triggers, some repeated.

The gist:
When it's time to pick locations take 1 trigger loop for the players to generate a random number and transfer it to Custom Score. Whoever has the highest score gets spot 1 and his score reset. The next player with highest score gets spot 2 and so on.

Issues:
  • In case of 2 players rolling the same number it favors the lower player number. To counter that you can add more switches. I'll use only 3 in my example (8 possible values)
  • It relies on Custom Score which may be in use. Other options are Most Resources, or Commands most units at.
  • Worst case, it takes 7 trigger loops. (6 players, 1 initial randomization)

Note: I use DC "location number" both to store where the player's stuff will be placed and to divide between phase 1 where the random number is generated and stored and phase 2 where the stuff is placed. That's why you see it as a condition everywhere.

Triggers:
Generate random number ...
Players

  • Player Force
  • Conditions

  • DC "location number" = 0 for Player Force
  • Time to pick locations
  • Actions

  • Randomize Switch 1
  • Randomize Switch 2
  • Randomize Switch 3
  • Set Custom Score to 0 for Current Player


  • ... and store in Custom Score 1/3
    Players

  • Player Force
  • Conditions

  • DC "location number" = 0 for Player Force
  • Time to pick locations
  • Switch 1 is set
  • Actions

  • Add 1 to Custom Score for Current Player


  • ... and store in Custom Score 2/3
    Players

  • Player Force
  • Conditions

  • DC "location number" = 0 for Player Force
  • Time to pick locations
  • Switch 2 is set
  • Actions

  • Add 2 to Custom Score for Current Player


  • ... and store in Custom Score 3/3
    Players

  • Player Force
  • Conditions

  • DC "location number" = 0 for Player Force
  • Time to pick locations
  • Switch 3 is set
  • Actions

  • Add 4 to Custom Score for Current Player


  • Initialize actual unit placement
    Players

  • Comp Player
  • Conditions

  • Custom Score at least 1 for Player Force //only run this trigger if players already randomized their stuff. Can be skipped if the comp player has a higher player number than the players.
  • DC "location number" = 0 for Player Force
  • Time to pick locations
  • Actions

  • Set DC "location number" to 1 for Player Force
  • Add 1 to Custom Score for Player Force




  • Placing stuff at location 1/6
    Players

  • Player Force
  • Conditions

  • DC "location number" exactly 1 for Current Player
  • Time to pick locations
  • Current Player has the most Custom Score
  • Actions

  • Set Custom Score to 0 for Current Player
  • Create units at location "Spot 1" for Current Player
  • Add 1 to DC "location number" for Player Force


  • Placing stuff at location 2/6
    Players

  • Player Force
  • Conditions

  • DC "location number" exactly 2 for Current Player
  • Time to pick locations
  • Current Player has the most Custom Score
  • Actions

  • Set Custom Score to 0 for Current Player
  • Create units at location "Spot 2" for Current Player
  • Add 1 to DC "location number" for Player Force


  • ... Repeat the triggers for locations 3-6. (change blue parts)

    My map is just about complete after I squash a few bugs. With my newly acquired knowledge, thanks to you especially and a few others, I've decided to comb through the triggers line by line and make sure the execution order and conditions won't cause any problems. Plus I want to ensure I understand exactly what's going on with each one, organize, and comment them appropriately.

    Anyways, when reviewing your triggers, I'm confused about one thing. Most the time, when you read or edit 'DC "location number"', you're doing it for the Current Player or the entire Force 1. Why is that exactly?

    The reason I ask is because the way I've been organizing my DCs. Any DC that is global and the same for all players, eg, a DC that keeps track of the current round number, is owned solely by Player 8.

    From what I understand of your triggers, it seems to me the location number is global, so to speak, but each player will still be holding a duplicate value. For consistency, was thinking of changing it to 'DC "location number" for Player 8', across the board in all conditions and actions.

    Wanted to check with you first as a little self-quiz to make sure I'm not completely lost. Thanks again sir.
    -



    None.

    Feb 3 2022, 8:19 am NudeRaider Post #42

    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
    Note: I use DC "location number" both to store where the player's stuff will be placed and to divide between phase 1 where the random number is generated and stored and phase 2 where the stuff is placed. That's why you see it as a condition everywhere.
    I think this note sums up its use pretty well. But I'll elaborate.

    • For triggers 1-5 (randomization and preparation) its state is 0, in the triggers afterwards it's > 0. This is to divide the phases and ensure trigger order, as the placement at the correct location will almost always take more than 1 trigger loop.
    • For triggers 6+ (placement at correct location) it keeps track of at which location the stuff will be generated for the player that wins the Custom Score comparison.

    So you'll notice that it's always a global variable which means it can be safely given to a comp player. But not all maps have comp players, so I made the triggers to work regardless. It's also good training to internalize how trigger order, Current Player, forces and DC counts interact with each other. ;)


    The reason that in the triggers 6+ I switch to checking for Current Player instead of the Force is that it will return the summed up count of all associated players when I check it for a force.
    So when we have 6 player and set a dc to 1 for the force, it will return 6 when the condition asks for deaths of the force. This makes things difficult when a player leaves or is defeated, because then the condition would only return 5. Again, if you want P8 to keep track of it, you can change the triggers accordingly.
    Remember, that in this case you can delete the condition "Custom Score at least 1 for Player Force" in the Initialization trigger.

    So why don't I check it for Current Player everywhere, you might ask. A safety measure that I do automatically without thinking about it. It makes sure that every player is on 0, not just the player who runs the current trigger. So it should be fine either way, but checking for force might make it easier to spot a bug, should it occur, because then nothing fires, instead of it only firing for certain players.


    Quote from Prankenstein
    From what I understand of your triggers, it seems to me the location number is global, so to speak, but each player will still be holding a duplicate value. For consistency, was thinking of changing it to 'DC "location number" for Player 8', across the board in all conditions and actions.
    That is correct.


    Quote from Prankenstein
    Wanted to check with you first as a little self-quiz to make sure I'm not completely lost. Thanks again sir.
    np and yw. :)




    Feb 4 2022, 12:03 am Prankenstein Post #43



    Quote from NudeRaider
    Quote
    Note: I use DC "location number" both to store where the player's stuff will be placed and to divide between phase 1 where the random number is generated and stored and phase 2 where the stuff is placed. That's why you see it as a condition everywhere.
    I think this note sums up its use pretty well. But I'll elaborate.

    I never had any doubts of how it worked, just how it was being set. Thought there might have been a nuance I was missing. I went ahead and changed those conditions and triggers to Player 8 and it still works beautifully. Your solution is so elegant and there's virtually no tradeoffs (except ties going to lower player, but that doesn't bother me).

    Some notes about separating phases:

    Combining DCs in my conditions to track the state started to get kind of crazy. So instead I use a series of switches to track the state of the map in a linear fashion. Only one of these switches can be set at one time.

    1) Round Initialized (switches and DCs reset for a new round, including some of yours)
    2) Locations Randomized (your triggers)
    3) Players Spawned (some more of your triggers)
    4) Enemy Spawned
    5) Awaiting Attack
    6) Attack Started
    7) End of Round



    None.

    Feb 4 2022, 4:12 pm NudeRaider Post #44

    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

    Tbh it's a perfect use case for a death counter owned by a computer player. Instead of multiple switches use the dc and set it according to the phases.
    DC=0: No phase active
    DC=1: 1) Round init
    DC=2: 2) Loc randomize
    ... and so on. Should be straightforward.

    And out of curiosity, did you end up integrating my proposed improvement (last trigger)?




    Feb 4 2022, 10:15 pm Prankenstein Post #45



    Quote from NudeRaider
    Tbh it's a perfect use case for a death counter owned by a computer player. Instead of multiple switches use the dc and set it according to the phases.
    DC=0: No phase active
    DC=1: 1) Round init
    DC=2: 2) Loc randomize
    ... and so on. Should be straightforward.

    You're totally right. I actually foresaw this suggestion coming from you, as I thought about this myself when I put all the extra switches in place and after the fact of course. The one thing I do like about the switches is the readability of them and not having to note the number of each phase while adding new functionality. But it is cleaner for sure and perfect for a linear system. I suppose at the end I could bring the triggers into notepad and do find/replace to make this happen.


    Quote from NudeRaider
    And out of curiosity, did you end up integrating my proposed improvement (last trigger)?

    I think I'm doing sort of a hybrid between your two solutions:

    - Each zone has a fixed 2x2 location in the center of it which never moves (Spawn 1, Spawn 2, etc). Once a player is assigned to a location, I just create a flag for the player there using your original 6 "Placing stuff at the base spots" triggers.
    - A DC for "Dark Swarm" counts the total number of players
    - Each Player owns a trigger which centers their location (Player 1 Spawn, Player 2 Spawn, etc) on top of their flag. Then I remove the flag and subtract 1 from DC "Dark Swarm".
    - When DC "Dark Swarm" = 0, I know all players have had their spawn location moved to their assigned location

    I did this because players can receive new units in various ways throughout the round, and each player is stuck within their own zone using boundaries. So any time a player receives a new unit or goes outside of their zone, I just create/move their unit to a single location called "Spawn Helper" where units are dispersed appropriately.



    None.

    Feb 4 2022, 11:26 pm NudeRaider Post #46

    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 Prankenstein
    I think I'm doing sort of a hybrid between your two solutions:

    - Each zone has a fixed 2x2 location in the center of it which never moves (Spawn 1, Spawn 2, etc). Once a player is assigned to a location, I just create a flag for the player there using your original 6 "Placing stuff at the base spots" triggers.
    - A DC for "Dark Swarm" counts the total number of players
    - Each Player owns a trigger which centers their location (Player 1 Spawn, Player 2 Spawn, etc) on top of their flag. Then I remove the flag and subtract 1 from DC "Dark Swarm".
    - When DC "Dark Swarm" = 0, I know all players have had their spawn location moved to their assigned location

    I did this because players can receive new units in various ways throughout the round, and each player is stuck within their own zone using boundaries. So any time a player receives a new unit or goes outside of their zone, I just create/move their unit to a single location called "Spawn Helper" where units are dispersed appropriately.
    Wouldn't this be simpler? (Similar to what I suggested, just not with obs but with flags which are given to Current Player, instead of P11)

    • Place a flag for each base location in the editor, owned by P8
    • During phase 3:
      - Center location x on flag owned by P8 at Anywhere
      - Give the flag to Current Player at x
      - Create the initial units for Current Player at x
    • When Current Player receives units:
      - Center location x on flag owned by Current Player at Anywhere
      - Create the extra units for Current Player at x
    • During phase 7: Give all flags at Anywhere back to P8

    Might have to use another unit if the player can own workers, as those could pick up the flag and thus move the marker for the base.

    No need for locations marking the spawn locations,
    no need for locations for the players,
    no need to count the players,
    no need for an extra DC because you know that everyone has picked their spawn locations when the switch for phase 3 is active and the player force has 0 Custom Score.

    Post has been edited 2 time(s), last time on Feb 4 2022, 11:41 pm by NudeRaider.




    Feb 5 2022, 12:24 am Prankenstein Post #47



    Quote from NudeRaider
    Quote from Prankenstein
    I think I'm doing sort of a hybrid between your two solutions:

    - Each zone has a fixed 2x2 location in the center of it which never moves (Spawn 1, Spawn 2, etc). Once a player is assigned to a location, I just create a flag for the player there using your original 6 "Placing stuff at the base spots" triggers.
    - A DC for "Dark Swarm" counts the total number of players
    - Each Player owns a trigger which centers their location (Player 1 Spawn, Player 2 Spawn, etc) on top of their flag. Then I remove the flag and subtract 1 from DC "Dark Swarm".
    - When DC "Dark Swarm" = 0, I know all players have had their spawn location moved to their assigned location

    I did this because players can receive new units in various ways throughout the round, and each player is stuck within their own zone using boundaries. So any time a player receives a new unit or goes outside of their zone, I just create/move their unit to a single location called "Spawn Helper" where units are dispersed appropriately.
    Wouldn't this be simpler? (Similar to what I suggested, just not with obs but with flags which are given to Current Player, instead of P11)

    • Place a flag for each base location in the editor, owned by P8
    • During phase 3:
      - Center location x on flag owned by P8 at Anywhere
      - Give the flag to Current Player at x
      - Create the initial units for Current Player at x
    • When Current Player receives units:
      - Center location x on flag owned by Current Player at Anywhere
      - Create the extra units for Current Player at x
    • During phase 7: Give all flags at Anywhere back to P8

    Might have to use another unit if the player can own workers, as those could pick up the flag and thus move the marker for the base.

    No need for locations marking the spawn locations,
    no need for locations for the players,
    no need to count the players,
    no need for an extra DC because you know that everyone has picked their spawn locations when the switch for phase 3 is active and the player force has 0 Custom Score.


    Very interesting, I would have never thought of this, because I suppose at first I wouldn't have been confident enough that it would always work. Like I imagine the location not moving fast enough to keep up with all these units that might be created, and you'd see like a cascading effect, and you might end up with players' units spawned in the wrong zone or something. But if you're saying it will work, I'm confident it will.

    Last night, I implemented a system that employs moving a location to detect when a player morphs a hydralisk into a lurker egg and/or a guardian into a cocoon. If the player has at least 30 or more "cash" (stored in a DC), the lurker egg/cocoon is removed, a lurker/guardian is created in it's place, and 30 cash is subtracted. If player has at most 29 cash, the lurker egg/cocoon is removed, and a hydralisk/mutalisk is created in it's place. It happens seamlessly even if I morph a bunch at once. So my point being that my confidence in location moving has definitely risen since I started, so I'll give your new system a try.

    The only drawback I see is there always needing to be a unit in the center of the location. A flag is a nice idea because it literally and visually "flags" the location for the player, but then you have a flag stuck in the ground all the time (and workers do spawn there so it's not possible anyways). An observer is better but would still be seen. I suppose a Map Revealer would be best, so long as there's not a conflict with other revealers.

    Edit: I started to implement this and map revealers will definitely cause some conflict since they're used all over the map and I'd rather not pollute the mini-map/map with buildings just to give vision. Also, using any unit that can be controlled by the player won't work since the player can obviously just move it. Would it be possible to place the flag at the top edge of the zone, say 10 tiles above the center, and after the location centers on the flag, shift the location down by 10 tiles, in order to find the center?

    Edit 2: Since Player 8 always shares vision with everyone, I suppose I could just give all the map revealers that are actually used to reveal the map, to Player 8. Player 7 can control the revealers used to mark the center of each zone. Then when a location is assigned to a player, they'll be given the revealer there. Unless there are caveats that I'm not thinking of.

    Edit 3: Looks like map revealers can't exist inside a location, so probably not the best choice :wtfage:

    Post has been edited 3 time(s), last time on Feb 5 2022, 1:18 am by Prankenstein.



    None.

    Feb 5 2022, 9:08 am NudeRaider Post #48

    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 Prankenstein
    Like I imagine the location not moving fast enough to keep up with all these units that might be created
    That will never happen. Trust is good, an explanation is better. ;) Remember what I said about trigger order?
    Quote
    Triggers will always fire one after another
    That means if for some reason a trigger takes a long time to go through their conditions and/or actions everything else will wait until it finishes. So what could happen is trigger(-induced) lag as the player's computers take too long to finish their triggers to keep up with the set game speed. Usually you need tens of thousands of triggers for that to happen.

    There's only one exception: The wait action. When it's called initially it puts the current trigger (and all triggers after it) on hold and immediately calls another trigger loop. During the wait time new trigger cycles will start normally. After the wait time is over, the previous trigger loop is continued. That's how hyper triggers work and the only way to disrupt the proper trigger order. It's also why everyone tells you not to time your stuff with waits. ;)

    EDIT: What can happen, though, is that freshly created units can't be detected with bring or commands. More info here.



    Quote from Prankenstein
    A flag is a nice idea
    I agree, but it's your idea. :P
    - Each Player owns a trigger which centers their location (Player 1 Spawn, Player 2 Spawn, etc) on top of their flag. Then I remove the flag and subtract 1 from DC "Dark Swarm".



    Quote from Prankenstein
    Would it be possible to place the flag at the top edge of the zone, say 10 tiles above the center, and after the location centers on the flag, shift the location down by 10 tiles, in order to find the center?
    It's possible but tedious to set up. Not recommended. You basically need to introduce a coordinate system to the map and do simple arithmetic. Clunky in sc; lots of cycling and countoffs. The axis consist of physical units on the map edge. To mark points in the coordinate system you set up 2 locations with dimensions x*1 and 1*y tiles that are centered on the axis units. x = width of the map, y = height of the map. Proper tutorials here.



    Quote from Prankenstein
    Looks like map revealers can't exist inside a location, so probably not the best choice
    True. There's nothing else that can't be seen by the player when you give it to them, which is why I initially suggested giving obs to comp/neutral players.

    Other options
    • Burrowed Zergling with (un-)burrow disabled. Means no player unit can burrow which is a problem for Lurkers.
    • Floor Gun Trap. Best candidate imo. Only drawback is that it can't be built on.
    • Pylon. Kinda like a big flag that can't be picked up. ;)
    • Mineral Patch. You probably want to disable main buildings (CC, Nexus, etc.) to prevent mining
    • Dark Swarm.* Can be built on. Will protect units under it

    *) Yes, Dark Swarms can be owned by players. ;) By default they have a limited duration which rules them out, but IIRC they can be made permanent. Not sure anymore though. If you wanna test it you could try preplacing them in the editor or create as unit with properties. Maybe someone else can chime in and give more info.

    EDIT2:
    Experimental idea for a truly invisible way: http://www.staredit.net/wiki/index.php?title=Bunker_Disabling_and_Stacking
    IIRC you can still detect the marines inside the bunker.

    Post has been edited 2 time(s), last time on Feb 5 2022, 10:17 am by NudeRaider.




    Feb 5 2022, 10:25 am GGmano Post #49

    Mr.Pete-Tong

    dark swarm is always owned by p12 neutral when its cast. not sure it can be given between players, havent tryid tho. but when dark swarm is cast by a defiler its in p12 ownage. to adjust special things like swarm you need to test out the unused units in the scmdraft editor upgrade settings. i think its unused unit 28 that changes the power/damage of psi storm that templars cast.. i learned this recently not long ago where i always thought psi storm couldnt be edited at least not without eud.

    psi storm can be edited up to making 2500 dmg per hit or so, by setting the start upgrade to max 256. its in the upgrade menu unused units 28 i think(truly not fully sure) you need test to check which one is which.

    hehe 28 dont exist there you see how good my memory is lol it might be 58 but truly dont recall the precise one you have to test it out. im pretty sure dweb can also be prolonged too im not sure what all the unused upgrades do feel free to test and enlighten us would be cool to have it explained more precisely @prankenstein

    Post has been edited 1 time(s), last time on Feb 5 2022, 10:30 am by GGmano.



    A Legendary Map Maker, Player. Apparently im more than intresting to observe Irl

    Ill try do my best in making all youre watchers happy

    The maps I made are tweaked into perfection and maximum strategy added

    Feb 5 2022, 12:01 pm NudeRaider Post #50

    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 GGmano
    dark swarm is always owned by p12 neutral when its cast. not sure it can be given between players, havent tryid tho.
    Correct. And yes, they can be given to other players like any other unit.




    Feb 5 2022, 5:22 pm DarkenedFantasies Post #51

    Roy's Secret Service

    Quote from Prankenstein
    Might have to use another unit if the player can own workers, as those could pick up the flag and thus move the marker for the base.

    The only drawback I see is there always needing to be a unit in the center of the location. A flag is a nice idea because it literally and visually "flags" the location for the player, but then you have a flag stuck in the ground all the time (and workers do spawn there so it's not possible anyways).
    If you run the Junkyard Dog AI script on a powerup, it will override the idle powerup order and workers won't be able to pick them up. Subsequently giving the powerup to a human player will break the junkyard dog order, so you will have to run the script again after giving it back to the computer. The Junkyard Dog AI Script doesn't work on human players, but players also can't pick up their own flags, so you might still be safe if you need the flag to be owned by the human player for longer than 1 trigger cycle.

    Little disclaimer to save you from a potential headache, just in case: Junkyard Dog only works on units whose collision box is smaller than the location used for it. (The location can actually be slightly smaller, but I haven't tested the exact difference yet.)


    Speaking of collision boxes, if you want the flag to not block pathing, you could use EUDs to set the NoCollide CUnit flag for it so units can walk through it, but I'm not sure if it will still prevent being built over. I guess a beacon could work for that (or any building if you also remove their NoCollide flag); have a pre-placed building stacked over the beacon and remove it at the beginning of the game. Then, if I remember correctly, it should no longer block building placement.




    Feb 6 2022, 1:07 am Prankenstein Post #52



    Quote from NudeRaider
    Quote from Prankenstein
    Like I imagine the location not moving fast enough to keep up with all these units that might be created
    That will never happen. Trust is good, an explanation is better. ;) Remember what I said about trigger order?
    Quote
    Triggers will always fire one after another
    That means if for some reason a trigger takes a long time to go through their conditions and/or actions everything else will wait until it finishes. So what could happen is trigger(-induced) lag as the player's computers take too long to finish their triggers to keep up with the set game speed. Usually you need tens of thousands of triggers for that to happen.

    There's only one exception: The wait action. When it's called initially it puts the current trigger (and all triggers after it) on hold and immediately calls another trigger loop. During the wait time new trigger cycles will start normally. After the wait time is over, the previous trigger loop is continued. That's how hyper triggers work and the only way to disrupt the proper trigger order. It's also why everyone tells you not to time your stuff with waits. ;)

    EDIT: What can happen, though, is that freshly created units can't be detected with bring or commands. More info here.



    Quote from Prankenstein
    A flag is a nice idea
    I agree, but it's your idea. :P
    - Each Player owns a trigger which centers their location (Player 1 Spawn, Player 2 Spawn, etc) on top of their flag. Then I remove the flag and subtract 1 from DC "Dark Swarm".



    Quote from Prankenstein
    Would it be possible to place the flag at the top edge of the zone, say 10 tiles above the center, and after the location centers on the flag, shift the location down by 10 tiles, in order to find the center?
    It's possible but tedious to set up. Not recommended. You basically need to introduce a coordinate system to the map and do simple arithmetic. Clunky in sc; lots of cycling and countoffs. The axis consist of physical units on the map edge. To mark points in the coordinate system you set up 2 locations with dimensions x*1 and 1*y tiles that are centered on the axis units. x = width of the map, y = height of the map. Proper tutorials here.



    Quote from Prankenstein
    Looks like map revealers can't exist inside a location, so probably not the best choice
    True. There's nothing else that can't be seen by the player when you give it to them, which is why I initially suggested giving obs to comp/neutral players.

    Other options
    • Burrowed Zergling with (un-)burrow disabled. Means no player unit can burrow which is a problem for Lurkers.
    • Floor Gun Trap. Best candidate imo. Only drawback is that it can't be built on.
    • Pylon. Kinda like a big flag that can't be picked up. ;)
    • Mineral Patch. You probably want to disable main buildings (CC, Nexus, etc.) to prevent mining
    • Dark Swarm.* Can be built on. Will protect units under it

    *) Yes, Dark Swarms can be owned by players. ;) By default they have a limited duration which rules them out, but IIRC they can be made permanent. Not sure anymore though. If you wanna test it you could try preplacing them in the editor or create as unit with properties. Maybe someone else can chime in and give more info.

    EDIT2:
    Experimental idea for a truly invisible way: http://www.staredit.net/wiki/index.php?title=Bunker_Disabling_and_Stacking
    IIRC you can still detect the marines inside the bunker.


    Ty for all the info. I've read into it all and have decided to try using a Floor Missile. I use a Floor Gun to detect some neutral units elsewhere on the map, and did notice they don't show on the minimap either which is great. Plus buildings don't need to be built in the center. The only issue is the Missile is unleashing a hailstorm of damage onto the computer attackers, so I need to decide whether to disable it or incorporate it via some balance changes.

    I've went ahead and worked all of your improvements into a backup map, which mostly consisted of deletion. Everything works fine as far as spawning goes, but now the randomization is broken. I think I know the cause and how to fix it, just don't know if it's the best way (or maybe you already gave the solution and I'm not seeing it). I think what's happening is Player 1 is generating a random custom score before everyone else which then puts him as as the leader in the custom score comparison. So he gets assigned to the first location right away before the other players even get a chance to draw.

    The only way I see to solve this is to store the number of players in a DC before the locations are randomized, and then subtract one each time a player draws a random score. Once the DC reaches 0, I know all players have drawn.

    Also, a drawback I'm facing. The final zone always needs to be occupied, regardless of number of players, as there's a final defense line of cannons there which are given to the occupying player. In my map prior, these locations were static and gave me more control. In the new system, the final location happens to be the last location to get centered on, as it's the top-most and right-most zone. I'd have to reverse all the zones to make it flawless, but I want the waves to run from left to right.



    None.

    Feb 6 2022, 1:10 am Prankenstein Post #53



    Quote from GGmano
    psi storm can be edited up to making 2500 dmg per hit or so, by setting the start upgrade to max 256. its in the upgrade menu unused units 28 i think(truly not fully sure) you need test to check which one is which.

    Always wondered about this, had no clue. Don't think I've ever seen a map do this either.



    None.

    Feb 6 2022, 1:26 am Prankenstein Post #54



    Speaking of collision boxes, if you want the flag to not block pathing, you could use EUDs to set the NoCollide CUnit flag for it so units can walk through it, but I'm not sure if it will still prevent being built over. I guess a beacon could work for that (or any building if you also remove their NoCollide flag); have a pre-placed building stacked over the beacon and remove it at the beginning of the game. Then, if I remember correctly, it should no longer block building placement.

    This reply gave me enough inspiration to go the dark side and start checking out some EUDs. Pretty amazing what can be done. Just downloaded EUD Editor and have been playing around with it on a copy of my map. I'm able to build creep colonies now without a creep :D and I put some of my units on ultra-speed just to see it in action, crazy!

    If I try to run a map that was built by EUD Editor, SCM Draft spits a bunch of errors out and doesn't let me. So I suppose I should keep a vanilla version attached to the EUD Editor project, where I do all my SCMDraft changes. Then when I want to release the changes, I rebuild the map in EUD Editor.

    In regards to your suggestion, I'm not seeing a way to do this in EUD Editor, though I do think a flag with no collision box would be my favorite result.



    None.

    Feb 6 2022, 1:55 am NudeRaider Post #55

    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

    Lemme give you a few quick hints.
    Quote
    I think what's happening is Player 1 is generating a random custom score before everyone else which then puts him as as the leader in the custom score comparison. So he gets assigned to the first location right away before the other players even get a chance to draw.
    You can add text messages to triggers to find out if / in what order they're firing.

    Quote
    Player 1 is generating a random custom score before everyone else which then puts him as as the leader in the custom score comparison
    Note that if everyone has 0 Custom Score everyone will have the most Custom Score. If winners are tied all tied players fulfill their condition

    Hard to tell without seeing all triggers. If P1 spawns first, it might be because conditions to prevent spawning are not yet in place at map start. Especially possible if you give DC/switch triggers to P8, who parses their triggers last. You can give such critical triggers to be owned by the force and set triggers/dc for P8.

    Quote
    The only issue is the Missile is unleashing a hailstorm of damage onto the computer attackers
    If the missile trap does too much damage, just set it to 0 damage in the editor. It will still do 0.5 dmg per missile. That's why the gun trap is preferable.

    Quote
    In the new system, the final location happens to be the last location to get centered on,
    In the cleanup trigger first give 5 missile traps to P9, one to P8 (will be the last spawn location).
    In the spawn triggers not only give a missile trap owned by P8 to the player but also give all missile traps owned by P9 to P8.
    Will make the first player grab the only available spot of P8, which is the last spawn location. All the other players will "try" to give traps from P9 to P8 but there are none to give, so that's no problem.

    Post has been edited 1 time(s), last time on Feb 6 2022, 2:06 am by NudeRaider.




    Feb 6 2022, 2:16 am Prankenstein Post #56



    Here's a visual

    Failed to get ImageSize ( http://i.ibb.co/jrk1vm0/screenshot.png )



    None.

    Feb 6 2022, 3:18 am DarkenedFantasies Post #57

    Roy's Secret Service

    Quote from Prankenstein
    If I try to run a map that was built by EUD Editor, SCM Draft spits a bunch of errors out and doesn't let me. So I suppose I should keep a vanilla version attached to the EUD Editor project, where I do all my SCMDraft changes. Then when I want to release the changes, I rebuild the map in EUD Editor.

    In regards to your suggestion, I'm not seeing a way to do this in EUD Editor, though I do think a flag with no collision box would be my favorite result.
    I don't use EUD editors, so I can't help you in that regard. None of the EUD editors work for me, but I wouldn't use them anyway mainly because of the map locking thing.

    I use this resource: http://farty1billion.dyndns.org/EUDdb/?pg=entry&ver=1.16.1 (or Cheat Engine if this doesn't have what I'm looking for) and the EUD condition/action in scmdraft2. The NoCollide flag I'm talking about is under "CUnit - Status Flags", so to set it for unit index 0, you would add 2097152 marine deaths for player 19080. I can help you get familiar with EUDs if you'd like, if you have Discord or something.




    Feb 6 2022, 3:56 am Prankenstein Post #58



    Quote from NudeRaider
    Lemme give you a few quick hints.
    Quote
    I think what's happening is Player 1 is generating a random custom score before everyone else which then puts him as as the leader in the custom score comparison. So he gets assigned to the first location right away before the other players even get a chance to draw.
    You can add text messages to triggers to find out if / in what order they're firing.

    Quote
    Player 1 is generating a random custom score before everyone else which then puts him as as the leader in the custom score comparison
    Note that if everyone has 0 Custom Score everyone will have the most Custom Score. If winners are tied all tied players fulfill their condition

    Hard to tell without seeing all triggers. If P1 spawns first, it might be because conditions to prevent spawning are not yet in place at map start. Especially possible if you give DC/switch triggers to P8, who parses their triggers last. You can give such critical triggers to be owned by the force and set triggers/dc for P8.

    Quote
    The only issue is the Missile is unleashing a hailstorm of damage onto the computer attackers
    If the missile trap does too much damage, just set it to 0 damage in the editor. It will still do 0.5 dmg per missile. That's why the gun trap is preferable.

    Quote
    In the new system, the final location happens to be the last location to get centered on,
    In the cleanup trigger first give 5 missile traps to P9, one to P8 (will be the last spawn location).
    In the spawn triggers not only give a missile trap owned by P8 to the player but also give all missile traps owned by P9 to P8.
    Will make the first player grab the only available spot of P8, which is the last spawn location. All the other players will "try" to give traps from P9 to P8 but there are none to give, so that's no problem.

    Much appreciated. I'm using a lot of time on this improved system (growing pains), on top of spending way more time than I originally wanted on the map (which is the status quo for me). Plus I've been asking a lot of questions and starting to feel needy. I think I'm just gonna pull the plug on this revamp and go back to the shittier system. The tradeoff being I don't have to worry about the ownership of a missile or something in my base, at the cost of around 12 extra locations and triggers. Maybe when I'm finished with everything else I'll feel good and compelled to come back to it and try again.

    Love the idea of giving 5 missiles to P9 and 1 to P8 to start each round. So clever, would've never thought of it.



    None.

    Feb 6 2022, 4:03 am Prankenstein Post #59



    Quote from Prankenstein
    If I try to run a map that was built by EUD Editor, SCM Draft spits a bunch of errors out and doesn't let me. So I suppose I should keep a vanilla version attached to the EUD Editor project, where I do all my SCMDraft changes. Then when I want to release the changes, I rebuild the map in EUD Editor.

    In regards to your suggestion, I'm not seeing a way to do this in EUD Editor, though I do think a flag with no collision box would be my favorite result.
    I don't use EUD editors, so I can't help you in that regard. None of the EUD editors work for me, but I wouldn't use them anyway mainly because of the map locking thing.

    I use this resource: http://farty1billion.dyndns.org/EUDdb/?pg=entry&ver=1.16.1 (or Cheat Engine if this doesn't have what I'm looking for) and the EUD condition/action in scmdraft2. The NoCollide flag I'm talking about is under "CUnit - Status Flags", so to set it for unit index 0, you would add 2097152 marine deaths for player 19080. I can help you get familiar with EUDs if you'd like, if you have Discord or something.


    That would be awesome. I'm gonna put all the EUD stuff on hold for now until I finish the vanilla map. I'll reach out if I have any EUD requirements near the end.



    None.

    Feb 6 2022, 1:56 pm GGmano Post #60

    Mr.Pete-Tong

    hope you get it working, failure is not an good option. Keep trying keep testing than youll end up succeding and learning on the way.

    If you want i can try come up with a simple system help but i need to understand what you want and need fully knowledge of all youre aspects. I have many simple yet complicated randomized systems working in my map.

    about the dark swarm nude suggested demon explained you can preplace the dark swarm in editor and than move it around to youre desired location.

    im pretty sure you can do the excaktly same with dweb if you prefer that better.

    darkenedfantasied explained you can also do it with eud this way:
    You can make dark swarms cast by defilers permanent by setting its CUnit Remove Timer (0x0059CDB8) to 0. Pre-placed ones don't expire for the same reason.

    too find out what causing the error in youre system you add text to each trigger in the system to check which triggers fire when and youll see excaktly what triggers dont fire. that way its more easy to locate the error.

    Post has been edited 10 time(s), last time on Feb 6 2022, 7:01 pm by GGmano.



    A Legendary Map Maker, Player. Apparently im more than intresting to observe Irl

    Ill try do my best in making all youre watchers happy

    The maps I made are tweaked into perfection and maximum strategy added

    Options
    Pages: < 1 2 3 4 >
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [07:14 pm]
    Kyradax -- Hi
    [05:05 pm]
    O)FaRTy1billion[MM] -- :wob:
    [2024-5-25. : 9:22 am]
    Zycorax -- :wob:
    [2024-5-23. : 3:50 pm]
    Ultraviolet -- :wob:
    [2024-5-23. : 6:26 am]
    UndeadStar -- :wob:
    [2024-5-22. : 6:10 am]
    Riney -- Somethings never change.
    [2024-5-22. : 6:10 am]
    Riney -- I come back after 4 months. Post wob. Make a crappy post in Null. Hit a 0 in magic boxes.
    [2024-5-22. : 6:00 am]
    Riney -- :wob:
    [2024-5-20. : 3:08 pm]
    Sylph-Of-Space -- woah! nice! thank you!
    [2024-5-20. : 4:05 am]
    O)FaRTy1billion[MM] -- the setting exists, it's just hidden in a weird place
    Please log in to shout.


    Members Online: jun3hong, Roy, RIVE, Oh_Man