[VX ACE] RUSSIAN ROULETTE SKILL

Posts

Pages: 1
So, in the game I'm currently working on the protagonists' primary weapons are guns. One of the characters is a somewhat cocky gambler and I want this to be reflected in one of his moves - Russian Roulette. I'm currently trying to figure out how to implement it.

- 1 bullet in the chamber, gun's maximum capacity is 6 bullets
- First shot is aimed at you, second is aimed at the enemy, third at you, fourth at the enemy, fifth at you, sixth at the enemy
- This means chances of getting shot (or the attack hitting instead of missing) is 16.6% (1 in 6) on the first trigger pull, 20% (1 in 5) on the second trigger pull, 25% (1 in 4) on the third trigger pull, 33.3% (1 in 3) on the fourth trigger pull, 50% (1 in 2) on the fifth trigger pull and 100% (1 in 1) on the final trigger pull
- To ramp up the tension, I'd like it if the attack did more damage the further along we get (ie firing on the first pull does less damage than firing on the fifth pull)
- I think it would be best if this only consumed one turn as people are less likely to use the attack if it could occupy the character for a potential of six turns.
- Naturally, if the bullet is fired there will be no more trigger pulls.
- One way I thought of doing it would be to have the Skill set a Variable to a random number between 1 and 6 to decide how many trigger pulls there will be then invoke one of another six Skills where the battle animation is pre-determined so the number of shots in the animation tallies up to the number of shots actually fired, but I think this cheapens the laws of probability and eliminates some of that essential tension as you then basically only have a 50/50 chance of it being you or the enemy that gets hit.

Anyone got any ideas on this one?
I think this can be done in common events, but lately I've gotten into a lot of scripting no one else has done. I think I'm up for this challenge to script it.

Alright, 90 minutes later. I have the skill where it pulls the trigger at himself and switches back and forth. Starts with a 1 in 6 chance. Then drops to 1 in 5 and so on.

I've got the base damage ratio at 150 HP and it doubles each failed attempt. This can all be changed. I've got a damage ratio thing so you can change it to damage *= 1.5 or whatever you want.

I also need to call into question the random. I have the system showing the variables. And about 95% of the time the gun goes off on the 5th bullet when there is a 50/50 chance. But I guess random is random. This also makes the skill pretty long. But I guess random is random.
4 hours ing. I've made a script to collect the user and target and damage the user if shot. Now the hangup is damaging the enemy or even finding the enemy. Too many odd troop variables, after that it will be showing the damage done. I think I'll give this a rest for now.
author=Sam
- One way I thought of doing it would be to have the Skill set a Variable to a random number between 1 and 6 to decide how many trigger pulls there will be then invoke one of another six Skills where the battle animation is pre-determined so the number of shots in the animation tallies up to the number of shots actually fired, but I think this cheapens the laws of probability and eliminates some of that essential tension as you then basically only have a 50/50 chance of it being you or the enemy that gets hit.

This is basically what it comes down to when you use the skill anyways - there's a roughly 50/50 chance the skill's going to hit either you or the enemy (weighted more towards hitting the enemy, something like 60/40 in favour of hitting the enemy). What I'd suggest is dropping the idea of only six attempts to fire it, or that the sixth shot will automatically hit. Here's what I'm proposing:

The bullet gets loaded into a random chamber - I'm assuming he's using a six chamber revolver, so it's assigned to (let's say) the "bulletLoadedIn" variable giving it a number between 1 and 6 in there. Hell, it doesn't even have to be a random chamber - you could just always assume it's in chamber 1, or 6, or 3, or whatever.

In true Russian Roulette, the chamber is spun before every shot. That means that, for each shot, you generate a random number between 1 and 6 and compare it to the bulletLoadedIn variable - if it's the same, the shot goes off, if not you swap to the other person as a target and try again, incrementing the "shotsTried" variable by 1 (and then work that variable into your damage formula so that the longer it takes for a shot to go off, the more damage it does).

The downside to this method is that RNG could make these sequences extremely long, but it would have the tension you're looking for - in your sixth-shot-hits-for-sure method, the skill is weighted more towards doing more damage to your enemy than it is to the character (because it aims at your character first and each attempt increases the damage - if you're interested, I can show you the math). With this method, it might be possible to do great damage to an enemy, but the chance of doing just as much damage to the character is there - without artifically weighting it towards one character or the other. If you want to make sure it doesn't run for an extremely long time, you can just limit the number of attempts to make the shot - if it doesn't go off, both the character and the enemy just got lucky today and live to fight another day.
I think I've cracked it (though somewhat messily)! I have 12 Skills, Russian Roulette, First Shot (x2), Second Shot (x2)... Sixth Shot (x1). There are also 6 Common Events, 0 shots fired, 1 shot fired... 5 shots fired.

Russian Roulette calls 0 shots fired, it sets a variable to a random number between 1 and 6, if its 1 its forces use of First Shot (hit), if it misses it forces Skill First Shot (miss), First Shot (miss) then calls common event 1 shot fired which sets the variable to a number between 1 and 5... you see where this is going.

The odd numbered shot skills have target as User, even numbers target enemies. The higher shot numbers do more damage.
Pages: 1