GameFreak444
Member
I'm interested how to add attributes in RPG Maker XP,like strength,dexterity etc.
For instance,I would like to add Charisma.
For instance,I would like to add Charisma.
def base_int
n = $data_actors[@actor_id].parameters[5, @level]
weapon = $data_weapons[@weapon_id]
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
n += weapon != nil ? weapon.int_plus : 0
n += armor1 != nil ? armor1.int_plus : 0
n += armor2 != nil ? armor2.int_plus : 0
n += armor3 != nil ? armor3.int_plus : 0
n += armor4 != nil ? armor4.int_plus : 0
return [[n, 1].max, 999].min
end
def base_cha
n = $data_actors[@actor_id].parameters[6, @level]
weapon = $data_weapons[@weapon_id]
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
n += weapon != nil ? weapon.int_plus : 0
n += armor1 != nil ? armor1.int_plus : 0
n += armor2 != nil ? armor2.int_plus : 0
n += armor3 != nil ? armor3.int_plus : 0
n += armor4 != nil ? armor4.int_plus : 0
return [[n, 1].max, 999].min
end
@cha_plus = 0 #adds a charisma/cha instance variable
def int
n = [[base_int + @int_plus, 1].max, 999].min
for i in @states
n *= $data_states[i].int_rate / 100.0
end
n = [[Integer(n), 1].max, 999].min
return n
end
def cha
n = [[base_cha + @cha_plus, 1].max, 999].min
for i in @states
n *= $data_states[i].int_rate / 100.0
end
n = [[Integer(n), 1].max, 999].min
return n
end
Unka Josh":3pc21hhh said:Just so you know, that's a mighty short time to re-bump things in.
However, I'll help you by asking you this question first:
What do you actually want Charisma to do?
Without an answer to that question, no one can actually help you.
teengamer":rdstmmze said:Well, there's an easy way to do this if you want charisma to be a bonus to a variable in game...
Under control variable,
1) press random X...Y [001]
2) then control variable,
add variable [002]
3) If variable [001]= 75
(success)
else
(fail)
or
if you want charisma=character's level
2) add [character]'s level
or if you want charisma to equal character's level*3
2a) set variable [002] to [character]'s level
2b) multiply variable [002] by 3
all variable number's, character's names, etc. can be anything as long as where it says 2 and 2 they must be X and X, not X and Y...
teengamer":2tcjqtcu said:Here is one. http://forum.chaos-project.com/index.php?topic=114.0
I have used this and like it.