Kills to cash
Dec 22 2010, 6:42 pm
By: Jesusfreak  

Dec 22 2010, 6:42 pm Jesusfreak Post #1



I'm trying to do kills to cash, but I see a couple of potentially major problems:
When a player starts getting multiple units or units with splash, the system starts bugging up because multiple units can get killed at the same time.
Many units have the same kill score value; ie, high templar, sarah kerrigan, siege tank, samir duran, alexei stukov, infested duran, and corsair are all 700.

I think "perfect" kills to cash might get around these (not sure), but I can't use it because I don't have an available computer player that doesn't kill anything and I don't understand the method anyway.

Is there a better way to do kills to cash than kill scores? (If it matters, I'm actually not doing kills to minerals, I'm doing kills to death counts, which are used to track kills which you turn in to get paid minerals later... I didn't think it made sense for money to appear out of thin air.)

(I KNOW I've made a thread on this same subject a while back, but I can't find it...)



None.

Dec 22 2010, 7:19 pm Chia-Tyrant Post #2



From what I remember, the "perfect" kills to cash requires you to use accumulate most kills to detect difference in kills between the player and a computer. Have the computer kill one unit and add 1$ to the player until the scores are even. It's good if you have lots of computers to spare or if the map is single player. Otherwise, it's not really worth using.

There are several options at your disposal. Here are a few:
  • Divide the world in areas. Detect when kill score is at least one. Add a certain amount of cash depending on where the unit is situated.
  • Use the "kills at least X units" condition. Copy-paste it as many times as you want. Past a certain threshold, you could detect if kill score is at least 1 to restrain players from becoming too powerful. It takes a ton of triggers but it's extremely easy to do (try "Trigger duplicator" or copy-paste in notepad).
  • Share the rewards. Detect unit deaths for the computers then add the appropriate amount of cash to the human players. I personally always prefer shared experience in rpg's; otherwise, players are too prone to individualism.
Additional restraints could also offer more viable options. For instance, how many human players are there? How many computer players can are agressive? How many units can the human players own?



None.

Dec 22 2010, 7:27 pm NudeRaider Post #3

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 no way around the mentioned problems with kills score based systems. Any method has their drawbacks, you'll just have to pick the least evil.

Kills to cash perfect isn't really difficult to understand. You have 1 computer - the score keeper - always have 1 kill more than anyone else of every unit that can die (by adding 1 of each unit to the "killing pit"), so the condition most kills of [unit] returns only true for this player. When another player makes a kill you detect that because now both that player AND the computer player have most kills of that unit (tied amount of kills = both players have most kills) so you give the reward to that player and let everyone else kill 1 of that unit, so all other players have same amount of kills as the killing player and the score keeper has 1 more than everyone else again. Then wait for the next kill and rinse and repeat.
So it'd be enough if you have 2 computer players that can both only kill certain types of unit. E.g. In a Protoss vs. Terran map the toss computer could keep track of the protoss units that are killed by the terran team because it's safe to assume the protoss computer doesn't kill his teammates. And the Terran computer respectively keeps track of the terran units that get killed.

If that doesn't work for you, maybe you can give out rewards based on deaths? You can't detect who made the kill that way but you could reward the whole team. Or you combine it with kills score, to detect who just made *any* kill and assume he killed everything that died in that trigger loop. Prone to false rewards for simultaneous kills though.

If that still isn't good enough for you, then there's always trigger duplicators which can make you 1,000 (or however many can possibly be killed in your map) triggers. 1 for each killed unit. For mass kill maps you'd have to make 1 reward every 10 kills or something because you'd eventually get lag from too many triggers.




Dec 22 2010, 7:30 pm Jesusfreak Post #4



There's 4 human players (I originally wanted 5 but had to make room for computer players) and 4 active computer players.
(4 players, one stereotypically "good" faction, one stereotypically "evil" faction, one weird conspiracy organization, and an "everything else" faction)

I thought of your first bullet point, but the problem is, it fails when there's multiple units across the map (what if, for example, the player has a group of swordsmen killing zombies near the vampire crypt and another group killing zombies in the marsh?)

For your second point... How do I get a trigger duplicator? What would copy/pasting something in notepad do?

For the third, the players aren't necessarily aligned to each other (actually, they'd almost certainly not be all allied to each other). I also hate shared experience, not to mention that it's not experience or money we're dividing up, it's kills (the number of kills is stored in a death counter, which is emptied when you go to town and collect your pay).



None.

Dec 22 2010, 7:33 pm Jesusfreak Post #5



Quote from NudeRaider
There's no way around the mentioned problems with kills score based systems. Any method has their drawbacks, you'll just have to pick the least evil.

Kills to cash perfect isn't really difficult to understand. You have 1 computer - the score keeper - always have 1 kill more than anyone else of every unit that can die (by adding 1 of each unit to the "killing pit"), so the condition most kills of [unit] returns only true for this player. When another player makes a kill you detect that because now both that player AND the computer player have most kills of that unit (tied amount of kills = both players have most kills) so you give the reward to that player and let everyone else kill 1 of that unit, so all other players have same amount of kills as the killing player and the score keeper has 1 more than everyone else again. Then wait for the next kill and rinse and repeat.
So it'd be enough if you have 2 computer players that can both only kill certain types of unit. E.g. In a Protoss vs. Terran map the toss computer could keep track of the protoss units that are killed by the terran team because it's safe to assume the protoss computer doesn't kill his teammates. And the Terran computer respectively keeps track of the terran units that get killed.

If that doesn't work for you, maybe you can give out rewards based on deaths? You can't detect who made the kill that way but you could reward the whole team. Or you combine it with kills score, to detect who just made *any* kill and assume he killed everything that died in that trigger loop. Prone to false rewards for simultaneous kills though.

If that still isn't good enough for you, then there's always trigger duplicators which can make you 1,000 (or however many can possibly be killed in your map) triggers. 1 for each killed unit. For mass kill maps you'd have to make 1 reward every 10 kills or something because you'd eventually get lag from too many triggers.

Kills to cash requires too much of my computer players (and as I mentioned responding to the other guy, the players aren't on a team)... I think I'm going to go with the trigger duplicator thing... how do I get it and how do I use it?



None.

Dec 22 2010, 7:42 pm Chia-Tyrant Post #6



It's available on sen's dldb here.
There are also plenty of alternatives like macrotriggers and company.



None.

Dec 22 2010, 7:43 pm Jesusfreak Post #7



Quote from Chia-Tyrant
It's available on sen's dldb here.
There are also plenty of alternatives like macrotriggers and company.

What's macrotriggers?

EDIT:
Quote
This is a Trigger Duplicator...

Web versions:

Duplicator http://hyperbolica.googlegroups.com/web/7.htm

Countoffs http://hyperbolica.googlegroups.com/web/4.htm

------------------------------line--------------------------

Ar3sgice's absolutely awesome trigger duplicator program; open the map with scmdraft2, open the non-classic trigger editor, find the triggers you want to copy, write the variables in, and compile!

Allows you to make arrays so the units/locations can be used in the trigger duplicator as well!

* Press F5 to refresh.

Um... there's a non-classic trigger editor?!?



None.

Dec 22 2010, 7:47 pm Chia-Tyrant Post #8



Macro is an app that helps write triggers (like protrg). I don't really like it since I can already use c++ to write my own apps or plainly use notepad to solve all of my problems.

I don't think it's available in the dldb but there's a topic with a download link on the forum; I can't seem to find it though.

Edit: Classic can be tedious to use. Copying text back and forth from the trigger editor in scmdraft (the text one, not classic) is much faster. Be warned though, it can be buggy (make sure to backup alot).



None.

Dec 22 2010, 7:49 pm Jesusfreak Post #9



I just checked over scmdraft, there's no non-classic trigger editor... :unsure:



None.

Dec 22 2010, 7:53 pm Chia-Tyrant Post #10



You mean this?




None.

Dec 22 2010, 7:57 pm Jesusfreak Post #11



... Mine doesn't have it...




None.

Dec 22 2010, 8:05 pm Chia-Tyrant Post #12



Oh, you just need to have the TrigEdit.sdp file in the /Scmdraft 2 080/Plugins folder. I put it in attachment.



None.

Dec 22 2010, 8:11 pm Jesusfreak Post #13



The file was already in there... I replaced it anyway and it still didn't do anything.

EDIT: Ah, I've got it working now. Apparently I was supposed to have made a shortcut to the file instead of copy/pasting the program onto my desktop (the one I had before was considering itself part of my desktop rather than the scmdraft file).



None.

Dec 22 2010, 8:13 pm Chia-Tyrant Post #14



Weird... try running in admin or compatibility mode?



None.

Dec 22 2010, 8:17 pm Jesusfreak Post #15



Ok, I've got the non-classic trigger editor and the trigger duplicator operational... and I don't understand either of them :><: .

How do they work?

EDIT: Ok, I think I've figured out the jist of it, the duplicator isn't as complicated as it looks, and I can just make the triggers in classic, copy them from trigedit, and paste them back into trigedit, and it should work... I think.

Of course, this is probably something I'd want to do last in my map, since this would take up a lot of space in the trigger editor...

EDIT2: What happens if I type something in wrong in trigedit? Does scmdraft crash or something?

Post has been edited 2 time(s), last time on Dec 22 2010, 8:35 pm by Jesusfreak.



None.

Dec 22 2010, 8:44 pm Chia-Tyrant Post #16



Quote
Of course, this is probably something I'd want to do last in my map, since this would take up a lot of space in the trigger editor...
Use find in notepad and add proper comments to triggers.

Quote
What happens if I type something in wrong in trigedit? Does scmdraft crash or something?
When you hit the "checkmark" button in trigedit after pasting the triggers, it should return an error message if something is wrong and won't save the changes. Btw, you need to hit that checkmark for changes to be saved.



None.

Dec 22 2010, 9:12 pm Jesusfreak Post #17



Even if I did add comments, it would still take up a lot of space if I used even only 100 triggers (I'll probably use about 5000 and add a message to the 5000th one telling the player that they have no life :bleh: ).

For testing purposes, I can just give myself a cheat of some sort if I need to.

EDIT: Wait, why do I have to go into notepad to find the triggers? Can't I just include the comment before I mass-produce the trigger with the duplicator?



None.

Dec 22 2010, 9:28 pm rockz Post #18

ᴄʜᴇᴇsᴇ ɪᴛ!

there is no "find" tool in the default text trigger editor. What you can do is copy/paste into a different text editor which actually works better. The purpose of "find" would be to find the correct trigger.

However you can also include manual comments (which are not saved in the map itself) in a default text file by just commenting it out:
//comment goes here

They won't be saved in the map, but they'll be saved in your text file, which you can then copy/paste into the map.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Dec 24 2010, 12:40 am Gigins Post #19



Combine Deaths and Kill score. Like, CP1 has at least 1 deaths of marine; P1 has at least 100 Kill score; CP1 -1 death of marine; P1 -100 Kill score +1$. Have to do every killable unit. You can use Current player to reduce trigger count player wise, use Force to reduce trigger count CP wise.

It isn't perfect but reseting it every 10 or so trigger cycles reduces errors to 1%. Use DC to count trigger cycles, every 10 trigger cycles reset all Deaths of killable units and player kill scores. Place this trigger after all kill calculations. This ensures that if a miscalculation has happened it won't lead to more errors and calculation will refresh every 10 cycles, that is less than a second.

To reduce error % further add combo triggers for units that are most likely to get splashed. Like, CP1 has at least 2 deaths of marine; P1 has at least 200 Kill score; CP1 -2 death of marine; P2 -200 kill score +2$.

Actually works as a charm. Errors occur only in mass splashing. Using this is all my late maps. Good luck!



None.

Dec 24 2010, 3:18 am Jesusfreak Post #20



Sounds pretty good, but how do I do the resetting it every 10 trigger cycles thing?

Also, wouldn't having all these triggers running potentially cause massive lag?

What if two different players kill the same kind of unit at the same time? The CPU would have 2 deaths of the unit, but each player would only have half the required kill score.

Ack, so confusing. I'll probably just use trigger duplicator to make like 5000 simple triggers for all the units...



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[02:26 pm]
UndeadStar -- Vrael, since the ad messages get removed, you look like a total madman for someone that come late
[2024-5-02. : 1:19 pm]
Vrael -- IM GONNA MANUFACTURE SOME SPORTBALL EQUIPMENT WHERE THE SUN DONT SHINE BOY
[2024-5-02. : 1:35 am]
Ultraviolet -- Vrael
Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
Gonna put deez sportballs in your mouth
[2024-5-01. : 1:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
[2024-4-30. : 7:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[2024-4-29. : 6:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[2024-4-29. : 4:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[2024-4-29. : 12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[2024-4-29. : 11:17 am]
Zycorax -- :wob:
Please log in to shout.


Members Online: UndeadStar, Enfie