XP Editor, Where are Enemy Action Condition Values Stored?

Started by Heretic86, July 21, 2022, 01:31:44 am

Previous topic - Next topic

Heretic86

Just curious where the ON / OFF value for the Conditions are stored...



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?

Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Blizzard

I'd say it doesn't actually store the condition and automatically thinks it's off if the variable has the default value.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

KK20

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.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Heretic86

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!
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)