Page 1 of 2
Setting Player Stat defaults
Posted: August 5th, 2012, 4:22 pm
by Lou
Hi,
I am working on the HUD and wanted to add a Stamina bar. I am using the Health and Mana bars as a
reference but I cannot find where the players stats are defined so I can add the stamina value.
Are these values that I can override in the "player.cfg" file or is there another location that I should set them?
Regards,
Lou
Re: Setting Player Stat defaults
Posted: August 7th, 2012, 4:06 pm
by Lou
I have been reviewing all the sub directories and cannot find a thing on this.
I hope it is not something so obvious that I completely overlooked it.
Re: Setting Player Stat defaults
Posted: August 8th, 2012, 9:52 am
by Hirato
player.cfg is the player's critter definition; you can define his initial stats, skills and assorted other things there.
There is no stamina value
Re: Setting Player Stat defaults
Posted: August 8th, 2012, 12:14 pm
by Lou
Hi Hirato,
Thanks for the info. Just a few more questions on this.....
1.) So when I code the player config am I adding "rc_player_health=150"?
I have tried a few combinations and have looked around but did not find anything that
said what the commands are for player stats.
2.) If there is no stamina then I need to request it as a new feature or compile my own copy of the code and add it,
correct? I cannot add a new stat via scripting.
Thanks,
Lou
Re: Setting Player Stat defaults
Posted: August 9th, 2012, 4:04 pm
by Lou
I set r_char_health = 150 and when I started the game it said it could not override the alias, maybe I am getting close.....
Re: Setting Player Stat defaults
Posted: August 15th, 2012, 8:54 am
by coopziana
Hi Lou,
I was looking at doing this too and I this is how you do what you are looking for:
Open player.cfg
Then you need to define player initial health with the following code:
For reference here is a list of other commands you can use to change Base Stats:
Code: Select all
r_char_ //then use any of the following followed by a value.
// base_level[i]
// base_experience[i]
// base_points[i]
// base_strength[i]
// base_endurance[i]
// base_agility[i]
// base_charisma[i]
// base_wisdom[i]
// base_intelligence[i]
// base_luck[i]
// base_armour[i]
// base_diplomacy[i]
// base_magic[i]
// base_marksman[i]
// base_melee[i]
// base_stealth[i]
// base_craft[i]
// base_fire_thresh[i]
// base_water_thresh[i]
// base_air_thresh[i]
// base_earth_thresh[i]
// base_magic_thresh[i]
// base_slash_thresh[i]
// base_blunt_thresh[i]
// base_pierce_thresh[i]
// base_fire_resist[i]
// base_water_resist[i]
// base_air_resist[i]
// base_earth_resist[i]
// base_magic_resist[i]
// base_slash_resist[i]
// base_blunt_resist[i]
// base_pierce_resist[i]
// base_maxspeed[i]
// base_jumpvel[i]
// base_maxhealth[i]
// base_maxmana[i]
// base_crit[i]
// base_healthregen[f]
// base_manaregen[f]
just as a little bonus info, i would imagine that setting the values at the end will be changed by ( +,-,= )
r_char_base_maxhealth = 150 // will set your base health to 150
r_char_base_maxhealth + 150 // will add 150 points to the already defined 117 health making the total 267
r_char_base_maxhealth - 150 // Will subtract 150 points from your already defined health making the total -33 (AKA DEAD).
Hope that helps!
Re: Setting Player Stat defaults
Posted: August 15th, 2012, 9:11 am
by coopziana
Hi Again,
Having tested the above, i've found you cannot subtract or set a value for the base_health.
Though i know in your case you just want to start with 150 health. So all you need to do is set the value as above to
in player.cfg
I know the engine doesn't like redefining certain stats once the game is running. A good way around this is to open us base.cfg (or whatever file you have placed the following code into)
Code: Select all
r_preparemap MAPNAME 0
firstmap MAPNAME
gameversion 1
compatversion 1
exec data/rpg/hud_standard.cfg
then you can pop in the following code to change certain things before the game fully loads:
Code: Select all
"on_start" = [ jumpvel 50 ] //this will change your jump velocity to 50 as soon as the game starts.
I'm not sure on what else you can throw in here but you should have a play with some commands this way, you might be able to get the desired results... I'm sure hirato can shed some light on some commands for us!
Re: Setting Player Stat defaults
Posted: August 15th, 2012, 1:33 pm
by Lou
Hi Coopziana,
Thanks for the info this was exactly what I needed!!
I wanted a way to set the players health and then eventually
the critter health other than the RPG default.
Regards,
Lou
Re: Setting Player Stat defaults
Posted: December 19th, 2012, 1:14 pm
by northstar
nevermind... that didnt work...
Re: Setting Player Stat defaults
Posted: December 20th, 2012, 11:08 am
by kddekadenz
I'm curios how to do this,too
