Skip to content

Commit 801f82e

Browse files
committedApr 13, 2024
Add chunk to track how often a move command failed in a move route.
Used by "Wait for Single Movement" command
1 parent 54dff22 commit 801f82e

8 files changed

+46
-2
lines changed
 

‎generator/csv/fields_easyrpg.csv

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ SaveEasyRpgText,font_size,f,Int32,0x05,12,0,0,Font size
2727
SaveEasyRpgText,letter_spacing,f,Int32,0x06,0,0,0,Additional spacing between letters
2828
SaveEasyRpgText,line_spacing,f,Int32,0x07,4,0,0,Additional spacing between lines
2929
SaveEasyRpgText,flags,f,SaveEasyRpgText_Flags,0x08,3,0,0,Various text settings
30+
SaveMapEventBase,easyrpg_move_failure_count,f,Int32,0xC9,0,0,0,Tracks how often the current move operation in a move route failed
3031
SaveSystem,maniac_strings,f,Vector<DBString>,0x24,,0,0,rpg::Strings
3132
SaveSystem,maniac_frameskip,,Int32,0x88,0,0,0,"FatalMix Frameskip (0=None, 1=1/5, 2=1/3, 3=1/2)"
3233
SaveSystem,maniac_picture_limit,,Int32,0x89,0,0,0,FatalMix Picture Limit

‎src/generated/lcf/lsd/chunks.h

+9-1
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,8 @@ namespace LSD_Reader {
408408
flash_current_level = 0x54,
409409
/** int */
410410
flash_time_left = 0x55,
411+
/** Tracks how often the current move operation in a move route failed */
412+
easyrpg_move_failure_count = 0xC9,
411413
/** */
412414
boarding = 0x65,
413415
/** */
@@ -522,6 +524,8 @@ namespace LSD_Reader {
522524
flash_current_level = 0x54,
523525
/** int */
524526
flash_time_left = 0x55,
527+
/** Tracks how often the current move operation in a move route failed */
528+
easyrpg_move_failure_count = 0xC9,
525529
/** Which vehicle */
526530
vehicle = 0x65,
527531
/** From 0 to 255 - In flying vehicles; remaining distance to ascend */
@@ -815,7 +819,9 @@ namespace LSD_Reader {
815819
/** double */
816820
flash_current_level = 0x54,
817821
/** int */
818-
flash_time_left = 0x55
822+
flash_time_left = 0x55,
823+
/** Tracks how often the current move operation in a move route failed */
824+
easyrpg_move_failure_count = 0xC9
819825
};
820826
};
821827
struct ChunkSaveMapEvent {
@@ -898,6 +904,8 @@ namespace LSD_Reader {
898904
flash_current_level = 0x54,
899905
/** int */
900906
flash_time_left = 0x55,
907+
/** Tracks how often the current move operation in a move route failed */
908+
easyrpg_move_failure_count = 0xC9,
901909
/** If true; this event is waiting for foreground execution. */
902910
waiting_execution = 0x65,
903911
/** Index of custom move route */

‎src/generated/lcf/rpg/savemapeventbase.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ namespace rpg {
6767
int32_t flash_blue = -1;
6868
double flash_current_level = 0.0;
6969
int32_t flash_time_left = 0;
70+
int32_t easyrpg_move_failure_count = 0;
7071
};
7172

7273
inline bool operator==(const SaveMapEventBase& l, const SaveMapEventBase& r) {
@@ -108,7 +109,8 @@ namespace rpg {
108109
&& l.flash_green == r.flash_green
109110
&& l.flash_blue == r.flash_blue
110111
&& l.flash_current_level == r.flash_current_level
111-
&& l.flash_time_left == r.flash_time_left;
112+
&& l.flash_time_left == r.flash_time_left
113+
&& l.easyrpg_move_failure_count == r.easyrpg_move_failure_count;
112114
}
113115

114116
inline bool operator!=(const SaveMapEventBase& l, const SaveMapEventBase& r) {

‎src/generated/lsd_savemapevent.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,13 @@ static TypedField<rpg::SaveMapEvent, int32_t> static_flash_time_left(
293293
0,
294294
0
295295
);
296+
static TypedField<rpg::SaveMapEvent, int32_t> static_easyrpg_move_failure_count(
297+
&rpg::SaveMapEvent::easyrpg_move_failure_count,
298+
LSD_Reader::ChunkSaveMapEvent::easyrpg_move_failure_count,
299+
"easyrpg_move_failure_count",
300+
0,
301+
0
302+
);
296303
static TypedField<rpg::SaveMapEvent, bool> static_waiting_execution(
297304
&rpg::SaveMapEvent::waiting_execution,
298305
LSD_Reader::ChunkSaveMapEvent::waiting_execution,
@@ -364,6 +371,7 @@ Field<rpg::SaveMapEvent> const* Struct<rpg::SaveMapEvent>::fields[] = {
364371
&static_flash_blue,
365372
&static_flash_current_level,
366373
&static_flash_time_left,
374+
&static_easyrpg_move_failure_count,
367375
&static_waiting_execution,
368376
&static_original_move_route_index,
369377
&static_triggered_by_decision_key,

‎src/generated/lsd_savemapeventbase.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,13 @@ static TypedField<rpg::SaveMapEventBase, int32_t> static_flash_time_left(
293293
0,
294294
0
295295
);
296+
static TypedField<rpg::SaveMapEventBase, int32_t> static_easyrpg_move_failure_count(
297+
&rpg::SaveMapEventBase::easyrpg_move_failure_count,
298+
LSD_Reader::ChunkSaveMapEventBase::easyrpg_move_failure_count,
299+
"easyrpg_move_failure_count",
300+
0,
301+
0
302+
);
296303

297304

298305
template <>
@@ -336,6 +343,7 @@ Field<rpg::SaveMapEventBase> const* Struct<rpg::SaveMapEventBase>::fields[] = {
336343
&static_flash_blue,
337344
&static_flash_current_level,
338345
&static_flash_time_left,
346+
&static_easyrpg_move_failure_count,
339347
NULL
340348
};
341349

‎src/generated/lsd_savepartylocation.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,13 @@ static TypedField<rpg::SavePartyLocation, int32_t> static_flash_time_left(
293293
0,
294294
0
295295
);
296+
static TypedField<rpg::SavePartyLocation, int32_t> static_easyrpg_move_failure_count(
297+
&rpg::SavePartyLocation::easyrpg_move_failure_count,
298+
LSD_Reader::ChunkSavePartyLocation::easyrpg_move_failure_count,
299+
"easyrpg_move_failure_count",
300+
0,
301+
0
302+
);
296303
static TypedField<rpg::SavePartyLocation, bool> static_boarding(
297304
&rpg::SavePartyLocation::boarding,
298305
LSD_Reader::ChunkSavePartyLocation::boarding,
@@ -448,6 +455,7 @@ Field<rpg::SavePartyLocation> const* Struct<rpg::SavePartyLocation>::fields[] =
448455
&static_flash_blue,
449456
&static_flash_current_level,
450457
&static_flash_time_left,
458+
&static_easyrpg_move_failure_count,
451459
&static_boarding,
452460
&static_aboard,
453461
&static_vehicle,

‎src/generated/lsd_savevehiclelocation.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,13 @@ static TypedField<rpg::SaveVehicleLocation, int32_t> static_flash_time_left(
293293
0,
294294
0
295295
);
296+
static TypedField<rpg::SaveVehicleLocation, int32_t> static_easyrpg_move_failure_count(
297+
&rpg::SaveVehicleLocation::easyrpg_move_failure_count,
298+
LSD_Reader::ChunkSaveVehicleLocation::easyrpg_move_failure_count,
299+
"easyrpg_move_failure_count",
300+
0,
301+
0
302+
);
296303
static TypedField<rpg::SaveVehicleLocation, int32_t> static_vehicle(
297304
&rpg::SaveVehicleLocation::vehicle,
298305
LSD_Reader::ChunkSaveVehicleLocation::vehicle,
@@ -371,6 +378,7 @@ Field<rpg::SaveVehicleLocation> const* Struct<rpg::SaveVehicleLocation>::fields[
371378
&static_flash_blue,
372379
&static_flash_current_level,
373380
&static_flash_time_left,
381+
&static_easyrpg_move_failure_count,
374382
&static_vehicle,
375383
&static_remaining_ascent,
376384
&static_remaining_descent,

‎src/generated/rpg_savemapeventbase.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ std::ostream& operator<<(std::ostream& os, const SaveMapEventBase& obj) {
5656
os << ", flash_blue="<< obj.flash_blue;
5757
os << ", flash_current_level="<< obj.flash_current_level;
5858
os << ", flash_time_left="<< obj.flash_time_left;
59+
os << ", easyrpg_move_failure_count="<< obj.easyrpg_move_failure_count;
5960
os << "}";
6061
return os;
6162
}

0 commit comments

Comments
 (0)
Please sign in to comment.