ChoiceScript Saving Plugin (Update: April 2023)

Thanks @Malebranche. Sorry I’m probably doing something really stupid (I’m a bit coding challenged).
Here’s a download link to the demo I made to test the save feature. I think that’s what you wanted to look at? If you need something different, let me know. (If you cant work out what I’ve done don’t worry, I’ll try to set up a demo test with general stats at points in the book if I can for anyone beta testing the game instead of using the save system).

Well, the good news is that it’s working. The bad news is that it still has the choice things that I don’t know how to get rid of those darn choices…

Here, I’ll give you a link.

https://dl.dropboxusercontent.com/u/243030709/The%20Tainted%202.0/web/index.html

Hmm, it’s alot more difficult with a compiled version, y’know what? Gimme a tick and I’ll set you up with a Pre-configured CS folder.

@Silhuetta What’s your startup.txt look like?

Ok thanks :slight_smile: I can just give you a link to the uncompiled files if that’s easier. (Have to go, will upload them tonight if that’s easier).

@Malebranche, here you go.

[quote]*title The Tainted
*author A.G. a.k.a Silhuetta
*scene_list
startup
prologue

*label top
*sm_init tainted | 4
*choice
#Save
*label save
*choice
#{savemod_slot_0} *sm_save 0 | false *goto top #{savemod_slot_1}
*sm_save 1 | true
*goto top
#{savemod_slot_2} *page_break *sm_save 2 | true *goto top #{savemod_slot_3}
*sm_save 3 | true
*goto top
#Return
*goto top
#Load
*label load
*choice
#{savemod_slot_0} *sm_load 0 | false *goto top #{savemod_slot_1}
*sm_load 1 | true
*goto top
#{savemod_slot_2} *sm_load 2 | true *goto top #{savemod_slot_3}
*sm_load 3 | true
*goto top
#Return
*goto top
#Delete
*label delete
*choice
#{savemod_slot_0} *sm_delete 0 *goto top #{savemod_slot_1}
*sm_delete 1
*goto top
#{savemod_slot_2} *sm_delete 2 *goto top #{savemod_slot_3}
*sm_delete 3
*goto top
#Return
*goto top

*comment Player (basics) _____________________________
*create full_name “John Doe”
*create firstname “John”
*create lastname “Doe”
*create gender “Unknown”
*create himher “him”
*create himher “her”
*create hisher “his”
*create hisher “her”
*create manwoman “man”
*create manwoman “woman”
*create hishers “hers”
*create heshe “he”
*create heshe “she”
*create boygirl “boy”
*create boygirl “girl”
*create mistermiss “Mister”
*create mistermiss “Miss”
*create himselfherself “himself”
*create himselfherself “herself”
*create race “Unknown”
*create position “Disoriented Civilian”
*create female false
*create male false
*create sex_preference “Unknown”
*create skin_color “Unknown”
*create hair_color “Unknown”
*create eye_color “Unknown”
*create body_type “Unknown”
*create like_males false
*create like_females false
*create know_about_tainted false
*create employer_name “Unknown”
*create legend_name “Unknown”
*create know_about_cerebrum false
*create addiction_to_cerebrum false
*create health 75
*create has_employer false
*create knows_about_insincerus false
*create know_about_pures false

*comment Player (personality & morals) ______________________
*create honest 50
*create idealistic 50
*create compassionate 50
*create ruthless 50
*create impulsive 50
*create sophistication 50
*create charming 50
*create stoic 50
*create vigilant 50
*create vagabond 50
*create humble 50
*create showy 50

*comment etc. ___________________
*create neighborhood_pop 30

*comment Player (skills) ___________________
*create agility 0
*create resilience 0
*comment defense
*create astuteness 0
*create strength 0
*create persuasion 0
*comment based on the player’s ruthless/compassionate meter, the answer will either be
*comment intimidating or persuasive
*create leadership 0
*create stealth 0

*comment Player (weapons) _______________________
*create have_melee false
*create have_ranged false
*create have_weapon false
*create weapon_name “Unknown”
*create weapon_type “Unknown”
*comment Ranged Weapons
*create colt 0
*create has_colt false
*create pistol 0
*create has_pistol false
*create revolver 0
*create has_revolver false
*create sniper_rifle 0
*create has_sniperrifle false
*comment Melee Weapons
*create ax 0
*create has_axe false
*create steelbat 0
*create has_steelbat false
*create throwingknife 0
*create has_throwingknife false
*create katana 0
*create has_katana false
*create bastardsword 0
*create has_bastardsword false

*comment Challenges _________________
*create has_challenges false
*create challenges “”
*create deaf false
*create mute false
*create migranes false
*create stunted_growth false
*create blind false
*comment may erase above

*comment Player (natural talents) __________________
*create has_natural_talent false
*create natural_talent “Unknown”
*create lightning_reflexes false
*create berserker false
*comment used to be extraordinary fighter
*create photographic_memory false
*create lava_hands false
*create spidey_sense false
*comment sensing danger/other things
*create energy_control false
*comment ability to control objects with mind

*comment Player (relationships) _______________
*create samuel_relationship 0
*create louis_relationship 0
*create oliver_relationship 0
*create kane_relationship 0
*create raymond_relationship 0
*create valarie_relationship 0
*create hiro_relationship 0
*create xeno_relationship 0

*comment variables ; chapter one __________________
*create has_legend_name false
*create nickname “Unknown”
*create has_nickname false
*create found_out_tainted false
*create heard_tainted_lore false
*create story_summarypro false
*create story_summarych1 false [/quote]

Here ya’ go! Preconfigured.

Nah it’s alright, it’s easier t’let ya’ build off of that ^^ than to debug.

@Silhuetta Just delete the choice, you don’t need it there to have the menu pop in from the top, it already has all of those configured since it gets passed your game’s name and number of save slots from the *sm_init command.

So I only keep the sm_init, then? All right, good to know. I’ll get it done tomorrow, cause it’s almost eleven over here.:grin:

Thanks for all the help so far.

Yep.

No problem, glad to be of service.

Screw doing it tomorrow, I’m too impatient!:stuck_out_tongue_closed_eyes:

IT’S ALIVE!

@Malebranche thank you thank you thank you thank you thank you. Was that enough thank you’s? Seriously though, I wouldn’t have made it without your help.

1 Like

Thanks for helping them out @Malebranche.
I think maybe I need to give the instructions a good rewrite.

1 Like

Think nothing of it, anything for Senpai after all.

(Brain: God dammit man, I thought we were done with the Senpai jokes already?!

Me: Well, y’know, I did roll the resistance check, but it failed, so, whaddaya’ gonna do?

Brain: … sigh )

5 Likes

Thanks so much @Malebranche! All working now I think :smiley:
I just looked at the code and realised I misunderstood and have been I’ve been altering the wrong index file and didn’t need the choice code in the startup.

1 Like

Hi @CJW

This has been an enormous help - a really wonderful mod which has really improved my stories :grin: thank you.

I was just wondering whether there was a way for a reader to turn off the save system if they wanted to read in ‘single life mode’

I’m guessing that the answer is no :relaxed: but thought I’d ask in case there was anything massively obvious I was missing.

1 Like

If you’re using the “menu addon”

1 Like

AAHH it works! I think you may be my new hero @CJW (though you may have to take second place to @Vendetta :wink: )

1 Like

An honoured second place indeed! :slight_smile:

2 Likes

Hi there.

First of all thank you for your help.

When making big games this save system is a blessing.

I have tried to implement the save slot system alongside with the “normal one”.

The first 3 slots,which are the only ones that appear on the dropdown box would be for the player and the other 3 would be auto-saves at predetermined points.

These last 3 work fine,but the first 3 only seem to save at the start of the scene.

Which means that if the player saves afterwards,when loading they lose their progress.

Is there anything that can be done about it?

Thank you in advance.

Hmm, i have done additional testing and it seems to occur only on certain parts of the game.

Also, it happens when i click show stats, it returns not to the page where it was supposed to, but instead to the start of the chapter.

Perhaps it has nothing to do with the save system per se.

Are you still experiencing this?

Nop. I found the issue. It happens when editing the scenes files only. If the files are closed its ok.

1 Like