Project1

标题: 【VA】运行时更改的数据库保存到存档中 [打印本页]

作者: 杂兵天下    时间: 2012-3-4 21:53
标题: 【VA】运行时更改的数据库保存到存档中
RUBY 代码复制
  1. $imported = {} if $imported.nil?
  2. if $imported["RuntimeDB"].nil?
  3.   $imported["RuntimeDB"] = true
  4.   module DataManager
  5.     class <<self
  6.       alias make_save_contents_runtimedb_zabing make_save_contents
  7.       alias extract_save_contents_runtimedb_zabing extract_save_contents
  8.     end
  9.     def self.make_save_contents
  10.       contents = make_save_contents_runtimedb_zabing
  11.       contents[:dataactorszabing] = $data_actors
  12.       contents[:dataclasseszabing] = $data_classes
  13.       contents[:dataskillszabing] = $data_skills
  14.       contents[:dataitemszabing] = $data_items
  15.       contents[:dataweaponszabing] = $data_weapons
  16.       contents[:dataarmorszabing] = $data_armors
  17.       contents[:dataenemieszabing] = $data_enemies
  18.       contents[:datatroopszabing] = $data_troops
  19.       contents[:datastateszabing] = $data_states
  20.       contents[:dataanimationszabing] = $data_animations
  21.       contents[:datatilesetszabing] = $data_tilesets
  22.       contents[:datacommoneventszabing] = $data_common_events
  23.       contents[:datasystemzabing] = $data_system
  24.       contents[:datamapinfoszabing] = $data_mapinfos
  25.       contents
  26.     end
  27.     def self.extract_save_contents(contents)
  28.       extract_save_contents_runtimedb_zabing(contents)
  29.       $data_actors = contents[:dataactorszabing]
  30.       $data_classes = contents[:dataclasseszabing]
  31.       $data_skills = contents[:dataskillszabing]
  32.       $data_items = contents[:dataitemszabing]
  33.       $data_weapons = contents[:dataweaponszabing]
  34.       $data_armors = contents[:dataarmorszabing]
  35.       $data_enemies = contents[:dataenemieszabing]
  36.       $data_troops = contents[:datatroopszabing]
  37.       $data_states = contents[:datastateszabing]
  38.       $data_animations = contents[:dataanimationszabing]
  39.       $data_tilesets = contents[:datatilesetszabing]
  40.       $data_common_events = contents[:datacommoneventszabing]
  41.       $data_system = contents[:datasystemzabing]
  42.       $data_mapinfos = contents[:datamapinfoszabing]
  43.     end
  44.   end
  45. else
  46.   msgbox "请不要重复加载脚本。"
  47. end

恩,这个只是为我接下来要准备做的武器打造系统做前奏,先发布下热身。
懂得的就不用我说明了。
不懂得根本用不着此脚本。
作者: Front    时间: 2014-9-1 00:22
没VX版吗?




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1