Skip to content

Commit

Permalink
Add chunk to track how often a move command failed in a move route.
Browse files Browse the repository at this point in the history
Used by "Wait for Single Movement" command
  • Loading branch information
Ghabry committed Apr 13, 2024
1 parent 54dff22 commit 801f82e
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 2 deletions.
1 change: 1 addition & 0 deletions generator/csv/fields_easyrpg.csv
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ SaveEasyRpgText,font_size,f,Int32,0x05,12,0,0,Font size
SaveEasyRpgText,letter_spacing,f,Int32,0x06,0,0,0,Additional spacing between letters
SaveEasyRpgText,line_spacing,f,Int32,0x07,4,0,0,Additional spacing between lines
SaveEasyRpgText,flags,f,SaveEasyRpgText_Flags,0x08,3,0,0,Various text settings
SaveMapEventBase,easyrpg_move_failure_count,f,Int32,0xC9,0,0,0,Tracks how often the current move operation in a move route failed
SaveSystem,maniac_strings,f,Vector<DBString>,0x24,,0,0,rpg::Strings
SaveSystem,maniac_frameskip,,Int32,0x88,0,0,0,"FatalMix Frameskip (0=None, 1=1/5, 2=1/3, 3=1/2)"
SaveSystem,maniac_picture_limit,,Int32,0x89,0,0,0,FatalMix Picture Limit
Expand Down
10 changes: 9 additions & 1 deletion src/generated/lcf/lsd/chunks.h
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,8 @@ namespace LSD_Reader {
flash_current_level = 0x54,
/** int */
flash_time_left = 0x55,
/** Tracks how often the current move operation in a move route failed */
easyrpg_move_failure_count = 0xC9,
/** */
boarding = 0x65,
/** */
Expand Down Expand Up @@ -522,6 +524,8 @@ namespace LSD_Reader {
flash_current_level = 0x54,
/** int */
flash_time_left = 0x55,
/** Tracks how often the current move operation in a move route failed */
easyrpg_move_failure_count = 0xC9,
/** Which vehicle */
vehicle = 0x65,
/** From 0 to 255 - In flying vehicles; remaining distance to ascend */
Expand Down Expand Up @@ -815,7 +819,9 @@ namespace LSD_Reader {
/** double */
flash_current_level = 0x54,
/** int */
flash_time_left = 0x55
flash_time_left = 0x55,
/** Tracks how often the current move operation in a move route failed */
easyrpg_move_failure_count = 0xC9
};
};
struct ChunkSaveMapEvent {
Expand Down Expand Up @@ -898,6 +904,8 @@ namespace LSD_Reader {
flash_current_level = 0x54,
/** int */
flash_time_left = 0x55,
/** Tracks how often the current move operation in a move route failed */
easyrpg_move_failure_count = 0xC9,
/** If true; this event is waiting for foreground execution. */
waiting_execution = 0x65,
/** Index of custom move route */
Expand Down
4 changes: 3 additions & 1 deletion src/generated/lcf/rpg/savemapeventbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ namespace rpg {
int32_t flash_blue = -1;
double flash_current_level = 0.0;
int32_t flash_time_left = 0;
int32_t easyrpg_move_failure_count = 0;
};

inline bool operator==(const SaveMapEventBase& l, const SaveMapEventBase& r) {
Expand Down Expand Up @@ -108,7 +109,8 @@ namespace rpg {
&& l.flash_green == r.flash_green
&& l.flash_blue == r.flash_blue
&& l.flash_current_level == r.flash_current_level
&& l.flash_time_left == r.flash_time_left;
&& l.flash_time_left == r.flash_time_left
&& l.easyrpg_move_failure_count == r.easyrpg_move_failure_count;
}

inline bool operator!=(const SaveMapEventBase& l, const SaveMapEventBase& r) {
Expand Down
8 changes: 8 additions & 0 deletions src/generated/lsd_savemapevent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,13 @@ static TypedField<rpg::SaveMapEvent, int32_t> static_flash_time_left(
0,
0
);
static TypedField<rpg::SaveMapEvent, int32_t> static_easyrpg_move_failure_count(
&rpg::SaveMapEvent::easyrpg_move_failure_count,
LSD_Reader::ChunkSaveMapEvent::easyrpg_move_failure_count,
"easyrpg_move_failure_count",
0,
0
);
static TypedField<rpg::SaveMapEvent, bool> static_waiting_execution(
&rpg::SaveMapEvent::waiting_execution,
LSD_Reader::ChunkSaveMapEvent::waiting_execution,
Expand Down Expand Up @@ -364,6 +371,7 @@ Field<rpg::SaveMapEvent> const* Struct<rpg::SaveMapEvent>::fields[] = {
&static_flash_blue,
&static_flash_current_level,
&static_flash_time_left,
&static_easyrpg_move_failure_count,
&static_waiting_execution,
&static_original_move_route_index,
&static_triggered_by_decision_key,
Expand Down
8 changes: 8 additions & 0 deletions src/generated/lsd_savemapeventbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,13 @@ static TypedField<rpg::SaveMapEventBase, int32_t> static_flash_time_left(
0,
0
);
static TypedField<rpg::SaveMapEventBase, int32_t> static_easyrpg_move_failure_count(
&rpg::SaveMapEventBase::easyrpg_move_failure_count,
LSD_Reader::ChunkSaveMapEventBase::easyrpg_move_failure_count,
"easyrpg_move_failure_count",
0,
0
);


template <>
Expand Down Expand Up @@ -336,6 +343,7 @@ Field<rpg::SaveMapEventBase> const* Struct<rpg::SaveMapEventBase>::fields[] = {
&static_flash_blue,
&static_flash_current_level,
&static_flash_time_left,
&static_easyrpg_move_failure_count,
NULL
};

Expand Down
8 changes: 8 additions & 0 deletions src/generated/lsd_savepartylocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,13 @@ static TypedField<rpg::SavePartyLocation, int32_t> static_flash_time_left(
0,
0
);
static TypedField<rpg::SavePartyLocation, int32_t> static_easyrpg_move_failure_count(
&rpg::SavePartyLocation::easyrpg_move_failure_count,
LSD_Reader::ChunkSavePartyLocation::easyrpg_move_failure_count,
"easyrpg_move_failure_count",
0,
0
);
static TypedField<rpg::SavePartyLocation, bool> static_boarding(
&rpg::SavePartyLocation::boarding,
LSD_Reader::ChunkSavePartyLocation::boarding,
Expand Down Expand Up @@ -448,6 +455,7 @@ Field<rpg::SavePartyLocation> const* Struct<rpg::SavePartyLocation>::fields[] =
&static_flash_blue,
&static_flash_current_level,
&static_flash_time_left,
&static_easyrpg_move_failure_count,
&static_boarding,
&static_aboard,
&static_vehicle,
Expand Down
8 changes: 8 additions & 0 deletions src/generated/lsd_savevehiclelocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,13 @@ static TypedField<rpg::SaveVehicleLocation, int32_t> static_flash_time_left(
0,
0
);
static TypedField<rpg::SaveVehicleLocation, int32_t> static_easyrpg_move_failure_count(
&rpg::SaveVehicleLocation::easyrpg_move_failure_count,
LSD_Reader::ChunkSaveVehicleLocation::easyrpg_move_failure_count,
"easyrpg_move_failure_count",
0,
0
);
static TypedField<rpg::SaveVehicleLocation, int32_t> static_vehicle(
&rpg::SaveVehicleLocation::vehicle,
LSD_Reader::ChunkSaveVehicleLocation::vehicle,
Expand Down Expand Up @@ -371,6 +378,7 @@ Field<rpg::SaveVehicleLocation> const* Struct<rpg::SaveVehicleLocation>::fields[
&static_flash_blue,
&static_flash_current_level,
&static_flash_time_left,
&static_easyrpg_move_failure_count,
&static_vehicle,
&static_remaining_ascent,
&static_remaining_descent,
Expand Down
1 change: 1 addition & 0 deletions src/generated/rpg_savemapeventbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ std::ostream& operator<<(std::ostream& os, const SaveMapEventBase& obj) {
os << ", flash_blue="<< obj.flash_blue;
os << ", flash_current_level="<< obj.flash_current_level;
os << ", flash_time_left="<< obj.flash_time_left;
os << ", easyrpg_move_failure_count="<< obj.easyrpg_move_failure_count;
os << "}";
return os;
}
Expand Down

0 comments on commit 801f82e

Please sign in to comment.