-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added final fantasy explorers editor
- Loading branch information
1 parent
b7121a0
commit a6d5f23
Showing
10 changed files
with
3,211 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
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='v20180710'; | ||
const PRECACHE_FILES=[ | ||
'index.html','./', | ||
'final-fantasy-explorers.js', | ||
'database.js', | ||
'icons.png', | ||
'favicon.png', | ||
'../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})})})}))}) |
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
/* | ||
Final Fantasy Explorers for HTML5 Save Editor v20180708 | ||
by Marc Robledo 2018 | ||
*/ | ||
|
||
SavegameEditor={ | ||
Name:'Final Fantasy Explorers', | ||
Filename:'game0', | ||
|
||
Offsets:{ | ||
GIL:0x031424, | ||
CP:0x03142c, | ||
ITEMS:0x023140, | ||
MATERIALS:0x02ff98, | ||
ATMALITHS:0x030128 | ||
}, | ||
|
||
/* check if savegame is valid */ | ||
checkValidSavegame:function(){ | ||
return (tempFile.fileSize==201816) | ||
}, | ||
|
||
|
||
/* preload function */ | ||
preload:function(){ | ||
setNumericRange('gil', 0, 9999999); | ||
setNumericRange('cp', 0, 9999999); | ||
|
||
createInventoryTable('material', MATERIALS); | ||
createInventoryTable('atmalith', ATMALITHS); | ||
createInventoryTable('item', ITEMS); | ||
}, | ||
|
||
/* load function */ | ||
load:function(){ | ||
tempFile.littleEndian=true; | ||
tempFile.fileName='game0'; | ||
|
||
setValue('gil', tempFile.readThreeBytes(this.Offsets.GIL), 0, 9999999); | ||
setValue('cp', tempFile.readThreeBytes(this.Offsets.CP), 0, 9999999); | ||
|
||
readInventoryFromTable('material', MATERIALS, this.Offsets.MATERIALS); | ||
readInventoryFromTable('atmalith', ATMALITHS, this.Offsets.ATMALITHS); | ||
readInventoryFromTable('item', ITEMS, this.Offsets.ITEMS); | ||
}, | ||
|
||
|
||
/* save function */ | ||
save:function(){ | ||
tempFile.writeThreeBytes(this.Offsets.GIL, getValue('gil')); | ||
tempFile.writeThreeBytes(this.Offsets.CP, getValue('cp')); | ||
|
||
|
||
writeToInventory('material', MATERIALS, this.Offsets.MATERIALS); | ||
writeToInventory('atmalith', ATMALITHS, this.Offsets.ATMALITHS); | ||
writeToInventory('item', ITEMS, this.Offsets.ITEMS); | ||
} | ||
} | ||
|
||
|
||
/* Implement 3-byte reader/writer in MarcBinFile */ | ||
MarcBinFile.prototype.readThreeBytes=function(offset){return (this.readByte(offset+2) << 16)+(this.readByte(offset+1) << 8)+(this.readByte(offset+0))} | ||
MarcBinFile.prototype.writeThreeBytes=function(offset,val){this.writeBytes(offset, [(val & 0x0000ff) >> 0, (val & 0x00ff00) >> 8, (val & 0xff0000) >> 16])} | ||
|
||
|
||
|
||
|
||
function readInventoryFromTable(container, table, offset){ | ||
for(var i=0; i<table.length; i++){ | ||
setValue(container+table[i][0], tempFile.readByte(offset+table[i][0])); | ||
checkQuantity(getField(container+table[i][0])); | ||
} | ||
} | ||
function writeToInventory(container, table, offset){ | ||
for(var i=0; i<table.length; i++){ | ||
tempFile.writeByte(offset+table[i][0], getValue(container+table[i][0])) | ||
} | ||
} | ||
function createInventoryTable(container, table){ | ||
for(var i=0; i<table.length; i++){ | ||
var input=inputNumber(container+table[i][0], 0, 99); | ||
input.addEventListener('change', checkQuantityEvent, false); | ||
get('container-'+container+'s').appendChild(row( | ||
[11,1], | ||
label('number-'+container+table[i][0], '<span class="fficon fficon'+table[i][1]+'"></span> '+table[i][2]), | ||
input | ||
)); | ||
} | ||
} | ||
|
||
|
||
function checkQuantity(el){ | ||
el.parentElement.parentElement.children[0].children[0].style.opacity=parseInt(el.value)?1:.2; | ||
} | ||
function checkQuantityEvent(){ | ||
return checkQuantity(this); | ||
} | ||
|
||
/* | ||
function getWeaponName(i){return WEAPONS[i][2]} | ||
function getWeaponType(i){return WEAPONS[i][0]} | ||
function getWeaponPassiveTrait(i){return WEAPONS[i][1]} | ||
function getArmorName(i){return ARMOR[i][1]} | ||
function getArmorType(i){return ARMOR[i][0]} | ||
function Weapon(offset){ | ||
this.offset=offset; | ||
this.hash=tempFile.readInt(offset); | ||
this.pAttack=tempFile.readShort(offset+4); | ||
this.mAttack=tempFile.readShort(offset+6); | ||
this.pAccuracy=tempFile.readShort(offset+8); | ||
this.mAccuracy=tempFile.readShort(offset+10); | ||
this.mRecovery=tempFile.readShort(offset+12); | ||
this.trait=tempFile.readInt(offset+14); | ||
this.traitValue=tempFile.readInt(offset+18); | ||
}*/ | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
window.addEventListener('load',function(){ | ||
/* service worker */ | ||
if(location.protocol==='http:') | ||
location.href=window.location.href.replace('http:','https:'); | ||
if('serviceWorker' in navigator) | ||
navigator.serviceWorker.register('_cache_service_worker.js'); | ||
}, false); |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Savegame Editor – Final Fantasy Explorers</title> | ||
<meta http-equiv="content-Type" content="text/html; charset=UTF-8"/> | ||
<meta name="description" content="A savegame editor for Final Fantasy Explorers. It can edit values for your coins, flow balls and onions."/> | ||
<meta name="keywords" content="html5, savegame, save, editor, hack, exploit, 3ds, final, fantasy, explorers, gil, cp, materials"/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/> | ||
<link rel="shortcut icon" href="favicon.png"/> | ||
<link type="text/css" rel="stylesheet" href="../savegame-editor.css" media="all"/> | ||
<script type="text/javascript" src="../savegame-editor.js"></script> | ||
<script type="text/javascript" src="./final-fantasy-explorers.js"></script> | ||
<script type="text/javascript" src="./database.js"></script> | ||
<style type="text/css"><!-- | ||
.fficon{ | ||
display:inline-block; | ||
vertical-align: middle; | ||
width:16px;height:16px; | ||
background-image:url(icons.png); | ||
} | ||
.fficon.fficon0{background-position: 0px -0px} | ||
.fficon.fficon1{background-position: 0px -16px} | ||
.fficon.fficon2{background-position: 0px -32px} | ||
.fficon.fficon3{background-position: 0px -48px} | ||
.fficon.fficon4{background-position: 0px -64px} | ||
.fficon.fficon5{background-position: 0px -80px} | ||
.fficon.fficon6{background-position: 0px -96px} | ||
.fficon.fficon7{background-position: 0px -112px} | ||
.fficon.fficon8{background-position: 0px -128px} | ||
.fficon.fficon9{background-position: 0px -144px} | ||
.fficon.fficon10{background-position: 0px -160px} | ||
.fficon.fficon11{background-position: 0px -176px} | ||
.fficon.fficon12{background-position: 0px -192px} | ||
.fficon.fficon13{background-position: 0px -208px} | ||
.fficon.fficon14{background-position: 0px -224px} | ||
.fficon.fficon15{background-position: 0px -240px} | ||
.fficon.fficon16{background-position: 0px -256px} | ||
.fficon.fficon17{background-position: 0px -272px} | ||
.fficon.fficon18{background-position: 0px -288px} | ||
.fficon.fficon19{background-position: 0px -304px} | ||
.fficon.fficon20{background-position: 0px -320px} | ||
.fficon.fficon21{background-position: 0px -336px} | ||
.fficon.fficon22{background-position: 0px -352px} | ||
.fficon.fficon23{background-position: 0px -368px} | ||
.fficon.fficon24{background-position: 0px -384px} | ||
--></style> | ||
</head> | ||
<body> | ||
|
||
<!-- HEADER --> | ||
<div id="header"> | ||
<div id="header-top"> | ||
<div class="row wrapper"> | ||
<h1 class="six columns text-left"><img src="favicon.png" /> Savegame Editor <small>for Final Fantasy Explorers</small></h1> | ||
<div class="six columns header-buttons text-right"> | ||
by <a href="/">Marc Robledo</a> | ||
<i class="icon github"></i> <a href="https://github.com/marcrobledo/savegame-editors/tree/master/final-fantasy-explorers" target="_blank">See on GitHub</a> | ||
<i class="icon heart"></i> <a href="https://www.paypal.me/marcrobledo/5" target="_blank" rel="nofollow">Donate</a> | ||
</div> | ||
</div> | ||
<div class="hidden row wrapper" id="toolbar"> | ||
<div class="twelve columns text-center"> | ||
<button class="close" onclick="closeFile()"><i class="icon close"></i> Close file</button> | ||
<button class="colored" onclick="saveChanges()"><i class="icon accept"></i> Save changes</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
|
||
<!-- THE EDITOR --> | ||
<div id="the-editor" class="wrapper hidden"> | ||
<!-- BASIC --> | ||
<h3 class="orange">Basic</h3> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="ten columns"><label for="number-gil"><span class="fficon fficon23"></span> Gil</label></div> | ||
<div class="two columns"><input id="number-gil" type="text" class="fw" /></div> | ||
<div class="ten columns"><label for="number-cp"><span class="fficon fficon24"></span> CP</label></div> | ||
<div class="two columns"><input id="number-cp" type="text" class="fw" /></div> | ||
</div> | ||
</div> | ||
|
||
<!-- WEAPONS --> | ||
<!-- <h3 class="blue"><span class="fficon fficon2"></span> Weapons</h3> --> | ||
|
||
<!-- SHIELDS --> | ||
<!-- <h3 class="green"><span class="fficon fficon3"></span> Shields</h3> --> | ||
|
||
<!-- HEAD --> | ||
<!-- <h3 class="red"><span class="fficon fficon4"></span> Head</h3> --> | ||
|
||
<!-- ARMOR --> | ||
<!-- <h3 class="orange"><span class="fficon fficon5"></span> Armor</h3> --> | ||
|
||
<!-- MATERIALS --> | ||
<h3 class="blue"><span class="fficon fficon1"></span> Materials</h3> | ||
<div class="container" id="container-materials"></div> | ||
|
||
<!-- ATMATLITHS --> | ||
<h3 class="green"><span class="fficon fficon1"></span> Atmatliths</h3> | ||
<div class="container" id="container-atmaliths"></div> | ||
|
||
<!-- ITEMS --> | ||
<h3 class="red"><span class="fficon fficon0"></span> Items</h3> | ||
<div class="container" id="container-items"></div> | ||
|
||
</div> | ||
|
||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.