rpgsync 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rpgsync/__init__.py +8 -0
- rpgsync/__main__.py +3 -0
- rpgsync/cli.py +1242 -0
- rpgsync/commands.py +920 -0
- rpgsync/compat.py +203 -0
- rpgsync/database.py +1025 -0
- rpgsync/db.py +1377 -0
- rpgsync/dbschema.py +1011 -0
- rpgsync/dsl.py +2616 -0
- rpgsync/dynparams.py +357 -0
- rpgsync/dynrpg.py +612 -0
- rpgsync/fmt.py +79 -0
- rpgsync/lcf.py +826 -0
- rpgsync/maniac.py +387 -0
- rpgsync/maptree.py +888 -0
- rpgsync/messages.py +113 -0
- rpgsync/named.py +1051 -0
- rpgsync/project.py +323 -0
- rpgsync/py.typed +0 -0
- rpgsync/pyexpr.py +1472 -0
- rpgsync/resources.py +455 -0
- rpgsync/scaffold.py +567 -0
- rpgsync/script.py +3532 -0
- rpgsync/scriptfiles.py +924 -0
- rpgsync/sync.py +1365 -0
- rpgsync/tables.py +114 -0
- rpgsync/venv.py +102 -0
- rpgsync-0.1.0.dist-info/METADATA +288 -0
- rpgsync-0.1.0.dist-info/RECORD +31 -0
- rpgsync-0.1.0.dist-info/WHEEL +4 -0
- rpgsync-0.1.0.dist-info/entry_points.txt +3 -0
rpgsync/db.py
ADDED
|
@@ -0,0 +1,1377 @@
|
|
|
1
|
+
"""Typed models of the RPG_RT.ldb database tables.
|
|
2
|
+
|
|
3
|
+
Database files exported by rpgsync (``Scripts/database/*.py``) hold these models (see rpgsync.tables).
|
|
4
|
+
Defaults are liblcf's; a keyword left out of a file means the default value.
|
|
5
|
+
|
|
6
|
+
Generated by tools/gen_dbschema.py from liblcf's generator/csv; do not edit.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
from typing import Any, Literal
|
|
11
|
+
|
|
12
|
+
from pydantic import BaseModel, ConfigDict, Field, PrivateAttr
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"Actor",
|
|
16
|
+
"Attribute",
|
|
17
|
+
"AttributeType",
|
|
18
|
+
"BattlerAnimation",
|
|
19
|
+
"BattlerAnimationItemSkill",
|
|
20
|
+
"BattlerAnimationItemSkillAfterimage",
|
|
21
|
+
"BattlerAnimationItemSkillAnimType",
|
|
22
|
+
"BattlerAnimationItemSkillMovement",
|
|
23
|
+
"BattlerAnimationItemSkillSpeed",
|
|
24
|
+
"BattlerAnimationPose",
|
|
25
|
+
"BattlerAnimationPoseAnimType",
|
|
26
|
+
"BattlerAnimationSpeed",
|
|
27
|
+
"BattlerAnimationWeapon",
|
|
28
|
+
"Class",
|
|
29
|
+
"DbModel",
|
|
30
|
+
"Encounter",
|
|
31
|
+
"Enemy",
|
|
32
|
+
"EnemyAction",
|
|
33
|
+
"EnemyActionBasic",
|
|
34
|
+
"EnemyActionConditionType",
|
|
35
|
+
"EnemyActionKind",
|
|
36
|
+
"Equipment",
|
|
37
|
+
"Item",
|
|
38
|
+
"ItemTarget",
|
|
39
|
+
"ItemTrajectory",
|
|
40
|
+
"ItemType",
|
|
41
|
+
"Learning",
|
|
42
|
+
"MapInfo",
|
|
43
|
+
"MapInfoBGMType",
|
|
44
|
+
"MapInfoMusicType",
|
|
45
|
+
"MapInfoTriState",
|
|
46
|
+
"Music",
|
|
47
|
+
"Parameters",
|
|
48
|
+
"Skill",
|
|
49
|
+
"SkillScope",
|
|
50
|
+
"SkillSpType",
|
|
51
|
+
"SkillType",
|
|
52
|
+
"Sound",
|
|
53
|
+
"Start",
|
|
54
|
+
"State",
|
|
55
|
+
"StateAffectType",
|
|
56
|
+
"StateChangeType",
|
|
57
|
+
"StatePersistence",
|
|
58
|
+
"StateRestriction",
|
|
59
|
+
"Switch",
|
|
60
|
+
"Terrain",
|
|
61
|
+
"TerrainBGAssociation",
|
|
62
|
+
"TerrainBushDepth",
|
|
63
|
+
"TerrainFlags",
|
|
64
|
+
"TreeMapMapType",
|
|
65
|
+
"Troop",
|
|
66
|
+
"TroopMember",
|
|
67
|
+
"Variable",
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def _freeze(v: Any) -> Any:
|
|
72
|
+
if isinstance(v, dict):
|
|
73
|
+
return tuple((k, _freeze(x)) for k, x in v.items())
|
|
74
|
+
if isinstance(v, (list, tuple)):
|
|
75
|
+
return tuple(_freeze(x) for x in v)
|
|
76
|
+
return v
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class DbModel(BaseModel):
|
|
80
|
+
"""Base class of the database models."""
|
|
81
|
+
model_config = ConfigDict(extra="forbid")
|
|
82
|
+
_lineno: int | None = PrivateAttr(default=None)
|
|
83
|
+
_ident: str | None = PrivateAttr(default=None)
|
|
84
|
+
|
|
85
|
+
@property
|
|
86
|
+
def lineno(self) -> int | None:
|
|
87
|
+
"""Line of the entry in its database file (None when read from the game)."""
|
|
88
|
+
return self._lineno
|
|
89
|
+
|
|
90
|
+
def key(self) -> tuple:
|
|
91
|
+
"""Hashable value used to compare entries."""
|
|
92
|
+
return _freeze(self.model_dump())
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
BattlerAnimationItemSkillAnimType = Literal["weapon", "battle"]
|
|
96
|
+
BattlerAnimationItemSkillMovement = Literal["none", "step", "jump", "move"]
|
|
97
|
+
BattlerAnimationItemSkillAfterimage = Literal["none", "add"]
|
|
98
|
+
BattlerAnimationItemSkillSpeed = Literal["fast", "medium", "slow"]
|
|
99
|
+
SkillType = Literal["normal", "teleport", "escape", "switch", "subskill"]
|
|
100
|
+
SkillSpType = Literal["cost", "percent"]
|
|
101
|
+
SkillScope = Literal["enemy", "enemies", "self", "ally", "party"]
|
|
102
|
+
ItemType = Literal[
|
|
103
|
+
"normal",
|
|
104
|
+
"weapon",
|
|
105
|
+
"shield",
|
|
106
|
+
"armor",
|
|
107
|
+
"helmet",
|
|
108
|
+
"accessory",
|
|
109
|
+
"medicine",
|
|
110
|
+
"book",
|
|
111
|
+
"material",
|
|
112
|
+
"special",
|
|
113
|
+
"switch",
|
|
114
|
+
]
|
|
115
|
+
ItemTrajectory = Literal["straight", "return"]
|
|
116
|
+
ItemTarget = Literal["single", "center", "simultaneous", "sequential"]
|
|
117
|
+
EnemyActionKind = Literal["basic", "skill", "transformation"]
|
|
118
|
+
EnemyActionBasic = Literal[
|
|
119
|
+
"attack",
|
|
120
|
+
"dual_attack",
|
|
121
|
+
"defense",
|
|
122
|
+
"observe",
|
|
123
|
+
"charge",
|
|
124
|
+
"autodestruction",
|
|
125
|
+
"escape",
|
|
126
|
+
"nothing",
|
|
127
|
+
]
|
|
128
|
+
EnemyActionConditionType = Literal[
|
|
129
|
+
"always",
|
|
130
|
+
"switch",
|
|
131
|
+
"turn",
|
|
132
|
+
"actors",
|
|
133
|
+
"hp",
|
|
134
|
+
"sp",
|
|
135
|
+
"party_lvl",
|
|
136
|
+
"party_fatigue",
|
|
137
|
+
]
|
|
138
|
+
StatePersistence = Literal["ends", "persists"]
|
|
139
|
+
StateRestriction = Literal["normal", "do_nothing", "attack_enemy", "attack_ally"]
|
|
140
|
+
StateAffectType = Literal["half", "double", "nothing"]
|
|
141
|
+
StateChangeType = Literal["lose", "gain", "nothing"]
|
|
142
|
+
AttributeType = Literal["physical", "magical"]
|
|
143
|
+
TerrainBushDepth = Literal["normal", "third", "half", "full"]
|
|
144
|
+
TerrainBGAssociation = Literal["background", "frame"]
|
|
145
|
+
BattlerAnimationPoseAnimType = Literal["character", "battle"]
|
|
146
|
+
BattlerAnimationSpeed = Literal["slow", "medium", "fast"]
|
|
147
|
+
TreeMapMapType = Literal["root", "map", "area"]
|
|
148
|
+
MapInfoMusicType = Literal["parent", "event", "specific"]
|
|
149
|
+
MapInfoBGMType = Literal["parent", "terrain", "specific"]
|
|
150
|
+
MapInfoTriState = Literal["parent", "allow", "forbid"]
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
class TerrainFlags(DbModel):
|
|
154
|
+
"""Bit flags Terrain."""
|
|
155
|
+
back_party: bool = Field(default=False, description="Back party. RPG Maker 2003 only.")
|
|
156
|
+
back_enemies: bool = Field(default=False, description="Back enemies. RPG Maker 2003 only.")
|
|
157
|
+
lateral_party: bool = Field(default=False, description="Lateral party. RPG Maker 2003 only.")
|
|
158
|
+
lateral_enemies: bool = Field(default=False, description="Lateral enemies. RPG Maker 2003 only.")
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
class Parameters(DbModel):
|
|
162
|
+
"""Base stats per level: element N-1 of each list is the value at level N."""
|
|
163
|
+
|
|
164
|
+
maxhp: list[int] = Field(default_factory=list, description="Maxhp.")
|
|
165
|
+
maxsp: list[int] = Field(default_factory=list, description="Maxsp.")
|
|
166
|
+
attack: list[int] = Field(default_factory=list, description="Attack.")
|
|
167
|
+
defense: list[int] = Field(default_factory=list, description="Defense.")
|
|
168
|
+
spirit: list[int] = Field(default_factory=list, description="Spirit.")
|
|
169
|
+
agility: list[int] = Field(default_factory=list, description="Agility.")
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
class Equipment(DbModel):
|
|
173
|
+
"""Initial equipment: item ids, 0 = nothing."""
|
|
174
|
+
|
|
175
|
+
weapon_id: int = Field(default=0, description="Weapon id (item id).")
|
|
176
|
+
shield_id: int = Field(default=0, description="Shield id (item id).")
|
|
177
|
+
armor_id: int = Field(default=0, description="Armor id (item id).")
|
|
178
|
+
helmet_id: int = Field(default=0, description="Helmet id (item id).")
|
|
179
|
+
accessory_id: int = Field(default=0, description="Accessory id (item id).")
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
class Learning(DbModel):
|
|
183
|
+
"""A skill learned at a given level."""
|
|
184
|
+
|
|
185
|
+
id: int | None = Field(
|
|
186
|
+
default=None,
|
|
187
|
+
description="Element id; leave it out to use the position in the list (1-based).",
|
|
188
|
+
)
|
|
189
|
+
level: int = Field(default=1, description="Level at which the skill is learned.")
|
|
190
|
+
skill_id: int = Field(default=1, description="Learned skill (skill id).")
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
class Actor(DbModel):
|
|
194
|
+
"""A hero (Database > Actors)."""
|
|
195
|
+
|
|
196
|
+
id: int | None = Field(
|
|
197
|
+
default=None,
|
|
198
|
+
description=(
|
|
199
|
+
"Database id: entry N is the N-th slot of the table (RPG_RT looks entries up by "
|
|
200
|
+
"position)."
|
|
201
|
+
),
|
|
202
|
+
)
|
|
203
|
+
name: str = Field(default="", description="Name.")
|
|
204
|
+
title: str = Field(default="", description="Title shown under the name (e.g. 'Knight').")
|
|
205
|
+
character_name: str = Field(default="", description="CharSet file used on the map.")
|
|
206
|
+
character_index: int = Field(default=0, description="Sprite index (0-7) inside the CharSet.")
|
|
207
|
+
transparent: bool = Field(default=False, description="Draw the map sprite translucent.")
|
|
208
|
+
initial_level: int = Field(default=1, description="Level when joining the party.")
|
|
209
|
+
final_level: int | None = Field(
|
|
210
|
+
default=None,
|
|
211
|
+
description=(
|
|
212
|
+
"Maximum level. None = the engine default (50 in RPG Maker 2000, 99 in RPG Maker "
|
|
213
|
+
"2003)."
|
|
214
|
+
),
|
|
215
|
+
)
|
|
216
|
+
critical_hit: bool = Field(default=True, description="Can land critical hits.")
|
|
217
|
+
critical_hit_chance: int = Field(default=30, description="Critical hit probability: 1 in N.")
|
|
218
|
+
face_name: str = Field(default="", description="FaceSet file.")
|
|
219
|
+
face_index: int = Field(default=0, description="Face index (0-15) inside the FaceSet.")
|
|
220
|
+
two_weapon: bool = Field(
|
|
221
|
+
default=False,
|
|
222
|
+
description="Wields two weapons instead of weapon + shield.",
|
|
223
|
+
)
|
|
224
|
+
lock_equipment: bool = Field(default=False, description="Equipment cannot be changed.")
|
|
225
|
+
auto_battle: bool = Field(default=False, description="Fights automatically.")
|
|
226
|
+
super_guard: bool = Field(
|
|
227
|
+
default=False,
|
|
228
|
+
description="Strong defense (damage quartered when defending).",
|
|
229
|
+
)
|
|
230
|
+
parameters: Parameters = Field(
|
|
231
|
+
default_factory=Parameters,
|
|
232
|
+
description="Max HP/SP, attack, defense, spirit and agility per level.",
|
|
233
|
+
)
|
|
234
|
+
exp_base: int | None = Field(
|
|
235
|
+
default=None,
|
|
236
|
+
description=(
|
|
237
|
+
"Experience curve: base value. None = the engine default (30 in RPG Maker 2000, 300 "
|
|
238
|
+
"in RPG Maker 2003)."
|
|
239
|
+
),
|
|
240
|
+
)
|
|
241
|
+
exp_inflation: int | None = Field(
|
|
242
|
+
default=None,
|
|
243
|
+
description=(
|
|
244
|
+
"Experience curve: inflation. None = the engine default (30 in RPG Maker 2000, 300 in "
|
|
245
|
+
"RPG Maker 2003)."
|
|
246
|
+
),
|
|
247
|
+
)
|
|
248
|
+
exp_correction: int = Field(default=0, description="Experience curve: correction.")
|
|
249
|
+
initial_equipment: Equipment = Field(
|
|
250
|
+
default_factory=Equipment,
|
|
251
|
+
description="Equipment when joining the party.",
|
|
252
|
+
)
|
|
253
|
+
unarmed_animation: int = Field(
|
|
254
|
+
default=1,
|
|
255
|
+
description="Battle animation of unarmed attacks (battle animation id).",
|
|
256
|
+
)
|
|
257
|
+
class_id: int = Field(default=0, description="Class (class id). RPG Maker 2003 only.")
|
|
258
|
+
battle_x: int = Field(default=220, description="Battle position X. RPG Maker 2003 only.")
|
|
259
|
+
battle_y: int = Field(default=120, description="Battle position Y. RPG Maker 2003 only.")
|
|
260
|
+
battler_animation: int = Field(
|
|
261
|
+
default=1,
|
|
262
|
+
description="Battler animation (battle charset; battler animation id). RPG Maker 2003 only.",
|
|
263
|
+
)
|
|
264
|
+
skills: list[Learning] = Field(default_factory=list, description="Skills learned by level.")
|
|
265
|
+
rename_skill: bool = Field(
|
|
266
|
+
default=False,
|
|
267
|
+
description="Use a custom name for the Skill battle command.",
|
|
268
|
+
)
|
|
269
|
+
skill_name: str = Field(default="", description="Custom name of the Skill battle command.")
|
|
270
|
+
state_ranks: list[int] = Field(
|
|
271
|
+
default_factory=list,
|
|
272
|
+
description="State ranks (rank per state id, index 0 is id 1: 0=A 1=B 2=C 3=D 4=E).",
|
|
273
|
+
)
|
|
274
|
+
attribute_ranks: list[int] = Field(
|
|
275
|
+
default_factory=list,
|
|
276
|
+
description="Attribute ranks (rank per attribute id, index 0 is id 1: 0=A 1=B 2=C 3=D 4=E).",
|
|
277
|
+
)
|
|
278
|
+
battle_commands: list[int] = Field(
|
|
279
|
+
default_factory=list,
|
|
280
|
+
description="Battle command ids (-1 = none). RPG Maker 2003 only.",
|
|
281
|
+
)
|
|
282
|
+
easyrpg_actorai: int = Field(
|
|
283
|
+
default=-1,
|
|
284
|
+
description=(
|
|
285
|
+
"Default autobattle AI behavior of the actor with 0=RPG_RT 1=RPG_RT+ 2=ATTACK. "
|
|
286
|
+
"EasyRPG Player extension."
|
|
287
|
+
),
|
|
288
|
+
)
|
|
289
|
+
easyrpg_prevent_critical: bool = Field(
|
|
290
|
+
default=False,
|
|
291
|
+
description="If the actor is protected against critical hits. EasyRPG Player extension.",
|
|
292
|
+
)
|
|
293
|
+
easyrpg_raise_evasion: bool = Field(
|
|
294
|
+
default=False,
|
|
295
|
+
description="If the actor has an increased evasion rate. EasyRPG Player extension.",
|
|
296
|
+
)
|
|
297
|
+
easyrpg_immune_to_attribute_downshifts: bool = Field(
|
|
298
|
+
default=False,
|
|
299
|
+
description="If the actor is immune to attribute downshifts. EasyRPG Player extension.",
|
|
300
|
+
)
|
|
301
|
+
easyrpg_ignore_evasion: bool = Field(
|
|
302
|
+
default=False,
|
|
303
|
+
description=(
|
|
304
|
+
"If the actors unarmed physical attacks ignore evasion. EasyRPG Player extension."
|
|
305
|
+
),
|
|
306
|
+
)
|
|
307
|
+
easyrpg_unarmed_hit: int = Field(
|
|
308
|
+
default=-1,
|
|
309
|
+
description="Hit rate of the actor on unarmed attacks. EasyRPG Player extension.",
|
|
310
|
+
)
|
|
311
|
+
easyrpg_unarmed_state_set: list[bool] = Field(
|
|
312
|
+
default_factory=list,
|
|
313
|
+
description=(
|
|
314
|
+
"States inflicted by unarmed normal attacks of the actor (one flag per state id, "
|
|
315
|
+
"index 0 is id 1). EasyRPG Player extension."
|
|
316
|
+
),
|
|
317
|
+
)
|
|
318
|
+
easyrpg_unarmed_state_chance: int = Field(
|
|
319
|
+
default=0,
|
|
320
|
+
description=(
|
|
321
|
+
"State infliction probability by unarmed normal attacks of the actor. EasyRPG Player "
|
|
322
|
+
"extension."
|
|
323
|
+
),
|
|
324
|
+
)
|
|
325
|
+
easyrpg_unarmed_attribute_set: list[bool] = Field(
|
|
326
|
+
default_factory=list,
|
|
327
|
+
description=(
|
|
328
|
+
"Attributes used by unarmed normal attacks of the actor (one flag per attribute id, "
|
|
329
|
+
"index 0 is id 1). EasyRPG Player extension."
|
|
330
|
+
),
|
|
331
|
+
)
|
|
332
|
+
easyrpg_dual_attack: bool = Field(
|
|
333
|
+
default=False,
|
|
334
|
+
description="If the actors unarmed physical attacks hits twice. EasyRPG Player extension.",
|
|
335
|
+
)
|
|
336
|
+
easyrpg_attack_all: bool = Field(
|
|
337
|
+
default=False,
|
|
338
|
+
description=(
|
|
339
|
+
"If the actors unarmed physical targets the entire enemy party. EasyRPG Player "
|
|
340
|
+
"extension."
|
|
341
|
+
),
|
|
342
|
+
)
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
class Class(DbModel):
|
|
346
|
+
"""A character class (Database > Classes, RPG Maker 2003)."""
|
|
347
|
+
|
|
348
|
+
id: int | None = Field(
|
|
349
|
+
default=None,
|
|
350
|
+
description=(
|
|
351
|
+
"Database id: entry N is the N-th slot of the table (RPG_RT looks entries up by "
|
|
352
|
+
"position)."
|
|
353
|
+
),
|
|
354
|
+
)
|
|
355
|
+
name: str = Field(default="", description="Name.")
|
|
356
|
+
two_weapon: bool = Field(default=False, description="Two weapon.")
|
|
357
|
+
lock_equipment: bool = Field(default=False, description="Lock equipment.")
|
|
358
|
+
auto_battle: bool = Field(default=False, description="Auto battle.")
|
|
359
|
+
super_guard: bool = Field(default=False, description="Super guard.")
|
|
360
|
+
parameters: Parameters = Field(
|
|
361
|
+
default_factory=Parameters,
|
|
362
|
+
description="Max HP/SP, attack, defense, spirit and agility per level.",
|
|
363
|
+
)
|
|
364
|
+
exp_base: int = Field(default=300, description="Exp base.")
|
|
365
|
+
exp_inflation: int = Field(default=300, description="Exp inflation.")
|
|
366
|
+
exp_correction: int = Field(default=0, description="Exp correction.")
|
|
367
|
+
battler_animation: int = Field(
|
|
368
|
+
default=0,
|
|
369
|
+
description="Battler animation (battle charset; battle animation id).",
|
|
370
|
+
)
|
|
371
|
+
skills: list[Learning] = Field(default_factory=list, description="Skills learned by level.")
|
|
372
|
+
state_ranks: list[int] = Field(
|
|
373
|
+
default_factory=list,
|
|
374
|
+
description="State ranks (rank per state id, index 0 is id 1: 0=A 1=B 2=C 3=D 4=E).",
|
|
375
|
+
)
|
|
376
|
+
attribute_ranks: list[int] = Field(
|
|
377
|
+
default_factory=list,
|
|
378
|
+
description="Attribute ranks (rank per attribute id, index 0 is id 1: 0=A 1=B 2=C 3=D 4=E).",
|
|
379
|
+
)
|
|
380
|
+
battle_commands: list[int] = Field(
|
|
381
|
+
default_factory=list,
|
|
382
|
+
description="Battle command ids (-1 = none).",
|
|
383
|
+
)
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
class Sound(DbModel):
|
|
387
|
+
"""A sound effect."""
|
|
388
|
+
|
|
389
|
+
name: str = Field(default="(OFF)", description="File in Sound/ ('(OFF)' = none).")
|
|
390
|
+
volume: int = Field(default=100, description="Volume in percent.")
|
|
391
|
+
tempo: int = Field(default=100, description="Tempo in percent.")
|
|
392
|
+
balance: int = Field(default=50, description="Balance (0 = left, 50 = center, 100 = right).")
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
class BattlerAnimationItemSkill(DbModel):
|
|
396
|
+
"""How one actor animates when using a weapon or skill (RPG Maker 2003)."""
|
|
397
|
+
|
|
398
|
+
id: int | None = Field(
|
|
399
|
+
default=None,
|
|
400
|
+
description="Element id; leave it out to use the position in the list (1-based).",
|
|
401
|
+
)
|
|
402
|
+
unknown02: int = Field(default=0, description="Unknown02. RPG Maker 2003 only.")
|
|
403
|
+
type: BattlerAnimationItemSkillAnimType | int = Field(
|
|
404
|
+
default="weapon",
|
|
405
|
+
description="Type (one of 'weapon', 'battle' or a number). RPG Maker 2003 only.",
|
|
406
|
+
)
|
|
407
|
+
weapon_animation_id: int = Field(
|
|
408
|
+
default=0,
|
|
409
|
+
description="Weapon animation id (battler animation weapon id). RPG Maker 2003 only.",
|
|
410
|
+
)
|
|
411
|
+
movement: BattlerAnimationItemSkillMovement | int = Field(
|
|
412
|
+
default="none",
|
|
413
|
+
description=(
|
|
414
|
+
"Movement (one of 'none', 'step', 'jump', 'move' or a number). RPG Maker 2003 only."
|
|
415
|
+
),
|
|
416
|
+
)
|
|
417
|
+
after_image: BattlerAnimationItemSkillAfterimage | int = Field(
|
|
418
|
+
default="none",
|
|
419
|
+
description="After image (one of 'none', 'add' or a number). RPG Maker 2003 only.",
|
|
420
|
+
)
|
|
421
|
+
attacks: int = Field(default=0, description="Attacks. RPG Maker 2003 only.")
|
|
422
|
+
ranged: bool = Field(default=False, description="Ranged. RPG Maker 2003 only.")
|
|
423
|
+
ranged_animation_id: int = Field(
|
|
424
|
+
default=0,
|
|
425
|
+
description="Ranged animation id (battler animation weapon id). RPG Maker 2003 only.",
|
|
426
|
+
)
|
|
427
|
+
ranged_speed: BattlerAnimationItemSkillSpeed | int = Field(
|
|
428
|
+
default="fast",
|
|
429
|
+
description=(
|
|
430
|
+
"Ranged speed (one of 'fast', 'medium', 'slow' or a number). RPG Maker 2003 only."
|
|
431
|
+
),
|
|
432
|
+
)
|
|
433
|
+
battle_animation_id: int = Field(
|
|
434
|
+
default=1,
|
|
435
|
+
description="Battle animation id (battle animation id). RPG Maker 2003 only.",
|
|
436
|
+
)
|
|
437
|
+
pose: int = Field(
|
|
438
|
+
default=3,
|
|
439
|
+
description="Pose (battler animation pose id). RPG Maker 2003 only.",
|
|
440
|
+
)
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
class Skill(DbModel):
|
|
444
|
+
"""A skill (Database > Skills)."""
|
|
445
|
+
|
|
446
|
+
id: int | None = Field(
|
|
447
|
+
default=None,
|
|
448
|
+
description=(
|
|
449
|
+
"Database id: entry N is the N-th slot of the table (RPG_RT looks entries up by "
|
|
450
|
+
"position)."
|
|
451
|
+
),
|
|
452
|
+
)
|
|
453
|
+
name: str = Field(default="", description="Name.")
|
|
454
|
+
description: str = Field(default="", description="Help text.")
|
|
455
|
+
using_message1: str = Field(
|
|
456
|
+
default="",
|
|
457
|
+
description="Battle message when used (first line). RPG Maker 2000 only.",
|
|
458
|
+
)
|
|
459
|
+
using_message2: str = Field(
|
|
460
|
+
default="",
|
|
461
|
+
description="Battle message when used (second line). RPG Maker 2000 only.",
|
|
462
|
+
)
|
|
463
|
+
failure_message: int = Field(
|
|
464
|
+
default=0,
|
|
465
|
+
description="Message shown when the skill fails. RPG Maker 2000 only.",
|
|
466
|
+
)
|
|
467
|
+
type: SkillType | int = Field(
|
|
468
|
+
default="normal",
|
|
469
|
+
description=(
|
|
470
|
+
"Type (one of 'normal', 'teleport', 'escape', 'switch', 'subskill' or a number)."
|
|
471
|
+
),
|
|
472
|
+
)
|
|
473
|
+
sp_type: SkillSpType | int = Field(
|
|
474
|
+
default="cost",
|
|
475
|
+
description="SP cost unit (one of 'cost', 'percent' or a number). RPG Maker 2003 only.",
|
|
476
|
+
)
|
|
477
|
+
sp_percent: int = Field(
|
|
478
|
+
default=0,
|
|
479
|
+
description="SP cost in percent of max SP. RPG Maker 2003 only.",
|
|
480
|
+
)
|
|
481
|
+
sp_cost: int = Field(default=0, description="SP cost.")
|
|
482
|
+
scope: SkillScope | int = Field(
|
|
483
|
+
default="enemy",
|
|
484
|
+
description="Target (one of 'enemy', 'enemies', 'self', 'ally', 'party' or a number).",
|
|
485
|
+
)
|
|
486
|
+
switch_id: int = Field(default=1, description="Switch turned ON by switch skills (switch id).")
|
|
487
|
+
animation_id: int = Field(default=1, description="Battle animation (battle animation id).")
|
|
488
|
+
sound_effect: Sound = Field(
|
|
489
|
+
default_factory=Sound,
|
|
490
|
+
description="Sound of teleport/escape/switch skills.",
|
|
491
|
+
)
|
|
492
|
+
occasion_field: bool = Field(default=True, description="Usable on the map.")
|
|
493
|
+
occasion_battle: bool = Field(default=False, description="Usable in battle.")
|
|
494
|
+
reverse_state_effect: bool = Field(
|
|
495
|
+
default=False,
|
|
496
|
+
description="Inflict the states instead of curing them. RPG Maker 2003 only.",
|
|
497
|
+
)
|
|
498
|
+
physical_rate: int = Field(default=0, description="Attack influence (0-10).")
|
|
499
|
+
magical_rate: int = Field(default=3, description="Spirit influence (0-10).")
|
|
500
|
+
variance: int = Field(default=4, description="Damage variance (0-10).")
|
|
501
|
+
power: int = Field(default=0, description="Base effect value.")
|
|
502
|
+
hit: int = Field(default=100, description="Success rate in percent.")
|
|
503
|
+
affect_hp: bool = Field(default=False, description="Affect hp.")
|
|
504
|
+
affect_sp: bool = Field(default=False, description="Affect sp.")
|
|
505
|
+
affect_attack: bool = Field(default=False, description="Affect attack.")
|
|
506
|
+
affect_defense: bool = Field(default=False, description="Affect defense.")
|
|
507
|
+
affect_spirit: bool = Field(default=False, description="Affect spirit.")
|
|
508
|
+
affect_agility: bool = Field(default=False, description="Affect agility.")
|
|
509
|
+
absorb_damage: bool = Field(default=False, description="Absorb the damage.")
|
|
510
|
+
ignore_defense: bool = Field(default=False, description="Ignore the target's defense.")
|
|
511
|
+
state_effects: list[bool] = Field(
|
|
512
|
+
default_factory=list,
|
|
513
|
+
description="States changed by the skill (one flag per state id, index 0 is id 1).",
|
|
514
|
+
)
|
|
515
|
+
attribute_effects: list[bool] = Field(
|
|
516
|
+
default_factory=list,
|
|
517
|
+
description="Attributes of the skill (one flag per attribute id, index 0 is id 1).",
|
|
518
|
+
)
|
|
519
|
+
affect_attr_defence: bool = Field(
|
|
520
|
+
default=False,
|
|
521
|
+
description="Lower the target's resistance to the attributes.",
|
|
522
|
+
)
|
|
523
|
+
battler_animation: int = Field(
|
|
524
|
+
default=-1,
|
|
525
|
+
description="Battler animation used (actor id). RPG Maker 2003 only.",
|
|
526
|
+
)
|
|
527
|
+
battler_animation_data: list[BattlerAnimationItemSkill] = Field(
|
|
528
|
+
default_factory=list,
|
|
529
|
+
description="Battle animation settings per actor. RPG Maker 2003 only.",
|
|
530
|
+
)
|
|
531
|
+
easyrpg_battle2k3_message: str = Field(
|
|
532
|
+
default="default_message",
|
|
533
|
+
description=(
|
|
534
|
+
"RPG Maker 2003 battle skill start notification. RPG Maker 2003 only. EasyRPG Player "
|
|
535
|
+
"extension."
|
|
536
|
+
),
|
|
537
|
+
)
|
|
538
|
+
easyrpg_ignore_reflect: bool = Field(
|
|
539
|
+
default=False,
|
|
540
|
+
description=(
|
|
541
|
+
"If the skill bypasses reflect states. Useful for physical skills and skills which "
|
|
542
|
+
"are meant to remove positive states from enemies. RPG Maker 2003 only. EasyRPG "
|
|
543
|
+
"Player extension."
|
|
544
|
+
),
|
|
545
|
+
)
|
|
546
|
+
easyrpg_state_hit: int = Field(
|
|
547
|
+
default=-1,
|
|
548
|
+
description="Separate accuracy value for state inflictions. EasyRPG Player extension.",
|
|
549
|
+
)
|
|
550
|
+
easyrpg_attribute_hit: int = Field(
|
|
551
|
+
default=-1,
|
|
552
|
+
description="Separate accuracy value for attribute shifts. EasyRPG Player extension.",
|
|
553
|
+
)
|
|
554
|
+
easyrpg_ignore_restrict_skill: bool = Field(
|
|
555
|
+
default=False,
|
|
556
|
+
description=(
|
|
557
|
+
"If the skill should bypass skill restrictions by states. EasyRPG Player extension."
|
|
558
|
+
),
|
|
559
|
+
)
|
|
560
|
+
easyrpg_ignore_restrict_magic: bool = Field(
|
|
561
|
+
default=False,
|
|
562
|
+
description=(
|
|
563
|
+
"If the skill should bypass magic restrictions by states. EasyRPG Player extension."
|
|
564
|
+
),
|
|
565
|
+
)
|
|
566
|
+
easyrpg_enable_stat_absorbing: bool = Field(
|
|
567
|
+
default=False,
|
|
568
|
+
description=(
|
|
569
|
+
"If the skill can absorb attack/defense/spirit/agility. EasyRPG Player extension."
|
|
570
|
+
),
|
|
571
|
+
)
|
|
572
|
+
easyrpg_affected_by_evade_all_physical_attacks: bool = Field(
|
|
573
|
+
default=False,
|
|
574
|
+
description=(
|
|
575
|
+
"If the skill should be affected by avoid attack states. RPG Maker 2003 only. EasyRPG "
|
|
576
|
+
"Player extension."
|
|
577
|
+
),
|
|
578
|
+
)
|
|
579
|
+
easyrpg_critical_hit_chance: int = Field(
|
|
580
|
+
default=0,
|
|
581
|
+
description=(
|
|
582
|
+
"Critical hit rate percentage for the skill. If negative then the battler critical "
|
|
583
|
+
"hit rate is used. EasyRPG Player extension."
|
|
584
|
+
),
|
|
585
|
+
)
|
|
586
|
+
easyrpg_affected_by_row_modifiers: bool = Field(
|
|
587
|
+
default=False,
|
|
588
|
+
description=(
|
|
589
|
+
"If the skill is affected by row modifiers. RPG Maker 2003 only. EasyRPG Player "
|
|
590
|
+
"extension."
|
|
591
|
+
),
|
|
592
|
+
)
|
|
593
|
+
easyrpg_hp_type: SkillSpType | int = Field(
|
|
594
|
+
default="cost",
|
|
595
|
+
description=(
|
|
596
|
+
"If the HP usage of the skill is a fixed number or in percent of the maximum HP (one "
|
|
597
|
+
"of 'cost', 'percent' or a number). RPG Maker 2003 only. EasyRPG Player extension."
|
|
598
|
+
),
|
|
599
|
+
)
|
|
600
|
+
easyrpg_hp_percent: int = Field(
|
|
601
|
+
default=0,
|
|
602
|
+
description=(
|
|
603
|
+
"How much percent of the maximum HP does the usage of the skill cost. RPG Maker 2003 "
|
|
604
|
+
"only. EasyRPG Player extension."
|
|
605
|
+
),
|
|
606
|
+
)
|
|
607
|
+
easyrpg_hp_cost: int = Field(
|
|
608
|
+
default=0,
|
|
609
|
+
description="How much HP does the usage of the skill cost. EasyRPG Player extension.",
|
|
610
|
+
)
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
class Item(DbModel):
|
|
614
|
+
"""An item, weapon or armor (Database > Items)."""
|
|
615
|
+
|
|
616
|
+
id: int | None = Field(
|
|
617
|
+
default=None,
|
|
618
|
+
description=(
|
|
619
|
+
"Database id: entry N is the N-th slot of the table (RPG_RT looks entries up by "
|
|
620
|
+
"position)."
|
|
621
|
+
),
|
|
622
|
+
)
|
|
623
|
+
name: str = Field(default="", description="Name.")
|
|
624
|
+
description: str = Field(default="", description="Help text.")
|
|
625
|
+
type: ItemType | int = Field(
|
|
626
|
+
default="normal",
|
|
627
|
+
description=(
|
|
628
|
+
"Type (one of 'normal', 'weapon', 'shield', 'armor', 'helmet', 'accessory', "
|
|
629
|
+
"'medicine', 'book', 'material', 'special', 'switch' or a number)."
|
|
630
|
+
),
|
|
631
|
+
)
|
|
632
|
+
price: int = Field(default=0, description="Shop price.")
|
|
633
|
+
uses: int = Field(default=1, description="Number of uses (0 = unlimited).")
|
|
634
|
+
atk_points1: int = Field(default=0, description="Attack bonus (equipment).")
|
|
635
|
+
def_points1: int = Field(default=0, description="Defense bonus (equipment).")
|
|
636
|
+
spi_points1: int = Field(default=0, description="Spirit bonus (equipment).")
|
|
637
|
+
agi_points1: int = Field(default=0, description="Agility bonus (equipment).")
|
|
638
|
+
two_handed: bool = Field(default=False, description="Two-handed weapon.")
|
|
639
|
+
sp_cost: int = Field(default=0, description="SP consumed per attack.")
|
|
640
|
+
hit: int = Field(default=90, description="Hit rate in percent.")
|
|
641
|
+
critical_hit: int = Field(default=0, description="Critical hit bonus in percent.")
|
|
642
|
+
animation_id: int = Field(default=1, description="Battle animation (battle animation id).")
|
|
643
|
+
preemptive: bool = Field(default=False, description="Attack first.")
|
|
644
|
+
dual_attack: bool = Field(default=False, description="Attack twice.")
|
|
645
|
+
attack_all: bool = Field(default=False, description="Attack all enemies.")
|
|
646
|
+
ignore_evasion: bool = Field(default=False, description="Ignore evasion.")
|
|
647
|
+
prevent_critical: bool = Field(default=False, description="Prevent critical hits.")
|
|
648
|
+
raise_evasion: bool = Field(default=False, description="Raise evasion.")
|
|
649
|
+
half_sp_cost: bool = Field(default=False, description="Halve SP costs.")
|
|
650
|
+
no_terrain_damage: bool = Field(default=False, description="No terrain damage.")
|
|
651
|
+
cursed: bool = Field(
|
|
652
|
+
default=False,
|
|
653
|
+
description="Cursed (cannot be unequipped). RPG Maker 2003 only.",
|
|
654
|
+
)
|
|
655
|
+
entire_party: bool = Field(default=False, description="Medicine affects the entire party.")
|
|
656
|
+
recover_hp_rate: int = Field(default=0, description="HP recovered in percent.")
|
|
657
|
+
recover_hp: int = Field(default=0, description="HP recovered.")
|
|
658
|
+
recover_sp_rate: int = Field(default=0, description="SP recovered in percent.")
|
|
659
|
+
recover_sp: int = Field(default=0, description="SP recovered.")
|
|
660
|
+
occasion_field1: bool = Field(default=False, description="Medicine usable on the map only.")
|
|
661
|
+
ko_only: bool = Field(default=False, description="Only usable on knocked out actors.")
|
|
662
|
+
max_hp_points: int = Field(default=0, description="Max HP increase (books/material).")
|
|
663
|
+
max_sp_points: int = Field(default=0, description="Max SP increase (books/material).")
|
|
664
|
+
atk_points2: int = Field(default=0, description="Attack increase (books/material).")
|
|
665
|
+
def_points2: int = Field(default=0, description="Defense increase (books/material).")
|
|
666
|
+
spi_points2: int = Field(default=0, description="Spirit increase (books/material).")
|
|
667
|
+
agi_points2: int = Field(default=0, description="Agility increase (books/material).")
|
|
668
|
+
using_message: int = Field(default=0, description="Message shown when used (0 = default).")
|
|
669
|
+
skill_id: int = Field(default=1, description="Skill invoked by special items (skill id).")
|
|
670
|
+
switch_id: int = Field(default=1, description="Switch turned ON by switch items (switch id).")
|
|
671
|
+
occasion_field2: bool = Field(default=True, description="Switch item usable on the map.")
|
|
672
|
+
occasion_battle: bool = Field(default=False, description="Switch item usable in battle.")
|
|
673
|
+
actor_set: list[bool] = Field(
|
|
674
|
+
default_factory=list,
|
|
675
|
+
description="Actors who can use/equip the item (one flag per actor id, index 0 is id 1).",
|
|
676
|
+
)
|
|
677
|
+
state_set: list[bool] = Field(
|
|
678
|
+
default_factory=list,
|
|
679
|
+
description="States changed by the item (one flag per state id, index 0 is id 1).",
|
|
680
|
+
)
|
|
681
|
+
attribute_set: list[bool] = Field(
|
|
682
|
+
default_factory=list,
|
|
683
|
+
description="Attributes of the item (one flag per attribute id, index 0 is id 1).",
|
|
684
|
+
)
|
|
685
|
+
state_chance: int = Field(default=0, description="State change probability in percent.")
|
|
686
|
+
reverse_state_effect: bool = Field(
|
|
687
|
+
default=False,
|
|
688
|
+
description="Inflict the states instead of curing them.",
|
|
689
|
+
)
|
|
690
|
+
weapon_animation: int = Field(
|
|
691
|
+
default=-1,
|
|
692
|
+
description="Weapon animation (actor id). RPG Maker 2003 only.",
|
|
693
|
+
)
|
|
694
|
+
animation_data: list[BattlerAnimationItemSkill] = Field(
|
|
695
|
+
default_factory=list,
|
|
696
|
+
description="Battle animation settings per actor. RPG Maker 2003 only.",
|
|
697
|
+
)
|
|
698
|
+
use_skill: bool = Field(
|
|
699
|
+
default=False,
|
|
700
|
+
description="Weapon/armor invokes its skill when used. RPG Maker 2003 only.",
|
|
701
|
+
)
|
|
702
|
+
class_set: list[bool] = Field(
|
|
703
|
+
default_factory=list,
|
|
704
|
+
description=(
|
|
705
|
+
"Classes who can use/equip the item (one flag per class id, index 0 is id 1). RPG "
|
|
706
|
+
"Maker 2003 only."
|
|
707
|
+
),
|
|
708
|
+
)
|
|
709
|
+
ranged_trajectory: ItemTrajectory | int = Field(
|
|
710
|
+
default="straight",
|
|
711
|
+
description="Trajectory of ranged weapons (one of 'straight', 'return' or a number).",
|
|
712
|
+
)
|
|
713
|
+
ranged_target: ItemTarget | int = Field(
|
|
714
|
+
default="single",
|
|
715
|
+
description=(
|
|
716
|
+
"Target of ranged weapons (one of 'single', 'center', 'simultaneous', 'sequential' or "
|
|
717
|
+
"a number)."
|
|
718
|
+
),
|
|
719
|
+
)
|
|
720
|
+
easyrpg_using_message: str = Field(
|
|
721
|
+
default="default_message",
|
|
722
|
+
description="Item usage message in battle. EasyRPG Player extension.",
|
|
723
|
+
)
|
|
724
|
+
easyrpg_max_count: int = Field(
|
|
725
|
+
default=-1,
|
|
726
|
+
description="How many the player can carry of this item. EasyRPG Player extension.",
|
|
727
|
+
)
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
class EnemyAction(DbModel):
|
|
731
|
+
"""One entry of a monster's action pattern."""
|
|
732
|
+
|
|
733
|
+
id: int | None = Field(
|
|
734
|
+
default=None,
|
|
735
|
+
description="Element id; leave it out to use the position in the list (1-based).",
|
|
736
|
+
)
|
|
737
|
+
kind: EnemyActionKind | int = Field(
|
|
738
|
+
default="basic",
|
|
739
|
+
description="Action type (one of 'basic', 'skill', 'transformation' or a number).",
|
|
740
|
+
)
|
|
741
|
+
basic: EnemyActionBasic | int = Field(
|
|
742
|
+
default="dual_attack",
|
|
743
|
+
description=(
|
|
744
|
+
"Basic action (kind='basic'; one of 'attack', 'dual_attack', 'defense', 'observe', "
|
|
745
|
+
"'charge', 'autodestruction', 'escape', 'nothing' or a number)."
|
|
746
|
+
),
|
|
747
|
+
)
|
|
748
|
+
skill_id: int = Field(default=1, description="Skill (kind='skill'; skill id).")
|
|
749
|
+
enemy_id: int = Field(
|
|
750
|
+
default=1,
|
|
751
|
+
description="Monster to transform into (kind='transformation'; monster id).",
|
|
752
|
+
)
|
|
753
|
+
condition_type: EnemyActionConditionType | int = Field(
|
|
754
|
+
default="always",
|
|
755
|
+
description=(
|
|
756
|
+
"Condition (one of 'always', 'switch', 'turn', 'actors', 'hp', 'sp', 'party_lvl', "
|
|
757
|
+
"'party_fatigue' or a number)."
|
|
758
|
+
),
|
|
759
|
+
)
|
|
760
|
+
condition_param1: int = Field(
|
|
761
|
+
default=0,
|
|
762
|
+
description="Condition: first value (switch id, turn, %, level...).",
|
|
763
|
+
)
|
|
764
|
+
condition_param2: int = Field(default=0, description="Condition: second value.")
|
|
765
|
+
switch_id: int = Field(default=1, description="Condition switch (switch id).")
|
|
766
|
+
switch_on: bool = Field(default=False, description="Turn a switch ON after the action.")
|
|
767
|
+
switch_on_id: int = Field(default=1, description="Switch turned ON (switch id).")
|
|
768
|
+
switch_off: bool = Field(default=False, description="Turn a switch OFF after the action.")
|
|
769
|
+
switch_off_id: int = Field(default=1, description="Switch turned OFF (switch id).")
|
|
770
|
+
rating: int = Field(default=50, description="Priority (1-10 in the editor).")
|
|
771
|
+
|
|
772
|
+
|
|
773
|
+
class Enemy(DbModel):
|
|
774
|
+
"""A monster (Database > Enemies)."""
|
|
775
|
+
|
|
776
|
+
id: int | None = Field(
|
|
777
|
+
default=None,
|
|
778
|
+
description=(
|
|
779
|
+
"Database id: entry N is the N-th slot of the table (RPG_RT looks entries up by "
|
|
780
|
+
"position)."
|
|
781
|
+
),
|
|
782
|
+
)
|
|
783
|
+
name: str = Field(default="", description="Name.")
|
|
784
|
+
battler_name: str = Field(default="", description="Monster graphic.")
|
|
785
|
+
battler_hue: int = Field(default=0, description="Hue shift of the graphic.")
|
|
786
|
+
max_hp: int = Field(default=10, description="Max hp.")
|
|
787
|
+
max_sp: int = Field(default=10, description="Max sp.")
|
|
788
|
+
attack: int = Field(default=10, description="Attack.")
|
|
789
|
+
defense: int = Field(default=10, description="Defense.")
|
|
790
|
+
spirit: int = Field(default=10, description="Spirit.")
|
|
791
|
+
agility: int = Field(default=10, description="Agility.")
|
|
792
|
+
transparent: bool = Field(default=False, description="Draw translucent.")
|
|
793
|
+
exp: int = Field(default=0, description="Experience given.")
|
|
794
|
+
gold: int = Field(default=0, description="Gold dropped.")
|
|
795
|
+
drop_id: int = Field(default=0, description="Dropped item (0 = none; item id).")
|
|
796
|
+
drop_prob: int = Field(default=100, description="Drop probability in percent.")
|
|
797
|
+
maniac_unarmed_animation: int = Field(
|
|
798
|
+
default=1,
|
|
799
|
+
description=(
|
|
800
|
+
"Animation for normal enemy attacks (Maniac Patch only; battle animation id). Maniac "
|
|
801
|
+
"Patch extension."
|
|
802
|
+
),
|
|
803
|
+
)
|
|
804
|
+
critical_hit: bool = Field(default=False, description="Can land critical hits.")
|
|
805
|
+
critical_hit_chance: int = Field(default=30, description="Critical hit probability: 1 in N.")
|
|
806
|
+
miss: bool = Field(default=False, description="Attacks often miss.")
|
|
807
|
+
levitate: bool = Field(default=False, description="Flying (floats up and down).")
|
|
808
|
+
state_ranks: list[int] = Field(
|
|
809
|
+
default_factory=list,
|
|
810
|
+
description="State ranks (rank per state id, index 0 is id 1: 0=A 1=B 2=C 3=D 4=E).",
|
|
811
|
+
)
|
|
812
|
+
attribute_ranks: list[int] = Field(
|
|
813
|
+
default_factory=list,
|
|
814
|
+
description="Attribute ranks (rank per attribute id, index 0 is id 1: 0=A 1=B 2=C 3=D 4=E).",
|
|
815
|
+
)
|
|
816
|
+
actions: list[EnemyAction] = Field(default_factory=list, description="Action pattern.")
|
|
817
|
+
easyrpg_enemyai: int = Field(
|
|
818
|
+
default=-1,
|
|
819
|
+
description=(
|
|
820
|
+
"Default AI behavior of the enemy with 0=RPG_RT 1=RPG_RT+. EasyRPG Player extension."
|
|
821
|
+
),
|
|
822
|
+
)
|
|
823
|
+
easyrpg_prevent_critical: bool = Field(
|
|
824
|
+
default=False,
|
|
825
|
+
description="If the enemy is protected against critical hits. EasyRPG Player extension.",
|
|
826
|
+
)
|
|
827
|
+
easyrpg_raise_evasion: bool = Field(
|
|
828
|
+
default=False,
|
|
829
|
+
description="If the enemy has an increased evasion rate. EasyRPG Player extension.",
|
|
830
|
+
)
|
|
831
|
+
easyrpg_immune_to_attribute_downshifts: bool = Field(
|
|
832
|
+
default=False,
|
|
833
|
+
description="If the enemy is immune to attribute downshifts. EasyRPG Player extension.",
|
|
834
|
+
)
|
|
835
|
+
easyrpg_ignore_evasion: bool = Field(
|
|
836
|
+
default=False,
|
|
837
|
+
description=(
|
|
838
|
+
"If the enemies unarmed physical attacks ignore evasion. EasyRPG Player extension."
|
|
839
|
+
),
|
|
840
|
+
)
|
|
841
|
+
easyrpg_hit: int = Field(
|
|
842
|
+
default=-1,
|
|
843
|
+
description="Hit rate of the enemy on normal attacks. EasyRPG Player extension.",
|
|
844
|
+
)
|
|
845
|
+
easyrpg_state_set: list[bool] = Field(
|
|
846
|
+
default_factory=list,
|
|
847
|
+
description=(
|
|
848
|
+
"States inflicted by normal attacks of the enemy (one flag per state id, index 0 is "
|
|
849
|
+
"id 1). EasyRPG Player extension."
|
|
850
|
+
),
|
|
851
|
+
)
|
|
852
|
+
easyrpg_state_chance: int = Field(
|
|
853
|
+
default=0,
|
|
854
|
+
description=(
|
|
855
|
+
"State infliction probability by normal attacks of the enemy. EasyRPG Player "
|
|
856
|
+
"extension."
|
|
857
|
+
),
|
|
858
|
+
)
|
|
859
|
+
easyrpg_attribute_set: list[bool] = Field(
|
|
860
|
+
default_factory=list,
|
|
861
|
+
description=(
|
|
862
|
+
"Attributes used by normal attacks of the enemy (one flag per attribute id, index 0 "
|
|
863
|
+
"is id 1). EasyRPG Player extension."
|
|
864
|
+
),
|
|
865
|
+
)
|
|
866
|
+
easyrpg_super_guard: bool = Field(
|
|
867
|
+
default=False,
|
|
868
|
+
description=(
|
|
869
|
+
"If the enemies defend action quarters instead of halves HP damage. EasyRPG Player "
|
|
870
|
+
"extension."
|
|
871
|
+
),
|
|
872
|
+
)
|
|
873
|
+
easyrpg_attack_all: bool = Field(
|
|
874
|
+
default=False,
|
|
875
|
+
description=(
|
|
876
|
+
"If the enemies unarmed physical targets the entire player party. EasyRPG Player "
|
|
877
|
+
"extension."
|
|
878
|
+
),
|
|
879
|
+
)
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
class TroopMember(DbModel):
|
|
883
|
+
"""A monster placed in a troop."""
|
|
884
|
+
|
|
885
|
+
id: int | None = Field(
|
|
886
|
+
default=None,
|
|
887
|
+
description="Element id; leave it out to use the position in the list (1-based).",
|
|
888
|
+
)
|
|
889
|
+
enemy_id: int = Field(default=1, description="Monster (monster id).")
|
|
890
|
+
x: int = Field(default=0, description="Screen position X.")
|
|
891
|
+
y: int = Field(default=0, description="Screen position Y.")
|
|
892
|
+
invisible: bool = Field(default=False, description="Hidden until shown by an event.")
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
class Troop(DbModel):
|
|
896
|
+
"""A monster party (Database > Troops).
|
|
897
|
+
|
|
898
|
+
The troop's battle events (pages) are in database/troop_events.py."""
|
|
899
|
+
|
|
900
|
+
id: int | None = Field(
|
|
901
|
+
default=None,
|
|
902
|
+
description=(
|
|
903
|
+
"Database id: entry N is the N-th slot of the table (RPG_RT looks entries up by "
|
|
904
|
+
"position)."
|
|
905
|
+
),
|
|
906
|
+
)
|
|
907
|
+
name: str = Field(default="", description="Name.")
|
|
908
|
+
members: list[TroopMember] = Field(default_factory=list, description="Monsters of the troop.")
|
|
909
|
+
auto_alignment: bool = Field(
|
|
910
|
+
default=False,
|
|
911
|
+
description="Align the monsters automatically. RPG Maker 2003 only.",
|
|
912
|
+
)
|
|
913
|
+
terrain_set: list[bool] = Field(
|
|
914
|
+
default_factory=list,
|
|
915
|
+
description=(
|
|
916
|
+
"Terrains where the troop can be encountered (one flag per terrain id, index 0 is id "
|
|
917
|
+
"1)."
|
|
918
|
+
),
|
|
919
|
+
)
|
|
920
|
+
appear_randomly: bool = Field(
|
|
921
|
+
default=False,
|
|
922
|
+
description="Random encounter only on the selected terrains. RPG Maker 2003 only.",
|
|
923
|
+
)
|
|
924
|
+
|
|
925
|
+
|
|
926
|
+
class State(DbModel):
|
|
927
|
+
"""A condition such as poison or death (Database > States)."""
|
|
928
|
+
|
|
929
|
+
id: int | None = Field(
|
|
930
|
+
default=None,
|
|
931
|
+
description=(
|
|
932
|
+
"Database id: entry N is the N-th slot of the table (RPG_RT looks entries up by "
|
|
933
|
+
"position)."
|
|
934
|
+
),
|
|
935
|
+
)
|
|
936
|
+
name: str = Field(default="", description="Name.")
|
|
937
|
+
type: StatePersistence | int = Field(
|
|
938
|
+
default="ends",
|
|
939
|
+
description="Whether the state ends after battle (one of 'ends', 'persists' or a number).",
|
|
940
|
+
)
|
|
941
|
+
color: int = Field(default=6, description="Color of the state name.")
|
|
942
|
+
priority: int = Field(default=50, description="Display priority.")
|
|
943
|
+
restriction: StateRestriction | int = Field(
|
|
944
|
+
default="normal",
|
|
945
|
+
description=(
|
|
946
|
+
"Action restriction (one of 'normal', 'do_nothing', 'attack_enemy', 'attack_ally' or "
|
|
947
|
+
"a number)."
|
|
948
|
+
),
|
|
949
|
+
)
|
|
950
|
+
a_rate: int = Field(default=100, description="Infliction rate for rank A in percent.")
|
|
951
|
+
b_rate: int = Field(default=80, description="Infliction rate for rank B in percent.")
|
|
952
|
+
c_rate: int = Field(default=60, description="Infliction rate for rank C in percent.")
|
|
953
|
+
d_rate: int = Field(default=30, description="Infliction rate for rank D in percent.")
|
|
954
|
+
e_rate: int = Field(default=0, description="Infliction rate for rank E in percent.")
|
|
955
|
+
hold_turn: int = Field(default=0, description="Minimum duration in turns.")
|
|
956
|
+
auto_release_prob: int = Field(
|
|
957
|
+
default=0,
|
|
958
|
+
description="Recovery probability per turn after hold_turn.",
|
|
959
|
+
)
|
|
960
|
+
release_by_damage: int = Field(default=0, description="Recovery probability when damaged.")
|
|
961
|
+
affect_type: StateAffectType | int = Field(
|
|
962
|
+
default="half",
|
|
963
|
+
description=(
|
|
964
|
+
"How the stat changes apply (one of 'half', 'double', 'nothing' or a number). RPG "
|
|
965
|
+
"Maker 2003 only."
|
|
966
|
+
),
|
|
967
|
+
)
|
|
968
|
+
affect_attack: bool = Field(default=False, description="Changes attack.")
|
|
969
|
+
affect_defense: bool = Field(default=False, description="Changes defense.")
|
|
970
|
+
affect_spirit: bool = Field(default=False, description="Changes spirit.")
|
|
971
|
+
affect_agility: bool = Field(default=False, description="Changes agility.")
|
|
972
|
+
reduce_hit_ratio: int = Field(default=100, description="Hit ratio in percent.")
|
|
973
|
+
avoid_attacks: bool = Field(
|
|
974
|
+
default=False,
|
|
975
|
+
description="Evade all physical attacks. RPG Maker 2003 only.",
|
|
976
|
+
)
|
|
977
|
+
reflect_magic: bool = Field(default=False, description="Reflect magic. RPG Maker 2003 only.")
|
|
978
|
+
cursed: bool = Field(
|
|
979
|
+
default=False,
|
|
980
|
+
description="Equipment cannot be changed. RPG Maker 2003 only.",
|
|
981
|
+
)
|
|
982
|
+
battler_animation_id: int = Field(
|
|
983
|
+
default=100,
|
|
984
|
+
description="Battler animation pose (100 = none; battle animation id). RPG Maker 2003 only.",
|
|
985
|
+
)
|
|
986
|
+
restrict_skill: bool = Field(default=False, description="Blocks physical skills.")
|
|
987
|
+
restrict_skill_level: int = Field(
|
|
988
|
+
default=0,
|
|
989
|
+
description="Physical skills blocked from this attack influence.",
|
|
990
|
+
)
|
|
991
|
+
restrict_magic: bool = Field(default=False, description="Blocks magic skills.")
|
|
992
|
+
restrict_magic_level: int = Field(
|
|
993
|
+
default=0,
|
|
994
|
+
description="Magic skills blocked from this spirit influence.",
|
|
995
|
+
)
|
|
996
|
+
hp_change_type: StateChangeType | int = Field(
|
|
997
|
+
default="lose",
|
|
998
|
+
description="HP change direction (one of 'lose', 'gain', 'nothing' or a number).",
|
|
999
|
+
)
|
|
1000
|
+
sp_change_type: StateChangeType | int = Field(
|
|
1001
|
+
default="lose",
|
|
1002
|
+
description="SP change direction (one of 'lose', 'gain', 'nothing' or a number).",
|
|
1003
|
+
)
|
|
1004
|
+
message_actor: str = Field(default="", description="Message when an actor is affected.")
|
|
1005
|
+
message_enemy: str = Field(default="", description="Message when a monster is affected.")
|
|
1006
|
+
message_already: str = Field(default="", description="Message when already affected.")
|
|
1007
|
+
message_affected: str = Field(default="", description="Message each turn.")
|
|
1008
|
+
message_recovery: str = Field(default="", description="Message on recovery.")
|
|
1009
|
+
hp_change_max: int = Field(default=0, description="HP change per turn in percent of max HP.")
|
|
1010
|
+
hp_change_val: int = Field(default=0, description="HP change per turn.")
|
|
1011
|
+
hp_change_map_steps: int = Field(default=0, description="HP change on the map: every N steps.")
|
|
1012
|
+
hp_change_map_val: int = Field(default=0, description="HP change on the map.")
|
|
1013
|
+
sp_change_max: int = Field(default=0, description="SP change per turn in percent of max SP.")
|
|
1014
|
+
sp_change_val: int = Field(default=0, description="SP change per turn.")
|
|
1015
|
+
sp_change_map_steps: int = Field(default=0, description="SP change on the map: every N steps.")
|
|
1016
|
+
sp_change_map_val: int = Field(default=0, description="SP change on the map.")
|
|
1017
|
+
easyrpg_immune_states: list[bool] = Field(
|
|
1018
|
+
default_factory=list,
|
|
1019
|
+
description=(
|
|
1020
|
+
"States cleared on infliction by this state (one flag per state id, index 0 is id 1). "
|
|
1021
|
+
"EasyRPG Player extension."
|
|
1022
|
+
),
|
|
1023
|
+
)
|
|
1024
|
+
|
|
1025
|
+
|
|
1026
|
+
class Attribute(DbModel):
|
|
1027
|
+
"""An attribute / element (Database > Attributes)."""
|
|
1028
|
+
|
|
1029
|
+
id: int | None = Field(
|
|
1030
|
+
default=None,
|
|
1031
|
+
description=(
|
|
1032
|
+
"Database id: entry N is the N-th slot of the table (RPG_RT looks entries up by "
|
|
1033
|
+
"position)."
|
|
1034
|
+
),
|
|
1035
|
+
)
|
|
1036
|
+
name: str = Field(default="", description="Name.")
|
|
1037
|
+
type: AttributeType | int = Field(
|
|
1038
|
+
default="physical",
|
|
1039
|
+
description="Physical or magical (one of 'physical', 'magical' or a number).",
|
|
1040
|
+
)
|
|
1041
|
+
a_rate: int = Field(default=300, description="Damage rate for rank A in percent.")
|
|
1042
|
+
b_rate: int = Field(default=200, description="Damage rate for rank B in percent.")
|
|
1043
|
+
c_rate: int = Field(default=100, description="Damage rate for rank C in percent.")
|
|
1044
|
+
d_rate: int = Field(default=50, description="Damage rate for rank D in percent.")
|
|
1045
|
+
e_rate: int = Field(default=0, description="Damage rate for rank E in percent.")
|
|
1046
|
+
|
|
1047
|
+
|
|
1048
|
+
class Terrain(DbModel):
|
|
1049
|
+
"""A terrain type (Database > Terrain)."""
|
|
1050
|
+
|
|
1051
|
+
id: int | None = Field(
|
|
1052
|
+
default=None,
|
|
1053
|
+
description=(
|
|
1054
|
+
"Database id: entry N is the N-th slot of the table (RPG_RT looks entries up by "
|
|
1055
|
+
"position)."
|
|
1056
|
+
),
|
|
1057
|
+
)
|
|
1058
|
+
name: str = Field(default="", description="Name.")
|
|
1059
|
+
damage: int = Field(default=0, description="Damage per step.")
|
|
1060
|
+
encounter_rate: int = Field(default=100, description="Encounter rate multiplier in percent.")
|
|
1061
|
+
background_name: str = Field(default="", description="Battle background.")
|
|
1062
|
+
boat_pass: bool = Field(default=False, description="Small boat can pass.")
|
|
1063
|
+
ship_pass: bool = Field(default=False, description="Ship can pass.")
|
|
1064
|
+
airship_pass: bool = Field(default=True, description="Airship can pass.")
|
|
1065
|
+
airship_land: bool = Field(default=True, description="Airship can land.")
|
|
1066
|
+
bush_depth: TerrainBushDepth | int = Field(
|
|
1067
|
+
default="normal",
|
|
1068
|
+
description=(
|
|
1069
|
+
"How much of a character is hidden (one of 'normal', 'third', 'half', 'full' or a "
|
|
1070
|
+
"number)."
|
|
1071
|
+
),
|
|
1072
|
+
)
|
|
1073
|
+
footstep: Sound = Field(
|
|
1074
|
+
default_factory=Sound,
|
|
1075
|
+
description="Footstep sound. RPG Maker 2003 only.",
|
|
1076
|
+
)
|
|
1077
|
+
on_damage_se: bool = Field(
|
|
1078
|
+
default=False,
|
|
1079
|
+
description="Play the footstep sound only on damage. RPG Maker 2003 only.",
|
|
1080
|
+
)
|
|
1081
|
+
background_type: TerrainBGAssociation | int = Field(
|
|
1082
|
+
default="background",
|
|
1083
|
+
description=(
|
|
1084
|
+
"Battle background mode (one of 'background', 'frame' or a number). RPG Maker 2003 "
|
|
1085
|
+
"only."
|
|
1086
|
+
),
|
|
1087
|
+
)
|
|
1088
|
+
background_a_name: str = Field(
|
|
1089
|
+
default="",
|
|
1090
|
+
description="Background a name. RPG Maker 2003 only.",
|
|
1091
|
+
)
|
|
1092
|
+
background_a_scrollh: bool = Field(
|
|
1093
|
+
default=False,
|
|
1094
|
+
description="Background a scrollh. RPG Maker 2003 only.",
|
|
1095
|
+
)
|
|
1096
|
+
background_a_scrollv: bool = Field(
|
|
1097
|
+
default=False,
|
|
1098
|
+
description="Background a scrollv. RPG Maker 2003 only.",
|
|
1099
|
+
)
|
|
1100
|
+
background_a_scrollh_speed: int = Field(
|
|
1101
|
+
default=0,
|
|
1102
|
+
description="Background a scrollh speed. RPG Maker 2003 only.",
|
|
1103
|
+
)
|
|
1104
|
+
background_a_scrollv_speed: int = Field(
|
|
1105
|
+
default=0,
|
|
1106
|
+
description="Background a scrollv speed. RPG Maker 2003 only.",
|
|
1107
|
+
)
|
|
1108
|
+
background_b: bool = Field(default=False, description="Background b. RPG Maker 2003 only.")
|
|
1109
|
+
background_b_name: str = Field(
|
|
1110
|
+
default="",
|
|
1111
|
+
description="Background b name. RPG Maker 2003 only.",
|
|
1112
|
+
)
|
|
1113
|
+
background_b_scrollh: bool = Field(
|
|
1114
|
+
default=False,
|
|
1115
|
+
description="Background b scrollh. RPG Maker 2003 only.",
|
|
1116
|
+
)
|
|
1117
|
+
background_b_scrollv: bool = Field(
|
|
1118
|
+
default=False,
|
|
1119
|
+
description="Background b scrollv. RPG Maker 2003 only.",
|
|
1120
|
+
)
|
|
1121
|
+
background_b_scrollh_speed: int = Field(
|
|
1122
|
+
default=0,
|
|
1123
|
+
description="Background b scrollh speed. RPG Maker 2003 only.",
|
|
1124
|
+
)
|
|
1125
|
+
background_b_scrollv_speed: int = Field(
|
|
1126
|
+
default=0,
|
|
1127
|
+
description="Background b scrollv speed. RPG Maker 2003 only.",
|
|
1128
|
+
)
|
|
1129
|
+
special_flags: TerrainFlags = Field(
|
|
1130
|
+
default_factory=TerrainFlags,
|
|
1131
|
+
description="Enabled special battle situations. RPG Maker 2003 only.",
|
|
1132
|
+
)
|
|
1133
|
+
special_back_party: int = Field(
|
|
1134
|
+
default=15,
|
|
1135
|
+
description="Back attack probability (party) in percent. RPG Maker 2003 only.",
|
|
1136
|
+
)
|
|
1137
|
+
special_back_enemies: int = Field(
|
|
1138
|
+
default=10,
|
|
1139
|
+
description="Back attack probability (enemies) in percent. RPG Maker 2003 only.",
|
|
1140
|
+
)
|
|
1141
|
+
special_lateral_party: int = Field(
|
|
1142
|
+
default=10,
|
|
1143
|
+
description="Pincer attack probability (party) in percent. RPG Maker 2003 only.",
|
|
1144
|
+
)
|
|
1145
|
+
special_lateral_enemies: int = Field(
|
|
1146
|
+
default=5,
|
|
1147
|
+
description="Pincer attack probability (enemies) in percent. RPG Maker 2003 only.",
|
|
1148
|
+
)
|
|
1149
|
+
grid_location: int = Field(default=0, description="Battle grid location. RPG Maker 2003 only.")
|
|
1150
|
+
grid_top_y: int = Field(default=120, description="Battle grid top Y. RPG Maker 2003 only.")
|
|
1151
|
+
grid_elongation: int = Field(
|
|
1152
|
+
default=392,
|
|
1153
|
+
description="Battle grid elongation. RPG Maker 2003 only.",
|
|
1154
|
+
)
|
|
1155
|
+
grid_inclination: int = Field(
|
|
1156
|
+
default=16000,
|
|
1157
|
+
description="Battle grid inclination. RPG Maker 2003 only.",
|
|
1158
|
+
)
|
|
1159
|
+
easyrpg_damage_in_percent: bool = Field(
|
|
1160
|
+
default=False,
|
|
1161
|
+
description="If the terrain damage is a percentage. EasyRPG Player extension.",
|
|
1162
|
+
)
|
|
1163
|
+
easyrpg_damage_can_kill: bool = Field(
|
|
1164
|
+
default=False,
|
|
1165
|
+
description="If the terrain damage can kill the actors. EasyRPG Player extension.",
|
|
1166
|
+
)
|
|
1167
|
+
|
|
1168
|
+
|
|
1169
|
+
class BattlerAnimationPose(DbModel):
|
|
1170
|
+
"""One pose of a battler animation."""
|
|
1171
|
+
|
|
1172
|
+
id: int | None = Field(
|
|
1173
|
+
default=None,
|
|
1174
|
+
description="Element id; leave it out to use the position in the list (1-based).",
|
|
1175
|
+
)
|
|
1176
|
+
name: str = Field(default="", description="Name. RPG Maker 2003 only.")
|
|
1177
|
+
battler_name: str = Field(default="", description="Battle CharSet file. RPG Maker 2003 only.")
|
|
1178
|
+
battler_index: int = Field(default=0, description="Index inside the file. RPG Maker 2003 only.")
|
|
1179
|
+
animation_type: BattlerAnimationPoseAnimType | int = Field(
|
|
1180
|
+
default="character",
|
|
1181
|
+
description=(
|
|
1182
|
+
"Battle CharSet or battle animation (one of 'character', 'battle' or a number). RPG "
|
|
1183
|
+
"Maker 2003 only."
|
|
1184
|
+
),
|
|
1185
|
+
)
|
|
1186
|
+
battle_animation_id: int = Field(
|
|
1187
|
+
default=1,
|
|
1188
|
+
description=(
|
|
1189
|
+
"Battle animation (animation_type='battle'; battle animation id). RPG Maker 2003 "
|
|
1190
|
+
"only."
|
|
1191
|
+
),
|
|
1192
|
+
)
|
|
1193
|
+
|
|
1194
|
+
|
|
1195
|
+
class BattlerAnimationWeapon(DbModel):
|
|
1196
|
+
"""One weapon graphic of a battler animation."""
|
|
1197
|
+
|
|
1198
|
+
id: int | None = Field(
|
|
1199
|
+
default=None,
|
|
1200
|
+
description="Element id; leave it out to use the position in the list (1-based).",
|
|
1201
|
+
)
|
|
1202
|
+
name: str = Field(default="", description="Name. RPG Maker 2003 only.")
|
|
1203
|
+
weapon_name: str = Field(default="", description="Weapon graphic file. RPG Maker 2003 only.")
|
|
1204
|
+
weapon_index: int = Field(default=0, description="Index inside the file. RPG Maker 2003 only.")
|
|
1205
|
+
|
|
1206
|
+
|
|
1207
|
+
class BattlerAnimation(DbModel):
|
|
1208
|
+
"""A battle character set: poses and weapons of a 2003 battler (Database > Battle Animation 2)."""
|
|
1209
|
+
|
|
1210
|
+
id: int | None = Field(
|
|
1211
|
+
default=None,
|
|
1212
|
+
description=(
|
|
1213
|
+
"Database id: entry N is the N-th slot of the table (RPG_RT looks entries up by "
|
|
1214
|
+
"position)."
|
|
1215
|
+
),
|
|
1216
|
+
)
|
|
1217
|
+
name: str = Field(default="", description="Name. RPG Maker 2003 only.")
|
|
1218
|
+
speed: BattlerAnimationSpeed | int = Field(
|
|
1219
|
+
default="slow",
|
|
1220
|
+
description=(
|
|
1221
|
+
"Animation speed (one of 'slow', 'medium', 'fast' or a number). RPG Maker 2003 only."
|
|
1222
|
+
),
|
|
1223
|
+
)
|
|
1224
|
+
poses: list[BattlerAnimationPose] = Field(
|
|
1225
|
+
default_factory=list,
|
|
1226
|
+
description=(
|
|
1227
|
+
"Poses (Idle, AttackRight, AttackLeft, Skill, Dead, Damage, Dazed, Defend, WalkLeft, "
|
|
1228
|
+
"WalkRight, Victory, Item, ...). RPG Maker 2003 only."
|
|
1229
|
+
),
|
|
1230
|
+
)
|
|
1231
|
+
weapons: list[BattlerAnimationWeapon] = Field(
|
|
1232
|
+
default_factory=list,
|
|
1233
|
+
description="Weapon graphics. RPG Maker 2003 only.",
|
|
1234
|
+
)
|
|
1235
|
+
|
|
1236
|
+
|
|
1237
|
+
class Switch(DbModel):
|
|
1238
|
+
"""A switch name."""
|
|
1239
|
+
|
|
1240
|
+
id: int | None = Field(
|
|
1241
|
+
default=None,
|
|
1242
|
+
description=(
|
|
1243
|
+
"Database id: entry N is the N-th slot of the table (RPG_RT looks entries up by "
|
|
1244
|
+
"position)."
|
|
1245
|
+
),
|
|
1246
|
+
)
|
|
1247
|
+
name: str = Field(default="", description="Name shown in the editor.")
|
|
1248
|
+
|
|
1249
|
+
|
|
1250
|
+
class Variable(DbModel):
|
|
1251
|
+
"""A variable name."""
|
|
1252
|
+
|
|
1253
|
+
id: int | None = Field(
|
|
1254
|
+
default=None,
|
|
1255
|
+
description=(
|
|
1256
|
+
"Database id: entry N is the N-th slot of the table (RPG_RT looks entries up by "
|
|
1257
|
+
"position)."
|
|
1258
|
+
),
|
|
1259
|
+
)
|
|
1260
|
+
name: str = Field(default="", description="Name shown in the editor.")
|
|
1261
|
+
|
|
1262
|
+
|
|
1263
|
+
class Music(DbModel):
|
|
1264
|
+
"""A music track."""
|
|
1265
|
+
|
|
1266
|
+
name: str = Field(default="(OFF)", description="File in Music/ ('(OFF)' = none).")
|
|
1267
|
+
fadein: int = Field(default=0, description="Fade in time in milliseconds.")
|
|
1268
|
+
volume: int = Field(default=100, description="Volume in percent.")
|
|
1269
|
+
tempo: int = Field(default=100, description="Tempo in percent.")
|
|
1270
|
+
balance: int = Field(default=50, description="Balance (0 = left, 50 = center, 100 = right).")
|
|
1271
|
+
|
|
1272
|
+
|
|
1273
|
+
class Encounter(DbModel):
|
|
1274
|
+
"""A troop met at random on a map."""
|
|
1275
|
+
|
|
1276
|
+
id: int | None = Field(
|
|
1277
|
+
default=None,
|
|
1278
|
+
description="Element id; leave it out to use the position in the list (1-based).",
|
|
1279
|
+
)
|
|
1280
|
+
troop_id: int = Field(default=0, description="Troop.")
|
|
1281
|
+
|
|
1282
|
+
|
|
1283
|
+
class MapInfo(DbModel):
|
|
1284
|
+
"""A map or an area of the map tree (RPG_RT.lmt) and its map properties."""
|
|
1285
|
+
|
|
1286
|
+
id: int | None = Field(
|
|
1287
|
+
default=None,
|
|
1288
|
+
description=(
|
|
1289
|
+
"Map id: the map's file is MapNNNN.lmu. Leave it out for a new map to get a free id."
|
|
1290
|
+
),
|
|
1291
|
+
)
|
|
1292
|
+
name: str = Field(default="", description="Name in the map tree.")
|
|
1293
|
+
parent_map: int = Field(
|
|
1294
|
+
default=0,
|
|
1295
|
+
description=(
|
|
1296
|
+
"Parent in the map tree, 0 = top level; 'parent' settings come from it (map id)."
|
|
1297
|
+
),
|
|
1298
|
+
)
|
|
1299
|
+
type: TreeMapMapType | int = Field(
|
|
1300
|
+
default=-1,
|
|
1301
|
+
description=(
|
|
1302
|
+
"Map, or area: a rectangle of its parent map with its own encounters (one of 'root', "
|
|
1303
|
+
"'map', 'area' or a number)."
|
|
1304
|
+
),
|
|
1305
|
+
)
|
|
1306
|
+
music_type: MapInfoMusicType | int = Field(
|
|
1307
|
+
default="parent",
|
|
1308
|
+
description=(
|
|
1309
|
+
"Background music: the parent's, set by events, or `music` (one of 'parent', 'event', "
|
|
1310
|
+
"'specific' or a number)."
|
|
1311
|
+
),
|
|
1312
|
+
)
|
|
1313
|
+
music: Music = Field(
|
|
1314
|
+
default_factory=Music,
|
|
1315
|
+
description="Background music when music_type='specific'.",
|
|
1316
|
+
)
|
|
1317
|
+
background_type: MapInfoBGMType | int = Field(
|
|
1318
|
+
default="parent",
|
|
1319
|
+
description=(
|
|
1320
|
+
"Battle background: the parent's, the terrain's, or `background_name` (one of "
|
|
1321
|
+
"'parent', 'terrain', 'specific' or a number)."
|
|
1322
|
+
),
|
|
1323
|
+
)
|
|
1324
|
+
background_name: str = Field(
|
|
1325
|
+
default="",
|
|
1326
|
+
description="Battle background file when background_type='specific'.",
|
|
1327
|
+
)
|
|
1328
|
+
teleport: MapInfoTriState | int = Field(
|
|
1329
|
+
default="parent",
|
|
1330
|
+
description=(
|
|
1331
|
+
"Teleport skills: the parent's setting, allowed or forbidden (one of 'parent', "
|
|
1332
|
+
"'allow', 'forbid' or a number)."
|
|
1333
|
+
),
|
|
1334
|
+
)
|
|
1335
|
+
escape: MapInfoTriState | int = Field(
|
|
1336
|
+
default="parent",
|
|
1337
|
+
description=(
|
|
1338
|
+
"Escape skills: the parent's setting, allowed or forbidden (one of 'parent', 'allow', "
|
|
1339
|
+
"'forbid' or a number)."
|
|
1340
|
+
),
|
|
1341
|
+
)
|
|
1342
|
+
save: MapInfoTriState | int = Field(
|
|
1343
|
+
default="parent",
|
|
1344
|
+
description=(
|
|
1345
|
+
"Saving: the parent's setting, allowed or forbidden (one of 'parent', 'allow', "
|
|
1346
|
+
"'forbid' or a number)."
|
|
1347
|
+
),
|
|
1348
|
+
)
|
|
1349
|
+
encounters: list[Encounter] = Field(default_factory=list, description="Troops met at random.")
|
|
1350
|
+
encounter_steps: int = Field(
|
|
1351
|
+
default=25,
|
|
1352
|
+
description="Average steps between random encounters (0 = none).",
|
|
1353
|
+
)
|
|
1354
|
+
area_rect: list[int] = Field(
|
|
1355
|
+
default_factory=lambda: [0, 0, 0, 0],
|
|
1356
|
+
description="Area rectangle in tiles: left, top, right, bottom (0, 0, 0, 0 for a map).",
|
|
1357
|
+
)
|
|
1358
|
+
|
|
1359
|
+
|
|
1360
|
+
class Start(DbModel):
|
|
1361
|
+
"""Where the party and the vehicles start a new game."""
|
|
1362
|
+
|
|
1363
|
+
party_map_id: int = Field(default=0, description="Map of the party (0 = not set; map id).")
|
|
1364
|
+
party_x: int = Field(default=0, description="Party X.")
|
|
1365
|
+
party_y: int = Field(default=0, description="Party Y.")
|
|
1366
|
+
boat_map_id: int = Field(default=0, description="Map of the boat (0 = not placed; map id).")
|
|
1367
|
+
boat_x: int = Field(default=0, description="Boat X.")
|
|
1368
|
+
boat_y: int = Field(default=0, description="Boat Y.")
|
|
1369
|
+
ship_map_id: int = Field(default=0, description="Map of the ship (0 = not placed; map id).")
|
|
1370
|
+
ship_x: int = Field(default=0, description="Ship X.")
|
|
1371
|
+
ship_y: int = Field(default=0, description="Ship Y.")
|
|
1372
|
+
airship_map_id: int = Field(
|
|
1373
|
+
default=0,
|
|
1374
|
+
description="Map of the airship (0 = not placed; map id).",
|
|
1375
|
+
)
|
|
1376
|
+
airship_x: int = Field(default=0, description="Airship X.")
|
|
1377
|
+
airship_y: int = Field(default=0, description="Airship Y.")
|