diff --git a/savegame-editor.js b/savegame-editor.js index 0cbc92e..9a80ec2 100644 --- a/savegame-editor.js +++ b/savegame-editor.js @@ -1,8 +1,8 @@ /* - savegame-editor.js v201705011 + savegame-editor.js v20180408 A library that lets you create easily a savegame editor. Made with vanilla JS. - by Marc Robledo 2016-2017 + by Marc Robledo 2016-2018 http://www.marcrobledo.com/license */ @@ -271,7 +271,7 @@ function fixNumericFieldValue(field){ if(isNaN(val) || val field.maxValue){ val=field.maxValue; } diff --git a/zelda-botw/_cache_service_worker.js b/zelda-botw/_cache_service_worker.js new file mode 100644 index 0000000..a0a6f37 --- /dev/null +++ b/zelda-botw/_cache_service_worker.js @@ -0,0 +1,31 @@ +/* +Copyright 2016 Google Inc. All Rights Reserved. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +--- +mod by marcrobledo, original from: https://github.com/GoogleChrome/samples/blob/gh-pages/service-worker/basic/service-worker.js +*/ + +const PRECACHE_ID='v20180408'; +const PRECACHE_FILES=[ +'index.html','./', +'zelda-botw.css', +'zelda-botw.js', +'zelda-botw.data.js', +'zelda-botw.icons.js', +'zelda-botw.locations.js', +'favicon.png', +'assets/_blank.png', +'assets/logo.png', +'assets/bg_black.jpg', +'assets/bg_white.jpg', +'../savegame-editor.js' +]; + +self.addEventListener('install',event=>{event.waitUntil(caches.open(PRECACHE_ID).then(cache=>cache.addAll(PRECACHE_FILES)).then(self.skipWaiting()))});self.addEventListener('activate',event=>{const currentCaches=[PRECACHE_ID,'runtime'];event.waitUntil(caches.keys().then(cacheNames=>{return cacheNames.filter(cacheName=>!currentCaches.includes(cacheName));}).then(cachesToDelete=>{return Promise.all(cachesToDelete.map(cacheToDelete=>{return caches.delete(cacheToDelete);}))}).then(()=>self.clients.claim()))});self.addEventListener('fetch',event=>{if(event.request.url.startsWith(self.location.origin))event.respondWith(caches.match(event.request).then(cachedResponse=>{if(cachedResponse)return cachedResponse;return caches.open('runtime').then(cache=>{return fetch(event.request).then(response=>{return cache.put(event.request,response.clone()).then(()=>{return response})})})}))}) \ No newline at end of file diff --git a/zelda-botw/index.html b/zelda-botw/index.html index f375020..dd068d3 100644 --- a/zelda-botw/index.html +++ b/zelda-botw/index.html @@ -1,5 +1,5 @@ - + Savegame Editor – The legend of Zelda: Breath of the wild @@ -81,46 +81,16 @@

Coordinates

-
-
- -
-
- -
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
- -
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
@@ -134,12 +104,20 @@

Horses

-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/zelda-botw/savegame-editor.appcache b/zelda-botw/savegame-editor.appcache deleted file mode 100644 index 8ee1973..0000000 --- a/zelda-botw/savegame-editor.appcache +++ /dev/null @@ -1,44 +0,0 @@ -CACHE MANIFEST -#v20180311c -#CACHE: -index.html -zelda-botw.css -zelda-botw.js -zelda-botw.data.js -zelda-botw.icons.js -zelda-botw.locations.js -favicon.png -assets/_blank.png -assets/logo.png -assets/bg_black.jpg -assets/bg_white.jpg -../savegame-editor.js - -# force these files to be loaded in network -NETWORK: -* - -#FALLBACK: -#assets/Armor_Head.png assets/_blank.png -#assets/Armor_Lower.png assets/_blank.png -#assets/Armor_Upper.png assets/_blank.png -#assets/Item_Chilled.png assets/_blank.png -#assets/Item_ChilledFish.png assets/_blank.png -#assets/Item_Cook.png assets/_blank.png -#assets/Item_Enemy.png assets/_blank.png -#assets/Item_FishGet.png assets/_blank.png -#assets/Item_Fruit.png assets/_blank.png -#assets/Item_InsectGet.png assets/_blank.png -#assets/Item_Material.png assets/_blank.png -#assets/Item_Meat.png assets/_blank.png -#assets/Item_MushroomGet.png assets/_blank.png -#assets/Item_Ore.png assets/_blank.png -#assets/Item_PlantGet.png assets/_blank.png -#assets/Item_Roast.png assets/_blank.png -#assets/Item_RoastFish.png assets/_blank.png -#assets/Other.png assets/_blank.png -#assets/Weapon_Bow.png assets/_blank.png -#assets/Weapon_Lsword.png assets/_blank.png -#assets/Weapon_Shield.png assets/_blank.png -#assets/Weapon_Spear.png assets/_blank.png -#assets/Weapon_Sword.png assets/_blank.png \ No newline at end of file diff --git a/zelda-botw/zelda-botw.js b/zelda-botw/zelda-botw.js index b1d8410..29e96f1 100644 --- a/zelda-botw/zelda-botw.js +++ b/zelda-botw/zelda-botw.js @@ -1,5 +1,5 @@ /* - The legend of Zelda: Breath of the wild v20181202 + The legend of Zelda: Breath of the wild v20180408 by Marc Robledo 2017-2018 */ var currentEditingItem=0; @@ -7,7 +7,7 @@ var currentEditingItem=0; SavegameEditor={ Name:'The legend of Zelda: Breath of the wild', Filename:'game_data.sav', - Version:20180311, + Version:20180408, /* Constants */ Constants:{ @@ -21,7 +21,6 @@ SavegameEditor={ MAP_ICONS: 0x9383490e, MAP_POS: 0xea9def3f, - PLAYER_LOCATION: 0xa40ba103, ICON_TYPES:{SWORD: 27, BOW:28, SHIELD:29, POT:30, STAR:31, CHEST:32,SKULL:33,LEAF:34,TOWER:35} }, @@ -46,6 +45,7 @@ SavegameEditor={ HORSE_MANES: [0x9c6cfd3f, 0x0a6478, 0x0a6538, 0x0a6520, 0x0a7f18, 0x0c01c0, 0x0c1168, 0x0c1168], HORSE_TYPES: [0xc247b696, 0x0b46f8, 0x0b47d8, 0x0b47b8, 0x0b6780, 0x0cead8, 0x0cfe40, 0x0cfe40], HORSE_BONDS: [0xe1a0ca54, 0x0c3670, 0x0c3738, 0x0c3710, 0x0c5bb0, 0x0de2a0, 0x0df960, 0x0df960], /* max=0x3f80 */ + HORSE_POSITION: [0x982ba201, 0x07aed0, 0x07af90, 0x07af78, 0x07c8f8, 0x088b78, 0x089a80, 0x089a80], KOROK_SEED_COUNTER: [0x8a94e07a, 0x076148, 0x0761f8, 0x0761e0, 0x0778f8, 0x083b60, 0x084908, 0x084908], DEFEATED_HINOX_COUNTER: [0x54679940, 0x04d2b8, 0x04d368, 0x04d358, 0x04e158, 0x05a2f0, 0x05ab78, 0x05ab78], @@ -59,14 +59,13 @@ SavegameEditor={ RELIC_RITO: [0xfda0cde4, 0x0da0d8, 0x0da190, 0x0da160, 0x0dcac0, 0x0f8370, 0x0f9cc8, 0x0f9cc8], MOTORCYCLE: [0xc9328299, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x0d2660, 0x0d2660], /* IsGet_Obj_Motorcycle */ - HORSE_POSITION: [0x00000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x089a7C, 0x089a7C], - MAP: [0x00000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x0044A0, 0x0044A0], - MAPTYPE: [0x00000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x0dc658, 0x0dc658], + PLAYER_POSITION: [0xa40ba103, 0x0a8cd8, 0x0a8da8, 0x0a8d90, 0x0aa8a8, 0x0c2b98, 0x0c3bf0, 0x0c3bf0], + MAP: [0x0bee9e46, 0x004128, 0x004130, 0x004130, 0x004310, 0x004348, 0x0044a0, 0x0044a0], + MAPTYPE: [0xd913b769, 0x0c0588, 0x0c0658, 0x0c0630, 0x0c29b0, 0x0db080, 0x0dc658, 0x0dc658] }, - /* private functions */ _toHexInt:function(i){var s=i.toString(16);while(s.length<8)s='0'+s;return '0x'+s}, _writeBoolean:function(offset,val,arrayPos){if(arrayPos)tempFile.writeInt(offset+8*i,val?1:0);else tempFile.writeInt(offset,val?1:0)}, @@ -81,6 +80,16 @@ SavegameEditor={ offset+=8; } }, + _writeStringShort:function(offset,str){ + for(var i=0; i<8; i++){ + tempFile.writeBytes(offset,[0,0,0,0]); + var fourBytes=str.substr(i*4, 4); + for(j=0; j= maxMapPins){ - break; - } + for (var i = 0; i