What's new
Choice of Mods

Join our amazing community to find Choicescript games and modifications to improve your gameplay!

Adding Save System to DeiArcana Mods.

Bo Lo Spizard

Active member
Member
Phase 1: The Toolbox (Get these first)
You need these five things before you start.
1- ZArchiver (For extracting files).
2- WebCode (For editing code and compiling).
3- Website 2 APK Builder (that's if you want an apk file. Or you could check one of these websites that convert an HTML to an apk)
4- ChoiceScript Source: Download "main.zip":
5- Save Plugin: Download "ChoiceScriptSavePlugin.js":
Phase 2: Workspace Setup
Do this fresh for every new game.
1- Extract the Base: Unzip the choicescript-main.zip file. You will get a folder named choicescript-main.
2- Clean the Scene Folder: Go to choicescript-main/web/mygame/scenes/. Delete everything inside this folder (delete startup.txt, animal.txt, etc.). It must be empty.
Phase 3: Extracting the Game
Now, take the APK.
1- View the APK: Open the APK file in ZArchiver (just tap -> View).
2- Find the Assets: Look for a folder usually named assets or web. You are looking for .txt files (the story) and .jpg/.png files (the images).
3- Copy the Scenes:
Select ONLY the .txt files (e.g., startup.txt, chapter1.txt).
4- Paste them into your workspace: choicescript-main/web/mygame/scenes/.
5- Copy the Images:
Select all images (.jpg, .png).
Paste them into your workspace: choicescript-main/web/mygame/.
Note: If the game has a specific images folder, try to mimic that structure, but usually dumping them in mygame is safest for mods:v
6- Copy all the files in the assets folder. Copy them and overwrite the ones in your workspace at choicescript-main/web/mygame/.
7- Copy all the files in the mygame folder (especially mygame.js). Copy them and overwrite the ones in your workspace at choicescript-main/web/mygame/.
Phase 4: Adding the Save System.
1- Add the Plugin: Copy ChoiceScriptSavePlugin.js and paste it inside choicescript-main/web/.
2- Open WebCode. Navigate to choicescript-main/web/mygame/ and open index.html.
3- Add the Plugin Script:
Search for: navigator.js
Underneath that line, paste this:
<script src="../ChoiceScriptSavePlugin.js"></script>
4- Set a Unique Name:
Search for: window.storeName
Change the name to something unique:
window.storeName = "MyModdedGame_UniqueName123 or something idk";
Note: sometimes it already has a unique name, but just check in case.
Phase 5: Unlocking the Full Game.
This removes the "Buy Now" blocks.
1- Edit index.html (Cleanup):
Delete the lines:
window.stripeKey = "pk_live_GqEqh7tXctOwj8MrtyBLFGMg";
window.appPurchase = "adfree";
window.steamClobber = new Date().getTime() < new Date("Apr 15, 2016");
window.releaseDate = new Date(Date.parse("Apr 23, 2016 09:30 PDT"));
window.steamRestore = true;
Delete the entire block starting with <div id="mobileLinks"> down to the </div>.
2- Edit mygame.js:
Open web/mygame/mygame.js.
Search for purchases =.
Delete the list inside the brackets so it looks like this:
purchases = {};

Search for:
if (nav.loadProducts) nav.loadProducts([], purchases);
Delete i5.

NOTE: forgot to mention this:
Delete these files from the web/, web/mygame/, and web/mygame/scenes/:
1- Web/:
Cache.php.
2- web/mygame:
Version.js
Security.php
Credits.html
3- web/mygame/scenes:
Choicescript_description.txt
Choicescript_upgrade.txt
Screenshots.txt
Phase 6: The compilation.
1- Open WebCode.
2- Open the file choicescript-main/compile.html.
3- Tap the Play/Run button in WebCode.
4- You will see a white screen asking you to "Upload ChoiceScript".
5- Click the button. Select your entire choicescript-main folder.
6- It will say "Compilation Complete" and give you a download link. Download that ffile
Note:some phones don't allow WebCode to access the files(uploading choicescript-main). So, if that happened to you, send your choicescript-main folder to your laptop or PC then just open the choicescript-main/compile.html then upload.
Phase 7: Building the APK if you want ¯\_(ツ)_/¯
1- Create a New Folder somewhere on your phone (e.g., "anything).
2- Put your newly compiled html file into this folder.
3- Rename the file to index.html
4- Copy all the images (.jpg, .png) from Phase 3 into this folder too. And sometimes audio files among others.
5- Open Website 2 APK Builder. Or any APK builder
6- Directory: Select your "FinalBuild" folder.
7- Edit these:
App name.
Permissions.
8- Build APK.
Done
~~~~
Note: I learned this from @Medivh tutorial.
 
Back
Top