Okay, so I decided to play around with RMXP out of boredom, first time in over a year, and I ran into something confusing.
Now, keep in mind that I am extremely rusty when it comes to RMXP, and it is taking time even remembering every last detail again...
So here's the problem/issue/interesting thing/misinformation/whatever you want to call it that I found. In the RMXP help manual, it says this about the different rank values:
Quote from: From the RMXP Help Manual: RPG::Classelement_ranks
Level of elemental effectiveness. 1-dimensional array using element IDs as subscripts (Table), with 6 levels (0: A, 1: B, 2: C, 3: D, 4: E, 5: F).
state_ranks
Level of status effectiveness. 1-dimensional array using status IDs as subscripts (Table), with 6 levels (0: A, 1: B, 2: C, 3: D, 4: E, 5: F).
Now, as I read that, it says a value of "C" in the editor should be "2". Correct?
Then why is it that if, using a default project where every rank is set to "C" in the editor, the actual values are 3's?
I simply just ran this little snippet after loading a game:
table = $data_classes[1].element_ranks
array = []
(0..table.xsize).each {|i| array.push(table[i]) }
p array
I don't know if I used to know why this was, if this is a bug, just a typo in the manual, or what. Any clues for an old scripter who forgets everything?
Looks like a typo to me. I wonder why it is like [1..6] instead of [0..5] though.
Have you tried changing one of the ranks to 0, saving the change to the file, reopen the project, and view the database?
Nope, not yet, but a quick look into Game_Actor confirms that it's pretty much just a typo. In the editor, it SHOULD read that "D" is the "normal" factor to apply, if you were using the conventional method listed in the manual, but it shows "C" instead. That's kinda weird, but whatever, I guess. A level of 3 is the "normal".
#--------------------------------------------------------------------------
# * Get Element Revision Value
# element_id : element ID
#--------------------------------------------------------------------------
def element_rate(element_id)
# Get values corresponding to element effectiveness
table = [0,200,150,100,50,0,-100]
result = table[$data_classes[@class_id].element_ranks[element_id]]
# If this element is protected by armor, then it's reduced by half
for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
armor = $data_armors[i]
if armor != nil and armor.guard_element_set.include?(element_id)
result /= 2
end
end
# If this element is protected by states, then it's 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
Well, it's not the first time the help file has been wrong. I reported a while back saying both the RMXP and RMVXA help files state Viewport#disposed? exists when it really doesn't.