Hello all,
With the ability to upload new images to teases currently off the table, I have been unable to develop my tease further outside of improving how the base mechanics function. The final thing on my list to work on now, that isn't adding more content, is sorting out the teaseStorage so that player progress is saved when the tease is closed and reopened.
I have not done this before so would appreciate some assistance from someone that has.
The way I currently understand it is simply to set values and then get values. But knowing how to implement this properly is where my lack of experience is hindering me.
My tease works in a Rogue-Like fashion, so that the player completes multiple runs before getting strong enough through meta progression to take on the final boss of the tease. The player goes into battle and fights enemies, earning gold and experience, but also purchasing potions to increase stats that only effect the current run, with exp being spent on permanent stat increases.
I have a system that works where current-run stats get reset at the end of a run, but permanent stat increases are counted and used to calculate starting stats on a new run.
If I wanted to save progress during a run, I assume I would want to use teaseStorage.setItem() to save the values for Day, Time, Player Health, Gold, Exp etc after a battle or after a shop purchase.
Would I need to run a bunch of teaseStorage.getItem() to retrieve these values on the Start page? to essentially load the player into the state they were in the last time the game "saved"?
teaseStorage Help
-
Thamrill
- Explorer At Heart

- Posts: 301
- Joined: Thu Jan 03, 2013 4:55 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
Re: teaseStorage Help
Basically, yes. You write values in the storage when you save and retrieve them when you load. If you have a lot of variables, you may consider some optimization of the code to reduce the number of saved variables, but as an initial just try and see how it works.SpeshDetective wrote: Sun Aug 24, 2025 5:13 pm Hello all,
With the ability to upload new images to teases currently off the table, I have been unable to develop my tease further outside of improving how the base mechanics function. The final thing on my list to work on now, that isn't adding more content, is sorting out the teaseStorage so that player progress is saved when the tease is closed and reopened.
I have not done this before so would appreciate some assistance from someone that has.
The way I currently understand it is simply to set values and then get values. But knowing how to implement this properly is where my lack of experience is hindering me.
My tease works in a Rogue-Like fashion, so that the player completes multiple runs before getting strong enough through meta progression to take on the final boss of the tease. The player goes into battle and fights enemies, earning gold and experience, but also purchasing potions to increase stats that only effect the current run, with exp being spent on permanent stat increases.
I have a system that works where current-run stats get reset at the end of a run, but permanent stat increases are counted and used to calculate starting stats on a new run.
If I wanted to save progress during a run, I assume I would want to use teaseStorage.setItem() to save the values for Day, Time, Player Health, Gold, Exp etc after a battle or after a shop purchase.
Would I need to run a bunch of teaseStorage.getItem() to retrieve these values on the Start page? to essentially load the player into the state they were in the last time the game "saved"?
Just remember to give a default value for a load:
Code: Select all
var spacerString=teaseStorage.getItem("spS")||"B239";-
SpeshDetective
- Explorer

- Posts: 41
- Joined: Tue Jan 31, 2023 7:19 pm
Re: teaseStorage Help
My initial script currently assigns values like this:Thamrill wrote: Mon Aug 25, 2025 7:53 am Basically, yes. You write values in the storage when you save and retrieve them when you load. If you have a lot of variables, you may consider some optimization of the code to reduce the number of saved variables, but as an initial just try and see how it works.
Just remember to give a default value for a load:
This code loads the variable named spS in the spaceString variable; if the value is not found, it assigns it the default value "B239"Code: Select all
var spacerString=teaseStorage.getItem("spS")||"B239";
Code: Select all
Attempt = 0;
Health = 100;
Max_Health = 100;
Gold = 0;
Exp = 0;
Stamina = 100;
Max_Stamina = 100;
Day = 1;
Time = 9;Code: Select all
var Attempt=teaseStorage.getItem("Atm")||"0";
var Health=teaseStorage.getItem("H")||"100";
var Max_Health=teaseStorage.getItem("MH")||"100";
var Gold=teaseStorage.getItem("G")||"0";
var Exp=teaseStorage.getItem("XP")||"0";
var Stamina=teaseStorage.getItem("Sta")||"100";
var Max_Stamina=teaseStorage.getItem("MSta")||"100";
var Day=teaseStorage.getItem("D")||"1";
var Time=teaseStorage.getItem("T")||"9";I have read on the forums that other people have had trouble hitting max storage space, so I know there is a limit, hence the Storage variable names being abbreviations of the actual variable, so I plan on having 1-2 character variable names in the storage and having a key on my notepad to know what the matching names are.
My final question would be, does this work through the preview link I have sent out for people to test? As in would I be able to test that this is working without publishing the tease?
-
Thamrill
- Explorer At Heart

- Posts: 301
- Joined: Thu Jan 03, 2013 4:55 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
Re: teaseStorage Help
SpeshDetective wrote: Mon Aug 25, 2025 10:06 am
My initial script currently assigns values like this:Would I need to change these to look like this:Code: Select all
Attempt = 0; Health = 100; Max_Health = 100; Gold = 0; Exp = 0; Stamina = 100; Max_Stamina = 100; Day = 1; Time = 9;Code: Select all
var Attempt=teaseStorage.getItem("Atm")||"0"; var Health=teaseStorage.getItem("H")||"100"; var Max_Health=teaseStorage.getItem("MH")||"100"; var Gold=teaseStorage.getItem("G")||"0"; var Exp=teaseStorage.getItem("XP")||"0"; var Stamina=teaseStorage.getItem("Sta")||"100"; var Max_Stamina=teaseStorage.getItem("MSta")||"100"; var Day=teaseStorage.getItem("D")||"1"; var Time=teaseStorage.getItem("T")||"9";
If I'm understanding correctly, it should then get these values from Storage and if there is no value set, it will set them to the initial value as normal? And then I can run a check that says if Attempt > 0 load direct to the main page and skip the intro? or something similar to that.
edit: I confirm it, if you want to work with numbers you can avoid the quotes and use them only for strings:
Code: Select all
var Exp=teaseStorage.getItem("XP")||0;
var Name=teaseStorage.getItem("name")||"Hero";
Code: Select all
Health = 100;
Code: Select all
Health=teaseStorage.getItem("H")||Health;
Don't worry, unless you have many many variables, you shouldn't have any issue; is better to have descriptive names, so you don't mess up accidentally.SpeshDetective wrote: Mon Aug 25, 2025 10:06 am
I have read on the forums that other people have had trouble hitting max storage space, so I know there is a limit, hence the Storage variable names being abbreviations of the actual variable, so I plan on having 1-2 character variable names in the storage and having a key on my notepad to know what the matching names are.
Yes, it works also on previews and also for not-logged-in users.SpeshDetective wrote: Mon Aug 25, 2025 10:06 am
My final question would be, does this work through the preview link I have sent out for people to test? As in would I be able to test that this is working without publishing the tease?
Re: teaseStorage Help
there is a way to keep the game active when I upload my tease for an upgrade?
After I reupload the tease, score get back to 0 for exemple.
After I reupload the tease, score get back to 0 for exemple.
-
Thamrill
- Explorer At Heart

- Posts: 301
- Joined: Thu Jan 03, 2013 4:55 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
Re: teaseStorage Help
You mean like upload a new tease and you want to be able to access the data of another? If that's the case, then no, it's not possible. What you can do is implement a way to export/import data. It's not super difficult to implement but it depends a lot on the quantity and type of variables you want ot include.react wrote: Tue May 12, 2026 1:22 pm there is a way to keep the game active when I upload my tease for an upgrade?
After I reupload the tease, score get back to 0 for exemple.
Re: teaseStorage Help
No I mean I've made a tease with an introduction. When complete, the introduction skip into a menu when you do the tease again. But I have make some changes on the tease and upload it again like a v1.2. After that when I come back on the tease I don't have acces anymore, I have to do the intro again.Thamrill wrote: Wed May 13, 2026 9:03 am You mean like upload a new tease and you want to be able to access the data of another? If that's the case, then no, it's not possible. What you can do is implement a way to export/import data. It's not super difficult to implement but it depends a lot on the quantity and type of variables you want ot include.
I think when you upload again the same tease, it keep the same url. So I don't understand why everything in the teasestorage get back to default
EDIT: My bad I must be stupid. I think I just wasn't login
-
Thamrill
- Explorer At Heart

- Posts: 301
- Joined: Thu Jan 03, 2013 4:55 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
Re: teaseStorage Help
Glad to know you were able to figure it outreact wrote: Wed May 13, 2026 12:41 pmNo I mean I've made a tease with an introduction. When complete, the introduction skip into a menu when you do the tease again. But I have make some changes on the tease and upload it again like a v1.2. After that when I come back on the tease I don't have acces anymore, I have to do the intro again.Thamrill wrote: Wed May 13, 2026 9:03 am You mean like upload a new tease and you want to be able to access the data of another? If that's the case, then no, it's not possible. What you can do is implement a way to export/import data. It's not super difficult to implement but it depends a lot on the quantity and type of variables you want ot include.
I think when you upload again the same tease, it keep the same url. So I don't understand why everything in the teasestorage get back to default
EDIT: My bad I must be stupid. I think I just wasn't login![]()
