Skip to content

Commit 89d46f6

Browse files
author
fdelapena
authored
Merge pull request #421 from rueter37/features
Add custom game settings in the database
2 parents 0cc525b + 01e901f commit 89d46f6

14 files changed

Lines changed: 362 additions & 8 deletions

generator/csv/fields_easyrpg.csv

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,18 @@ SaveSystem,maniac_frameskip,,Int32,0x88,0,0,0,"FatalMix Frameskip (0=None, 1=1/5
1111
SaveSystem,maniac_picture_limit,,Int32,0x89,0,0,0,FatalMix Picture Limit
1212
SaveSystem,maniac_options,,Vector<UInt8>,0x8A,,0,0,"Various FatalMix options (XX XA XB XC). A: MsgSkip OFF/RShift (0/4) B: TestPlay Keep/ON/OFF (0/2/4), C: Pause focus lost Wait/Run (0/1)"
1313
SaveSystem,maniac_joypad_bindings,,Vector<UInt8>,0x8B,,0,0,"JoyLeft, JoyRight, JoyUp, JoyDown, Joy1, ... Joy12"
14+
BattleCommands,easyrpg_default_atb_mode,f,Enum<SaveSystem_AtbMode>,0xC8,0,0,1,Default ATB mode of RPG 2003 battle system
15+
BattleCommands,easyrpg_enable_battle_row_command,f,Boolean,0xC9,True,0,1,If the row command should be enabled in RPG Maker 2003 battles
16+
BattleCommands,easyrpg_sequential_order,f,Boolean,0xCA,False,0,1,If alternative and gauge style battles should behave like traditional style battles
1417
Skill,easyrpg_battle2k3_message,f,DBString,0xC9,DBString(kDefaultMessage),0,1,RPG Maker 2003 battle skill start notification
18+
Skill,easyrpg_ignore_reflect,f,Boolean,0xCA,False,0,1,If the skill bypasses reflect states. Useful for physical skills and skills which are meant to remove positive states from enemies
19+
Skill,easyrpg_state_hit,f,Int32,0xCB,-1,0,0,Separate accuracy value for state inflictions
20+
Skill,easyrpg_attribute_hit,f,Int32,0xCC,-1,0,0,Separate accuracy value for attribute shifts
21+
Skill,easyrpg_ignore_restrict_skill,f,Boolean,0xCD,False,0,0,If the skill should bypass skill restrictions by states
22+
Skill,easyrpg_ignore_restrict_magic,f,Boolean,0xCE,False,0,0,If the skill should bypass magic restrictions by states
23+
Skill,easyrpg_enable_stat_absorbing,f,Boolean,0xCF,False,0,0,If the skill can absorb attack/defense/spirit/agility
1524
Item,easyrpg_using_message,f,DBString,0xC9,DBString(kDefaultMessage),0,0,Item usage message in battle
25+
Item,easyrpg_max_count,f,Int32,0xCA,-1,0,0,How many the player can carry of this item
1626
Terms,easyrpg_item_number_separator,f,DBString,0xC8,DBString(kDefaultTerm),0,0,Item number separator
1727
Terms,easyrpg_skill_cost_separator,f,DBString,0xC9,DBString(kDefaultTerm),0,0,Skill cost separator
1828
Terms,easyrpg_equipment_arrow,f,DBString,0xCA,DBString(kDefaultTerm),0,0,Equipment window arrow
@@ -33,3 +43,18 @@ Terms,easyrpg_battle2k3_escape,f,DBString,0xD8,DBString(kDefaultTerm),0,1,RPG Ma
3343
Terms,easyrpg_battle2k3_special_combat_back,f,DBString,0xD9,,0,1,Message for back and pincer attack
3444
Terms,easyrpg_battle2k3_skill,f,DBString,0xDA,DBString(kDefaultTerm),0,1,RPG Maker 2003 battle general skill start notification
3545
Terms,easyrpg_battle2k3_item,f,DBString,0xDB,DBString(kDefaultTerm),0,1,RPG Maker 2003 battle general item start notification
46+
System,easyrpg_alternative_exp,f,Int32,0xC8,0,0,0,Which EXP formula to use: 0=Default 1=2k 2=2k3
47+
System,easyrpg_battle_options,f,Vector<Int16>,0xC9,"[0,1,2]",0,0,Available battle options where 0=Battle 1=AutoBattle 2=Escape
48+
System,easyrpg_max_actor_hp,f,Int32,0xCA,-1,0,0,Absolute maximum HP value actors can have
49+
System,easyrpg_max_enemy_hp,f,Int32,0xCB,-1,0,0,Absolute maximum HP value enemies can have
50+
System,easyrpg_max_damage,f,Int32,0xCC,-1,0,0,How much damage can an attack inflict at most
51+
System,easyrpg_max_exp,f,Int32,0xCD,-1,0,0,Absolute maximum EXP value actors can have
52+
System,easyrpg_max_level,f,Int32,0xCE,-1,0,0,Absolute maximum level actors can reach
53+
System,easyrpg_max_savefiles,f,Int32,0xCF,15,0,0,How many savegame slots should be shown in the savegame scene
54+
System,easyrpg_max_item_count,f,Int32,0xD0,-1,0,0,How many items of a kind the player can carry. Can be overridden per item with the easyrpg_max_count setting of an item
55+
System,easyrpg_variable_min_value,f,Int32,0xD1,0,0,0,Minimum value a variable can have
56+
System,easyrpg_variable_max_value,f,Int32,0xD2,0,0,0,Maximum value a variable can have
57+
System,easyrpg_max_actor_sp,f,Int32,0xD3,-1,0,0,Absolute maximum SP value actors can have
58+
System,easyrpg_max_enemy_sp,f,Int32,0xD4,-1,0,0,Absolute maximum SP value enemies can have
59+
System,easyrpg_max_stat_base_value,f,Int32,0xD5,-1,0,0,Absolute maximum value a base stat can have
60+
System,easyrpg_max_stat_battle_value,f,Int32,0xD6,-1,0,0,Absolute maximum value a battle stat can have

src/generated/lcf/ldb/chunks.h

Lines changed: 54 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,13 @@ namespace LDB_Reader {
233233
/** Integer */
234234
death_teleport_y = 0x1C,
235235
/** Integer */
236-
death_teleport_face = 0x1D
236+
death_teleport_face = 0x1D,
237+
/** Default ATB mode of RPG 2003 battle system */
238+
easyrpg_default_atb_mode = 0xC8,
239+
/** If the row command should be enabled in RPG Maker 2003 battles */
240+
easyrpg_enable_battle_row_command = 0xC9,
241+
/** If alternative and gauge style battles should behave like traditional style battles */
242+
easyrpg_sequential_order = 0xCA
237243
};
238244
};
239245
struct ChunkBattlerAnimation {
@@ -443,7 +449,19 @@ namespace LDB_Reader {
443449
/** ? - RPG2003 */
444450
battler_animation_data = 0x32,
445451
/** RPG Maker 2003 battle skill start notification */
446-
easyrpg_battle2k3_message = 0xC9
452+
easyrpg_battle2k3_message = 0xC9,
453+
/** If the skill bypasses reflect states. Useful for physical skills and skills which are meant to remove positive states from enemies */
454+
easyrpg_ignore_reflect = 0xCA,
455+
/** Separate accuracy value for state inflictions */
456+
easyrpg_state_hit = 0xCB,
457+
/** Separate accuracy value for attribute shifts */
458+
easyrpg_attribute_hit = 0xCC,
459+
/** If the skill should bypass skill restrictions by states */
460+
easyrpg_ignore_restrict_skill = 0xCD,
461+
/** If the skill should bypass magic restrictions by states */
462+
easyrpg_ignore_restrict_magic = 0xCE,
463+
/** If the skill can absorb attack/defense/spirit/agility */
464+
easyrpg_enable_stat_absorbing = 0xCF
447465
};
448466
};
449467
struct ChunkItem {
@@ -561,7 +579,9 @@ namespace LDB_Reader {
561579
/** Integer */
562580
ranged_target = 0x4C,
563581
/** Item usage message in battle */
564-
easyrpg_using_message = 0xC9
582+
easyrpg_using_message = 0xC9,
583+
/** How many the player can carry of this item */
584+
easyrpg_max_count = 0xCA
565585
};
566586
};
567587
struct ChunkEnemyAction {
@@ -1337,7 +1357,37 @@ namespace LDB_Reader {
13371357
/** Flag - RPG2003 */
13381358
invert_animations = 0x65,
13391359
/** When false the title is skipped and the game starts directly. In TestPlay mode skips directly to the Load scene. Added in RPG Maker 2003 v1.11 */
1340-
show_title = 0x6F
1360+
show_title = 0x6F,
1361+
/** Which EXP formula to use: 0=Default 1=2k 2=2k3 */
1362+
easyrpg_alternative_exp = 0xC8,
1363+
/** Available battle options where 0=Battle 1=AutoBattle 2=Escape */
1364+
easyrpg_battle_options = 0xC9,
1365+
/** Absolute maximum HP value actors can have */
1366+
easyrpg_max_actor_hp = 0xCA,
1367+
/** Absolute maximum HP value enemies can have */
1368+
easyrpg_max_enemy_hp = 0xCB,
1369+
/** How much damage can an attack inflict at most */
1370+
easyrpg_max_damage = 0xCC,
1371+
/** Absolute maximum EXP value actors can have */
1372+
easyrpg_max_exp = 0xCD,
1373+
/** Absolute maximum level actors can reach */
1374+
easyrpg_max_level = 0xCE,
1375+
/** How many savegame slots should be shown in the savegame scene */
1376+
easyrpg_max_savefiles = 0xCF,
1377+
/** How many items of a kind the player can carry. Can be overridden per item with the easyrpg_max_count setting of an item */
1378+
easyrpg_max_item_count = 0xD0,
1379+
/** Minimum value a variable can have */
1380+
easyrpg_variable_min_value = 0xD1,
1381+
/** Maximum value a variable can have */
1382+
easyrpg_variable_max_value = 0xD2,
1383+
/** Absolute maximum SP value actors can have */
1384+
easyrpg_max_actor_sp = 0xD3,
1385+
/** Absolute maximum SP value enemies can have */
1386+
easyrpg_max_enemy_sp = 0xD4,
1387+
/** Absolute maximum value a base stat can have */
1388+
easyrpg_max_stat_base_value = 0xD5,
1389+
/** Absolute maximum value a battle stat can have */
1390+
easyrpg_max_stat_battle_value = 0xD6
13411391
};
13421392
};
13431393
struct ChunkSwitch {

src/generated/lcf/rpg/battlecommands.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ namespace rpg {
100100
int32_t death_teleport_x = 0;
101101
int32_t death_teleport_y = 0;
102102
int32_t death_teleport_face = 0;
103+
int32_t easyrpg_default_atb_mode = 0;
104+
bool easyrpg_enable_battle_row_command = true;
105+
bool easyrpg_sequential_order = false;
103106
};
104107
inline std::ostream& operator<<(std::ostream& os, BattleCommands::Placement code) {
105108
os << static_cast<std::underlying_type_t<decltype(code)>>(code);
@@ -141,7 +144,10 @@ namespace rpg {
141144
&& l.death_teleport_id == r.death_teleport_id
142145
&& l.death_teleport_x == r.death_teleport_x
143146
&& l.death_teleport_y == r.death_teleport_y
144-
&& l.death_teleport_face == r.death_teleport_face;
147+
&& l.death_teleport_face == r.death_teleport_face
148+
&& l.easyrpg_default_atb_mode == r.easyrpg_default_atb_mode
149+
&& l.easyrpg_enable_battle_row_command == r.easyrpg_enable_battle_row_command
150+
&& l.easyrpg_sequential_order == r.easyrpg_sequential_order;
145151
}
146152

147153
inline bool operator!=(const BattleCommands& l, const BattleCommands& r) {

src/generated/lcf/rpg/item.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ namespace rpg {
134134
int32_t ranged_trajectory = 0;
135135
int32_t ranged_target = 0;
136136
DBString easyrpg_using_message = DBString(kDefaultMessage);
137+
int32_t easyrpg_max_count = -1;
137138
};
138139
inline std::ostream& operator<<(std::ostream& os, Item::Type code) {
139140
os << static_cast<std::underlying_type_t<decltype(code)>>(code);
@@ -201,7 +202,8 @@ namespace rpg {
201202
&& l.class_set == r.class_set
202203
&& l.ranged_trajectory == r.ranged_trajectory
203204
&& l.ranged_target == r.ranged_target
204-
&& l.easyrpg_using_message == r.easyrpg_using_message;
205+
&& l.easyrpg_using_message == r.easyrpg_using_message
206+
&& l.easyrpg_max_count == r.easyrpg_max_count;
205207
}
206208

207209
inline bool operator!=(const Item& l, const Item& r) {

src/generated/lcf/rpg/skill.h

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ namespace rpg {
107107
int32_t battler_animation = -1;
108108
std::vector<BattlerAnimationItemSkill> battler_animation_data;
109109
DBString easyrpg_battle2k3_message = DBString(kDefaultMessage);
110+
bool easyrpg_ignore_reflect = false;
111+
int32_t easyrpg_state_hit = -1;
112+
int32_t easyrpg_attribute_hit = -1;
113+
bool easyrpg_ignore_restrict_skill = false;
114+
bool easyrpg_ignore_restrict_magic = false;
115+
bool easyrpg_enable_stat_absorbing = false;
110116
};
111117
inline std::ostream& operator<<(std::ostream& os, Skill::Type code) {
112118
os << static_cast<std::underlying_type_t<decltype(code)>>(code);
@@ -156,7 +162,13 @@ namespace rpg {
156162
&& l.affect_attr_defence == r.affect_attr_defence
157163
&& l.battler_animation == r.battler_animation
158164
&& l.battler_animation_data == r.battler_animation_data
159-
&& l.easyrpg_battle2k3_message == r.easyrpg_battle2k3_message;
165+
&& l.easyrpg_battle2k3_message == r.easyrpg_battle2k3_message
166+
&& l.easyrpg_ignore_reflect == r.easyrpg_ignore_reflect
167+
&& l.easyrpg_state_hit == r.easyrpg_state_hit
168+
&& l.easyrpg_attribute_hit == r.easyrpg_attribute_hit
169+
&& l.easyrpg_ignore_restrict_skill == r.easyrpg_ignore_restrict_skill
170+
&& l.easyrpg_ignore_restrict_magic == r.easyrpg_ignore_restrict_magic
171+
&& l.easyrpg_enable_stat_absorbing == r.easyrpg_enable_stat_absorbing;
160172
}
161173

162174
inline bool operator!=(const Skill& l, const Skill& r) {

src/generated/lcf/rpg/system.h

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,21 @@ namespace rpg {
231231
DBString frame_name;
232232
bool invert_animations = false;
233233
bool show_title = true;
234+
int32_t easyrpg_alternative_exp = 0;
235+
std::vector<int16_t> easyrpg_battle_options = {0, 1, 2};
236+
int32_t easyrpg_max_actor_hp = -1;
237+
int32_t easyrpg_max_enemy_hp = -1;
238+
int32_t easyrpg_max_damage = -1;
239+
int32_t easyrpg_max_exp = -1;
240+
int32_t easyrpg_max_level = -1;
241+
int32_t easyrpg_max_savefiles = 15;
242+
int32_t easyrpg_max_item_count = -1;
243+
int32_t easyrpg_variable_min_value = 0;
244+
int32_t easyrpg_variable_max_value = 0;
245+
int32_t easyrpg_max_actor_sp = -1;
246+
int32_t easyrpg_max_enemy_sp = -1;
247+
int32_t easyrpg_max_stat_base_value = -1;
248+
int32_t easyrpg_max_stat_battle_value = -1;
234249
};
235250
inline std::ostream& operator<<(std::ostream& os, System::FadeOut code) {
236251
os << static_cast<std::underlying_type_t<decltype(code)>>(code);
@@ -316,7 +331,22 @@ namespace rpg {
316331
&& l.show_frame == r.show_frame
317332
&& l.frame_name == r.frame_name
318333
&& l.invert_animations == r.invert_animations
319-
&& l.show_title == r.show_title;
334+
&& l.show_title == r.show_title
335+
&& l.easyrpg_alternative_exp == r.easyrpg_alternative_exp
336+
&& l.easyrpg_battle_options == r.easyrpg_battle_options
337+
&& l.easyrpg_max_actor_hp == r.easyrpg_max_actor_hp
338+
&& l.easyrpg_max_enemy_hp == r.easyrpg_max_enemy_hp
339+
&& l.easyrpg_max_damage == r.easyrpg_max_damage
340+
&& l.easyrpg_max_exp == r.easyrpg_max_exp
341+
&& l.easyrpg_max_level == r.easyrpg_max_level
342+
&& l.easyrpg_max_savefiles == r.easyrpg_max_savefiles
343+
&& l.easyrpg_max_item_count == r.easyrpg_max_item_count
344+
&& l.easyrpg_variable_min_value == r.easyrpg_variable_min_value
345+
&& l.easyrpg_variable_max_value == r.easyrpg_variable_max_value
346+
&& l.easyrpg_max_actor_sp == r.easyrpg_max_actor_sp
347+
&& l.easyrpg_max_enemy_sp == r.easyrpg_max_enemy_sp
348+
&& l.easyrpg_max_stat_base_value == r.easyrpg_max_stat_base_value
349+
&& l.easyrpg_max_stat_battle_value == r.easyrpg_max_stat_battle_value;
320350
}
321351

322352
inline bool operator!=(const System& l, const System& r) {

src/generated/ldb_battlecommands.cpp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,27 @@ static TypedField<rpg::BattleCommands, int32_t> static_death_teleport_face(
125125
0,
126126
0
127127
);
128+
static TypedField<rpg::BattleCommands, int32_t> static_easyrpg_default_atb_mode(
129+
&rpg::BattleCommands::easyrpg_default_atb_mode,
130+
LDB_Reader::ChunkBattleCommands::easyrpg_default_atb_mode,
131+
"easyrpg_default_atb_mode",
132+
0,
133+
1
134+
);
135+
static TypedField<rpg::BattleCommands, bool> static_easyrpg_enable_battle_row_command(
136+
&rpg::BattleCommands::easyrpg_enable_battle_row_command,
137+
LDB_Reader::ChunkBattleCommands::easyrpg_enable_battle_row_command,
138+
"easyrpg_enable_battle_row_command",
139+
0,
140+
1
141+
);
142+
static TypedField<rpg::BattleCommands, bool> static_easyrpg_sequential_order(
143+
&rpg::BattleCommands::easyrpg_sequential_order,
144+
LDB_Reader::ChunkBattleCommands::easyrpg_sequential_order,
145+
"easyrpg_sequential_order",
146+
0,
147+
1
148+
);
128149

129150

130151
template <>
@@ -144,6 +165,9 @@ Field<rpg::BattleCommands> const* Struct<rpg::BattleCommands>::fields[] = {
144165
&static_death_teleport_x,
145166
&static_death_teleport_y,
146167
&static_death_teleport_face,
168+
&static_easyrpg_default_atb_mode,
169+
&static_easyrpg_enable_battle_row_command,
170+
&static_easyrpg_sequential_order,
147171
NULL
148172
};
149173

src/generated/ldb_item.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,13 @@ static TypedField<rpg::Item, DBString> static_easyrpg_using_message(
415415
0,
416416
0
417417
);
418+
static TypedField<rpg::Item, int32_t> static_easyrpg_max_count(
419+
&rpg::Item::easyrpg_max_count,
420+
LDB_Reader::ChunkItem::easyrpg_max_count,
421+
"easyrpg_max_count",
422+
0,
423+
0
424+
);
418425

419426

420427
template <>
@@ -476,6 +483,7 @@ Field<rpg::Item> const* Struct<rpg::Item>::fields[] = {
476483
&static_ranged_trajectory,
477484
&static_ranged_target,
478485
&static_easyrpg_using_message,
486+
&static_easyrpg_max_count,
479487
NULL
480488
};
481489

src/generated/ldb_skill.cpp

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,48 @@ static TypedField<rpg::Skill, DBString> static_easyrpg_battle2k3_message(
277277
0,
278278
1
279279
);
280+
static TypedField<rpg::Skill, bool> static_easyrpg_ignore_reflect(
281+
&rpg::Skill::easyrpg_ignore_reflect,
282+
LDB_Reader::ChunkSkill::easyrpg_ignore_reflect,
283+
"easyrpg_ignore_reflect",
284+
0,
285+
1
286+
);
287+
static TypedField<rpg::Skill, int32_t> static_easyrpg_state_hit(
288+
&rpg::Skill::easyrpg_state_hit,
289+
LDB_Reader::ChunkSkill::easyrpg_state_hit,
290+
"easyrpg_state_hit",
291+
0,
292+
0
293+
);
294+
static TypedField<rpg::Skill, int32_t> static_easyrpg_attribute_hit(
295+
&rpg::Skill::easyrpg_attribute_hit,
296+
LDB_Reader::ChunkSkill::easyrpg_attribute_hit,
297+
"easyrpg_attribute_hit",
298+
0,
299+
0
300+
);
301+
static TypedField<rpg::Skill, bool> static_easyrpg_ignore_restrict_skill(
302+
&rpg::Skill::easyrpg_ignore_restrict_skill,
303+
LDB_Reader::ChunkSkill::easyrpg_ignore_restrict_skill,
304+
"easyrpg_ignore_restrict_skill",
305+
0,
306+
0
307+
);
308+
static TypedField<rpg::Skill, bool> static_easyrpg_ignore_restrict_magic(
309+
&rpg::Skill::easyrpg_ignore_restrict_magic,
310+
LDB_Reader::ChunkSkill::easyrpg_ignore_restrict_magic,
311+
"easyrpg_ignore_restrict_magic",
312+
0,
313+
0
314+
);
315+
static TypedField<rpg::Skill, bool> static_easyrpg_enable_stat_absorbing(
316+
&rpg::Skill::easyrpg_enable_stat_absorbing,
317+
LDB_Reader::ChunkSkill::easyrpg_enable_stat_absorbing,
318+
"easyrpg_enable_stat_absorbing",
319+
0,
320+
0
321+
);
280322

281323

282324
template <>
@@ -318,6 +360,12 @@ Field<rpg::Skill> const* Struct<rpg::Skill>::fields[] = {
318360
&static_battler_animation,
319361
&static_battler_animation_data,
320362
&static_easyrpg_battle2k3_message,
363+
&static_easyrpg_ignore_reflect,
364+
&static_easyrpg_state_hit,
365+
&static_easyrpg_attribute_hit,
366+
&static_easyrpg_ignore_restrict_skill,
367+
&static_easyrpg_ignore_restrict_magic,
368+
&static_easyrpg_enable_stat_absorbing,
321369
NULL
322370
};
323371

0 commit comments

Comments
 (0)