Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Trouble with mineral award system and need to give human players
Trouble with mineral award system and need to give human players
Oct 20 2018, 9:08 pm
By: RevenantGhost  

Oct 20 2018, 9:08 pm RevenantGhost Post #1



The FAQ section is rich with helpful information, but I could not find a solution to my problem there even though it claims there is a work-around for my problem using an EXP system. I read about how in creation of a mineral reward system, "there is no way to modify the number of kills a player has, only deaths. This often becomes a problem when trying to create a money/experience system for a map."

This is completely accurate, as I have found that without a way to track each individual player's kills, I cannot get a proper mineral reward system working. This is where I need help. Even with an EXP system, I don't see how I could get individual players rewards for their own kills, as they would still be awarded EXP when the computer player achieves kills.

So here is one great example of the MANY similar triggers I'm currently using (for mineral reward for kills of each individual unit type) and the thorough description of my problem:

There are 8 players in my map and an additional 12th neutral.
Force 1: Specialists
Players 1, 2, 3
Force 2: Zerg/Terran Dominion Threat
Players 5, 6, 7
Force 3: Protoss
Player 8
Force 4: Humanity
Player 4

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

Trigger("Player 1","Player 2","Player 3"){
Conditions:
Kill("Current Player", "Zerg Hydralisk", At least, 1);
Deaths("Zerg/Terran Dominion Threat", "Zerg Hydralisk", At least, 1);

Actions:
Set Resources("Current Player", Add, 1, ore);
Display Text Message(Don't Always Display, "\x0041 mins earned.\x004");
Set Deaths("Zerg/Terran Dominion Threat", "Zerg Hydralisk", Set To, 0);
Set Score("Current Player", Set To, 0, Kills);
Preserve Trigger();
}

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


Problem: The diagnosis I observe for my problem is as follows: The human players 1 through 3 successfully acquire 1 mineral for each hydralisk they kill. However, because the conditions track only whether the player has at least 1 kill, even when a 4th player, a computer player, gets kills, the players 1 through 3 get the reward for player 4's kills, when I want them to get rewards only when they killed the hydralisk themselves, NEVER when the computer players gets kills.

Solution: So my question is, what exactly is a good workaround for this, how can I make sure that minerals are awarded to players for their own kills and never when computer allies also get kills?

I will send more information as needed. See attached map, for testing. My apologies if there is already an answer out there for this problem. I did not find any solutions after a good search.

Attachments:



None.

Oct 20 2018, 10:27 pm Roy Post #2

An artist's depiction of an Extended Unit Death

The Kills to Cash Wiki page talks about various ways to go about this.

I think nowadays you could even reset the player's kill counter with EUDs. EUD Editor 2 has a tab under trigger actions for EUDs, and one of the available actions there is called "SetKills", which would do what you want. Basically your trigger would look like:

Triggername
Players

  • Force 1
  • Conditions

  • Current Player kills at least 1 Zerg Hydralisk
  • Actions

  • Modify resources for Current Player: Add 1 ore.
  • (EUD) SetKills(CurrentPlayer, Zerg Hydralisk, 1, Subtract)
  • Preserve Trigger


  • Obviously if you're not used to using EUD Editor (or writing EUDs in general), this may seem like a huge hassle. Unfortunately, outside of this or the methods mentioned in the wiki article, there isn't really an elegant way to do kills to cash.




    Oct 20 2018, 11:30 pm RevenantGhost Post #3



    That worked!!! I used EUD Editor to make all the triggers for the mineral award system in my map, using exactly the conditions and actions in your example. The only problem remaining is that the project in EUD Editor won't compile when I add a "display text" action to tell the player their kill resulted in a reward.



    None.

    Oct 21 2018, 1:49 am Ultraviolet Post #4



    Why not just use kill score to avoid all that hassle? While you can't modify kill count, you can easily modify score, and it's basically the same thing if you're familiar with the kill scores for all the units. Heck, with EUDs, you can even set kill scores for any unit to specific amounts to customize the system.




    Oct 21 2018, 2:39 am RevenantGhost Post #5



    You could be right UV, but I didn't want to go by kill scores just because I don't know if that's always accurate enough.
    Take this unit kill score table I found. If I had, for example, killed two zerglings (50 each) and a hydralisk (350) in a short time span, how would that be distinguished from a defiler (450)? So if I had a trigger to give a reward for a player that achieves a kill score of 450, would the triggers give the mineral reward based on the units that were actually killed, or that of a defiler?

    If I'm wrong to be so careful, can you give me a breakdown of how things actually work and describe in detail a mineral reward system that uses unit kill scores to attribute rewards to players instead of EUDs? Thank you for the idea btw, it's worth investigating, even while EUD editor was able to achieve the same end goal.


    UNIT KILL SCORES
    ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦
    When playing certain SCUMS (StarCraft Use Map Settings) games, you will notice that there is a leaderboard on the top left corner displaying how much points you get for killing certain units. Here is the reference to how much each unit is really worth.

    NOTE: The listing is in no particular order. Sorry for any inconvenience.

    TERRAN
    ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦
    Units:
    Marine - 100
    Ghost - 350
    Vulture - 150
    Goliath - 400
    Siege Tank - 700
    SCV - 100
    Firebat - 200
    Medic - 250
    Wraith - 800
    Science Vessel - 1250
    Dropship - 600
    Battlecruiser - 2400
    Valkyrie - 800
    Gui Montag (Firebat) - 400
    Civilian - 10
    Sarah Kerrigan (Ghost) - 700
    Alan Schezar (Goliath) - 800
    Jim Raynor (Vulture) - 300
    Jim Raynor (Marine) - 200
    Tom Kazansky (Wraith) - 1600
    Magellan (Science Vessel) - 2500
    Edmund Duke (Siege Tank) - 1400
    Arcturus Mengsk (Battlecruiser) - 4800
    Hyperion (Battlecruiser) - 4800
    Norad II (Battlecruiser) - 4800
    Samir Duran (Ghost) - 700
    Alexei Stukov (Ghost) - 700
    Gerard DuGalle (Battlecruiser) - 4800

    Special:
    Vulture Spider Mine - 25

    Buildings:
    Command Center - 1200
    Supply Depot - 150
    Refinery - 150
    Barracks - 225
    Academy - 300
    Factory - 600
    Starport - 600
    Science Facility - 825
    Engineering Bay - 195
    Armory - 300
    Missile Turret - 150
    Bunker - 150

    Add-ons:
    Comsat Station - 225
    Nuclear Silo - 225
    Control Tower - 300
    Covert Ops - 225
    Physics Lab - 225
    Machine Shop - 225

    Special Buildings:
    Norad II (Crashed Battlecruiser) - 5000
    Ion Cannon - 5000
    Psi Disruptor - 3600
    Power Generator - 600

    Independent:
    Independent Starport - 10

    ZERG
    ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦
    Units:
    Zergling - 50
    Hydralisk - 350
    Ultralisk - 1300
    Broodling - 25
    Drone - 100
    Defiler - 450
    Infested Terran - 400
    Lurker - 500
    Overlord - 200
    Mutalisk - 600
    Guardian - 1100
    Queen - 800
    Scourge - 200
    Devourer - 1100
    Torrasque (Ultralisk) - 2600
    Matriarch (Queen) - 1600
    Infested Kerrigan (Infested Terran) - 4000
    Unclean One (Defiler) - 900
    Hunter Killer (Hydralisk) - 500
    Devouring One (Zergling) - 100
    Kukulza (Mutalisk) - 1200
    Kukulza (Guardian) - 2200
    Yggdrasill (Overlord) - 400
    Infested Duran - 700

    Special Units:
    Larva - 10
    Egg - 25
    Cocoon - 10

    Buildings:
    Infested Command Center - 900
    Hatchery - 900
    Lair - 1200
    Hive - 1500
    Nydus Canal - 225
    Hydralisk Den - 300
    Defiler Mound - 450
    Greater Spire - 1350
    Queen's Nest - 525
    Evolution Chamber - 120
    Ultralisk Cavern - 825
    Spire - 750
    Spawning Pool - 225
    Creep Colony - 120
    Spore Colony - 195
    Sunken Colony - 240
    Extractor - 75

    Special Buildings:
    Overmind (With Shell) - 10000
    Overmind - 10000
    Mature Crysalis - 5000
    Cerebrate - 2500
    Cerebrate Daggoth - 2500
    Overmind Cocoon - 4000

    PROTOSS
    ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦
    Units:
    Dark Templar - 650
    Dark Archon - 1300
    Probe - 100
    Zealot - 200
    Dragoon - 500
    High Templar - 700
    Archon - 1400
    Reaver - 800
    Corsair - 700
    Shuttle - 400
    Scout - 1300
    Arbiter - 2050
    Carrier - 1900
    Observer - 450
    Dark Templar (Hero) - 400
    Zeratul (Dark Templar) - 800
    Tassadar/Zeratul (Archon) - 2800
    Fenix (Zealot) - 400
    Fenix (Dragoon) - 1000
    Tassadar (Templar) - 1400
    Mojo (Scout) - 2600
    Warbringer (Reaver) - 1600
    Gantrithor (Carrier) - 3800
    Danimoth (Arbiter) - 4100
    Aldaris (Templar) - 1400
    Artanis (Scout) - 2400
    Raszagal (Dark Templar) - 1300

    Buildings:
    Nexus - 1200
    Robotics Facility - 900
    Pylon - 150
    Assimilator - 150
    Observatory - 525
    Gateway - 225
    Photon Cannon - 300
    Citadel of Adun - 600
    Cybernetics Core - 300
    Templar Archives - 750
    Forge - 300
    Stargate - 900
    Fleet Beacon - 1050
    Arbiter Tribunal - 1350
    Robotics Support Bay - 375
    Shield Battery - 150

    Special Buildings:
    Stasis Cell/Prison - 5000
    Protoss Temple - 5000
    Xel'Naga Temple - 5000
    Warp Gate - 2000

    NEUTRAL UNITS
    ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦
    Critters:
    Rhynadon (Badlands) - 10
    Bengalaas (Jungle) - 10
    Scantid (Desert) - 10
    Kakaru (Twilight) - 10
    Ragnasaur (Ash World) - 10
    Ursadon (Ice World) - 10

    Source and Credit: Unknown (various authors)



    None.

    Oct 21 2018, 5:49 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

    There's only a few combinations where you can't tell what unit was killed. Basically you accept that inaccuracy for simpler triggers. It's splash damage that really messes up that system though. If you combine it with checking deaths it becomes a lot more accurate but also setting up the cross player triggers is pretty tricky.

    Anyways, that's broad stroking it. Refer to Roys link to pick the system that suits you best.




    Oct 21 2018, 6:47 pm Roy Post #7

    An artist's depiction of an Extended Unit Death

    Quote from RevenantGhost
    That worked!!! I used EUD Editor to make all the triggers for the mineral award system in my map, using exactly the conditions and actions in your example. The only problem remaining is that the project in EUD Editor won't compile when I add a "display text" action to tell the player their kill resulted in a reward.
    I haven't used strings in EUD Editor 2, but maybe there's a problem with them. You could split up your trigger into two triggers: one you make in your editor of choice with the display message, and the other with the EUD subtraction. Like so:

    Kill Message
    Players

  • Force 1
  • Conditions

  • Current Player kills at least 1 Zerg Hydralisk
  • Actions

  • Display Text Message for current player: "\x0041 mins earned.\x004".
  • Preserve Trigger


  • Kill Reward
    Players

  • Force 1
  • Conditions

  • Current Player kills at least 1 Zerg Hydralisk
  • Actions

  • Modify resources for Current Player: Add 1 ore.
  • (EUD) SetKills(CurrentPlayer, Zerg Hydralisk, 1, Subtract)
  • Preserve Trigger


  • Make sure the message trigger comes before the EUD trigger in the trigger list to have it properly display.




    Oct 22 2018, 10:44 pm RevenantGhost Post #8



    I found that I was making a simple mistake in EUD editor that was preventing the project from compiling. You just have to be careful to select an option such as "always" every single time a display text trigger is used. If in any instance, you fail to specify, "always" or "once" or "empty," then the program will refuse to compile the project, presumably because the trigger is incomplete without making such a specification.

    Anyway, I was able to do everything I needed to do using the EUD editor. Thanks again, for your help!



    None.

    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [06:01 am]
    NudeRaider -- youarenotworthy
    youarenotworthy shouted: Is there a post somewhere that details how to get started with EUD?
    not just somewhere but stickied in UMS Assistance! ;) http://www.staredit.net/topic/7993/
    [05:57 am]
    NudeRaider -- Ultraviolet yep
    [03:09 am]
    RdeRenato -- with weapon* i need a medic with grenade launcher
    [03:09 am]
    RdeRenato -- x2
    [02:48 am]
    youarenotworthy -- Is there a post somewhere that details how to get started with EUD?
    [02:47 am]
    youarenotworthy -- I looked at the AI ability requirements you sent me before, but I don't really understand any of it.
    [02:41 am]
    Roy -- Or do you mean giving the medic a weapon?
    [02:37 am]
    Roy -- It would be easier to just meet the AI requirements: http://www.staredit.net/topic/13823/
    [02:32 am]
    RdeRenato -- Is it possible to make the medic attack with EUD?
    [02:22 am]
    Roy -- For some reason I have the ability to check it via condition in EUDGen but not set it with an action, so I'm guessing at least some of them don't work as expected as EUD actions. Or I'm just bad and forgot to include them.
    Please log in to shout.


    Members Online: O)FaRTy1billion[MM], Roy, jun3hong