Skip to content

Commit 3c45da9

Browse files
author
rueter37
committed
Add custom game settings in the database
The following database settings have been added: - BattleCommands option 200: Default ATB mode - BattleCommands option 201: Enable in-battle row command - BattleCommands option 202: Sequential order battling - Skill option 202: Ignore reflect state - Skill option 203: State infliction hit rate - Skill option 204: Attribute shift hit rate - Skill option 205: Ignore physical rate restriction by states - Skill option 206: Ignore magical rate restriction by states - Item option 202: Maximum item count in inventory - System option 200: Alternative EXP curve - System option 201: Enable auto battle - System option 202: Maximum actor HP value - System option 203: Maximum enemy HP value - System option 204: Maximum damage value - System option 205: Maximum EXP value - System option 206: Maximum level - System option 207: Enable stat absorbing - System option 208: Maximum number of savegame slots - System option 209: Default maximum item count in inventory - System option 210: Minimum variable value - System option 211: Maximum variable value - System option 212: Maximum actor SP value - System option 213: Maximum enemy SP value - System option 214: Maximum base stat value - System option 215: Maximum battle stat value
1 parent 82892b0 commit 3c45da9

14 files changed

Lines changed: 358 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,17 @@ 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
1523
Item,easyrpg_using_message,f,DBString,0xC9,DBString(kDefaultMessage),0,0,Item usage message in battle
24+
Item,easyrpg_max_count,f,Int32,0xCA,-1,0,0,How many the player can carry of this item
1625
Terms,easyrpg_item_number_separator,f,DBString,0xC8,DBString(kDefaultTerm),0,0,Item number separator
1726
Terms,easyrpg_skill_cost_separator,f,DBString,0xC9,DBString(kDefaultTerm),0,0,Skill cost separator
1827
Terms,easyrpg_equipment_arrow,f,DBString,0xCA,DBString(kDefaultTerm),0,0,Equipment window arrow
@@ -33,3 +42,19 @@ Terms,easyrpg_battle2k3_escape,f,DBString,0xD8,DBString(kDefaultTerm),0,1,RPG Ma
3342
Terms,easyrpg_battle2k3_special_combat_back,f,DBString,0xD9,,0,1,Message for back and pincer attack
3443
Terms,easyrpg_battle2k3_skill,f,DBString,0xDA,DBString(kDefaultTerm),0,1,RPG Maker 2003 battle general skill start notification
3544
Terms,easyrpg_battle2k3_item,f,DBString,0xDB,DBString(kDefaultTerm),0,1,RPG Maker 2003 battle general item start notification
45+
System,easyrpg_alternative_exp,f,Int32,0xC8,0,0,0,Which EXP formula to use: 0=Default 1=2k 2=2k3
46+
System,easyrpg_enable_auto_battle,f,Boolean,0xC9,True,0,0,If auto battling should be allowed
47+
System,easyrpg_max_actor_hp,f,Int32,0xCA,-1,0,0,Absolute maximum HP value actors can have
48+
System,easyrpg_max_enemy_hp,f,Int32,0xCB,-1,0,0,Absolute maximum HP value enemies can have
49+
System,easyrpg_max_damage,f,Int32,0xCC,-1,0,0,How much damage can an attack inflict at most
50+
System,easyrpg_max_exp,f,Int32,0xCD,-1,0,0,Absolute maximum EXP value actors can have
51+
System,easyrpg_max_level,f,Int32,0xCE,-1,0,0,Absolute maximum level actors can reach
52+
System,easyrpg_enable_stat_absorbing,f,Boolean,0xCF,False,0,0,If attack/defense/spirit/agility can be absorbed
53+
System,easyrpg_max_savefiles,f,Int32,0xD0,15,0,0,How many savegame slots should be shown in the savegame scene
54+
System,easyrpg_max_item_count,f,Int32,0xD1,-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,0xD2,0,0,0,Minimum value a variable can have
56+
System,easyrpg_variable_max_value,f,Int32,0xD3,0,0,0,Maximum value a variable can have
57+
System,easyrpg_max_actor_sp,f,Int32,0xD4,-1,0,0,Absolute maximum SP value actors can have
58+
System,easyrpg_max_enemy_sp,f,Int32,0xD5,-1,0,0,Absolute maximum SP value enemies can have
59+
System,easyrpg_max_stat_base_value,f,Int32,0xD6,-1,0,0,Absolute maximum value a base stat can have
60+
System,easyrpg_max_stat_battle_value,f,Int32,0xD7,-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,17 @@ 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
447463
};
448464
};
449465
struct ChunkItem {
@@ -561,7 +577,9 @@ namespace LDB_Reader {
561577
/** Integer */
562578
ranged_target = 0x4C,
563579
/** Item usage message in battle */
564-
easyrpg_using_message = 0xC9
580+
easyrpg_using_message = 0xC9,
581+
/** How many the player can carry of this item */
582+
easyrpg_max_count = 0xCA
565583
};
566584
};
567585
struct ChunkEnemyAction {
@@ -1337,7 +1355,39 @@ namespace LDB_Reader {
13371355
/** Flag - RPG2003 */
13381356
invert_animations = 0x65,
13391357
/** 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
1358+
show_title = 0x6F,
1359+
/** Which EXP formula to use: 0=Default 1=2k 2=2k3 */
1360+
easyrpg_alternative_exp = 0xC8,
1361+
/** If auto battling should be allowed */
1362+
easyrpg_enable_auto_battle = 0xC9,
1363+
/** Absolute maximum HP value actors can have */
1364+
easyrpg_max_actor_hp = 0xCA,
1365+
/** Absolute maximum HP value enemies can have */
1366+
easyrpg_max_enemy_hp = 0xCB,
1367+
/** How much damage can an attack inflict at most */
1368+
easyrpg_max_damage = 0xCC,
1369+
/** Absolute maximum EXP value actors can have */
1370+
easyrpg_max_exp = 0xCD,
1371+
/** Absolute maximum level actors can reach */
1372+
easyrpg_max_level = 0xCE,
1373+
/** If attack/defense/spirit/agility can be absorbed */
1374+
easyrpg_enable_stat_absorbing = 0xCF,
1375+
/** How many savegame slots should be shown in the savegame scene */
1376+
easyrpg_max_savefiles = 0xD0,
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 = 0xD1,
1379+
/** Minimum value a variable can have */
1380+
easyrpg_variable_min_value = 0xD2,
1381+
/** Maximum value a variable can have */
1382+
easyrpg_variable_max_value = 0xD3,
1383+
/** Absolute maximum SP value actors can have */
1384+
easyrpg_max_actor_sp = 0xD4,
1385+
/** Absolute maximum SP value enemies can have */
1386+
easyrpg_max_enemy_sp = 0xD5,
1387+
/** Absolute maximum value a base stat can have */
1388+
easyrpg_max_stat_base_value = 0xD6,
1389+
/** Absolute maximum value a battle stat can have */
1390+
easyrpg_max_stat_battle_value = 0xD7
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: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ 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;
110115
};
111116
inline std::ostream& operator<<(std::ostream& os, Skill::Type code) {
112117
os << static_cast<std::underlying_type_t<decltype(code)>>(code);
@@ -156,7 +161,12 @@ namespace rpg {
156161
&& l.affect_attr_defence == r.affect_attr_defence
157162
&& l.battler_animation == r.battler_animation
158163
&& l.battler_animation_data == r.battler_animation_data
159-
&& l.easyrpg_battle2k3_message == r.easyrpg_battle2k3_message;
164+
&& l.easyrpg_battle2k3_message == r.easyrpg_battle2k3_message
165+
&& l.easyrpg_ignore_reflect == r.easyrpg_ignore_reflect
166+
&& l.easyrpg_state_hit == r.easyrpg_state_hit
167+
&& l.easyrpg_attribute_hit == r.easyrpg_attribute_hit
168+
&& l.easyrpg_ignore_restrict_skill == r.easyrpg_ignore_restrict_skill
169+
&& l.easyrpg_ignore_restrict_magic == r.easyrpg_ignore_restrict_magic;
160170
}
161171

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

src/generated/lcf/rpg/system.h

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,22 @@ namespace rpg {
231231
DBString frame_name;
232232
bool invert_animations = false;
233233
bool show_title = true;
234+
int32_t easyrpg_alternative_exp = 0;
235+
bool easyrpg_enable_auto_battle = true;
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+
bool easyrpg_enable_stat_absorbing = false;
242+
int32_t easyrpg_max_savefiles = 15;
243+
int32_t easyrpg_max_item_count = -1;
244+
int32_t easyrpg_variable_min_value = 0;
245+
int32_t easyrpg_variable_max_value = 0;
246+
int32_t easyrpg_max_actor_sp = -1;
247+
int32_t easyrpg_max_enemy_sp = -1;
248+
int32_t easyrpg_max_stat_base_value = -1;
249+
int32_t easyrpg_max_stat_battle_value = -1;
234250
};
235251
inline std::ostream& operator<<(std::ostream& os, System::FadeOut code) {
236252
os << static_cast<std::underlying_type_t<decltype(code)>>(code);
@@ -316,7 +332,23 @@ namespace rpg {
316332
&& l.show_frame == r.show_frame
317333
&& l.frame_name == r.frame_name
318334
&& l.invert_animations == r.invert_animations
319-
&& l.show_title == r.show_title;
335+
&& l.show_title == r.show_title
336+
&& l.easyrpg_alternative_exp == r.easyrpg_alternative_exp
337+
&& l.easyrpg_enable_auto_battle == r.easyrpg_enable_auto_battle
338+
&& l.easyrpg_max_actor_hp == r.easyrpg_max_actor_hp
339+
&& l.easyrpg_max_enemy_hp == r.easyrpg_max_enemy_hp
340+
&& l.easyrpg_max_damage == r.easyrpg_max_damage
341+
&& l.easyrpg_max_exp == r.easyrpg_max_exp
342+
&& l.easyrpg_max_level == r.easyrpg_max_level
343+
&& l.easyrpg_enable_stat_absorbing == r.easyrpg_enable_stat_absorbing
344+
&& l.easyrpg_max_savefiles == r.easyrpg_max_savefiles
345+
&& l.easyrpg_max_item_count == r.easyrpg_max_item_count
346+
&& l.easyrpg_variable_min_value == r.easyrpg_variable_min_value
347+
&& l.easyrpg_variable_max_value == r.easyrpg_variable_max_value
348+
&& l.easyrpg_max_actor_sp == r.easyrpg_max_actor_sp
349+
&& l.easyrpg_max_enemy_sp == r.easyrpg_max_enemy_sp
350+
&& l.easyrpg_max_stat_base_value == r.easyrpg_max_stat_base_value
351+
&& l.easyrpg_max_stat_battle_value == r.easyrpg_max_stat_battle_value;
320352
}
321353

322354
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: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,41 @@ 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+
);
280315

281316

282317
template <>
@@ -318,6 +353,11 @@ Field<rpg::Skill> const* Struct<rpg::Skill>::fields[] = {
318353
&static_battler_animation,
319354
&static_battler_animation_data,
320355
&static_easyrpg_battle2k3_message,
356+
&static_easyrpg_ignore_reflect,
357+
&static_easyrpg_state_hit,
358+
&static_easyrpg_attribute_hit,
359+
&static_easyrpg_ignore_restrict_skill,
360+
&static_easyrpg_ignore_restrict_magic,
321361
NULL
322362
};
323363

0 commit comments

Comments
 (0)