Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Scene_TechTree Setup
- # goes anywhere in the setup section, no dependences
- # items marked ** need input/attention
- module TechTree
- BASE_FILENAME = "techtree2.png" # **
- # name of base fullscreen image
- # goes in graphics/system
- LOCK_FILENAME = "techtreelock.png" # **
- # name of image file for the "lock" image
- XP_BAR_FULL_FILENAME = "techtreexp.png" # **
- # name of the image file for the seperate, full version of the righthand xp bar
- # this will be overlayed on top of the base image
- XP_BAR_FULL_X = 630 # **
- XP_BAR_FULL_Y = 86 # **
- # the x and y coordinates of the upper left hand corner of where the xp bar starts
- ALLOW_LOCK_CURSOR = true
- # allow cursor to move onto a locked item
- HELP_WINDOW_LINES = 3
- HELP_WINDOW_X = 0
- HELP_WINDOW_Y = 384
- HELP_WINDOW_SHOW_WINDOWSKIN = false
- HELP_WINDOW_SHOW_BACKGROUND = false
- BUTTON_RECT_WIDTH = 32
- BUTTON_RECT_HEIGHT = 32
- SELECTION_RECT_PADDING = 2
- # in pixels
- # how far to draw the selection rect outside of the image box, in each direction
- MOUSE_DETECTION_RECT_PADDING = 2
- # in pixels
- # this is how far outside the bounding box of the button rect
- # in any direction, you can be for the mouse to work
- INDEX_ID_MAP = [
- [:r, :r, 46, :l, :r, 47, :l, :r, 48, :l, :r, 49, :l, :r, 50, :l, 51],
- [:r, 32, 33, 34, 35, 0, 36, 37, 38, 39, 40, 0, 41, 42, 43, 44, :l],
- [16, 17, 18, 19, 20, 0, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30],
- [ 1, 2, 3, 4, 5, 0, 6, 7, 8, 9, 10, 0, 11, 12, 13, 14, 15],
- ]
- # a map of each techid and where it is in the window
- # each row should be equal length
- # padding can be used
- # :l, if encountered while moving up/down, attempts to move the cursor left
- # :r, if encountered while moving up/down, attempts to move the cursor right
- # 0 if encountered while moving up/down, it will move in the opposide direction
- # last moved (to put the cursor back approximately where it was)
- # otherwise, these are considered white space and skipped over in the direction
- # already being moved
- # when a cursor is forced moved, *row* is always preserved if possible
- # the numbers in this map should be matched with the techids themselves
- # the numbers themselves are otherwise arbitrary and can be changed
- # if this is confusing, pull up the base image side by side with this table
- # academy of war is 1-5, there is a 0 representing the space between
- # then tactics and command is 6-10, another 0 spacer, and 11-15 is crafts
- # this continues each row
- # when we get to the top, we have the white spaces, which, if moved into
- # attempt to keep the cursor in the same "tree"
- # pressing up into the top row moves to the nearest tech
- # so the rightmost/leftmost t3 techs will cursor up into the dual capstones
- # The capstone for crafts/academy can only be reached while already in the t4 row
- # to maintain consistency (to change this, the :l next to the 51 should be an :r)
- # you should avoid messing with this unless necessary, we can change
- # tech ids here easily if they need to match what is below
- INVERT_WINDOW_INDEXES = true
- # if window is inverted, index 0 starts at the bottom
- # (we want this, since we want to start on the bottom row and count up)
- # if false, index 0 is the upper left of the INDEX_ID_MAP
- VERTICAL_WRAPAROUND = false
- # cursor can go from the bottom of the window to the top by pressing down and vice versa
- HORIZONTAL_WRAPAROUND = true
- # cursor can go from the left edge to the right by pressing left and vice versa
- TECHS = Hash.new { |h, k| h[k] = Hash.new }
- # format is:
- # TECHS[id][property] = param
- # ** need one of the below
- # see above INDEX_ID_MAP to see what concides with which space on the board
- # (can be easily changed if need be, they mostly go in order along each row
- # starting at the bottom with 31 and 45 skipped to represent the "missing"
- # techs in academy and crafts, in case we want to add them)
- TECHS[1][:name] = "Spellweaver" # ** the name of the tech
- TECHS[1][:disabled_filename] = "tech_35.png" # ** filename from in graphics/system
- # the "greyed out" version of this tech to be overlayed when disabled
- TECHS[1][:button_x] = 16 # **the x coordinate of the upper leftmost pixel of the tech icon
- TECHS[1][:button_y] = 289 # ** the y coordinate of the upper leftmost pixel of the tech icon
- # these are used for mouse detection, image overlay positioning
- # and selection cursor positioning
- TECHS[1][:help] = "" # ** The help text when this tech is selected
- # multiline supported
- TECHS[1][:locked_help] = nil # if anything other than nil, this will be displayed
- # as the help text when having the cursor on the locked item
- # if nil, use the normal help text
- TECHS[1][:tier] = 1 # ** tier of the tech, for unlocking and counting purposes
- # effects and item linking to come later
- TECHS[2][:name] = "Magician Academy"
- TECHS[2][:disabled_filename] = "tech_36.png"
- TECHS[2][:button_x] = 55
- TECHS[2][:button_y] = 289
- TECHS[2][:help] = ""
- TECHS[2][:locked_help] = nil #
- TECHS[2][:tier] = 1
- TECHS[3][:name] = "Army Stables"
- TECHS[3][:disabled_filename] = "tech_37.png"
- TECHS[3][:button_x] = 94
- TECHS[3][:button_y] = 289
- TECHS[3][:help] = ""
- TECHS[3][:locked_help] = nil #
- TECHS[3][:tier] = 1
- TECHS[4][:name] = "Donarโs Acolytes"
- TECHS[4][:disabled_filename] = "tech_38.png"
- TECHS[4][:button_x] = 133
- TECHS[4][:button_y] = 289
- TECHS[4][:help] = ""
- TECHS[4][:locked_help] = nil #
- TECHS[4][:tier] = 1
- TECHS[5][:name] = "Battle Medics"
- TECHS[5][:disabled_filename] = "tech_39.png"
- TECHS[5][:button_x] = 172
- TECHS[5][:button_y] = 289
- TECHS[5][:help] = ""
- TECHS[5][:locked_help] = nil #
- TECHS[5][:tier] = 1
- TECHS[6][:name] = "Mentorship"
- TECHS[6][:disabled_filename] = "tech_40.png"
- TECHS[6][:button_x] = 231
- TECHS[6][:button_y] = 289
- TECHS[6][:help] = ""
- TECHS[6][:locked_help] = nil #
- TECHS[6][:tier] = 1
- TECHS[7][:name] = "Mixed Unit Tactics"
- TECHS[7][:disabled_filename] = "tech_41.png"
- TECHS[7][:button_x] = 271
- TECHS[7][:button_y] = 289
- TECHS[7][:help] = ""
- TECHS[7][:locked_help] = nil #
- TECHS[7][:tier] = 1
- TECHS[8][:name] = "Home Defense"
- TECHS[8][:disabled_filename] = "tech_42.png"
- TECHS[8][:button_x] = 309
- TECHS[8][:button_y] = 289
- TECHS[8][:help] = ""
- TECHS[8][:locked_help] = nil #
- TECHS[8][:tier] = 1
- TECHS[9][:name] = "Conscription"
- TECHS[9][:disabled_filename] = "tech_43.png"
- TECHS[9][:button_x] = 348
- TECHS[9][:button_y] = 289
- TECHS[9][:help] = ""
- TECHS[9][:locked_help] = nil #
- TECHS[9][:tier] = 1
- TECHS[10][:name] = "Mercenary Envoys"
- TECHS[10][:disabled_filename] = "tech_44.png"
- TECHS[10][:button_x] = 387
- TECHS[10][:button_y] = 289
- TECHS[10][:help] = ""
- TECHS[10][:locked_help] = nil #
- TECHS[10][:tier] = 1
- TECHS[11][:name] = "Adept Blacksmith"
- TECHS[11][:disabled_filename] = "tech_45.png"
- TECHS[11][:button_x] = 445
- TECHS[11][:button_y] = 289
- TECHS[11][:help] = ""
- TECHS[11][:locked_help] = nil #
- TECHS[11][:tier] = 1
- TECHS[12][:name] = "Jewelcrafting"
- TECHS[12][:disabled_filename] = "tech_46.png"
- TECHS[12][:button_x] = 483
- TECHS[12][:button_y] = 289
- TECHS[12][:help] = ""
- TECHS[12][:locked_help] = nil #
- TECHS[12][:tier] = 1
- TECHS[13][:name] = "Iron Smelting"
- TECHS[13][:disabled_filename] = "tech_47.png"
- TECHS[13][:button_x] = 523
- TECHS[13][:button_y] = 289
- TECHS[13][:help] = ""
- TECHS[13][:locked_help] = nil #
- TECHS[13][:tier] = 1
- TECHS[14][:name] = "Steel Forging"
- TECHS[14][:disabled_filename] = "tech_48.png"
- TECHS[14][:button_x] = 561
- TECHS[14][:button_y] = 289
- TECHS[14][:help] = ""
- TECHS[14][:locked_help] = nil #
- TECHS[14][:tier] = 1
- TECHS[15][:name] = "Platina Alloys"
- TECHS[15][:disabled_filename] = "tech_49.png"
- TECHS[15][:button_x] = 600
- TECHS[15][:button_y] = 289
- TECHS[15][:help] = ""
- TECHS[15][:locked_help] = nil #
- TECHS[15][:tier] = 1
- TECHS[16][:name] = "Sunstone Refining"
- TECHS[16][:disabled_filename] = "tech_20.png"
- TECHS[16][:button_x] = 16
- TECHS[16][:button_y] = 205
- TECHS[16][:help] = ""
- TECHS[16][:locked_help] = nil #
- TECHS[16][:tier] = 2
- TECHS[17][:name] = "War Mages"
- TECHS[17][:disabled_filename] = "tech_21.png"
- TECHS[17][:button_x] = 55
- TECHS[17][:button_y] = 205
- TECHS[17][:help] = ""
- TECHS[17][:locked_help] = nil #
- TECHS[17][:tier] = 2
- TECHS[18][:name] = "Warhorse Husbandry"
- TECHS[18][:disabled_filename] = "tech_22.png"
- TECHS[18][:button_x] = 94
- TECHS[18][:button_y] = 205
- TECHS[18][:help] = ""
- TECHS[18][:locked_help] = nil #
- TECHS[18][:tier] = 2
- TECHS[19][:name] = "Sisterhood of Justice"
- TECHS[19][:disabled_filename] = "tech_23.png"
- TECHS[19][:button_x] = 133
- TECHS[19][:button_y] = 205
- TECHS[19][:help] = ""
- TECHS[19][:locked_help] = nil #
- TECHS[19][:tier] = 2
- TECHS[20][:name] = "Gem Trader"
- TECHS[20][:disabled_filename] = "tech_24.png"
- TECHS[20][:button_x] = 172
- TECHS[20][:button_y] = 205
- TECHS[20][:help] = ""
- TECHS[20][:locked_help] = nil #
- TECHS[20][:tier] = 2
- TECHS[21][:name] = "Advanced Flanking"
- TECHS[21][:disabled_filename] = "tech_25.png"
- TECHS[21][:button_x] = 231
- TECHS[21][:button_y] = 205
- TECHS[21][:help] = ""
- TECHS[21][:locked_help] = nil #
- TECHS[21][:tier] = 2
- TECHS[22][:name] = "Swordsmanship"
- TECHS[22][:disabled_filename] = "tech_26.png"
- TECHS[22][:button_x] = 270
- TECHS[22][:button_y] = 205
- TECHS[22][:help] = ""
- TECHS[22][:locked_help] = nil #
- TECHS[22][:tier] = 2
- TECHS[23][:name] = "Field Strongholds"
- TECHS[23][:disabled_filename] = "tech_27.png"
- TECHS[23][:button_x] = 309
- TECHS[23][:button_y] = 205
- TECHS[23][:help] = ""
- TECHS[23][:locked_help] = nil #
- TECHS[23][:tier] = 2
- TECHS[24][:name] = "Steel Phalanx"
- TECHS[24][:disabled_filename] = "tech_28.png"
- TECHS[24][:button_x] = 348
- TECHS[24][:button_y] = 205
- TECHS[24][:help] = ""
- TECHS[24][:locked_help] = nil #
- TECHS[24][:tier] = 2
- TECHS[25][:name] = "Bowmanship"
- TECHS[25][:disabled_filename] = "tech_29.png"
- TECHS[25][:button_x] = 387
- TECHS[25][:button_y] = 205
- TECHS[25][:help] = ""
- TECHS[25][:locked_help] = nil #
- TECHS[25][:tier] = 2
- TECHS[26][:name] = "Journeyman Blacksmith"
- TECHS[26][:disabled_filename] = "tech_30.png"
- TECHS[26][:button_x] = 444
- TECHS[26][:button_y] = 205
- TECHS[26][:help] = ""
- TECHS[26][:locked_help] = nil #
- TECHS[26][:tier] = 2
- TECHS[27][:name] = "Augmenteering"
- TECHS[27][:disabled_filename] = "tech_31.png"
- TECHS[27][:button_x] = 483
- TECHS[27][:button_y] = 205
- TECHS[27][:help] = ""
- TECHS[27][:locked_help] = nil #
- TECHS[27][:tier] = 2
- TECHS[28][:name] = "Advanced Material Science"
- TECHS[28][:disabled_filename] = "tech_32.png"
- TECHS[28][:button_x] = 522
- TECHS[28][:button_y] = 205
- TECHS[28][:help] = ""
- TECHS[28][:locked_help] = nil #
- TECHS[28][:tier] = 2
- TECHS[29][:name] = "Obsidian Forging"
- TECHS[29][:disabled_filename] = "tech_33.png"
- TECHS[29][:button_x] = 561
- TECHS[29][:button_y] = 205
- TECHS[29][:help] = ""
- TECHS[29][:locked_help] = nil #
- TECHS[29][:tier] = 2
- TECHS[30][:name] = "Advanced Crossbows"
- TECHS[30][:disabled_filename] = "tech_34.png"
- TECHS[30][:button_x] = 600
- TECHS[30][:button_y] = 205
- TECHS[30][:help] = ""
- TECHS[30][:locked_help] = nil #
- TECHS[30][:tier] = 2
- TECHS[32][:name] = "Magical Alacrity"
- TECHS[32][:disabled_filename] = "tech_7.png"
- TECHS[32][:button_x] = 55
- TECHS[32][:button_y] = 123
- TECHS[32][:help] = ""
- TECHS[32][:locked_help] = nil #
- TECHS[32][:tier] = 3
- TECHS[33][:name] = "Fire Affinity"
- TECHS[33][:disabled_filename] = "tech_8.png"
- TECHS[33][:button_x] = 94
- TECHS[33][:button_y] = 123
- TECHS[33][:help] = ""
- TECHS[33][:locked_help] = nil #
- TECHS[33][:tier] = 3
- TECHS[34][:name] = "Ice Affinity"
- TECHS[34][:disabled_filename] = "tech_9.png"
- TECHS[34][:button_x] = 133
- TECHS[34][:button_y] = 123
- TECHS[34][:help] = ""
- TECHS[34][:locked_help] = nil #
- TECHS[34][:tier] = 3
- TECHS[35][:name] = "Ice Affinity"
- TECHS[35][:disabled_filename] = "tech_10.png"
- TECHS[35][:button_x] = 172
- TECHS[35][:button_y] = 123
- TECHS[35][:help] = ""
- TECHS[35][:locked_help] = nil #
- TECHS[35][:tier] = 3
- TECHS[36][:name] = "Mobile Warfare"
- TECHS[36][:disabled_filename] = "tech_11.png"
- TECHS[36][:button_x] = 231
- TECHS[36][:button_y] = 123
- TECHS[36][:help] = ""
- TECHS[36][:locked_help] = nil #
- TECHS[36][:tier] = 3
- TECHS[37][:name] = "Longsword Mastery"
- TECHS[37][:disabled_filename] = "tech_12.png"
- TECHS[37][:button_x] = 270
- TECHS[37][:button_y] = 123
- TECHS[37][:help] = ""
- TECHS[37][:locked_help] = nil #
- TECHS[37][:tier] = 3
- TECHS[38][:name] = "Fixed Defenses"
- TECHS[38][:disabled_filename] = "tech_13.png"
- TECHS[38][:button_x] = 309
- TECHS[38][:button_y] = 123
- TECHS[38][:help] = ""
- TECHS[38][:locked_help] = nil #
- TECHS[38][:tier] = 3
- TECHS[39][:name] = "Professionalism"
- TECHS[39][:disabled_filename] = "tech_14.png"
- TECHS[39][:button_x] = 348
- TECHS[39][:button_y] = 123
- TECHS[39][:help] = ""
- TECHS[39][:locked_help] = nil #
- TECHS[39][:tier] = 3
- TECHS[40][:name] = "Archer General"
- TECHS[40][:disabled_filename] = "tech_15.png"
- TECHS[40][:button_x] = 387
- TECHS[40][:button_y] = 123
- TECHS[40][:help] = ""
- TECHS[40][:locked_help] = nil #
- TECHS[40][:tier] = 3
- TECHS[41][:name] = "Master Blacksmith"
- TECHS[41][:disabled_filename] = "tech_16.png"
- TECHS[41][:button_x] = 444
- TECHS[41][:button_y] = 123
- TECHS[41][:help] = ""
- TECHS[41][:locked_help] = nil #
- TECHS[41][:tier] = 3
- TECHS[42][:name] = "Grapeshot"
- TECHS[42][:disabled_filename] = "tech_17.png"
- TECHS[42][:button_x] = 483
- TECHS[42][:button_y] = 123
- TECHS[42][:help] = ""
- TECHS[42][:locked_help] = nil #
- TECHS[42][:tier] = 3
- TECHS[43][:name] = "Rifled Artillery"
- TECHS[43][:disabled_filename] = "tech_18.png"
- TECHS[43][:button_x] = 522
- TECHS[43][:button_y] = 123
- TECHS[43][:help] = ""
- TECHS[43][:locked_help] = nil #
- TECHS[43][:tier] = 3
- TECHS[44][:name] = "Breech-Loading Gun"
- TECHS[44][:disabled_filename] = "tech_19.png"
- TECHS[44][:button_x] = 561
- TECHS[44][:button_y] = 123
- TECHS[44][:help] = ""
- TECHS[44][:locked_help] = nil #
- TECHS[44][:tier] = 3
- TECHS[46][:name] = "Mage Regiments"
- TECHS[46][:disabled_filename] = "tech_1.png"
- TECHS[46][:button_x] = 94
- TECHS[46][:button_y] = 41
- TECHS[46][:help] = ""
- TECHS[46][:locked_help] = nil #
- TECHS[46][:tier] = 4
- TECHS[47][:name] = "Dragon Bond"
- TECHS[47][:disabled_filename] = "tech_2.png"
- TECHS[47][:button_x] = 201
- TECHS[47][:button_y] = 26
- TECHS[47][:help] = ""
- TECHS[47][:locked_help] = nil #
- TECHS[47][:tier] = 4
- TECHS[48][:name] = "Grand Army"
- TECHS[48][:disabled_filename] = "tech_3.png"
- TECHS[48][:button_x] = 309
- TECHS[48][:button_y] = 41
- TECHS[48][:help] = ""
- TECHS[48][:locked_help] = nil #
- TECHS[48][:tier] = 4
- TECHS[49][:name] = "Musketeering"
- TECHS[49][:disabled_filename] = "tech_4.png"
- TECHS[49][:button_x] = 415
- TECHS[49][:button_y] = 26
- TECHS[49][:help] = ""
- TECHS[49][:locked_help] = nil #
- TECHS[49][:tier] = 4
- TECHS[50][:name] = "Grandmaster Artificer"
- TECHS[50][:disabled_filename] = "tech_5.png"
- TECHS[50][:button_x] = 522
- TECHS[50][:button_y] = 41
- TECHS[50][:help] = ""
- TECHS[50][:locked_help] = nil #
- TECHS[50][:tier] = 4
- TECHS[51][:name] = "Arcane Forge"
- TECHS[51][:disabled_filename] = "tech_6.png"
- TECHS[51][:button_x] = 604
- TECHS[51][:button_y] = 41
- TECHS[51][:help] = ""
- TECHS[51][:locked_help] = nil #
- TECHS[51][:tier] = 4
- end
- # don't touch beyond here
- class Scene_TechTree < Scene_Base
- include TechTree
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement