rgss_db 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +5 -0
  3. data/COPYING.md +674 -0
  4. data/README.md +347 -0
  5. data/bin/rgss-db +4 -0
  6. data/bin/rgssdb +4 -0
  7. data/lib/rgss_db/app.rb +928 -0
  8. data/lib/rgss_db/controller/data_manager.rb +557 -0
  9. data/lib/rgss_db/model/data_file.rb +516 -0
  10. data/lib/rgss_db/model/data_file_factory.rb +94 -0
  11. data/lib/rgss_db/model/debug.rb +199 -0
  12. data/lib/rgss_db/model/errors.rb +17 -0
  13. data/lib/rgss_db/model/mixins/jsonable.rb +35 -0
  14. data/lib/rgss_db/model/mixins/jsonable_constructor.rb +40 -0
  15. data/lib/rgss_db/model/rpg_maker_data/vx/rgss/color.rb +72 -0
  16. data/lib/rgss_db/model/rpg_maker_data/vx/rgss/rect.rb +70 -0
  17. data/lib/rgss_db/model/rpg_maker_data/vx/rgss/table.rb +99 -0
  18. data/lib/rgss_db/model/rpg_maker_data/vx/rgss/tone.rb +72 -0
  19. data/lib/rgss_db/model/rpg_maker_data/vx/rgss.rb +11 -0
  20. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/actor.rb +44 -0
  21. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/animation.rb +31 -0
  22. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/animation_frame.rb +20 -0
  23. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/animation_timing.rb +23 -0
  24. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/area.rb +26 -0
  25. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/armor.rb +31 -0
  26. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/audio_file.rb +23 -0
  27. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/base_item.rb +25 -0
  28. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/bgm.rb +36 -0
  29. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/bgs.rb +36 -0
  30. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/class.rb +31 -0
  31. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/class_learning.rb +20 -0
  32. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/common_event.rb +25 -0
  33. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb +44 -0
  34. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy_action.rb +29 -0
  35. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy_drop_item.rb +23 -0
  36. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/event.rb +36 -0
  37. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/event_command.rb +19 -0
  38. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/event_page.rb +32 -0
  39. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/event_page_condition.rb +34 -0
  40. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/event_page_graphic.rb +25 -0
  41. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/item.rb +27 -0
  42. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/map.rb +47 -0
  43. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/map_info.rb +26 -0
  44. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/me.rb +27 -0
  45. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/move_command.rb +18 -0
  46. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/move_route.rb +20 -0
  47. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/se.rb +21 -0
  48. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/skill.rb +22 -0
  49. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/state.rb +47 -0
  50. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/system.rb +43 -0
  51. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/system_terms.rb +53 -0
  52. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/system_test_battler.rb +25 -0
  53. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/system_vehicle.rb +24 -0
  54. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/troop.rb +24 -0
  55. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/troop_member.rb +23 -0
  56. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/troop_page.rb +21 -0
  57. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/troop_page_condition.rb +33 -0
  58. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb +87 -0
  59. data/lib/rgss_db/model/rpg_maker_data/vx/rpg/weapon.rb +31 -0
  60. data/lib/rgss_db/model/rpg_maker_data/vx/rpg.rb +59 -0
  61. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rgss/color.rb +72 -0
  62. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rgss/rect.rb +70 -0
  63. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rgss/table.rb +99 -0
  64. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rgss/tone.rb +72 -0
  65. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rgss.rb +11 -0
  66. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/actor.rb +27 -0
  67. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/animation.rb +31 -0
  68. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/animation_frame.rb +23 -0
  69. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/animation_timing.rb +26 -0
  70. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/armor.rb +20 -0
  71. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/audio_file.rb +23 -0
  72. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/base_item.rb +31 -0
  73. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/base_item_feature.rb +29 -0
  74. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/bgm.rb +43 -0
  75. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/bgs.rb +43 -0
  76. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/class.rb +37 -0
  77. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/class_learning.rb +24 -0
  78. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/common_event.rb +33 -0
  79. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/enemy.rb +27 -0
  80. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/enemy_action.rb +26 -0
  81. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/enemy_drop_item.rb +24 -0
  82. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/equip_item.rb +19 -0
  83. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/event.rb +36 -0
  84. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/event_command.rb +19 -0
  85. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/event_page.rb +35 -0
  86. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/event_page_condition.rb +40 -0
  87. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/event_page_graphic.rb +31 -0
  88. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/item.rb +25 -0
  89. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/map.rb +58 -0
  90. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/map_encounter.rb +23 -0
  91. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/map_info.rb +26 -0
  92. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/me.rb +27 -0
  93. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/move_command.rb +17 -0
  94. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/move_route.rb +19 -0
  95. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/se.rb +21 -0
  96. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/skill.rb +25 -0
  97. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/state.rb +34 -0
  98. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/system.rb +62 -0
  99. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/system_terms.rb +25 -0
  100. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/system_test_battler.rb +24 -0
  101. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/system_vehicle.rb +27 -0
  102. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/tileset.rb +26 -0
  103. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/troop.rb +24 -0
  104. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/troop_member.rb +25 -0
  105. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/troop_page.rb +24 -0
  106. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/troop_page_condition.rb +39 -0
  107. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/usable_item.rb +84 -0
  108. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/usable_item_damage.rb +56 -0
  109. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/usable_item_effect.rb +25 -0
  110. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/weapon.rb +25 -0
  111. data/lib/rgss_db/model/rpg_maker_data/vx_ace/rpg.rb +66 -0
  112. data/lib/rgss_db/model/rpg_maker_data/xp/rgss/color.rb +72 -0
  113. data/lib/rgss_db/model/rpg_maker_data/xp/rgss/rect.rb +70 -0
  114. data/lib/rgss_db/model/rpg_maker_data/xp/rgss/table.rb +99 -0
  115. data/lib/rgss_db/model/rpg_maker_data/xp/rgss/tone.rb +72 -0
  116. data/lib/rgss_db/model/rpg_maker_data/xp/rgss.rb +11 -0
  117. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/actor.rb +44 -0
  118. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/animation.rb +28 -0
  119. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/animation_frame.rb +20 -0
  120. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/animation_timing.rb +24 -0
  121. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/armor.rb +37 -0
  122. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/audio_file.rb +23 -0
  123. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/class.rb +28 -0
  124. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/class_learning.rb +20 -0
  125. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/common_event.rb +25 -0
  126. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/enemy.rb +47 -0
  127. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/enemy_action.rb +28 -0
  128. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/event.rb +36 -0
  129. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/event_command.rb +19 -0
  130. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/event_page.rb +32 -0
  131. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/event_page_condition.rb +30 -0
  132. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/event_page_graphic.rb +27 -0
  133. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/item.rb +48 -0
  134. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/map.rb +39 -0
  135. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/map_info.rb +26 -0
  136. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/move_command.rb +18 -0
  137. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/move_route.rb +19 -0
  138. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/skill.rb +47 -0
  139. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/state.rb +51 -0
  140. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/system.rb +56 -0
  141. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/system_test_battler.rb +25 -0
  142. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/system_words.rb +39 -0
  143. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/tileset.rb +39 -0
  144. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/troop.rb +24 -0
  145. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/troop_member.rb +23 -0
  146. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/troop_page.rb +21 -0
  147. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/troop_page_condition.rb +32 -0
  148. data/lib/rgss_db/model/rpg_maker_data/xp/rpg/weapon.rb +38 -0
  149. data/lib/rgss_db/model/rpg_maker_data/xp/rpg.rb +52 -0
  150. data/lib/rgss_db/model/strings.rb +607 -0
  151. data/lib/rgss_db/model/utilities.rb +90 -0
  152. data/lib/rgss_db/version.rb +7 -0
  153. data/lib/rgss_db/view/app_cli.rb +449 -0
  154. data/lib/rgss_db.rb +41 -0
  155. data/sig/rgss_db.rbs +5221 -0
  156. metadata +496 -0
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RPG
4
+ #
5
+ # The data class for map events.
6
+ #
7
+ class Event
8
+ include RgssDb::Jsonable
9
+ extend RgssDb::JsonableConstructor
10
+
11
+ def initialize(x, y)
12
+ @id = 0
13
+ @name = ""
14
+ @x = x
15
+ @y = y
16
+ @pages = [RPG::Event::Page.new]
17
+ end
18
+
19
+ def to_s
20
+ @name.to_s
21
+ end
22
+
23
+ #
24
+ # JSON constructor
25
+ #
26
+ # @param args [Array]
27
+ #
28
+ # @return Class instance
29
+ #
30
+ def self.json_new(*args)
31
+ new(-1, -1)
32
+ end
33
+
34
+ attr_accessor :id, :name, :x, :y, :pages
35
+ end
36
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RPG
4
+ #
5
+ # The data class for the Event command.
6
+ #
7
+ class EventCommand
8
+ include RgssDb::Jsonable
9
+ extend RgssDb::JsonableConstructor
10
+
11
+ def initialize(code = 0, indent = 0, parameters = [])
12
+ @code = code
13
+ @indent = indent
14
+ @parameters = parameters
15
+ end
16
+
17
+ attr_accessor :code, :indent, :parameters
18
+ end
19
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RPG
4
+ #
5
+ # The data class for map events.
6
+ #
7
+ class Event
8
+ #
9
+ # The data class for the event page.
10
+ #
11
+ class Page
12
+ include RgssDb::Jsonable
13
+ extend RgssDb::JsonableConstructor
14
+
15
+ def initialize
16
+ @condition = RPG::Event::Page::Condition.new
17
+ @graphic = RPG::Event::Page::Graphic.new
18
+ @move_type = 0
19
+ @move_speed = 3
20
+ @move_frequency = 3
21
+ @move_route = RPG::MoveRoute.new
22
+ @walk_anime = true
23
+ @step_anime = false
24
+ @direction_fix = false
25
+ @through = false
26
+ @priority_type = 0
27
+ @trigger = 0
28
+ @list = [RPG::EventCommand.new]
29
+ end
30
+
31
+ attr_accessor :condition, :graphic, :move_type, :move_speed, :move_frequency, :move_route, :walk_anime,
32
+ :step_anime, :direction_fix, :through, :priority_type, :trigger, :list
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RPG
4
+ #
5
+ # The data class for map events.
6
+ #
7
+ class Event
8
+ #
9
+ # The data class for the event page.
10
+ #
11
+ class Page
12
+ #
13
+ # The data class for the event page conditions.
14
+ #
15
+ class Condition
16
+ include RgssDb::Jsonable
17
+ extend RgssDb::JsonableConstructor
18
+
19
+ def initialize
20
+ @switch1_valid = false
21
+ @switch2_valid = false
22
+ @variable_valid = false
23
+ @self_switch_valid = false
24
+ @item_valid = false
25
+ @actor_valid = false
26
+ @switch1_id = 1
27
+ @switch2_id = 1
28
+ @variable_id = 1
29
+ @variable_value = 0
30
+ @self_switch_ch = "A"
31
+ @item_id = 1
32
+ @actor_id = 1
33
+ end
34
+
35
+ attr_accessor :switch1_valid, :switch2_valid, :variable_valid, :self_switch_valid, :item_valid, :actor_valid,
36
+ :switch1_id, :switch2_id, :variable_id, :variable_value, :self_switch_ch, :item_id, :actor_id
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RPG
4
+ #
5
+ # The data class for map events.
6
+ #
7
+ class Event
8
+ #
9
+ # The data class for the event page.
10
+ #
11
+ class Page
12
+ #
13
+ # The data class for the Event page [Graphics].
14
+ #
15
+ class Graphic
16
+ include RgssDb::Jsonable
17
+ extend RgssDb::JsonableConstructor
18
+
19
+ def initialize
20
+ @tile_id = 0
21
+ @character_name = ""
22
+ @character_index = 0
23
+ @direction = 2
24
+ @pattern = 0
25
+ end
26
+
27
+ attr_accessor :tile_id, :character_name, :character_index, :direction, :pattern
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RPG
4
+ #
5
+ # The data class for items.
6
+ #
7
+ class Item < UsableItem
8
+ include RgssDb::Jsonable
9
+ extend RgssDb::JsonableConstructor
10
+
11
+ def initialize
12
+ super
13
+ @scope = 7
14
+ @itype_id = 1
15
+ @price = 0
16
+ @consumable = true
17
+ end
18
+
19
+ def key_item?
20
+ @itype_id == 2
21
+ end
22
+
23
+ attr_accessor :itype_id, :price, :consumable
24
+ end
25
+ end
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RPG
4
+ #
5
+ # The data class for maps.
6
+ #
7
+ class Map
8
+ include RgssDb::Jsonable
9
+ extend RgssDb::JsonableConstructor
10
+
11
+ def initialize(width, height)
12
+ @display_name = ""
13
+ @tileset_id = 1
14
+ @width = width
15
+ @height = height
16
+ @scroll_type = 0
17
+ @specify_battleback = false
18
+ @battleback_floor_name = ""
19
+ @battleback_wall_name = ""
20
+ @autoplay_bgm = false
21
+ @bgm = RPG::BGM.new
22
+ @autoplay_bgs = false
23
+ @bgs = RPG::BGS.new("", 80)
24
+ @disable_dashing = false
25
+ @encounter_list = []
26
+ @encounter_step = 30
27
+ @parallax_name = ""
28
+ @parallax_loop_x = false
29
+ @parallax_loop_y = false
30
+ @parallax_sx = 0
31
+ @parallax_sy = 0
32
+ @parallax_show = false
33
+ @note = ""
34
+ @data = Table.new(width, height, 4)
35
+ @events = {}
36
+ end
37
+
38
+ def to_s
39
+ @display_name.to_s
40
+ end
41
+
42
+ #
43
+ # JSON constructor
44
+ #
45
+ # @param args [Array]
46
+ #
47
+ # @return Class instance
48
+ #
49
+ def self.json_new(*args)
50
+ new(-1, -1)
51
+ end
52
+
53
+ attr_accessor :display_name, :tileset_id, :width, :height, :scroll_type, :specify_battleback, :battleback1_name,
54
+ :battleback2_name, :autoplay_bgm, :bgm, :autoplay_bgs, :bgs, :disable_dashing, :encounter_list,
55
+ :encounter_step, :parallax_name, :parallax_loop_x, :parallax_loop_y, :parallax_sx, :parallax_sy,
56
+ :parallax_show, :note, :data, :events
57
+ end
58
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RPG
4
+ #
5
+ # The data class for maps.
6
+ #
7
+ class Map
8
+ #
9
+ # The data class for the encounter settings.
10
+ #
11
+ class Encounter
12
+ include RgssDb::Jsonable
13
+ extend RgssDb::JsonableConstructor
14
+
15
+ def initialize
16
+ @troop_id = 1
17
+ @weight = 10
18
+ @region_set = []
19
+ end
20
+ attr_accessor :troop_id, :weight, :region_set
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RPG
4
+ #
5
+ # The data class for map information.
6
+ #
7
+ class MapInfo
8
+ include RgssDb::Jsonable
9
+ extend RgssDb::JsonableConstructor
10
+
11
+ def initialize
12
+ @name = ""
13
+ @parent_id = 0
14
+ @order = 0
15
+ @expanded = false
16
+ @scroll_x = 0
17
+ @scroll_y = 0
18
+ end
19
+
20
+ def to_s
21
+ @name.to_s
22
+ end
23
+
24
+ attr_accessor :name, :parent_id, :order, :expanded, :scroll_x, :scroll_y
25
+ end
26
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RPG
4
+ #
5
+ # The data class for ME. This class has functionality for playing itself using an Audio module.
6
+ #
7
+ class ME < AudioFile
8
+ include RgssDb::Jsonable
9
+ extend RgssDb::JsonableConstructor
10
+
11
+ def play
12
+ if @name.empty?
13
+ Audio.me_stop
14
+ else
15
+ Audio.me_play("Audio/ME/" + @name, @volume, @pitch)
16
+ end
17
+ end
18
+
19
+ def self.stop
20
+ Audio.me_stop
21
+ end
22
+
23
+ def self.fade(time)
24
+ Audio.me_fade(time)
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RPG
4
+ #
5
+ # The data class for the Move command.
6
+ #
7
+ class MoveCommand
8
+ include RgssDb::Jsonable
9
+ extend RgssDb::JsonableConstructor
10
+
11
+ def initialize(code = 0, parameters = [])
12
+ @code = code
13
+ @parameters = parameters
14
+ end
15
+ attr_accessor :code, :parameters
16
+ end
17
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RPG
4
+ #
5
+ # The data class for the Move route.
6
+ #
7
+ class MoveRoute
8
+ include RgssDb::Jsonable
9
+ extend RgssDb::JsonableConstructor
10
+
11
+ def initialize
12
+ @repeat = true
13
+ @skippable = false
14
+ @wait = false
15
+ @list = [RPG::MoveCommand.new]
16
+ end
17
+ attr_accessor :repeat, :skippable, :wait, :list
18
+ end
19
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RPG
4
+ #
5
+ # The data class for SE. This class has functionality for playing itself using an Audio module.
6
+ #
7
+ class SE < AudioFile
8
+ include RgssDb::Jsonable
9
+ extend RgssDb::JsonableConstructor
10
+
11
+ def play
12
+ return if @name.empty?
13
+
14
+ Audio.se_play("Audio/SE/" + @name, @volume, @pitch)
15
+ end
16
+
17
+ def self.stop
18
+ Audio.se_stop
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RPG
4
+ #
5
+ # The data class for skills.
6
+ #
7
+ class Skill < UsableItem
8
+ include RgssDb::Jsonable
9
+ extend RgssDb::JsonableConstructor
10
+
11
+ def initialize
12
+ super
13
+ @scope = 1
14
+ @stype_id = 1
15
+ @mp_cost = 0
16
+ @tp_cost = 0
17
+ @message1 = ""
18
+ @message2 = ""
19
+ @required_wtype_id1 = 0
20
+ @required_wtype_id2 = 0
21
+ end
22
+
23
+ attr_accessor :stype_id, :mp_cost, :tp_cost, :message1, :message2, :required_wtype_id1, :required_wtype_id2
24
+ end
25
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RPG
4
+ #
5
+ # The data class for state.
6
+ #
7
+ class State < BaseItem
8
+ include RgssDb::Jsonable
9
+ extend RgssDb::JsonableConstructor
10
+
11
+ def initialize
12
+ super
13
+ @restriction = 0
14
+ @priority = 50
15
+ @remove_at_battle_end = false
16
+ @remove_by_restriction = false
17
+ @auto_removal_timing = 0
18
+ @min_turns = 1
19
+ @max_turns = 1
20
+ @remove_by_damage = false
21
+ @chance_by_damage = 100
22
+ @remove_by_walking = false
23
+ @steps_to_remove = 100
24
+ @message1 = ""
25
+ @message2 = ""
26
+ @message3 = ""
27
+ @message4 = ""
28
+ end
29
+
30
+ attr_accessor :restriction, :priority, :remove_at_battle_end, :remove_by_restriction, :auto_removal_timing,
31
+ :min_turns, :max_turns, :remove_by_damage, :chance_by_damage, :remove_by_walking,
32
+ :steps_to_remove, :message1, :message2, :message3, :message4
33
+ end
34
+ end
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RPG
4
+ #
5
+ # The data class for the system.
6
+ #
7
+ class System
8
+ include RgssDb::Jsonable
9
+ extend RgssDb::JsonableConstructor
10
+
11
+ def initialize
12
+ @game_title = ""
13
+ @version_id = 0
14
+ @japanese = true
15
+ @party_members = [1]
16
+ @currency_unit = ""
17
+ @elements = [nil, ""]
18
+ @skill_types = [nil, ""]
19
+ @weapon_types = [nil, ""]
20
+ @armor_types = [nil, ""]
21
+ @switches = [nil, ""]
22
+ @variables = [nil, ""]
23
+ @boat = RPG::System::Vehicle.new
24
+ @ship = RPG::System::Vehicle.new
25
+ @airship = RPG::System::Vehicle.new
26
+ @title1_name = ""
27
+ @title2_name = ""
28
+ @opt_draw_title = true
29
+ @opt_use_midi = false
30
+ @opt_transparent = false
31
+ @opt_followers = true
32
+ @opt_slip_death = false
33
+ @opt_floor_death = false
34
+ @opt_display_tp = true
35
+ @opt_extra_exp = false
36
+ @window_tone = Tone.new(0, 0, 0)
37
+ @title_bgm = RPG::BGM.new
38
+ @battle_bgm = RPG::BGM.new
39
+ @battle_end_me = RPG::ME.new
40
+ @gameover_me = RPG::ME.new
41
+ @sounds = Array.new(24) { RPG::SE.new }
42
+ @test_battlers = []
43
+ @test_troop_id = 1
44
+ @start_map_id = 1
45
+ @start_x = 0
46
+ @start_y = 0
47
+ @terms = RPG::System::Terms.new
48
+ @battleback1_name = ""
49
+ @battleback2_name = ""
50
+ @battler_name = ""
51
+ @battler_hue = 0
52
+ @edit_map_id = 1
53
+ end
54
+
55
+ attr_accessor :game_title, :version_id, :japanese, :party_members, :currency_unit, :skill_types, :weapon_types,
56
+ :armor_types, :elements, :switches, :variables, :boat, :ship, :airship, :title1_name, :title2_name,
57
+ :opt_draw_title, :opt_use_midi, :opt_transparent, :opt_followers, :opt_slip_death, :opt_floor_death,
58
+ :opt_display_tp, :opt_extra_exp, :window_tone, :title_bgm, :battle_bgm, :battle_end_me,
59
+ :gameover_me, :sounds, :test_battlers, :test_troop_id, :start_map_id, :start_x, :start_y,
60
+ :terms, :battleback1_name, :battleback2_name, :battler_name, :battler_hue, :edit_map_id
61
+ end
62
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RPG
4
+ #
5
+ # The data class for the system.
6
+ #
7
+ class System
8
+ #
9
+ # The data class for terminology.
10
+ #
11
+ class Terms
12
+ include RgssDb::Jsonable
13
+ extend RgssDb::JsonableConstructor
14
+
15
+ def initialize
16
+ @basic = Array.new(8) { "" }
17
+ @params = Array.new(8) { "" }
18
+ @etypes = Array.new(5) { "" }
19
+ @commands = Array.new(23) { "" }
20
+ end
21
+
22
+ attr_accessor :basic, :params, :etypes, :commands
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RPG
4
+ #
5
+ # The data class for the system.
6
+ #
7
+ class System
8
+ #
9
+ # The data class for the actors used in battle tests.
10
+ #
11
+ class TestBattler
12
+ include RgssDb::Jsonable
13
+ extend RgssDb::JsonableConstructor
14
+
15
+ def initialize
16
+ @actor_id = 1
17
+ @level = 1
18
+ @equips = [0, 0, 0, 0, 0]
19
+ end
20
+
21
+ attr_accessor :actor_id, :level, :equips
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RPG
4
+ #
5
+ # The data class for the system.
6
+ #
7
+ class System
8
+ #
9
+ # The data class for vehicles.
10
+ #
11
+ class Vehicle
12
+ include RgssDb::Jsonable
13
+ extend RgssDb::JsonableConstructor
14
+
15
+ def initialize
16
+ @character_name = ""
17
+ @character_index = 0
18
+ @bgm = RPG::BGM.new
19
+ @start_map_id = 0
20
+ @start_x = 0
21
+ @start_y = 0
22
+ end
23
+
24
+ attr_accessor :character_name, :character_index, :bgm, :start_map_id, :start_x, :start_y
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RPG
4
+ #
5
+ # The data class for tile sets.
6
+ #
7
+ class Tileset
8
+ include RgssDb::Jsonable
9
+ extend RgssDb::JsonableConstructor
10
+
11
+ def initialize
12
+ @id = 0
13
+ @mode = 1
14
+ @name = ""
15
+ @tileset_names = Array.new(9).collect { "" }
16
+ @flags = Table.new(8192)
17
+ @note = ""
18
+ end
19
+
20
+ def to_s
21
+ @name.to_s
22
+ end
23
+
24
+ attr_accessor :id, :mode, :name, :tileset_names, :flags, :note
25
+ end
26
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RPG
4
+ #
5
+ # The data class for enemy troops.
6
+ #
7
+ class Troop
8
+ include RgssDb::Jsonable
9
+ extend RgssDb::JsonableConstructor
10
+
11
+ def initialize
12
+ @id = 0
13
+ @name = ""
14
+ @members = []
15
+ @pages = [RPG::Troop::Page.new]
16
+ end
17
+
18
+ def to_s
19
+ @name.to_s
20
+ end
21
+
22
+ attr_accessor :id, :name, :members, :pages
23
+ end
24
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RPG
4
+ #
5
+ # The data class for enemy troops.
6
+ #
7
+ class Troop
8
+ #
9
+ # The data class for enemy troop members.
10
+ #
11
+ class Member
12
+ include RgssDb::Jsonable
13
+ extend RgssDb::JsonableConstructor
14
+
15
+ def initialize
16
+ @enemy_id = 1
17
+ @x = 0
18
+ @y = 0
19
+ @hidden = false
20
+ end
21
+
22
+ attr_accessor :enemy_id, :x, :y, :hidden
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RPG
4
+ #
5
+ # The data class for enemy troops.
6
+ #
7
+ class Troop
8
+ #
9
+ # The data class for battle events (pages).
10
+ #
11
+ class Page
12
+ include RgssDb::Jsonable
13
+ extend RgssDb::JsonableConstructor
14
+
15
+ def initialize
16
+ @condition = RPG::Troop::Page::Condition.new
17
+ @span = 0
18
+ @list = [RPG::EventCommand.new]
19
+ end
20
+
21
+ attr_accessor :condition, :span, :list
22
+ end
23
+ end
24
+ end