rmxp_extractor 1.7 → 1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CODE_OF_CONDUCT.md +74 -74
- data/Data/Actors.rxdata +0 -0
- data/Data/Animations.rxdata +0 -0
- data/Data/Armors.rxdata +0 -0
- data/Data/Classes.rxdata +0 -0
- data/Data/CommonEvents.rxdata +0 -0
- data/Data/Enemies.rxdata +0 -0
- data/Data/Items.rxdata +0 -0
- data/Data/Map001.rxdata +0 -0
- data/Data/Map002.rxdata +0 -0
- data/Data/Map003.rxdata +0 -0
- data/Data/Map004.rxdata +0 -0
- data/Data/Map005.rxdata +0 -0
- data/Data/Map006.rxdata +0 -0
- data/Data/Map007.rxdata +0 -0
- data/Data/Map008.rxdata +0 -0
- data/Data/Map009.rxdata +0 -0
- data/Data/Map010.rxdata +0 -0
- data/Data/Map011.rxdata +0 -0
- data/Data/Map012.rxdata +0 -0
- data/Data/Map013.rxdata +0 -0
- data/Data/Map014.rxdata +0 -0
- data/Data/Map015.rxdata +0 -0
- data/Data/Map016.rxdata +0 -0
- data/Data/Map017.rxdata +0 -0
- data/Data/Map018.rxdata +0 -0
- data/Data/Map019.rxdata +0 -0
- data/Data/Map020.rxdata +0 -0
- data/Data/Map021.rxdata +0 -0
- data/Data/Map022.rxdata +0 -0
- data/Data/Map023.rxdata +0 -0
- data/Data/Map024.rxdata +0 -0
- data/Data/Map025.rxdata +0 -0
- data/Data/Map026.rxdata +0 -0
- data/Data/Map027.rxdata +0 -0
- data/Data/Map028.rxdata +0 -0
- data/Data/Map029.rxdata +0 -0
- data/Data/Map030.rxdata +0 -0
- data/Data/Map031.rxdata +0 -0
- data/Data/Map032.rxdata +0 -0
- data/Data/Map033.rxdata +0 -0
- data/Data/Map034.rxdata +0 -0
- data/Data/Map035.rxdata +0 -0
- data/Data/Map036.rxdata +0 -0
- data/Data/Map037.rxdata +0 -0
- data/Data/Map038.rxdata +0 -0
- data/Data/Map039.rxdata +0 -0
- data/Data/Map040.rxdata +0 -0
- data/Data/Map041.rxdata +0 -0
- data/Data/Map042.rxdata +0 -0
- data/Data/Map043.rxdata +0 -0
- data/Data/Map044.rxdata +0 -0
- data/Data/Map045.rxdata +0 -0
- data/Data/Map046.rxdata +0 -0
- data/Data/Map047.rxdata +0 -0
- data/Data/Map048.rxdata +0 -0
- data/Data/Map049.rxdata +0 -0
- data/Data/Map050.rxdata +0 -0
- data/Data/Map051.rxdata +0 -0
- data/Data/Map052.rxdata +0 -0
- data/Data/Map053.rxdata +0 -0
- data/Data/Map054.rxdata +0 -0
- data/Data/Map055.rxdata +0 -0
- data/Data/Map056.rxdata +0 -0
- data/Data/Map057.rxdata +0 -0
- data/Data/Map058.rxdata +0 -0
- data/Data/Map059.rxdata +0 -0
- data/Data/Map060.rxdata +0 -0
- data/Data/Map061.rxdata +0 -0
- data/Data/Map062.rxdata +0 -0
- data/Data/Map063.rxdata +0 -0
- data/Data/Map064.rxdata +0 -0
- data/Data/Map065.rxdata +0 -0
- data/Data/Map066.rxdata +0 -0
- data/Data/Map067.rxdata +0 -0
- data/Data/Map068.rxdata +0 -0
- data/Data/Map069.rxdata +0 -0
- data/Data/Map070.rxdata +0 -0
- data/Data/Map071.rxdata +0 -0
- data/Data/Map072.rxdata +0 -0
- data/Data/Map073.rxdata +0 -0
- data/Data/Map074.rxdata +0 -0
- data/Data/Map075.rxdata +0 -0
- data/Data/Map076.rxdata +0 -0
- data/Data/Map077.rxdata +0 -0
- data/Data/Map078.rxdata +0 -0
- data/Data/Map079.rxdata +0 -0
- data/Data/Map080.rxdata +0 -0
- data/Data/Map081.rxdata +0 -0
- data/Data/Map082.rxdata +0 -0
- data/Data/Map083.rxdata +0 -0
- data/Data/Map084.rxdata +0 -0
- data/Data/Map085.rxdata +0 -0
- data/Data/Map086.rxdata +0 -0
- data/Data/Map087.rxdata +0 -0
- data/Data/Map088.rxdata +0 -0
- data/Data/Map089.rxdata +0 -0
- data/Data/Map090.rxdata +0 -0
- data/Data/Map091.rxdata +0 -0
- data/Data/Map092.rxdata +0 -0
- data/Data/Map093.rxdata +0 -0
- data/Data/Map094.rxdata +0 -0
- data/Data/Map095.rxdata +0 -0
- data/Data/Map096.rxdata +0 -0
- data/Data/Map097.rxdata +0 -0
- data/Data/Map098.rxdata +0 -0
- data/Data/Map099.rxdata +0 -0
- data/Data/Map100.rxdata +0 -0
- data/Data/Map101.rxdata +0 -0
- data/Data/Map102.rxdata +0 -0
- data/Data/Map103.rxdata +0 -0
- data/Data/Map104.rxdata +0 -0
- data/Data/Map105.rxdata +0 -0
- data/Data/Map106.rxdata +0 -0
- data/Data/Map107.rxdata +0 -0
- data/Data/Map108.rxdata +0 -0
- data/Data/Map109.rxdata +0 -0
- data/Data/Map110.rxdata +0 -0
- data/Data/Map111.rxdata +0 -0
- data/Data/Map112.rxdata +0 -0
- data/Data/Map113.rxdata +0 -0
- data/Data/Map114.rxdata +0 -0
- data/Data/Map115.rxdata +0 -0
- data/Data/Map116.rxdata +0 -0
- data/Data/Map117.rxdata +0 -0
- data/Data/Map118.rxdata +0 -0
- data/Data/Map119.rxdata +0 -0
- data/Data/Map120.rxdata +0 -0
- data/Data/Map121.rxdata +0 -0
- data/Data/Map122.rxdata +0 -0
- data/Data/Map123.rxdata +0 -0
- data/Data/Map124.rxdata +0 -0
- data/Data/Map125.rxdata +0 -0
- data/Data/Map126.rxdata +0 -0
- data/Data/Map127.rxdata +0 -0
- data/Data/Map128.rxdata +0 -0
- data/Data/Map129.rxdata +0 -0
- data/Data/Map130.rxdata +0 -0
- data/Data/Map131.rxdata +0 -0
- data/Data/Map132.rxdata +0 -0
- data/Data/Map133.rxdata +0 -0
- data/Data/Map134.rxdata +0 -0
- data/Data/Map135.rxdata +0 -0
- data/Data/Map136.rxdata +0 -0
- data/Data/Map137.rxdata +0 -0
- data/Data/Map138.rxdata +0 -0
- data/Data/Map139.rxdata +0 -0
- data/Data/Map140.rxdata +0 -0
- data/Data/Map141.rxdata +0 -0
- data/Data/Map142.rxdata +0 -0
- data/Data/Map143.rxdata +0 -0
- data/Data/Map144.rxdata +0 -0
- data/Data/Map145.rxdata +0 -0
- data/Data/Map146.rxdata +0 -0
- data/Data/Map147.rxdata +0 -0
- data/Data/Map148.rxdata +0 -0
- data/Data/Map149.rxdata +0 -0
- data/Data/Map150.rxdata +0 -0
- data/Data/Map151.rxdata +0 -0
- data/Data/Map152.rxdata +0 -0
- data/Data/Map153.rxdata +0 -0
- data/Data/Map154.rxdata +0 -0
- data/Data/Map155.rxdata +0 -0
- data/Data/Map156.rxdata +0 -0
- data/Data/Map157.rxdata +0 -0
- data/Data/Map158.rxdata +0 -0
- data/Data/Map159.rxdata +0 -0
- data/Data/Map160.rxdata +0 -0
- data/Data/Map161.rxdata +0 -0
- data/Data/Map162.rxdata +0 -0
- data/Data/Map163.rxdata +0 -0
- data/Data/Map164.rxdata +0 -0
- data/Data/Map165.rxdata +0 -0
- data/Data/Map166.rxdata +0 -0
- data/Data/Map167.rxdata +0 -0
- data/Data/Map168.rxdata +0 -0
- data/Data/Map169.rxdata +0 -0
- data/Data/Map170.rxdata +0 -0
- data/Data/Map171.rxdata +0 -0
- data/Data/Map172.rxdata +0 -0
- data/Data/Map173.rxdata +0 -0
- data/Data/Map174.rxdata +0 -0
- data/Data/Map175.rxdata +0 -0
- data/Data/Map176.rxdata +0 -0
- data/Data/Map177.rxdata +0 -0
- data/Data/Map178.rxdata +0 -0
- data/Data/Map179.rxdata +0 -0
- data/Data/Map180.rxdata +0 -0
- data/Data/Map181.rxdata +0 -0
- data/Data/Map182.rxdata +0 -0
- data/Data/Map183.rxdata +0 -0
- data/Data/Map184.rxdata +0 -0
- data/Data/Map185.rxdata +0 -0
- data/Data/Map186.rxdata +0 -0
- data/Data/Map187.rxdata +0 -0
- data/Data/Map188.rxdata +0 -0
- data/Data/Map189.rxdata +0 -0
- data/Data/Map190.rxdata +0 -0
- data/Data/Map191.rxdata +0 -0
- data/Data/Map192.rxdata +0 -0
- data/Data/Map193.rxdata +0 -0
- data/Data/Map194.rxdata +0 -0
- data/Data/Map195.rxdata +0 -0
- data/Data/Map196.rxdata +0 -0
- data/Data/Map197.rxdata +0 -0
- data/Data/Map198.rxdata +0 -0
- data/Data/Map199.rxdata +0 -0
- data/Data/Map200.rxdata +0 -0
- data/Data/Map201.rxdata +0 -0
- data/Data/Map202.rxdata +0 -0
- data/Data/Map203.rxdata +0 -0
- data/Data/Map204.rxdata +0 -0
- data/Data/Map205.rxdata +0 -0
- data/Data/Map206.rxdata +0 -0
- data/Data/Map207.rxdata +0 -0
- data/Data/Map208.rxdata +0 -0
- data/Data/Map209.rxdata +0 -0
- data/Data/Map210.rxdata +0 -0
- data/Data/Map211.rxdata +0 -0
- data/Data/Map212.rxdata +0 -0
- data/Data/Map213.rxdata +0 -0
- data/Data/Map214.rxdata +0 -0
- data/Data/Map215.rxdata +0 -0
- data/Data/Map216.rxdata +0 -0
- data/Data/Map217.rxdata +0 -0
- data/Data/Map218.rxdata +0 -0
- data/Data/Map219.rxdata +0 -0
- data/Data/Map220.rxdata +0 -0
- data/Data/Map221.rxdata +0 -0
- data/Data/Map222.rxdata +0 -0
- data/Data/Map223.rxdata +0 -0
- data/Data/Map224.rxdata +0 -0
- data/Data/Map225.rxdata +0 -0
- data/Data/Map226.rxdata +0 -0
- data/Data/Map227.rxdata +0 -0
- data/Data/Map228.rxdata +0 -0
- data/Data/Map229.rxdata +0 -0
- data/Data/Map230.rxdata +0 -0
- data/Data/Map231.rxdata +0 -0
- data/Data/Map232.rxdata +0 -0
- data/Data/Map233.rxdata +0 -0
- data/Data/Map234.rxdata +0 -0
- data/Data/Map235.rxdata +0 -0
- data/Data/Map236.rxdata +0 -0
- data/Data/Map237.rxdata +0 -0
- data/Data/Map238.rxdata +0 -0
- data/Data/Map239.rxdata +0 -0
- data/Data/Map240.rxdata +0 -0
- data/Data/Map241.rxdata +0 -0
- data/Data/Map242.rxdata +0 -0
- data/Data/Map243.rxdata +0 -0
- data/Data/Map244.rxdata +0 -0
- data/Data/Map245.rxdata +0 -0
- data/Data/Map246.rxdata +0 -0
- data/Data/Map247.rxdata +0 -0
- data/Data/Map248.rxdata +0 -0
- data/Data/Map249.rxdata +0 -0
- data/Data/Map250.rxdata +0 -0
- data/Data/Map251.rxdata +0 -0
- data/Data/Map252.rxdata +0 -0
- data/Data/Map253.rxdata +0 -0
- data/Data/Map254.rxdata +0 -0
- data/Data/Map255.rxdata +0 -0
- data/Data/Map256.rxdata +0 -0
- data/Data/Map257.rxdata +0 -0
- data/Data/Map258.rxdata +0 -0
- data/Data/Map259.rxdata +0 -0
- data/Data/Map260.rxdata +0 -0
- data/Data/Map261.rxdata +0 -0
- data/Data/Map262.rxdata +0 -0
- data/Data/Map263.rxdata +0 -0
- data/Data/MapInfos.rxdata +0 -0
- data/Data/Scripts.rxdata +0 -0
- data/Data/Skills.rxdata +0 -0
- data/Data/States.rxdata +0 -0
- data/Data/System.rxdata +0 -0
- data/Data/Tilesets.rxdata +0 -0
- data/Data/Troops.rxdata +0 -0
- data/Data/Weapons.rxdata +0 -0
- data/Data/xScripts.rxdata +0 -0
- data/Gemfile +13 -13
- data/LICENSE.txt +21 -21
- data/README.md +35 -35
- data/Rakefile +6 -6
- data/Scripts/Credits_Message.rb +259 -0
- data/Scripts/Data_FastTravel.rb +50 -0
- data/Scripts/Data_Footsteps.rb +77 -0
- data/Scripts/Data_Item.rb +50 -0
- data/Scripts/Data_SpecialEventData.rb +60 -0
- data/Scripts/Demo.rb +7 -0
- data/Scripts/Desktop_Message.rb +210 -0
- data/Scripts/Doc_Message.rb +273 -0
- data/Scripts/EdText.rb +50 -0
- data/Scripts/Ed_Message.rb +234 -0
- data/Scripts/FastTravel.rb +175 -0
- data/Scripts/Game_Actor.rb +156 -0
- data/Scripts/Game_Actors.rb +28 -0
- data/Scripts/Game_BattleAction.rb +145 -0
- data/Scripts/Game_Battler 1.rb +307 -0
- data/Scripts/Game_Battler 2.rb +294 -0
- data/Scripts/Game_Battler 3.rb +354 -0
- data/Scripts/Game_Character 1.rb +291 -0
- data/Scripts/Game_Character 2.rb +355 -0
- data/Scripts/Game_Character 3.rb +505 -0
- data/Scripts/Game_CommonEvent.rb +70 -0
- data/Scripts/Game_Enemy.rb +317 -0
- data/Scripts/Game_Event.rb +264 -0
- data/Scripts/Game_FastTravel.rb +40 -0
- data/Scripts/Game_Follower.rb +76 -0
- data/Scripts/Game_Light.rb +13 -0
- data/Scripts/Game_Map.rb +551 -0
- data/Scripts/Game_Oneshot.rb +83 -0
- data/Scripts/Game_Party.rb +380 -0
- data/Scripts/Game_Picture.rb +164 -0
- data/Scripts/Game_Player.rb +298 -0
- data/Scripts/Game_Screen.rb +148 -0
- data/Scripts/Game_SelfSwitches.rb +30 -0
- data/Scripts/Game_Switches.rb +45 -0
- data/Scripts/Game_System.rb +210 -0
- data/Scripts/Game_Temp.rb +145 -0
- data/Scripts/Game_Variables.rb +36 -0
- data/Scripts/Interpreter 1.rb +320 -0
- data/Scripts/Interpreter 2.rb +286 -0
- data/Scripts/Interpreter 3.rb +474 -0
- data/Scripts/Interpreter 4.rb +327 -0
- data/Scripts/Interpreter 5.rb +448 -0
- data/Scripts/Interpreter 6.rb +307 -0
- data/Scripts/Interpreter 7.rb +282 -0
- data/Scripts/Main.rb +46 -9
- data/Scripts/Particles.rb +141 -0
- data/Scripts/Persistent.rb +71 -0
- data/Scripts/Puzzle_Film.rb +14 -0
- data/Scripts/Puzzle_Pixel.rb +210 -0
- data/Scripts/Puzzle_Safe.rb +152 -0
- data/Scripts/Puzzle_Sokoban.rb +14 -0
- data/Scripts/RPG.rb +55 -0
- data/Scripts/SaveLoad.rb +275 -0
- data/Scripts/Scene_Debug.rb +190 -0
- data/Scripts/Scene_End.rb +108 -0
- data/Scripts/Scene_Equip.rb +222 -0
- data/Scripts/Scene_File.rb +111 -0
- data/Scripts/Scene_Item.rb +205 -0
- data/Scripts/Scene_Load.rb +106 -0
- data/Scripts/Scene_Map.rb +540 -0
- data/Scripts/Scene_Menu.rb +213 -0
- data/Scripts/Scene_Name.rb +113 -0
- data/Scripts/Scene_Save.rb +88 -0
- data/Scripts/Scene_Skill.rb +232 -0
- data/Scripts/Scene_Status.rb +78 -0
- data/Scripts/Scene_Title.rb +237 -0
- data/Scripts/Script.rb +780 -0
- data/Scripts/Sprite_Battler.rb +131 -0
- data/Scripts/Sprite_Character.rb +192 -0
- data/Scripts/Sprite_Footprint.rb +35 -0
- data/Scripts/Sprite_Footsplash.rb +54 -0
- data/Scripts/Sprite_Light.rb +18 -0
- data/Scripts/Sprite_MapText.rb +63 -0
- data/Scripts/Sprite_Picture.rb +72 -0
- data/Scripts/Sprite_Timer.rb +52 -0
- data/Scripts/Spriteset_Map.rb +370 -0
- data/Scripts/Window_Base.rb +327 -0
- data/Scripts/Window_BattleResult.rb +51 -0
- data/Scripts/Window_BattleStatus.rb +62 -0
- data/Scripts/Window_Command.rb +49 -0
- data/Scripts/Window_DebugLeft.rb +57 -0
- data/Scripts/Window_DebugRight.rb +69 -0
- data/Scripts/Window_EquipItem.rb +94 -0
- data/Scripts/Window_EquipLeft.rb +61 -0
- data/Scripts/Window_EquipRight.rb +56 -0
- data/Scripts/Window_Gold.rb +27 -0
- data/Scripts/Window_Help.rb +33 -0
- data/Scripts/Window_InputNumber.rb +111 -0
- data/Scripts/Window_Item.rb +229 -0
- data/Scripts/Window_MainMenu.rb +150 -0
- data/Scripts/Window_MenuStatus.rb +48 -0
- data/Scripts/Window_Message.rb +459 -0
- data/Scripts/Window_NameEdit.rb +108 -0
- data/Scripts/Window_NameInput.rb +262 -0
- data/Scripts/Window_PartyCommand.rb +42 -0
- data/Scripts/Window_PlayTime.rb +40 -0
- data/Scripts/Window_SaveFile.rb +91 -0
- data/Scripts/Window_Selectable.rb +203 -0
- data/Scripts/Window_Settings.rb +469 -0
- data/Scripts/Window_ShopBuy.rb +93 -0
- data/Scripts/Window_ShopCommand.rb +37 -0
- data/Scripts/Window_ShopNumber.rb +87 -0
- data/Scripts/Window_ShopSell.rb +94 -0
- data/Scripts/Window_ShopStatus.rb +107 -0
- data/Scripts/Window_Skill.rb +83 -0
- data/Scripts/Window_SkillStatus.rb +28 -0
- data/Scripts/Window_Status.rb +64 -0
- data/Scripts/Window_Steps.rb +26 -0
- data/Scripts/Window_Target.rb +49 -0
- data/Scripts/_scripts.txt +111 -1
- data/Scripts/i18n_English.rb +59 -0
- data/Scripts/i18n_Language.rb +130 -0
- data/bin/rmxp_extractor +13 -13
- data/bin/setup +8 -8
- data/diff_check.rb +13 -13
- data/lib/rmxp_extractor/classnames.rb +245 -244
- data/lib/rmxp_extractor/data_export.rb +82 -82
- data/lib/rmxp_extractor/data_import.rb +69 -69
- data/lib/rmxp_extractor/ron.rb +144 -144
- data/lib/rmxp_extractor/script_handler.rb +85 -85
- data/lib/rmxp_extractor/version.rb +3 -3
- data/lib/rmxp_extractor.rb +46 -46
- data/rmxp_extractor.gemspec +30 -30
- data/spec/spec_helper.rb +100 -100
- metadata +112 -126
- data/Data/Map-1.rxdata +0 -0
- data/Data/Map-327.rxdata +0 -0
- data/Data/Map264.rxdata +0 -0
- data/Data/Map265.rxdata +0 -0
- data/Data/Map266.rxdata +0 -0
- data/Data/Map267.rxdata +0 -0
- data/Data/Map268.rxdata +0 -0
- data/Data/Map269.rxdata +0 -0
- data/Data/Map270.rxdata +0 -0
- data/Data/Map271.rxdata +0 -0
- data/Data/Map272.rxdata +0 -0
- data/Data/Map273.rxdata +0 -0
- data/Data/Map274.rxdata +0 -0
- data/Data/Map275.rxdata +0 -0
- data/Data/Map276.rxdata +0 -0
- data/Data/Map277.rxdata +0 -0
- data/Data/Map278.rxdata +0 -0
- data/Data/Map279.rxdata +0 -0
- data/Data/Map280.rxdata +0 -0
- data/Data/Map281.rxdata +0 -0
- data/Data/Map282.rxdata +0 -0
- data/Data/Map283.rxdata +0 -0
- data/Data/Map284.rxdata +0 -0
- data/Data/Map285.rxdata +0 -0
- data/Data/Map286.rxdata +0 -0
- data/Data/Map287.rxdata +0 -0
- data/Data/Map288.rxdata +0 -0
- data/Data/Map289.rxdata +0 -0
- data/Data/Map290.rxdata +0 -0
- data/Data/Map291.rxdata +0 -0
- data/Data/Map292.rxdata +0 -0
- data/Data/Map293.rxdata +0 -0
- data/Data/Map294.rxdata +0 -0
- data/Data/Map295.rxdata +0 -0
- data/Data/Map296.rxdata +0 -0
- data/Data/Map297.rxdata +0 -0
- data/Data/Map298.rxdata +0 -0
- data/Data/Map299.rxdata +0 -0
- data/Data/Map300.rxdata +0 -0
- data/Data/Map301.rxdata +0 -0
- data/Data/Map302.rxdata +0 -0
- data/Data/Map303.rxdata +0 -0
- data/Data/Map304.rxdata +0 -0
- data/Data/Map305.rxdata +0 -0
- data/Data/Map306.rxdata +0 -0
- data/Data/Map307.rxdata +0 -0
- data/Data/Map308.rxdata +0 -0
- data/Data/Map309.rxdata +0 -0
- data/Data/Map310.rxdata +0 -0
- data/Data/Map311.rxdata +0 -0
- data/Data/Map312.rxdata +0 -0
- data/Data/Map313.rxdata +0 -0
- data/Data/Map314.rxdata +0 -0
- data/Data/Map315.rxdata +0 -0
- data/Data/Map316.rxdata +0 -0
- data/Data/Map317.rxdata +0 -0
- data/Data/Map318.rxdata +0 -0
- data/Data/Map319.rxdata +0 -0
- data/Data/Map320.rxdata +0 -0
- data/Data/Map321.rxdata +0 -0
- data/Data/Map322.rxdata +0 -0
- data/Data/Map323.rxdata +0 -0
- data/Data/Map324.rxdata +0 -0
- data/Data/Map325.rxdata +0 -0
- data/Data/Map326.rxdata +0 -0
- data/Data/Map327.rxdata +0 -0
- data/Data/Map328.rxdata +0 -0
- data/Data/Map329.rxdata +0 -0
- data/Data/Map330.rxdata +0 -0
- data/Data/Map331.rxdata +0 -0
- data/Data/Map332.rxdata +0 -0
- data/Data/Map333.rxdata +0 -0
- data/Data/Map334.rxdata +0 -0
- data/Data/Map335.rxdata +0 -0
- data/Data/Map336.rxdata +0 -0
- data/Data/Map337.rxdata +0 -0
- data/Data/Map338.rxdata +0 -0
- data/Data/Map339.rxdata +0 -0
- data/Data/Map340.rxdata +0 -0
- data/Data/Map341.rxdata +0 -0
- data/Data/Map342.rxdata +0 -0
- data/Data/Map343.rxdata +0 -0
- data/Data/Map344.rxdata +0 -0
- data/Data/Map345.rxdata +0 -0
- data/Data/Map346.rxdata +0 -0
- data/Data/Map347.rxdata +0 -0
- data/Data/Map348.rxdata +0 -0
- data/Data/Map349.rxdata +0 -0
- data/Data/Map350.rxdata +0 -0
- data/Data/Map351.rxdata +0 -0
- data/Data/Map352.rxdata +0 -0
- data/Data/Map353.rxdata +0 -0
- data/Data/Map354.rxdata +0 -0
- data/Data/Map355.rxdata +0 -0
- data/Data/Map356.rxdata +0 -0
- data/Data/Map357.rxdata +0 -0
- data/Data/Map358.rxdata +0 -0
- data/Data/Map359.rxdata +0 -0
- data/Data/Map360.rxdata +0 -0
- data/Data/Map361.rxdata +0 -0
- data/Data/Map362.rxdata +0 -0
- data/Data/Map363.rxdata +0 -0
- data/Data/Map364.rxdata +0 -0
- data/Data/Map365.rxdata +0 -0
- data/Data/Map366.rxdata +0 -0
- data/Data/Map367.rxdata +0 -0
- data/Data/Map368.rxdata +0 -0
- data/Data/Map369.rxdata +0 -0
- data/Data/Map370.rxdata +0 -0
- data/Data/Map371.rxdata +0 -0
- data/Data/Map372.rxdata +0 -0
- data/Data/Map373.rxdata +0 -0
- data/Data/Map374.rxdata +0 -0
- data/Data/Map375.rxdata +0 -0
- data/Data/Map376.rxdata +0 -0
- data/Data/Map377.rxdata +0 -0
- data/Data/Map378.rxdata +0 -0
- data/Data/Map379.rxdata +0 -0
- data/Data/Map380.rxdata +0 -0
- data/Data/Map381.rxdata +0 -0
- data/Data/Map382.rxdata +0 -0
- data/Data/Map383.rxdata +0 -0
- data/Data/Map384.rxdata +0 -0
- data/Data/Map385.rxdata +0 -0
data/Scripts/Script.rb
ADDED
@@ -0,0 +1,780 @@
|
|
1
|
+
PROTO_TEXT = "put me in the big portal"
|
2
|
+
CEDRIC_TEXT = "put me in the big portal"
|
3
|
+
RUE_TEXT = "put me in the big portal"
|
4
|
+
|
5
|
+
SUPPORTED_DE = ["cinnamon", "gnome", "mate", "kde", "xfce"]
|
6
|
+
|
7
|
+
module Script
|
8
|
+
def self.px
|
9
|
+
logpos($game_player.x, $game_player.real_x, $game_player.direction == 6)
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.py
|
13
|
+
logpos($game_player.y, $game_player.real_y, $game_player.direction == 2)
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.is_name_swear
|
17
|
+
test_string = $game_oneshot.player_name.downcase
|
18
|
+
if ["fuck", "shit", "ass", "cock", "damn", "penis", "tiddy", "titty", "cunt", "fag", "whore"].any? { |swear| test_string.include? swear }
|
19
|
+
return true
|
20
|
+
end
|
21
|
+
return false
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.is_name_niko
|
25
|
+
test_string = $game_oneshot.player_name.downcase
|
26
|
+
if test_string == "niko"
|
27
|
+
return true
|
28
|
+
end
|
29
|
+
return false
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.is_name_like_niko
|
33
|
+
test_string = $game_oneshot.player_name.downcase
|
34
|
+
if ["nico", "nikko", "nicco", "nikoh", "nicoh"].any? { |name| test_string == name }
|
35
|
+
return true
|
36
|
+
end
|
37
|
+
return false
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.is_name_like_mom_dad
|
41
|
+
test_string = $game_oneshot.player_name.downcase
|
42
|
+
if ["mom", "dad", "mommy", "daddy", "mama", "papa"].any? { |name| test_string == name }
|
43
|
+
return true
|
44
|
+
end
|
45
|
+
return false
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.is_name_gross
|
49
|
+
test_string = $game_oneshot.player_name.downcase
|
50
|
+
if ["poo", "pee", "fart", "stinky", "piss", "shit", "slimy"].any? { |name| test_string == name }
|
51
|
+
return true
|
52
|
+
end
|
53
|
+
return false
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.start_bruteforce
|
57
|
+
$game_oneshot.bruteforce_start = Graphics.frame_count
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.check_bruteforce
|
61
|
+
if($game_oneshot.bruteforce_start == nil)
|
62
|
+
$game_oneshot.bruteforce_start = Graphics.frame_count
|
63
|
+
end
|
64
|
+
time_passed = Graphics.frame_count - $game_oneshot.bruteforce_start
|
65
|
+
if(time_passed > (2 * 60 * 63014))
|
66
|
+
return true
|
67
|
+
else
|
68
|
+
return false
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
def self.skip_bruteforce
|
73
|
+
$game_oneshot.bruteforce_start -= 62800*2*60
|
74
|
+
end
|
75
|
+
|
76
|
+
def self.lose_all_items
|
77
|
+
for i in 1..99
|
78
|
+
$game_party.lose_item(i, 99)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
def self.bruteforce_vars
|
83
|
+
if($game_oneshot.bruteforce_start == nil)
|
84
|
+
$game_oneshot.bruteforce_start = Graphics.frame_count
|
85
|
+
end
|
86
|
+
time_passed = Graphics.frame_count - $game_oneshot.bruteforce_start
|
87
|
+
counts_tried = time_passed / (2 * 60)
|
88
|
+
digit1 = counts_tried % 10;
|
89
|
+
digit2 = ((counts_tried % 100) - digit1) / 10
|
90
|
+
digit3 = ((counts_tried % 1000) - (digit2 * 10) - digit1) / 100
|
91
|
+
digit4 = ((counts_tried % 10000) - (digit3 * 100) - (digit2 * 10) - digit1) / 1000
|
92
|
+
digit5 = ((counts_tried % 100000) - (digit4 * 1000) - (digit3 * 100) - (digit2 * 10) - digit1) / 10000
|
93
|
+
$game_variables[26] = digit5
|
94
|
+
$game_variables[27] = digit4
|
95
|
+
$game_variables[28] = digit3
|
96
|
+
$game_variables[29] = digit2
|
97
|
+
$game_variables[30] = digit1
|
98
|
+
end
|
99
|
+
|
100
|
+
def self.fix_footsplashes(xDelta, yDelta)
|
101
|
+
$scene.fix_footsplashes(xDelta, yDelta)
|
102
|
+
end
|
103
|
+
|
104
|
+
def self.move_player_relative(x, y)
|
105
|
+
$game_player.x += x
|
106
|
+
$game_player.y += y
|
107
|
+
$game_player.real_x += x * 4 * 32
|
108
|
+
$game_player.real_y += y * 4 * 32
|
109
|
+
$game_map.display_x += x * 4 * 32
|
110
|
+
$game_map.display_y += y * 4 * 32
|
111
|
+
end
|
112
|
+
|
113
|
+
def self.move_player(x, y)
|
114
|
+
xDelta = x - $game_player.x
|
115
|
+
yDelta = y - $game_player.y
|
116
|
+
Script.move_player_relative(xDelta, yDelta)
|
117
|
+
end
|
118
|
+
|
119
|
+
def self.eve_x(name)
|
120
|
+
for event in $game_map.events.values
|
121
|
+
if event.name == name
|
122
|
+
return logpos(event.x, event.real_x, event.direction == 6)
|
123
|
+
end
|
124
|
+
end
|
125
|
+
return 0
|
126
|
+
end
|
127
|
+
|
128
|
+
def self.eve_y(name)
|
129
|
+
for event in $game_map.events.values
|
130
|
+
if event.name == name
|
131
|
+
return logpos(event.y, event.real_y, event.direction == 2)
|
132
|
+
end
|
133
|
+
end
|
134
|
+
return 0
|
135
|
+
end
|
136
|
+
|
137
|
+
def self.countdown_over
|
138
|
+
equinox = Time.new(2017, 03, 27)
|
139
|
+
diff = equinox - Time.now
|
140
|
+
if(diff <= 0)
|
141
|
+
return true
|
142
|
+
end
|
143
|
+
return false
|
144
|
+
end
|
145
|
+
|
146
|
+
def self.countdown_extend_over
|
147
|
+
equinox = Time.new(2017, 03, 27)
|
148
|
+
diff = equinox - Time.now
|
149
|
+
if(diff <= 0)
|
150
|
+
return true
|
151
|
+
end
|
152
|
+
return false
|
153
|
+
end
|
154
|
+
|
155
|
+
def self.cdown_update(equinox)
|
156
|
+
diff = equinox - Time.now
|
157
|
+
if(diff < 0)
|
158
|
+
diff = 0
|
159
|
+
end
|
160
|
+
seconds = diff % 60
|
161
|
+
minutes = ((diff - seconds)/ 60) % 60
|
162
|
+
hours = ((((diff - seconds)/ 60) - minutes) / 60) % 24
|
163
|
+
days = (((((diff - seconds)/ 60) - minutes) / 60) - hours) / 24
|
164
|
+
secs1 = seconds % 10
|
165
|
+
secs2 = (seconds - secs1) / 10
|
166
|
+
mins1 = minutes % 10
|
167
|
+
mins2 = (minutes - mins1) / 10
|
168
|
+
hrs1 = hours % 10
|
169
|
+
hrs2 = (hours - hrs1) / 10
|
170
|
+
dys1 = days % 10
|
171
|
+
dys2 = ((days - dys1) / 10) % 10
|
172
|
+
dys3 = ((days - dys1 - (dys2*10)) / 100) % 10
|
173
|
+
dys4 = ((days - dys1 - (dys2*10) - (dys3*100)) / 1000) % 10
|
174
|
+
secs1 = secs1.floor
|
175
|
+
change = false
|
176
|
+
if secs1 != $game_variables[101]
|
177
|
+
$game_variables[101] = secs1
|
178
|
+
change = true
|
179
|
+
end
|
180
|
+
if secs2 != $game_variables[102]
|
181
|
+
$game_variables[102] = secs2
|
182
|
+
change = true
|
183
|
+
end
|
184
|
+
if mins1 != $game_variables[103]
|
185
|
+
$game_variables[103] = mins1
|
186
|
+
change = true
|
187
|
+
end
|
188
|
+
if mins2 != $game_variables[104]
|
189
|
+
$game_variables[104] = mins2
|
190
|
+
change = true
|
191
|
+
end
|
192
|
+
if hrs1 != $game_variables[105]
|
193
|
+
$game_variables[105] = hrs1
|
194
|
+
change = true
|
195
|
+
end
|
196
|
+
if hrs2 != $game_variables[106]
|
197
|
+
$game_variables[106] = hrs2
|
198
|
+
change = true
|
199
|
+
end
|
200
|
+
if dys1 != $game_variables[107]
|
201
|
+
$game_variables[107] = dys1
|
202
|
+
change = true
|
203
|
+
end
|
204
|
+
if dys2 != $game_variables[108]
|
205
|
+
$game_variables[108] = dys2
|
206
|
+
change = true
|
207
|
+
end
|
208
|
+
if dys3 != $game_variables[109]
|
209
|
+
$game_variables[109] = dys3
|
210
|
+
change = true
|
211
|
+
end
|
212
|
+
if dys4 != $game_variables[110]
|
213
|
+
$game_variables[110] = dys4
|
214
|
+
change = true
|
215
|
+
end
|
216
|
+
return change
|
217
|
+
end
|
218
|
+
|
219
|
+
def self.countdown_update
|
220
|
+
return cdown_update(Time.new(2017, 03, 27))
|
221
|
+
end
|
222
|
+
|
223
|
+
def self.countdown_extend_update
|
224
|
+
return cdown_update(Time.new(2017, 03, 27))
|
225
|
+
end
|
226
|
+
|
227
|
+
def self.countdown_update_rue
|
228
|
+
if @rue_equinox == nil
|
229
|
+
@rue_equinox = Time.now + 6
|
230
|
+
end
|
231
|
+
return cdown_update(@rue_equinox)
|
232
|
+
end
|
233
|
+
|
234
|
+
def self.niko_reflection_update
|
235
|
+
for event in $game_map.events.values
|
236
|
+
if event.name == "niko reflection"
|
237
|
+
event.real_y = 27*128/2 - ($game_player.real_y - 27*128/2)
|
238
|
+
event.real_x = $game_player.real_x
|
239
|
+
event.y = 14 - (($game_player.y - 13))
|
240
|
+
event.x = $game_player.x
|
241
|
+
if event.y > 14
|
242
|
+
event.y = 14
|
243
|
+
end
|
244
|
+
if event.real_y > 14*128
|
245
|
+
event.real_y = 14*128
|
246
|
+
end
|
247
|
+
event.direction = $game_player.direction
|
248
|
+
event.pattern = $game_player.pattern
|
249
|
+
case event.direction
|
250
|
+
when 2
|
251
|
+
event.direction = 8
|
252
|
+
when 8
|
253
|
+
event.direction = 2
|
254
|
+
end
|
255
|
+
return
|
256
|
+
end
|
257
|
+
end
|
258
|
+
end
|
259
|
+
|
260
|
+
def self.niko_reflection_enc_update
|
261
|
+
for event in $game_map.events.values
|
262
|
+
if event.name == "niko reflection"
|
263
|
+
event.real_y = 20*128 - ($game_player.real_y - 20*128)
|
264
|
+
event.real_x = $game_player.real_x
|
265
|
+
event.y = 20 - (($game_player.y - 20))
|
266
|
+
event.x = $game_player.x
|
267
|
+
if event.y > 19
|
268
|
+
event.y = 19
|
269
|
+
end
|
270
|
+
if event.real_y > 19*128
|
271
|
+
event.real_y = 19*128
|
272
|
+
end
|
273
|
+
|
274
|
+
if event.x > 14
|
275
|
+
event.x = 14
|
276
|
+
elsif event.x < 6
|
277
|
+
event.x = 6
|
278
|
+
end
|
279
|
+
if event.real_x > (14*128) - 32
|
280
|
+
event.real_x = (14*128) - 32
|
281
|
+
elsif event.real_x < (6*128) + 32
|
282
|
+
event.real_x = (6*128) + 32
|
283
|
+
end
|
284
|
+
|
285
|
+
event.direction = $game_player.direction
|
286
|
+
event.pattern = $game_player.pattern
|
287
|
+
case event.direction
|
288
|
+
when 2
|
289
|
+
event.direction = 8
|
290
|
+
when 8
|
291
|
+
event.direction = 2
|
292
|
+
end
|
293
|
+
return
|
294
|
+
end
|
295
|
+
end
|
296
|
+
end
|
297
|
+
|
298
|
+
|
299
|
+
def self.niko_reflection_peng_update
|
300
|
+
for event in $game_map.events.values
|
301
|
+
if event.name == "niko reflection"
|
302
|
+
event.real_y = 20*128 - ($game_player.real_y - 20*128)
|
303
|
+
event.real_x = $game_player.real_x
|
304
|
+
event.y = 20 - (($game_player.y - 20))
|
305
|
+
event.x = $game_player.x
|
306
|
+
if event.y > 19
|
307
|
+
event.y = 19
|
308
|
+
end
|
309
|
+
if event.real_y > 19*128
|
310
|
+
event.real_y = 19*128
|
311
|
+
end
|
312
|
+
|
313
|
+
if event.x > 14
|
314
|
+
event.x = 14
|
315
|
+
elsif event.x < 6
|
316
|
+
event.x = 6
|
317
|
+
end
|
318
|
+
if event.real_x > (14*128) - 32
|
319
|
+
event.real_x = (14*128) - 32
|
320
|
+
elsif event.real_x < (6*128) + 32
|
321
|
+
event.real_x = (6*128) + 32
|
322
|
+
end
|
323
|
+
|
324
|
+
return
|
325
|
+
end
|
326
|
+
end
|
327
|
+
end
|
328
|
+
|
329
|
+
# Temporary switch assignment
|
330
|
+
def self.tmp_s1=(val)
|
331
|
+
$game_switches[TMP_INDEX+0] = val
|
332
|
+
end
|
333
|
+
|
334
|
+
def self.tmp_s2=(val)
|
335
|
+
$game_switches[TMP_INDEX+1] = val
|
336
|
+
end
|
337
|
+
|
338
|
+
def self.tmp_s3=(val)
|
339
|
+
$game_switches[TMP_INDEX+2] = val
|
340
|
+
end
|
341
|
+
|
342
|
+
def self.tmp_v1=(val)
|
343
|
+
$game_variables[TMP_INDEX+0] = val
|
344
|
+
end
|
345
|
+
|
346
|
+
def self.tmp_v2=(val)
|
347
|
+
$game_variables[TMP_INDEX+1] = val
|
348
|
+
end
|
349
|
+
|
350
|
+
def self.tmp_v3=(val)
|
351
|
+
$game_variables[TMP_INDEX+2] = val
|
352
|
+
end
|
353
|
+
|
354
|
+
private
|
355
|
+
TMP_INDEX = 22
|
356
|
+
|
357
|
+
def self.logpos(pos, realpos, positive)
|
358
|
+
bigpos = pos * 128
|
359
|
+
if realpos < bigpos
|
360
|
+
return pos - 1 if positive
|
361
|
+
elsif realpos > bigpos
|
362
|
+
return pos + 1 if positive
|
363
|
+
end
|
364
|
+
return pos
|
365
|
+
end
|
366
|
+
|
367
|
+
def self.set_cam(x, y)
|
368
|
+
$game_map.display_x = x
|
369
|
+
$game_map.display_y = y
|
370
|
+
end
|
371
|
+
|
372
|
+
def self.fadein_bgm(target, speed)
|
373
|
+
$game_temp.target_bgm_vol_level = target
|
374
|
+
$game_temp.bgm_fadein_speed = speed
|
375
|
+
end
|
376
|
+
|
377
|
+
def self.copy_journal
|
378
|
+
# If the required directories don't exist, create them
|
379
|
+
Dir.mkdir(Oneshot::GAME_PATH) unless File.exists?(Oneshot::GAME_PATH)
|
380
|
+
Dir.mkdir(Oneshot::GAME_PATH + "/Oneshot") unless File.exists?(Oneshot::GAME_PATH + "/Oneshot")
|
381
|
+
begin
|
382
|
+
# If we're on a supported Linux DE, make a .desktop file
|
383
|
+
# so the clover icon can be properly shown
|
384
|
+
if Oneshot::OS == "linux" and SUPPORTED_DE.include? Oneshot::DE
|
385
|
+
path = "#{Oneshot::GAME_PATH}/Oneshot/#{Oneshot::JOURNAL}.desktop"
|
386
|
+
File.open(path, "wb") do |output|
|
387
|
+
output.write("[Desktop Entry]\n")
|
388
|
+
output.write("Comment=...\n")
|
389
|
+
output.write("Terminal=false\n")
|
390
|
+
output.write("Name=_______\n")
|
391
|
+
output.write("Exec=#{Dir.pwd}/#{Oneshot::JOURNAL}\n")
|
392
|
+
output.write("Type=Application\n")
|
393
|
+
output.write("Icon=#{Dir.pwd}/images/icon.png\n")
|
394
|
+
end
|
395
|
+
File.chmod(0777, path)
|
396
|
+
# If the journal is a file, copy it to Documents
|
397
|
+
elsif File.file?(Oneshot::JOURNAL)
|
398
|
+
File.open(Oneshot::JOURNAL, "rb") do |input|
|
399
|
+
File.open("#{Oneshot::GAME_PATH}/Oneshot/#{Oneshot::JOURNAL}", "wb") do |output|
|
400
|
+
while buff = input.read(4096)
|
401
|
+
output.write(buff)
|
402
|
+
end
|
403
|
+
end
|
404
|
+
end
|
405
|
+
# If the journal isn't a file, symlink it
|
406
|
+
else
|
407
|
+
File.symlink "#{Dir.pwd}/#{Oneshot::JOURNAL}", "#{Oneshot::GAME_PATH}/Oneshot/#{Oneshot::JOURNAL}"
|
408
|
+
end
|
409
|
+
rescue Errno::EACCES => e
|
410
|
+
# this probably means the clover.exe already exists and is running, so no need to create it again
|
411
|
+
rescue Errno::EEXIST => e
|
412
|
+
# this means that the journal file already exists, so no need to create it again
|
413
|
+
end
|
414
|
+
if File.exists?("README.txt")
|
415
|
+
File.open("README.txt", "rb") do |input|
|
416
|
+
File.open(Oneshot::GAME_PATH + "/Oneshot/README.txt","wb") do |output|
|
417
|
+
while buff = input.read(4096)
|
418
|
+
output.write(buff)
|
419
|
+
end
|
420
|
+
end
|
421
|
+
end
|
422
|
+
end
|
423
|
+
end
|
424
|
+
|
425
|
+
def self.create_boxes
|
426
|
+
Dir.mkdir(Oneshot::GAME_PATH) unless File.exists?(Oneshot::GAME_PATH)
|
427
|
+
Dir.mkdir(Oneshot::GAME_PATH + "/Oneshot") unless File.exists?(Oneshot::GAME_PATH + "/Oneshot")
|
428
|
+
Dir.mkdir(Oneshot::GAME_PATH + "/Oneshot/Portal1") unless File.exists?(Oneshot::GAME_PATH + "/Oneshot/Portal1")
|
429
|
+
Dir.mkdir(Oneshot::GAME_PATH + "/Oneshot/Portal2") unless File.exists?(Oneshot::GAME_PATH + "/Oneshot/Portal2")
|
430
|
+
Dir.mkdir(Oneshot::GAME_PATH + "/Oneshot/Portal3") unless File.exists?(Oneshot::GAME_PATH + "/Oneshot/Portal3")
|
431
|
+
Dir.mkdir(Oneshot::GAME_PATH + "/Oneshot/BigPortal") unless File.exists?(Oneshot::GAME_PATH + "/Oneshot/BigPortal")
|
432
|
+
end
|
433
|
+
|
434
|
+
def self.delete_if_exists(f_name)
|
435
|
+
File.delete(f_name) unless !File.exists?(f_name)
|
436
|
+
end
|
437
|
+
|
438
|
+
def self.clear_boxes
|
439
|
+
for i in 1..3
|
440
|
+
portal_path = Oneshot::GAME_PATH + "/Oneshot/Portal" + i.to_s
|
441
|
+
case i
|
442
|
+
when 1
|
443
|
+
delete_if_exists(portal_path + "/blue_npc_prototype.png")
|
444
|
+
delete_if_exists(portal_path + "/proto1.png")
|
445
|
+
delete_if_exists(portal_path + "/keyB.txt")
|
446
|
+
when 2
|
447
|
+
delete_if_exists(portal_path + "/green_npc_cedric.png")
|
448
|
+
delete_if_exists(portal_path + "/cedric.png")
|
449
|
+
delete_if_exists(portal_path + "/keyG.txt")
|
450
|
+
when 3
|
451
|
+
delete_if_exists(portal_path + "/red_rue.png")
|
452
|
+
delete_if_exists(portal_path + "/rue.png")
|
453
|
+
delete_if_exists(portal_path + "/keyR.txt")
|
454
|
+
end
|
455
|
+
end
|
456
|
+
delete_if_exists(Oneshot::GAME_PATH + "/Oneshot/BigPortal/keyB.txt")
|
457
|
+
delete_if_exists(Oneshot::GAME_PATH + "/Oneshot/BigPortal/keyG.txt")
|
458
|
+
delete_if_exists(Oneshot::GAME_PATH + "/Oneshot/BigPortal/keyR.txt")
|
459
|
+
end
|
460
|
+
|
461
|
+
def self.copy_file(src, dst)
|
462
|
+
begin
|
463
|
+
File.open(src, "rb") do |input|
|
464
|
+
File.open(dst,"wb") do |output|
|
465
|
+
while buff = input.read(4096)
|
466
|
+
output.write(buff)
|
467
|
+
end
|
468
|
+
end
|
469
|
+
end
|
470
|
+
rescue Errno::EACCES => e
|
471
|
+
#this probably means the file already exists and is open, so no need to create it again
|
472
|
+
rescue Errno::EEXIST => e
|
473
|
+
#this probably means the file already exists, so no need to create it again
|
474
|
+
end
|
475
|
+
end
|
476
|
+
|
477
|
+
def self.write_key(dst, str)
|
478
|
+
File.open(dst, 'w') do |file|
|
479
|
+
file.puts(str)
|
480
|
+
end
|
481
|
+
end
|
482
|
+
|
483
|
+
def self.put_key_in_box(numb)
|
484
|
+
portal_path = Oneshot::GAME_PATH + "/Oneshot/Portal" + numb.to_s
|
485
|
+
case numb
|
486
|
+
when 1
|
487
|
+
copy_file("Graphics/Characters/blue_npc_prototype.png", portal_path + "/blue_npc_prototype.png")
|
488
|
+
copy_file("Graphics/Faces/proto1.png", portal_path + "/proto1.png")
|
489
|
+
write_key(portal_path + "/keyB.txt", tr(PROTO_TEXT))
|
490
|
+
when 2
|
491
|
+
copy_file("Graphics/Characters/green_npc_cedric.png", portal_path + "/green_npc_cedric.png")
|
492
|
+
copy_file("Graphics/Faces/cedric.png", portal_path + "/cedric.png")
|
493
|
+
write_key(portal_path + "/keyG.txt", tr(CEDRIC_TEXT))
|
494
|
+
when 3
|
495
|
+
copy_file("Graphics/Characters/red_rue.png", portal_path + "/red_rue.png")
|
496
|
+
copy_file("Graphics/Faces/rue.png", portal_path + "/rue.png")
|
497
|
+
write_key(portal_path + "/keyR.txt", tr(RUE_TEXT))
|
498
|
+
end
|
499
|
+
|
500
|
+
end
|
501
|
+
|
502
|
+
def self.password1
|
503
|
+
locale = $persistent.langcode
|
504
|
+
if !Language::LANGUAGES.include? locale
|
505
|
+
locale = 'en'
|
506
|
+
end
|
507
|
+
source_dir = "Graphics/Fogs/_/scenario1/" + locale.downcase
|
508
|
+
Dir.mkdir(Oneshot::DOCS_PATH) unless File.exists?(Oneshot::DOCS_PATH)
|
509
|
+
copy_file(source_dir + "/pw1.png", Oneshot::DOCS_PATH + "/ONESHOT_password1.png")
|
510
|
+
copy_file(source_dir + "/pw2.png", Oneshot::DOCS_PATH + "/ONESHOT_password2.png")
|
511
|
+
copy_file(source_dir + "/pw3.png", Oneshot::DOCS_PATH + "/ONESHOT_password3.png")
|
512
|
+
copy_file(source_dir + "/pw4.png", Oneshot::DOCS_PATH + "/ONESHOT_password4.png")
|
513
|
+
end
|
514
|
+
|
515
|
+
def self.password2
|
516
|
+
locale = $persistent.langcode
|
517
|
+
if !Language::LANGUAGES.include? locale
|
518
|
+
locale = 'en'
|
519
|
+
end
|
520
|
+
source_dir = "Graphics/Fogs/_/scenario2/#{locale.downcase}"
|
521
|
+
Dir.mkdir(Oneshot::DOCS_PATH) unless File.exists?(Oneshot::DOCS_PATH)
|
522
|
+
copy_file("#{source_dir}/pw1.png", "#{Oneshot::DOCS_PATH}/ONESHOT_password1.png")
|
523
|
+
copy_file("#{source_dir}/pw2.png", "#{Oneshot::DOCS_PATH}/ONESHOT_password2.png")
|
524
|
+
copy_file("#{source_dir}/pw3.png", "#{Oneshot::DOCS_PATH}/ONESHOT_password3.png")
|
525
|
+
copy_file("#{source_dir}/pw4.png", "#{Oneshot::DOCS_PATH}/ONESHOT_password4.png")
|
526
|
+
end
|
527
|
+
|
528
|
+
=begin
|
529
|
+
def self.take_key_out_of_box(numb)
|
530
|
+
if File.exists?(Oneshot::GAME_PATH + "/Oneshot/Box" + numb.to_s + "/key" + numb.to_s + ".png")
|
531
|
+
File.delete(Oneshot::GAME_PATH + "/Oneshot/Box" + numb.to_s + "/key" + numb.to_s + ".png")
|
532
|
+
end
|
533
|
+
if File.exists?(Oneshot::GAME_PATH + "/Oneshot/BigBox/key" + numb.to_s + ".png")
|
534
|
+
File.delete(Oneshot::GAME_PATH + "/Oneshot/BigBox/key" + numb.to_s + ".png")
|
535
|
+
end
|
536
|
+
end
|
537
|
+
=end
|
538
|
+
|
539
|
+
def self.is_key_in_box(numb)
|
540
|
+
portal_path = Oneshot::GAME_PATH + "/Oneshot/Portal" + numb.to_s
|
541
|
+
case numb
|
542
|
+
when 1
|
543
|
+
return File.exists?(portal_path + "/keyB.txt")
|
544
|
+
when 2
|
545
|
+
return File.exists?(portal_path + "/keyG.txt")
|
546
|
+
when 3
|
547
|
+
return File.exists?(portal_path + "/keyR.txt")
|
548
|
+
end
|
549
|
+
return false
|
550
|
+
end
|
551
|
+
|
552
|
+
def self.is_key_in_bigbox(numb)
|
553
|
+
portal_path = Oneshot::GAME_PATH + "/Oneshot/BigPortal"
|
554
|
+
case numb
|
555
|
+
when 1
|
556
|
+
return File.exists?(portal_path + "/keyB.txt")
|
557
|
+
when 2
|
558
|
+
return File.exists?(portal_path + "/keyG.txt")
|
559
|
+
when 3
|
560
|
+
return File.exists?(portal_path + "/keyR.txt")
|
561
|
+
end
|
562
|
+
return false
|
563
|
+
end
|
564
|
+
|
565
|
+
end
|
566
|
+
|
567
|
+
def has_lightbulb?
|
568
|
+
$game_party.item_number(1) > 0
|
569
|
+
end
|
570
|
+
|
571
|
+
def button_pressed?
|
572
|
+
(1..18).each do |i|
|
573
|
+
return true if Input.trigger?(i)
|
574
|
+
end
|
575
|
+
return false
|
576
|
+
end
|
577
|
+
|
578
|
+
def enter_name
|
579
|
+
$game_temp.name_calling = true
|
580
|
+
end
|
581
|
+
|
582
|
+
def check_exit(min, max, x: -1, y: -1)
|
583
|
+
result = false
|
584
|
+
if x >= 0
|
585
|
+
if $game_player.x == x
|
586
|
+
if $game_player.y >= min && $game_player.y <= max
|
587
|
+
result = true
|
588
|
+
end
|
589
|
+
end
|
590
|
+
elsif y >= 0
|
591
|
+
if $game_player.y == y
|
592
|
+
if $game_player.x >= min && $game_player.x <= max
|
593
|
+
result = true
|
594
|
+
end
|
595
|
+
end
|
596
|
+
end
|
597
|
+
Script.tmp_s1 = $game_switches[11] ? false : result
|
598
|
+
end
|
599
|
+
|
600
|
+
def loadQASave(fname)
|
601
|
+
filename = "testing_saves/" + fname + ".rxdata"
|
602
|
+
# If file doesn't exist
|
603
|
+
unless FileTest.exist?(filename)
|
604
|
+
filename = "testing_saves_postgame/" + fname + ".rxdata"
|
605
|
+
unless FileTest.exist?(filename)
|
606
|
+
# Play buzzer SE
|
607
|
+
$game_system.se_play($data_system.buzzer_se)
|
608
|
+
return
|
609
|
+
end
|
610
|
+
end
|
611
|
+
# Play load SE
|
612
|
+
$game_system.se_play($data_system.load_se)
|
613
|
+
|
614
|
+
# Read save data
|
615
|
+
file = File.open(filename, "rb")
|
616
|
+
# Read character data for drawing save file
|
617
|
+
characters = Marshal.load(file)
|
618
|
+
# Read frame count for measuring play time
|
619
|
+
Graphics.frame_count = Marshal.load(file)
|
620
|
+
# Read each type of game object
|
621
|
+
$game_system = Marshal.load(file)
|
622
|
+
$game_switches = Marshal.load(file)
|
623
|
+
$game_variables = Marshal.load(file)
|
624
|
+
$game_self_switches = Marshal.load(file)
|
625
|
+
$game_screen = Marshal.load(file)
|
626
|
+
$game_actors = Marshal.load(file)
|
627
|
+
$game_party = Marshal.load(file)
|
628
|
+
$game_troop = Marshal.load(file)
|
629
|
+
$game_map = Marshal.load(file)
|
630
|
+
$game_player = Marshal.load(file)
|
631
|
+
$game_followers = Marshal.load(file)
|
632
|
+
$game_oneshot = Marshal.load(file)
|
633
|
+
$game_fasttravel = Marshal.load(file)
|
634
|
+
$game_temp.footstep_sfx = Marshal.load(file)
|
635
|
+
|
636
|
+
# If magic number is different from when saving
|
637
|
+
# (if editing was added with editor)
|
638
|
+
if $game_system.magic_number != $data_system.magic_number
|
639
|
+
# Load map
|
640
|
+
$game_map.setup($game_map.map_id)
|
641
|
+
$game_player.center($game_player.x, $game_player.y)
|
642
|
+
end
|
643
|
+
# Refresh party members
|
644
|
+
$game_party.refresh
|
645
|
+
|
646
|
+
f_prev = $game_player
|
647
|
+
for f in $game_followers
|
648
|
+
f.leader = f_prev
|
649
|
+
f.moveto($game_player.x, $game_player.y)
|
650
|
+
f_prev = f
|
651
|
+
end
|
652
|
+
file.close
|
653
|
+
# Restore BGM and BGS
|
654
|
+
$game_system.bgm_play($game_system.playing_bgm)
|
655
|
+
$game_system.bgs_play($game_system.playing_bgs)
|
656
|
+
# Update map (run parallel process event)
|
657
|
+
$game_map.update
|
658
|
+
# Switch to map screen
|
659
|
+
$scene = Scene_Map.new
|
660
|
+
end
|
661
|
+
|
662
|
+
def kill_perma_flags
|
663
|
+
for i in 151..175
|
664
|
+
$game_switches[i] = false
|
665
|
+
end
|
666
|
+
for i in 76..100
|
667
|
+
$game_variables[i] = 0
|
668
|
+
end
|
669
|
+
end
|
670
|
+
|
671
|
+
def bg(name)
|
672
|
+
$game_map.bg_name = name
|
673
|
+
end
|
674
|
+
|
675
|
+
def particles(type)
|
676
|
+
$game_map.particles_type = type
|
677
|
+
end
|
678
|
+
|
679
|
+
def ambient(r, g, b, gray = 0)
|
680
|
+
$game_map.ambient.set(r, g, b, gray)
|
681
|
+
end
|
682
|
+
|
683
|
+
def clear_ambient
|
684
|
+
$game_map.ambient.set(0, 0, 0, 0)
|
685
|
+
end
|
686
|
+
|
687
|
+
def add_light(id, file, intensity, x, y)
|
688
|
+
#$scene.add_light(id, file, intensity, x, y)
|
689
|
+
end
|
690
|
+
|
691
|
+
def del_light(id)
|
692
|
+
#$scene.del_light(id)
|
693
|
+
end
|
694
|
+
|
695
|
+
def clear_lights
|
696
|
+
#$scene.clear_lights
|
697
|
+
end
|
698
|
+
|
699
|
+
def wrap_map
|
700
|
+
$game_map.wrapping = true
|
701
|
+
end
|
702
|
+
|
703
|
+
def pan_offset_y(val)
|
704
|
+
$game_map.pan_offset_y = val
|
705
|
+
end
|
706
|
+
|
707
|
+
# Map specific settings
|
708
|
+
def green_ambient
|
709
|
+
ambient(-30, -20, -30)
|
710
|
+
end
|
711
|
+
|
712
|
+
def blue_ambient
|
713
|
+
ambient(-40, -40, -40)
|
714
|
+
end
|
715
|
+
|
716
|
+
def house_ambient
|
717
|
+
ambient(-15, -15, -15)
|
718
|
+
end
|
719
|
+
|
720
|
+
# Travel
|
721
|
+
def enable_travel
|
722
|
+
$game_fasttravel.enabled = true
|
723
|
+
end
|
724
|
+
|
725
|
+
def disable_travel
|
726
|
+
$game_fasttravel.enabled = false
|
727
|
+
end
|
728
|
+
|
729
|
+
def unlock_map(zone, map, dir)
|
730
|
+
# Find the coordinate of the calling event
|
731
|
+
e = $game_map.events.values.find { |e| e.name == 'FAST TRAVEL' }
|
732
|
+
raise 'could not find event named FAST TRAVEL' if !e
|
733
|
+
case dir
|
734
|
+
when :down
|
735
|
+
newdir = 2
|
736
|
+
when :left
|
737
|
+
newdir = 4
|
738
|
+
when :right
|
739
|
+
newdir = 6
|
740
|
+
when :up
|
741
|
+
newdir = 8
|
742
|
+
else
|
743
|
+
raise "invalid direction: #{dir}"
|
744
|
+
end
|
745
|
+
$game_fasttravel.enabled = true
|
746
|
+
$game_fasttravel.zone = zone
|
747
|
+
$game_fasttravel.unlock(map, $game_map.map_id, e.x, e.y, newdir)
|
748
|
+
end
|
749
|
+
|
750
|
+
# Misc
|
751
|
+
def watcher_tell_time
|
752
|
+
hour = Time.now.hour
|
753
|
+
if hour >= 6 && hour < 12
|
754
|
+
Script.tmp_v1 = 0
|
755
|
+
elsif hour >= 12 && hour < 17
|
756
|
+
Script.tmp_v1 = 1
|
757
|
+
elsif hour >= 17
|
758
|
+
Script.tmp_v1 = 2
|
759
|
+
else
|
760
|
+
Script.tmp_v1 = 3
|
761
|
+
end
|
762
|
+
end
|
763
|
+
|
764
|
+
def plight_start_timer
|
765
|
+
$game_oneshot.plight_timer = Time.now
|
766
|
+
end
|
767
|
+
|
768
|
+
def plight_update_timer
|
769
|
+
if $game_oneshot.plight_timer == nil
|
770
|
+
plight_start_timer
|
771
|
+
end
|
772
|
+
Script.tmp_v1 = ((Time.now - $game_oneshot.plight_timer) / 60).to_i
|
773
|
+
end
|
774
|
+
|
775
|
+
def activate_balcony?(ypos)
|
776
|
+
!$scene.menu_open? &&
|
777
|
+
$game_player.y == ypos &&
|
778
|
+
$game_player.direction == 8 &&
|
779
|
+
Input.trigger?(Input::ACTION) && !$game_system.map_interpreter.running? && !$game_temp.menus_visible
|
780
|
+
end
|