And for those who don't know what vampire mode is: your health drains over time and you can replenish it by damaging or killing your opponents. All health items are removed from the arena, regeneration regenerates armor instead. You won't survive if you camp. Maximum health and armor is by default 300 and 250 respectively.
There's a few cvars added for customising it, but the standard settings offer a pretty balanced and challenging game.
The readme mentions a minor issue with floats and low values. Could this be from a multiplication of an int and a float? If so, check the int is converted to a float first, then convert the answer back to an int (if that is what you are after).
You're right about it being about multiplying ints and floats, although I'm not quite sure whether I understand your advice though. The issue is the game rounding down the values and losing decimals that can make quite a difference, but I decided to rather round up the values now and it seems alright. It was especially an issue when your target has armor - one MG bullet would only give you a 1 health bonus. Now it gives 2, which is acceptable since the exact amount should be 1.7325 if you didn't frag your opponent.
I've also capped the health bonuses to your target's health now, so if your target has 10 health and no armor, then a railgun shot will base your bonus on 10 damage given, not 100.
Now I just need to figure out the high-health glowing effect. Still not 100% sure how to get it to work - I'm basically trying to do it using a new powerup entry to the powerup_t struct, applying it to clients when they're within 10% from the max health, and drawing it client-side in the same way as with actual power-ups in cg_players.c.
As to the (int float) issue, if you convert the int to a float, then do the math (so you have float float), you should get a 'closer to correct' answer. In javascript or java this is a common issue which can be solved with (parseFloat(int) * float). However the rounding up is a good solution too.
Like whether or not your health is slowly reduced automatically, how much health you have, what weapons you have/start with etc.
Do this and you have got one hot mod.
There are cvars that control those. Here's from the readme:
gm_vampire 0/1 (default: 1)
Enables vampire mode.
gm_vampire_expireRate <rate> (default: 1)
Integral increment by which players' health are decreased per second
gm_vampire_killFactor <factor> (default: 1.0)
Floating factor of damage dealt resulting in a frag which is added to own health
gm_vampire_stealFactor <factor> (default: 0.75)
Floating factor of damage dealt not resulting in a frag which is added to own health
gm_vampire_startArmor <amount> (default: 100)
Amount of armor given to players upon spawning
gm_vampire_startHealth <amount> (default: 60)
Amount of health given to players upon spawning
gm_vampire_maxArmor <amount> (default: 250)
Maximum amount of armor a player can hold
gm_vampire_maxHealth <amount> (default: 300)
Maximum amount of health a player can have
"what weapons you have/start with"
I could add a pretty comprehensive set of options for starting weapons straight from my main mod, but I'm looking to keep this as simple/minimalistic as possible. I might add just a basic option for the next version though, which will be released when I figure out how to implement a high-health player glow... right now everyone glows lol.
Only registered members can post a reply.
Already registered? Sign in.