SHARE
TWEET

Untitled

a guest Sep 22nd, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # unit setup
  2. # allows setting up more specific unit entities to be added to a squad
  3. # goes in the 00==SETUP== section *before* Enemy Squad Setup
  4.  
  5. # comment tags:
  6. # none
  7.  
  8. module UnitSetup
  9.  
  10.   UNIT_TEMPLATE_DEFAULTS = Hash.new { |h, k| h[k] = Hash.new } # no touchy
  11.  
  12.   UNIT_TEMPLATE_DEFAULTS[:name] = nil # the name of the unit
  13.   UNIT_TEMPLATE_DEFAULTS[:nickname] = nil
  14.   UNIT_TEMPLATE_DEFAULTS[:class_id] = nil # the class id of the unit
  15.   UNIT_TEMPLATE_DEFAULTS[:actor_id] = nil # the actor id of the unit
  16.   UNIT_TEMPLATE_DEFAULTS[:enemy_id] = nil # the actor id of the unit
  17.   UNIT_TEMPLATE_DEFAULTS[:level] = nil # suggested level
  18.   UNIT_TEMPLATE_DEFAULTS[:level_mod] = nil # modifier for suggested level
  19.   UNIT_TEMPLATE_DEFAULTS[:stars] = nil
  20.   UNIT_TEMPLATE_DEFAULTS[:stars_mod] = nil
  21.   UNIT_TEMPLATE_DEFAULTS[:param] = Hash.new(nil)
  22.   UNIT_TEMPLATE_DEFAULTS[:param_mod] = Hash.new(1.0)
  23.   UNIT_TEMPLATE_DEFAULTS[:death_switch] = nil # turns this switch *on* when unit dies
  24.   UNIT_TEMPLATE_DEFAULTS[:tags] = []
  25.  
  26.   UNIT_TEMPLATE = Hash.new { |h1, k1| h1[k1] = Hash.new { |h2, k2|
  27.   h2[k2] = Marshal.load(Marshal.dump(UNIT_TEMPLATE_DEFAULTS[k2]))
  28.   }
  29.   }  # no touchy
  30.  
  31.   # Format is UNIT_TEMPLATE["designation"][:property] = value
  32.   # designations are Case Sensitive
  33.   # anything left nil or not included uses rules for procedural generation
  34.   UNIT_TEMPLATE["testtroop"][:name] = "Rocky" # the name.  if not set, will be pulled from a pool
  35.   UNIT_TEMPLATE["testtroop"][:class_id] = 1 # the class ID of the unit.  Use an array, and one will be randomly selected
  36.   UNIT_TEMPLATE["testtroop"][:actor_id] = nil # the actor id of the unit.  If set, all defaults will be based on this actor
  37.   UNIT_TEMPLATE["testtroop"][:enemy_id] = nil # the enemy id of the unit.  If set, all defaults will be based on this actor
  38.   # if actor_id, class_id, or enemy_id are present with one or more of the others, preference goes to enemy_id > actor_id > class_id
  39.   UNIT_TEMPLATE["testtroop"][:level] = nil # the suggested level of the unit.  If not provided, use the squads level settings
  40.   UNIT_TEMPLATE["testtroop"][:level_mod] = nil # add this value to the unit's level after all other calculations
  41.   UNIT_TEMPLATE["testtroop"][:stars] = nil # if set, overrides the squads star level
  42.   UNIT_TEMPLATE["testtroop"][:stars_mod] = nil # if set, adds to the units star level based on squad settings
  43.   UNIT_TEMPLATE["testtroop"][:param][:atk] = 152 # atk param is set to 152
  44.   # atk can be subbed for any recognized param
  45.   UNIT_TEMPLATE["testtroop"][:param_mod][:def] = 2.0 # defense is double normal
  46.   # def can be subbed for any recognized param
  47.   UNIT_TEMPLATE["testtroop"][:tags] = []
  48.   # tags - a list of tags.  None exist yet, but plan on things like "boss"
  49.   # expandable data field
  50.   UNIT_TEMPLATE["testtroop"][:death_switch] = nil
  51.   # turns this switch *on* when unit dies
  52.   # can be used to trigger post battle death quotes
  53.  
  54.   UNIT_TEMPLATE["Wolfgar"][:name] = "Wolfgar"
  55.   UNIT_TEMPLATE["Wolfgar"][:nickname] = "wolfgar"
  56.   UNIT_TEMPLATE["Wolfgar"][:class_id] = 3
  57.   UNIT_TEMPLATE["Wolfgar"][:stars] = 2
  58.   UNIT_TEMPLATE["Wolfgar"][:level_mod] = 2
  59.   UNIT_TEMPLATE["Wolfgar"][:param_mod][:atk] = 1.25
  60.  
  61.   UNIT_TEMPLATE["Barnabas"][:name] = "Barnabas"
  62.   UNIT_TEMPLATE["Barnabas"][:nickname] = "barnabas"
  63.   UNIT_TEMPLATE["Barnabas"][:class_id] = 4
  64.   UNIT_TEMPLATE["Barnabas"][:stars] = 3
  65.   UNIT_TEMPLATE["Barnabas"][:level_mod] = 3
  66.  
  67.   UNIT_TEMPLATE["Antares"][:name] = "Antares"  
  68.   UNIT_TEMPLATE["Antares"][:nickname] = "antares"  
  69.   UNIT_TEMPLATE["Antares"][:class_id] = 9
  70.   UNIT_TEMPLATE["Antares"][:stars] = 5
  71.   UNIT_TEMPLATE["Antares"][:level_mod] = 3
  72.  
  73.   UNIT_TEMPLATE["Diana"][:name] = "Diana"
  74.   UNIT_TEMPLATE["Diana"][:nickname] = "diana"
  75.   UNIT_TEMPLATE["Diana"][:class_id] = 66
  76.   UNIT_TEMPLATE["Diana"][:stars] = 3
  77.   UNIT_TEMPLATE["Diana"][:level_mod] = 5
  78.  
  79.   UNIT_TEMPLATE["Dirk"][:name] = "Dirk"
  80.   UNIT_TEMPLATE["Dirk"][:nickname] = "dirk"
  81.   UNIT_TEMPLATE["Dirk"][:class_id] = 18
  82.   UNIT_TEMPLATE["Dirk"][:stars] = 3
  83.   UNIT_TEMPLATE["Dirk"][:level_mod] = 2
  84.  
  85.   UNIT_TEMPLATE["Kuroda"][:name] = "Kuroda"
  86.   UNIT_TEMPLATE["Kuroda"][:nickname] = "kuroda"
  87.   UNIT_TEMPLATE["Kuroda"][:class_id] = 18
  88.   UNIT_TEMPLATE["Kuroda"][:stars] = 5
  89.   UNIT_TEMPLATE["Kuroda"][:level_mod] = 7
  90.   UNIT_TEMPLATE["Kuroda"][:param_mod][:atk] = 1.5
  91.   UNIT_TEMPLATE["Kuroda2"][:death_switch] = 592
  92.  
  93.   UNIT_TEMPLATE["Lysander"][:name] = "Lysander"
  94.   UNIT_TEMPLATE["Lysander"][:nickname] = "lysander"
  95.   UNIT_TEMPLATE["Lysander"][:class_id] = 67
  96.   UNIT_TEMPLATE["Lysander"][:stars] = 5
  97.   UNIT_TEMPLATE["Lysander"][:level_mod] = 1
  98.  
  99.   UNIT_TEMPLATE["Alexei"][:name] = "Alexei"
  100.   UNIT_TEMPLATE["Alexei"][:nickname] = "alexei"
  101.   UNIT_TEMPLATE["Alexei"][:class_id] = 9
  102.   UNIT_TEMPLATE["Alexei"][:stars] = 3
  103.   UNIT_TEMPLATE["Alexei"][:level_mod] = 2
  104.  
  105.   UNIT_TEMPLATE["Lothair"][:name] = "Lothair"
  106.   UNIT_TEMPLATE["Lothair"][:nickname] = "lothair"
  107.   UNIT_TEMPLATE["Lothair"][:class_id] = 11
  108.   UNIT_TEMPLATE["Lothair"][:stars] = 3
  109.   UNIT_TEMPLATE["Lothair"][:level_mod] = 10
  110.   UNIT_TEMPLATE["Lothair"][:param_mod][:atk] = 0.6
  111.  
  112.   UNIT_TEMPLATE["Roland"][:name] = "Roland"
  113.   UNIT_TEMPLATE["Roland"][:nickname] = "roland"
  114.   UNIT_TEMPLATE["Roland"][:class_id] = 6
  115.   UNIT_TEMPLATE["Roland"][:stars] = 1
  116.   UNIT_TEMPLATE["Roland"][:level_mod] = 2
  117.  
  118.   UNIT_TEMPLATE["Beatrix"][:name] = "Beatrix"
  119.   UNIT_TEMPLATE["Beatrix"][:nickname] = "beatrix"
  120.   UNIT_TEMPLATE["Beatrix"][:class_id] = 69
  121.   UNIT_TEMPLATE["Beatrix"][:stars] = 5
  122.   UNIT_TEMPLATE["Beatrix"][:level_mod] = 12
  123.   UNIT_TEMPLATE["Beatrix"][:param_mod][:mat] = 1.5
  124.  
  125.   UNIT_TEMPLATE["Trihan"][:name] = "Trihan"
  126.   UNIT_TEMPLATE["Trihan"][:nickname] = "trihan"
  127.   UNIT_TEMPLATE["Trihan"][:class_id] = 11
  128.   UNIT_TEMPLATE["Trihan"][:stars] = 5
  129.   UNIT_TEMPLATE["Trihan"][:level_mod] = 5
  130.   UNIT_TEMPLATE["Trihan"][:param_mod][:mhp] = 1.5
  131.   UNIT_TEMPLATE["Trihan"][:param_mod][:atk] = 1.5
  132.  
  133.   UNIT_TEMPLATE["Terenor"][:name] = "Terenor"
  134.   UNIT_TEMPLATE["Terenor"][:nickname] = "terenor"
  135.   UNIT_TEMPLATE["Terenor"][:class_id] = 11
  136.   UNIT_TEMPLATE["Terenor"][:stars] = 1
  137.   UNIT_TEMPLATE["Terenor"][:level_mod] = 8
  138.   UNIT_TEMPLATE["Terenor"][:param_mod][:mhp] = 0.75
  139.   UNIT_TEMPLATE["Terenor"][:param_mod][:atk] = 0.5
  140.   UNIT_TEMPLATE["Kuroda2"][:death_switch] = 530
  141.  
  142.   UNIT_TEMPLATE["Casamir"][:name] = "Casamir"
  143.   UNIT_TEMPLATE["Casamir"][:nickname] = "casamir"
  144.   UNIT_TEMPLATE["Casamir"][:class_id] = 9
  145.   UNIT_TEMPLATE["Casamir"][:stars] = 1
  146.   UNIT_TEMPLATE["Casamir"][:level_mod] = 15
  147.   UNIT_TEMPLATE["Casamir"][:param_mod][:mhp] = 0.75
  148.   UNIT_TEMPLATE["Casamir"][:param_mod][:atk] = 0.25
  149.  
  150.   UNIT_TEMPLATE["Randolf"][:name] = "Randolf"
  151.   UNIT_TEMPLATE["Randolf"][:nickname] = "randolf"
  152.   UNIT_TEMPLATE["Randolf"][:class_id] = 3
  153.   UNIT_TEMPLATE["Randolf"][:stars] = 1
  154.   UNIT_TEMPLATE["Randolf"][:level_mod] = 1
  155.  
  156.   UNIT_TEMPLATE["Hand1"][:name] = "Hand of Zanatus"
  157.   UNIT_TEMPLATE["Hand1"][:nickname] = "hoz"
  158.   UNIT_TEMPLATE["Hand1"][:class_id] = 72
  159.   UNIT_TEMPLATE["Hand1"][:stars] = 5
  160.   UNIT_TEMPLATE["Hand1"][:level_mod] = 10
  161.   UNIT_TEMPLATE["Hand1"][:param_mod][:mhp] = 2.0
  162.   UNIT_TEMPLATE["Hand1"][:param_mod][:atk] = 1.5
  163.  
  164.   UNIT_TEMPLATE["Geoffrey"][:name] = "Geoffrey"
  165.   UNIT_TEMPLATE["Geoffrey"][:nickname] = "geoffrey"
  166.   UNIT_TEMPLATE["Geoffrey"][:class_id] = 9
  167.   UNIT_TEMPLATE["Geoffrey"][:stars] = 1
  168.   UNIT_TEMPLATE["Geoffrey"][:level_mod] = 1
  169.  
  170.   UNIT_TEMPLATE["Gwynneth"][:name] = "Gwynneth"
  171.   UNIT_TEMPLATE["Gwynneth"][:nickname] = "gwynneth"
  172.   UNIT_TEMPLATE["Gwynneth"][:class_id] = 13
  173.   UNIT_TEMPLATE["Gwynneth"][:stars] = 5
  174.   UNIT_TEMPLATE["Gwynneth"][:level_mod] = 3
  175.   UNIT_TEMPLATE["Gwynneth"][:param_mod][:mhp] = 1.5
  176.   UNIT_TEMPLATE["Gwynneth"][:param_mod][:atk] = 1.5
  177.  
  178.   UNIT_TEMPLATE["Ragavi"][:name] = "Ragavi"
  179.   UNIT_TEMPLATE["Ragavi"][:nickname] = "ragavi"
  180.   UNIT_TEMPLATE["Ragavi"][:class_id] = 92
  181.   UNIT_TEMPLATE["Ragavi"][:stars] = 5
  182.   UNIT_TEMPLATE["Ragavi"][:level_mod] = 5
  183.   UNIT_TEMPLATE["Ragavi"][:param_mod][:agi] = 1.5
  184.   UNIT_TEMPLATE["Ragavi"][:param_mod][:atk] = 1.5
  185.  
  186.   UNIT_TEMPLATE["Cyrus"][:name] = "Cyrus"
  187.   UNIT_TEMPLATE["Cyrus"][:nickname] = "cyrus"
  188.   UNIT_TEMPLATE["Cyrus"][:class_id] = 39
  189.   UNIT_TEMPLATE["Cyrus"][:stars] = 3
  190.   UNIT_TEMPLATE["Cyrus"][:level_mod] = 2
  191.  
  192.   UNIT_TEMPLATE["Trihan2"][:name] = "Trihan"
  193.   UNIT_TEMPLATE["Trihan2"][:name] = "trihan"
  194.   UNIT_TEMPLATE["Trihan2"][:class_id] = 11
  195.   UNIT_TEMPLATE["Trihan2"][:stars] = 5
  196.   UNIT_TEMPLATE["Trihan2"][:level_mod] = 2
  197.   UNIT_TEMPLATE["Trihan2"][:param_mod][:mhp] = 1.5
  198.   UNIT_TEMPLATE["Trihan2"][:param_mod][:atk] = 1.25
  199.  
  200.   UNIT_TEMPLATE["Casamir2"][:name] = "Casamir"
  201.   UNIT_TEMPLATE["Casamir2"][:nickname] = "casamir"
  202.   UNIT_TEMPLATE["Casamir2"][:class_id] = 9
  203.   UNIT_TEMPLATE["Casamir2"][:stars] = 1
  204.   UNIT_TEMPLATE["Casamir2"][:level_mod] = 5
  205.   UNIT_TEMPLATE["Casamir2"][:param_mod][:mhp] = 0.75
  206.   UNIT_TEMPLATE["Casamir2"][:param_mod][:atk] = 0.25
  207.  
  208.   UNIT_TEMPLATE["Lysander2"][:name] = "Lysander"
  209.   UNIT_TEMPLATE["Lysander2"][:nickname] = "lysander"
  210.   UNIT_TEMPLATE["Lysander2"][:class_id] = 68
  211.   UNIT_TEMPLATE["Lysander2"][:stars] = 5
  212.   UNIT_TEMPLATE["Lysander2"][:level_mod] = 0
  213.   UNIT_TEMPLATE["Lysander2"][:death_switch] = 570
  214.  
  215.   UNIT_TEMPLATE["Jules"][:name] = "Jules"
  216.   UNIT_TEMPLATE["Jules"][:nickname] = "jules"
  217.   UNIT_TEMPLATE["Jules"][:class_id] = 24
  218.   UNIT_TEMPLATE["Jules"][:stars] = 3
  219.   UNIT_TEMPLATE["Jules"][:level_mod] = 0
  220.   UNIT_TEMPLATE["Jules"][:death_switch] = 565
  221.  
  222.   UNIT_TEMPLATE["Narima2"][:name] = "Narima"
  223.   UNIT_TEMPLATE["Narima2"][:nickname] = "narima"
  224.   UNIT_TEMPLATE["Narima2"][:class_id] = 24
  225.   UNIT_TEMPLATE["Narima2"][:stars] = 2
  226.   UNIT_TEMPLATE["Narima2"][:level_mod] = 0  
  227.   UNIT_TEMPLATE["Narima2"][:death_switch] = 564
  228.  
  229.   UNIT_TEMPLATE["Sybil"][:name] = "Sybil"
  230.   UNIT_TEMPLATE["Sybil"][:nickname] = "sybil"
  231.   UNIT_TEMPLATE["Sybil"][:class_id] = 12
  232.   UNIT_TEMPLATE["Sybil"][:stars] = 2
  233.   UNIT_TEMPLATE["Sybil"][:level_mod] = 0
  234.   UNIT_TEMPLATE["Sybil"][:death_switch] = 566
  235.  
  236.   UNIT_TEMPLATE["Abigayle"][:name] = "Abigayle"
  237.   UNIT_TEMPLATE["Abigayle"][:nickname] = "abigayle"
  238.   UNIT_TEMPLATE["Abigayle"][:class_id] = 30
  239.   UNIT_TEMPLATE["Abigayle"][:stars] = 2
  240.   UNIT_TEMPLATE["Abigayle"][:level_mod] = 0
  241.   UNIT_TEMPLATE["Abigayle"][:death_switch] = 632
  242.  
  243.   UNIT_TEMPLATE["Kuroda2"][:name] = "Kuroda"
  244.   UNIT_TEMPLATE["Kuroda2"][:nickname] = "kuroda"
  245.   UNIT_TEMPLATE["Kuroda2"][:class_id] = 18
  246.   UNIT_TEMPLATE["Kuroda2"][:stars] = 5
  247.   UNIT_TEMPLATE["Kuroda2"][:level_mod] = 2
  248.   UNIT_TEMPLATE["Kuroda2"][:param_mod][:atk] = 1.5
  249.   UNIT_TEMPLATE["Kuroda2"][:param_mod][:agi] = 1.5
  250.   UNIT_TEMPLATE["Kuroda2"][:death_switch] = 568
  251.  
  252.   UNIT_TEMPLATE["Jebediah"][:name] = "Jebediah"
  253.   UNIT_TEMPLATE["Jebediah"][:nickname] = "jebediah"
  254.   UNIT_TEMPLATE["Jebediah"][:class_id] = 39
  255.   UNIT_TEMPLATE["Jebediah"][:stars] = 4
  256.   UNIT_TEMPLATE["Jebediah"][:level_mod] = 2
  257.   UNIT_TEMPLATE["Jebediah"][:param_mod][:mat] = 2.0
  258.   UNIT_TEMPLATE["Jebediah"][:death_switch] = 567
  259.  
  260.   UNIT_TEMPLATE["Kalytos"][:name] = "Kalytos"
  261.   UNIT_TEMPLATE["Kalytos"][:nickname] = "kalytos"
  262.   UNIT_TEMPLATE["Kalytos"][:class_id] = 56
  263.   UNIT_TEMPLATE["Kalytos"][:stars] = 5
  264.   UNIT_TEMPLATE["Kalytos"][:level_mod] = 3
  265.   UNIT_TEMPLATE["Kalytos"][:param_mod][:mat] = 1.5
  266.   UNIT_TEMPLATE["Kalytos"][:param_mod][:atk] = 1.5
  267.   UNIT_TEMPLATE["Kalytos"][:param_mod][:mhp] = 2.0
  268.  
  269.   UNIT_TEMPLATE["Edelia"][:name] = "Edelia"
  270.   UNIT_TEMPLATE["Edelia"][:nickname] = "edelia"
  271.   UNIT_TEMPLATE["Edelia"][:class_id] = 30
  272.   UNIT_TEMPLATE["Edelia"][:stars] = 2
  273.   UNIT_TEMPLATE["Edelia"][:level_mod] = 2  
  274.   UNIT_TEMPLATE["Edelia"][:death_switch] = 559  
  275.  
  276. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top