Staredit Network

Staredit Network -> Concepts -> Kills to Cash Near-Perfect v2
Report, edit, etc...Posted by Tuxedo Templar on 2006-10-31 at 08:23:25
Ok so we all know the main methods of doing cash for kills normally, right? You can either make one trigger for each kill of each unit you want (which could easily go into the thousands for maps where lots of killing takes place), you can give money whenever the kills score is non-zero (which doesn't account for unit type or multi-kills), or if you're willing to sacrifice a portion of terrain and a player slot you can track kills by the 'most kills' method (which for precision uses is the only real way to do it... thus far, at least).

Any way you look at it, there's a cost involved. However, me being the insatiable perfectionist I am, I'm not simply able to settle on a compromise like any normal sane person would. Therefore, I went and ripped apart the so-called 'perfect' method and rebuilt it from the ground up.

The difference?

One measly player slot. Yep. All that work just to skim off the cost of that one extra player slot. Yay me.



How does it work now? Aw who cares. I'm probably gonna need to clean it up a lot before I can actually use it (for mechnogears), so I won't bother explaining it until then. At least it works, and that's all I really care about ATM. tongue.gif Check out the prototype and test it out for yourself. Points if you find something wrong with it. Bonus points if you can make use of it somehow.

Enjoy.
Report, edit, etc...Posted by Grand_Dracolich on 2006-10-31 at 09:55:09
THANK YOU! I'm going to make an open rpg where its everyone for himself, and the shared kills method (the most reliable kills to cash method I have) isn't really going to work for it.

If this is more useful then the 'most kills' method (which I don't know) then I really want to use this.
Report, edit, etc...Posted by Tuxedo Templar on 2006-10-31 at 09:58:53
Well the only difference between the 'most kills' method (which this is just a modified version of) is that you don't need the extra player slot. You can have all 8 players in the game without needing to reserve one with the previous method.

Call it an upgrade, really.
Report, edit, etc...Posted by Grand_Dracolich on 2006-10-31 at 10:03:10
The way I was going to set my map up I would've had 1 or 2 player slots free, but it would be a little helpful if I had those free to do something (maybe I'll go insane and make them players...).
Report, edit, etc...Posted by ShadowFlare on 2006-10-31 at 14:28:24
BTW, this reminds me of something. On my map I'm making, which will need SCMLoader to load some mods, I have kills to cash triggers on it. However, since it is using mods, I can very very easily make absolutely perfect kills to cash. This is because the points received for kills are modified. wink.gif Too bad Blizzard didn't make it so you could modify that unit property in maps. Then there would be a way to easily do cash to kills exactly how you want it and without needing a units.dat mod.
Report, edit, etc...Posted by Urmom(U) on 2006-10-31 at 15:15:24
Couldn't DL it because I couldn't find where to.
Report, edit, etc...Posted by Tuxedo Templar on 2006-10-31 at 15:57:09
It's somewhere in the middle of the page, urmom. I hate that host too but rapidshare was down so I had to pick something. tongue.gif
Report, edit, etc...Posted by Rantent on 2006-10-31 at 22:01:48
The downloads not working for me...
Report, edit, etc...Posted by Tuxedo Templar on 2006-10-31 at 22:23:19
Ok try this then:

http://www.mysharefile.com/v/7081491/Kills...ct_v2d.scx.html
Report, edit, etc...Posted by Grand_Dracolich on 2006-11-01 at 09:11:15
If you could explain how it works, or at least rename some switches and units in the counters to describe what they do, I'd be grateful.
Report, edit, etc...Posted by Tuxedo Templar on 2006-11-01 at 20:09:42
I just tested it with multiplayer and full house. Needs more improvements still (kill tracking is a bit slow) but it does indeed work now.

The gist of it is that if all players don't have both Most and Least kills, someone has made a kill somewhere. I just modified the previous 'perfect' method using that property instead of reserving a player slot to always be the Most kills.
Report, edit, etc...Posted by Grand_Dracolich on 2006-11-01 at 21:14:37
I have no idea what the trigger layout is, when hosting on SeN's back up and you've worked out the bugs, post up a fully commented version.
Report, edit, etc...Posted by Urmom(U) on 2006-11-01 at 21:23:23
I like the trigger work. If you could find a way to copy the trigger commented 'Count off until player no longer has least kills' a few times without giving inaccurate results then that would speed things up a lot.
Report, edit, etc...Posted by Tuxedo Templar on 2006-11-01 at 21:35:28
Yeah, that's exactly what I just did tongue.gif. Actually I copied it seperately for each player (setting the 1 at a time restriction to apply only for the current player). Problem is I can't have more than one at a time being killed without knowing if it'll go over the Least Kills limit for the current player (and risk pushing player inadvertently into Most kills). And I can't make the archons kill any faster than SC will let them. pinch.gif

If I were to find the difference between current player's kills and the Most player and count off from that, though, then I probably could.
Report, edit, etc...Posted by Urmom(U) on 2006-11-02 at 15:14:35
You should have the archons attack a burrowed unit with infinite health so that they are always attacking and then the splash will maybe kill the units spawned instantly instead of waiting for the archons to find a target.
Report, edit, etc...Posted by Grand_Dracolich on 2006-11-02 at 15:23:03
He had archons attacking an infinite hp floor trap. I'm not sure what else you can do to make it faster...
Report, edit, etc...Posted by Urmom(U) on 2006-11-02 at 18:21:24
Oh my bad, I just looked at the triggers.
Report, edit, etc...Posted by spinesheath on 2006-11-03 at 16:53:45
Ok, it's a little complex... pinch.gif
Just tell me one thing: What are you doing THIS for?

CODE
//-----------------------------------------------------------------//

Trigger("Player 1","Player 2","Player 3"){
Conditions:
Most Kills("Men");
Least Kills("Men");

Actions:
Set Switch("Switch0", set);
Preserve Trigger();
Comment("Check state of kills balance...");
}

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

Trigger("Player 1","Player 2","Player 3"){
Conditions:
Most Kills("Men");
Switch("Switch0", set);

Actions:
Set Switch("Switch1", set);
Preserve Trigger();
Comment("");
}

//-----------------------------------------------------------------//
Trigger("Player 1","Player 2","Player 3"){
Conditions:
Least Kills("Men");
Switch("Switch1", set);

Actions:
Set Switch("Switch2", set);
Preserve Trigger();
Comment("");
}

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




At first, you check if CurrentPlayer has both least and most kills, then, IF he HAS both, you check if he has most kills... and then you check if he has least. This gives no sense at all. And in the end, you clear all switches but switch0, so:
What are those triggers for?
Report, edit, etc...Posted by Grand_Dracolich on 2006-11-03 at 18:58:27
QUOTE(spinesheath @ Nov 3 2006, 08:53 PM)
At first, you check if CurrentPlayer has both least and most kills, then, IF he HAS both, you check if he has most kills... and then you check if he has least. This gives no sense at all. And in the end, you clear all switches but switch0, so:
What are those triggers for?
[right][snapback]582689[/snapback][/right]


That's what I wanna know, but what I do know about it is, if a player doesn't have both most and least kills, then someone has a kill, if you have most kills, then something happens and you get minerals, or something. I don't really know all that much about it.
Report, edit, etc...Posted by Tuxedo Templar on 2006-11-03 at 19:16:02
Well, think about it in terms of the trigger loop. Obviously the first time around those switch setters well simply end up with switch0 being set if those conditions are fulfilled. However the next time around (and there's nothing that clears switch0 beyond those triggers, by the way), the first trigger may or may not activate, but the others below it will activate accordingly.

It basically checks if one or the other is true (there's no 'NOT least kills' condition, by the way), and performs actions accordingly. Originally I'd had something that would happen if only one of the two (Least or Most kills) were true, but since I removed those I could probably simplify it to the following two triggers:
CODE

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

Trigger("Player 1","Player 2","Player 3"){
Conditions:
Always();

Actions:
Set Switch("Switch0", clear);
Preserve Trigger();
Comment(" ");
}

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

Trigger("Player 1","Player 2","Player 3"){
Conditions:
Most Kills("Men");
Least Kills("Men");

Actions:
Set Switch("Switch0", set);
Preserve Trigger();
Comment("Check state of kills balance...");
}

//-----------------------------------------------------------------//
Report, edit, etc...Posted by spinesheath on 2006-11-03 at 19:28:05
Ah, ok, I missed that switch0 is not cleared... damn pinch.gif

I don't see anymore possible problems then - no points for me cry.gif

Well done! clapping.gif
Report, edit, etc...Posted by Laser_Dude on 2006-11-03 at 21:31:53
Ok, first off: this is a helpful system, but: there are no player tracking capabilities that I've seen, (it just says yay no matter what). Please correct me if I'm wrong

Second off, you said that no extra player was needed, yet you still used one

Third off, if all the players were to get a kill at the same time (which might actually be common, in the case of a 1v1 mass game, with 2 players blasting each other to bits.

The old system of kills to cash perfect was glitch free, but it used an extra player. This is similar, but works without the extra player, you would have to watch out for every player getting a kill at the same time.
Report, edit, etc...Posted by Tuxedo Templar on 2006-11-03 at 23:17:07
Yeah in a 1v1 mass game that might happen. Or if you have units of multiple players killing each other in sync by the same amount for some reason (dumb luck or by some design). In that case you'd still need an extra player slot to "ground the current", so to speak. My implementation relies on disjointed killing by at least one of the players. That's of course what's going on in my Mechnogears map, which is really all I designed this for anyway. tongue.gif



ADDITION:
Actually, glad you brought that up because I believe I've found a partial solution. In the unlikely event that two or more players manage to keep the Most and Least condition by killing at the exact moment, they will however both have increased their Kills Score. I might be able to come up with a solution to track that, but it would only be able to break ties for one unit kill at a time. If players kill 2 or more units simultaneously for some reason, they'd only get treated as one.


Hmm. I guess there is no completely perfect method without sacrificing a player slot. That'll have to suffice, though. Odds are very low of those cases happening, really.
Report, edit, etc...Posted by Kookster on 2006-11-04 at 01:13:00
tux your a mad genious how do you think of these simple but complicated things
Report, edit, etc...Posted by Tuxedo Templar on 2006-11-04 at 10:31:55
Actually if it was simple before it ain't so much now. Trying to get the new prototype with kill score checking is basically combining two systems into one. Plus having discovered another possibly major bug doesn't help. angry.gif


I think what I'm gonna do is run the current method normally, with two additions: For players who have not finished counting off their current kills before making new ones, you can detect their new kills (only 1 at a time per HT, unfortunately) by a non-zero kills score. Fortunately this doesn't apply for players who aren't at Least kills during the countoff (or as long as at least one Least kills player isn't getting new kills), who can continue getting kills as much as they want without penalty (because of the way it's designed). Except for possibly delaying the countoff duration (and adding risk of more lost kills the longer it has to run).

If no one is counting off kills but everyone gets a non-zero kills score somehow (like with simultaneous kills), then simply add to their kill count just the same. Only 1 kill per HT, though, like before (and I unfortunately can't factor in deaths to track more than 1 due to use of certain death counters by the triggers of the map I'll be using this in).


So basically, just fall back on the old kills score method between the gaps. pinch.gif Guess that's as good as it'll get.

ADDITION:
UPDATE- Ok got it done. Works ok so far. Might need to give it some more focused testing just to be sure, though.
Next Page (1)