Skip to content

Commit

Permalink
add options to configure fixed actor/enemy facing during battle
Browse files Browse the repository at this point in the history
  • Loading branch information
Primekick authored and Ghabry committed Sep 20, 2023
1 parent 3546ff2 commit d7314c1
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 2 deletions.
2 changes: 2 additions & 0 deletions generator/csv/fields_easyrpg.csv
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ BattleCommands,easyrpg_default_atb_mode,f,Enum<SaveSystem_AtbMode>,0xC8,0,0,1,De
BattleCommands,easyrpg_enable_battle_row_command,f,Boolean,0xC9,True,0,1,If the row command should be enabled in RPG Maker 2003 battles
BattleCommands,easyrpg_sequential_order,f,Boolean,0xCA,False,0,1,If alternative and gauge style battles should behave like traditional style battles
BattleCommands,easyrpg_disable_row_feature,f,Boolean,0xCB,False,0,1,If the row feature should be disabled in RPG Maker 2003 games
BattleCommands,easyrpg_fixed_actor_facing_direction,f,Int32,0xCC,0,0,1,"If actor facing direction shouldn't ever change during battle. Applies only to Normal and Initiative battle types (0=Disabled, 1=Always flipped, 2=Never flipped)"
BattleCommands,easyrpg_fixed_enemy_facing_direction,f,Int32,0xCD,0,0,1,"If enemy facing direction shouldn't ever change during battle. Applies only to Normal and Initiative battle types (0=Disabled, 1=Always flipped, 2=Never flipped)"
Actor,easyrpg_actorai,f,Int32,0xC9,-1,0,0,Default autobattle AI behavior of the actor
Actor,easyrpg_prevent_critical,f,Boolean,0xCA,False,0,0,If the actor is protected against critical hits
Actor,easyrpg_raise_evasion,f,Boolean,0xCB,False,0,0,If the actor has an increased evasion rate
Expand Down
6 changes: 5 additions & 1 deletion src/generated/lcf/ldb/chunks.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,11 @@ namespace LDB_Reader {
/** If alternative and gauge style battles should behave like traditional style battles */
easyrpg_sequential_order = 0xCA,
/** If the row feature should be disabled in RPG Maker 2003 games */
easyrpg_disable_row_feature = 0xCB
easyrpg_disable_row_feature = 0xCB,
/** If actor facing direction shouldn't ever change during battle. Applies only to Normal and Initiative battle types (0=Disabled, 1=Always flipped, 2=Never flipped) */
easyrpg_fixed_actor_facing_direction = 0xCC,
/** If enemy facing direction shouldn't ever change during battle. Applies only to Normal and Initiative battle types (0=Disabled, 1=Always flipped, 2=Never flipped) */
easyrpg_fixed_enemy_facing_direction = 0xCD
};
};
struct ChunkBattlerAnimation {
Expand Down
6 changes: 5 additions & 1 deletion src/generated/lcf/rpg/battlecommands.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ namespace rpg {
bool easyrpg_enable_battle_row_command = true;
bool easyrpg_sequential_order = false;
bool easyrpg_disable_row_feature = false;
int32_t easyrpg_fixed_actor_facing_direction = 0;
int32_t easyrpg_fixed_enemy_facing_direction = 0;
};
inline std::ostream& operator<<(std::ostream& os, BattleCommands::Placement code) {
os << static_cast<std::underlying_type_t<decltype(code)>>(code);
Expand Down Expand Up @@ -149,7 +151,9 @@ namespace rpg {
&& l.easyrpg_default_atb_mode == r.easyrpg_default_atb_mode
&& l.easyrpg_enable_battle_row_command == r.easyrpg_enable_battle_row_command
&& l.easyrpg_sequential_order == r.easyrpg_sequential_order
&& l.easyrpg_disable_row_feature == r.easyrpg_disable_row_feature;
&& l.easyrpg_disable_row_feature == r.easyrpg_disable_row_feature
&& l.easyrpg_fixed_actor_facing_direction == r.easyrpg_fixed_actor_facing_direction
&& l.easyrpg_fixed_enemy_facing_direction == r.easyrpg_fixed_enemy_facing_direction;
}

inline bool operator!=(const BattleCommands& l, const BattleCommands& r) {
Expand Down
16 changes: 16 additions & 0 deletions src/generated/ldb_battlecommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,20 @@ static TypedField<rpg::BattleCommands, bool> static_easyrpg_disable_row_feature(
0,
1
);
static TypedField<rpg::BattleCommands, int32_t> static_easyrpg_fixed_actor_facing_direction(
&rpg::BattleCommands::easyrpg_fixed_actor_facing_direction,
LDB_Reader::ChunkBattleCommands::easyrpg_fixed_actor_facing_direction,
"easyrpg_fixed_actor_facing_direction",
0,
1
);
static TypedField<rpg::BattleCommands, int32_t> static_easyrpg_fixed_enemy_facing_direction(
&rpg::BattleCommands::easyrpg_fixed_enemy_facing_direction,
LDB_Reader::ChunkBattleCommands::easyrpg_fixed_enemy_facing_direction,
"easyrpg_fixed_enemy_facing_direction",
0,
1
);


template <>
Expand All @@ -176,6 +190,8 @@ Field<rpg::BattleCommands> const* Struct<rpg::BattleCommands>::fields[] = {
&static_easyrpg_enable_battle_row_command,
&static_easyrpg_sequential_order,
&static_easyrpg_disable_row_feature,
&static_easyrpg_fixed_actor_facing_direction,
&static_easyrpg_fixed_enemy_facing_direction,
NULL
};

Expand Down
2 changes: 2 additions & 0 deletions src/generated/rpg_battlecommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ std::ostream& operator<<(std::ostream& os, const BattleCommands& obj) {
os << ", easyrpg_enable_battle_row_command="<< obj.easyrpg_enable_battle_row_command;
os << ", easyrpg_sequential_order="<< obj.easyrpg_sequential_order;
os << ", easyrpg_disable_row_feature="<< obj.easyrpg_disable_row_feature;
os << ", easyrpg_fixed_actor_facing_direction="<< obj.easyrpg_fixed_actor_facing_direction;
os << ", easyrpg_fixed_enemy_facing_direction="<< obj.easyrpg_fixed_enemy_facing_direction;
os << "}";
return os;
}
Expand Down

0 comments on commit d7314c1

Please sign in to comment.