Setting Player Stat defaults

Chat and ask questions about the RPG Maker Mode here.
Lou
Member
Member
Posts: 59
Joined: May 29th, 2012, 11:46 am
Name: Lou

Setting Player Stat defaults

Postby Lou » August 5th, 2012, 4:22 pm

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

Lou
Member
Member
Posts: 59
Joined: May 29th, 2012, 11:46 am
Name: Lou

Re: Setting Player Stat defaults

Postby Lou » August 7th, 2012, 4:06 pm

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.

Hirato
Developer
Developer
Posts: 689
Joined: May 30th, 2009, 1:23 pm
IRC Username: hirato

Re: Setting Player Stat defaults

Postby Hirato » August 8th, 2012, 9:52 am

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
This is not a url, clicking it is pointless

Lou
Member
Member
Posts: 59
Joined: May 29th, 2012, 11:46 am
Name: Lou

Re: Setting Player Stat defaults

Postby Lou » August 8th, 2012, 12:14 pm

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

Lou
Member
Member
Posts: 59
Joined: May 29th, 2012, 11:46 am
Name: Lou

Re: Setting Player Stat defaults

Postby Lou » August 9th, 2012, 4:04 pm

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.....

coopziana
Member
Member
Posts: 27
Joined: July 23rd, 2012, 9:58 am
Name: Ben

Re: Setting Player Stat defaults

Postby coopziana » August 15th, 2012, 8:54 am

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:

Code: Select all

r_char_base_maxhealth = 150


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!

coopziana
Member
Member
Posts: 27
Joined: July 23rd, 2012, 9:58 am
Name: Ben

Re: Setting Player Stat defaults

Postby coopziana » August 15th, 2012, 9:11 am

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

Code: Select all

r_char_base_maxhealth +33


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!

Lou
Member
Member
Posts: 59
Joined: May 29th, 2012, 11:46 am
Name: Lou

Re: Setting Player Stat defaults

Postby Lou » August 15th, 2012, 1:33 pm

Hi Coopziana,
Thanks for the info this was exactly what I needed!! :D
I wanted a way to set the players health and then eventually
the critter health other than the RPG default.
Regards,
Lou

northstar
Member
Member
Posts: 208
Joined: March 1st, 2012, 1:17 pm
Name: steven

Re: Setting Player Stat defaults

Postby northstar » December 19th, 2012, 1:14 pm

nevermind... that didnt work...

User avatar
kddekadenz
Member
Member
Posts: 423
Joined: July 17th, 2011, 11:02 am
Name: kdd
Contact:

Re: Setting Player Stat defaults

Postby kddekadenz » December 20th, 2012, 11:08 am

I'm curios how to do this,too :|
Kelgar is an advanced RPG beeing developed in Sandbox


Return to “RPG Maker Mode”

Who is online

Users browsing this forum: No registered users and 1 guest