Just curious where the ON / OFF value for the Conditions are stored...
(https://downloads.chaos-project.com/heretic86/images/EnemyCondition.png)
module RPG
class Enemy
class Action
def initialize
@kind = 0
@basic = 0
@skill_id = 1
@condition_turn_a = 0
@condition_turn_b = 1
@condition_hp = 100
@condition_level = 1
@condition_switch_id = 0
@rating = 5
end
attr_accessor :kind
attr_accessor :basic
attr_accessor :skill_id
attr_accessor :condition_turn_a
attr_accessor :condition_turn_b
attr_accessor :condition_hp
attr_accessor :condition_level
attr_accessor :condition_switch_id
attr_accessor :rating
end
end
end
None of these appear to contain any data about the Editors conditions, so Im wondering where / how these are stored in the Editor in the window above? I mean for checking and unchecking the condition sets, not the values themselves...
From the documentation:
Quotecondition_turn_a
condition_turn_b
a and b values specified in the [Turn] condition. To be input in the form a + bx.
When the turn is not specified as a condition, a = 0 and b = 1.
Thing is, although invalid, a = 0 and b = 1 can be entered. So what controls whether or not that check box is checked?
I'd say it doesn't actually store the condition and automatically thinks it's off if the variable has the default value.
Yes, the box is OFF when a default value (i.e. the values stated in `def initialize`) is provided, as Blizz said. You can even see this yourself when trying to set the "Turn" condition to 0 + 1X and reopen the window.
Ok, got it. I was expecting the values i put in would cause the checkbox to stay checked, but when i put in 0 and 1 and saved it, it did come back up as unchecked. Odd one but got it.
Thanks!