In Game_Enemy you can find the method to define element_rate:
What I am trying to do is to change the Numbers in the Table to either
Now I am calling this via script to show the element efficiency:
Where as "X" is a variable, "Y" is the enemy in the troop and "Z" the ID of the Element.
This get's a text output a la "\v[X]%" at the moment which for example outputs "100%"
Where do I start to change tables into text? the table is needed for the calculation in general if I read everything right
Code:
def element_rate(element_id)
# Get a numerical value corresponding to element effectiveness
table = [0,200,150,100,50,0,-100]
result = table[$data_enemies[@enemy_id].element_ranks[element_id]]
# If protected by state, this element is reduced by half
for i in @states
if $data_states[i].guard_element_set.include?(element_id)
result /= 2
end
end
# End Method
return result
end
What I am trying to do is to change the Numbers in the Table to either
- Letters corresponding to the Editor (A, B, C, etc.)
- Text that spells "Very Effective, Effective, Neutral, etc.)
Now I am calling this via script to show the element efficiency:
Code:
$game_variables[x] = $game_troop.enemies[y].element_rate(z)
Where as "X" is a variable, "Y" is the enemy in the troop and "Z" the ID of the Element.
This get's a text output a la "\v[X]%" at the moment which for example outputs "100%"
Where do I start to change tables into text? the table is needed for the calculation in general if I read everything right