Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Exp Glitch in RPG
Exp Glitch in RPG
Dec 27 2007, 1:29 am
By: Fawkes  

Dec 27 2007, 1:29 am Fawkes Post #1



I'm making an RPG where kills get you exp. It seemed to work when I played it alone, but when I did it with a friend, a weird glitch occured. It seemed he got exp for killing units until I killed one of those units. Then every unit of that kind that he killed would give ME exp instead of giving him exp. However, he'd still get exp for unit types I hadn't killed yet.



None.

Dec 27 2007, 2:23 am Roy Post #2

An artist's depiction of an Extended Unit Death

I'm assuming it's a shared property (like switches or something similar) that in your "kills to xp" trigger for player 2 are activated for player 1 when player 1 kills something.

I'd suggest looking over your triggers and seeing if you made any mistakes with switches, death counters, kill scores, etc.

If you want further help, however, you'll need to post the triggers so we can actually see what the problem is.




Dec 27 2007, 3:12 am Fawkes Post #3



I seperated the triggers for each player because checking them together caused a different glitch. Anyway, this is the trigger:

Players:
P(#)

Conditions:
Current player kills at least 1 (unit)
P8 has suffered at least 1 death of (unit)

Actions:
Modify score for current player, add (#) custom
Set deaths for P8 for (unit) to 0
Preserve Trigger



None.

Dec 27 2007, 3:22 am Vrael Post #4



Take note: when the death for p8 is subtracted, p1 still has 1 kill of unit. So, if p2 kills a unit, both conditions for the p1 experience are fulfilled.



None.

Dec 27 2007, 3:56 am NudeRaider Post #5

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 Vrael
Take note: when the death for p8 is subtracted, p1 still has 1 kill of unit. So, if p2 kills a unit, both conditions for the p1 experience are fulfilled.
Correct. To make it worse: You can't subtract a kill. You can only subtract kills score.

But every kill of a different type of unit has a different kills score. You can make a simple system checking for the exact kills score for every type of unit you can kill. Like this:

Current Player has exactly 350 kills score (=hydra)
-> Set Kills score to 0 for Current Player
-> Add 2 to Custom Score for Current Player

Current Player has exactly 50 kills score (=ling)
-> Set Kills score to 0 for Current Player
-> Add 1 to Custom Score for Current Player

As you can see you won't need the death condition of P8 but need a lot of triggers.
Problems arise, when you kill more than 1 unit per trigger loop (Hypers will help a lot!) or if you kill 2 units the same time by splash or multiple units.

In this case you would have to use a less accurate (but very easy) kills score method (e.g. player has at least 300 kills score -> subtract 300 kills score, add 1 to custom score) or use the 'perfect kills to cash' method which is quite complicated to set up and forces you to have spare comp player which doesn't kill units.

Which one will it be? ;)




Dec 27 2007, 4:02 am Fawkes Post #6



Is there a way to do this without using kill scores?



None.

Dec 27 2007, 4:37 am Vrael Post #7



You could take a leaf out of... someone else's book (I forget who) and have an arena for battles. You run up to an enemy and get teleported to a closed area, that way you can easily detect what you're fighting against. If you're going for the real-time feel, it's hard to get any more accurate. Otherwise kill score is best, or the perfect kills-to-cash, but... that's about it. Or you could devise your own method somehow and show us all up here at SEN, I'd like that.



None.

Dec 27 2007, 7:23 am JaBoK Post #8



Hm... what about a (complex to the extreme) set of trigs that first calculated how many of each unit the enemy lost in one cycle, then, going with most expensive units first, found out which player killed the unit and how to give them xp. For example, player 1 kills 2 hydralisks and one zergling with a major splash attack, player two happens to kill one hydra at the same time. The system knows player 8 lost 3 hydras and one zergling, the system also knows that player one has 750 killscore and player 2 has 350 killscore. The three hydras are subtracted from player 1, player1, player two, then the remaining zergling is subtracted from player one. Result: 2Hydra1Ling for player one and 1Hydra for player 2. This is just a theory, don't try it unless you seriously know what you're doing, due to the fact that it has to be streamlined to run in a single trigger cycle.



None.

Dec 27 2007, 7:50 am Moose Post #9

We live in a society.

Quote from Fawkes
I seperated the triggers for each player because checking them together caused a different glitch.
It shouldn't. Three triggers owned by P1, P2, and P3 will function identically to one trigger owned by all three of the players.

Conditions:
Current player kills at least 1 (unit) <-- Hi, I am a condition that is always going to be met after the player kills one of the unit.
P8 has suffered at least 1 death of (unit) <-- Therefore, whenever P8 has a death, the first player to run the trigger will have this condition met.

Actions:
Modify score for current player, add (#) custom
Set deaths for P8 for (unit) to 0 <-- Hi, after the first player runs the trigger, I ensure that none of the other players will run it.




Dec 27 2007, 9:21 am NudeRaider Post #10

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 JaBoK
Hm... what about a (complex to the extreme) set of trigs that first calculated how many of each unit the enemy lost in one cycle, then, going with most expensive units first, found out which player killed the unit and how to give them xp. For example, player 1 kills 2 hydralisks and one zergling with a major splash attack, player two happens to kill one hydra at the same time. The system knows player 8 lost 3 hydras and one zergling, the system also knows that player one has 750 killscore and player 2 has 350 killscore. The three hydras are subtracted from player 1, player1, player two, then the remaining zergling is subtracted from player one. Result: 2Hydra1Ling for player one and 1Hydra for player 2. This is just a theory, don't try it unless you seriously know what you're doing, due to the fact that it has to be streamlined to run in a single trigger cycle.
Well and what if Player 1 kills 7 lings (350 score) and 1 hydra (350 score) dies by Player 2? The system wouldn't know which player should get 7 custom score and which only 1.

No seriously you got 2 options:
- The simple score subtract (like every 400 score = 1 xp)
- The complex kills to cash perfect




Dec 27 2007, 5:42 pm JaBoK Post #11



How is player one gonna kill seven lings in one trigger cycle? Not gonna happen.



None.

Dec 28 2007, 12:47 am NudeRaider Post #12

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 JaBoK
How is player one gonna kill seven lings in one trigger cycle? Not gonna happen.
I knew someone would ask this. :D
so now what about 2 lings and 1 marine (both 100 kills score) still impossible?
I just showed you that your system has its problems, but I didn't want to post EVERY SINGLE INSTANCE where it fails.
Btw. how would you subtract everything in 1 cycle?




Dec 28 2007, 4:54 pm Falkoner Post #13



Well, you can just give them a certain amount for every amount of points :/



None.

Dec 30 2007, 10:49 pm JaBoK Post #14



Quote from NudeRaider
Quote from JaBoK
How is player one gonna kill seven lings in one trigger cycle? Not gonna happen.
I knew someone would ask this. :D
so now what about 2 lings and 1 marine (both 100 kills score) still impossible?
I just showed you that your system has its problems, but I didn't want to post EVERY SINGLE INSTANCE where it fails.
Btw. how would you subtract everything in 1 cycle?
In the case of the game you'd have to design it so that either occurences like this didnt happen, the xp for marines and 2 lings is close, and honestly the chances of player 1 splashing, killing 2 lings in the exact same 12th of a second that player 2 kills a marine is pretty slim.

To subtract everything in one cycle, first, in player one, you check the total killscore for player one compared to the deaths of player eight. IE:

P8 has one death of hydra, p1 has 350 killscore, subtract death and killscore, then add XP (Copy this a few times, maybe even do a binary copy) then do that for every unit. If the units with the highest killscore are on the top of the list, then it'll do it in one cycle. This should suffice as long as your RPG doesnt have mass slaughterings of cheap enemies while you fight a boss at the same time.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:53 am]
Ultraviolet -- :lol:
[06:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[06:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[06:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[06:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[06:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
[06:48 pm]
Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
[06:47 pm]
Vrael -- Do you know anyone with a deep understanding of the unique characteristics of your carpets, ensuring they receive the specialized care they deserve?
[06:45 pm]
NudeRaider -- Vrael
Vrael shouted: I've also recently becoming interested in Carpet Cleaning, but I'd like to find someone with a reputation for unparalleled quality and attention to detail.
beats me, but I'd make sure to pick the epitome of excellence and nothing less.
[06:41 pm]
Vrael -- It seems like I may need Introductions to multiple companies for the Topics that I care deeply about, even as early as Today, 6:03 am.
Please log in to shout.


Members Online: Roy, pinajsubi95