How to make save file or code for money, med packs, and shield cans or whatever (Difficulty: 4/10 or 🟩)

we’ll make a save code for money, med packs, and shield cans or whatever. you will need an inventory item manager


for each of them along with their own number-type, player-scoped property.

Make each inventory item manager update their corresponding property



(i.e. money manager updates the “money” property). Now have all 3 properties broadcast on the same channel when they update (ex. the properties broadcast on the “saveCodeUpdate” channel).

Get a button that says “Export Data”/“Get a Save Code”

and wire it or “channel it” to a popup.


Make the popup have a header of “Your Save Code” or something like that. Create a block that runs when receiving on the (ex. “saveCodeUpdate”) channel that the properties broadcast on.

In the blocks, make this:

Creating and exporting your save code/file is now complete!


Now to import the data, just have 3 counters,


that each represent the amount of one of the 3 items. Get 3 new properties that are copies of the 3 properties you already have but add this to the end of the names of the new properties: “Grant”. Ex. if you had a “money” property, the copied version of it would be “moneyGrant”.

Make the counters update their corresponding “----Grant” property.

Get 3 new buttons (or triggers),
Screenshot 2024-07-18 7.26.26 AM
one titled “+1”, one titled “-1” and one titled, “Next Digit”.

Make the “Next Digit” button increment a new counter.


Have this counter track a new, player-scoped, number-type property (ex. “digitNum”)

and make sure the counter’s default value is 1.

Give the counter a target value of 4, and when it reaches it’s target value, make it broadcast on channel “resetImportCounter”.

Also have the counter reset when receiving on “resetImportCounter”.

Get the +1 and -1 buttons to broadcast on their own channel when pressed (i.e. the +1 button broadcasts on “addOne”


and the -1 button broadcasts on channel “subtractOne”).

Get 6 checkers, with 2 of them checking if the “digitNum” property is equal to 1.

2 of them checking if the “digitNum” property is equal to 2.


and the last 2 checking if the “digitNum” property is equal to 3.

Now give 1 of each checker to the +1 and -1 buttons (1,2, and 3 checker for +1 and 1,2, and 3 checker for -1). Let’s start with the +1 button’s checkers. Make each of it’s checkers check when receiving on channel “addOne” and if the check passes then the checker broadcasts on it’s own channel (i.e. the 1 checker broadcasts on “addOne1”, and the 2 checker broadcasts on “addOne2” etc).

Now make the 3 counters from before increment when receiving on one of the checker’s channels (ex. the 1st counter increments when receiving on channel “addOne1” etc). Repeat what you did for the +1 button and it’s checkers but for the -1 button and it’s checkers. Make sure that the checkers broadcast on a channel to decrement the counters, not increment. Get a new button that has the message of “Import Data”/“Use Save Code” or something like that. Make it broadcast on a channel (ex. “importData”).

Get 3 item granters: one item granter grants money, one item granter grants medpacks, and the last item granter grants shield cans or whatever.

Create a new block for each of the item granters and make sure that the block runs when receiving on channel “importData”.
Finally, in each of the blocks have this block code but modify it depending on which item it is:

Note: the property that is in the blocks will be changed based on the item granter. Ex. if the blocks above were used for the money item granter, then the dashes would be swapped with “money” making the 1st property (the property labeled 1) be “money” and the 2nd property (labeled 2) be “moneyGrant”.

What the blocks do is set the player’s money to 0 (Idk if you can have negative of an item so I used different block code just in case) so that they can’t cheat the save code system and get infinite resources. After the blocks subtract the money, it grants the money from the imported data.

Now to this
get a new trigger with a delay of 1 second (make sure player collision is off!) and make it trigger when receiving on “importData”. Also, make it broadcast on channel “resetDataCounters” when it’s triggered. Make the 3 counters that track the “----Grant” properties reset when receiving on the “resetDataCounters” channel.

Now End of game Widget code

Now get a end of game widget and property

name it ‘‘save code’’ make property type text and set the end of widget to the new property


Now get lifecycle and relay wire them to each other ‘‘event occurs →Triggers relay’’

Now get two wire repeater and wire each other up
image
set the first to this :down_arrow:

second leave as is. now wire relay to first wire repeater

now get a trigger and set block code this :down_arrow:

and wire second wire repeater to the tirgger⬇

and it look likes this


All done! FINALLY!

Feel free to reply and ask a question so I can clarify!
thanks to Kosm0-o for the help. it mean’s alot to me

  • 1/10 or :blue_square:
  • 2/10 or :white_large_square:
  • 3/10 or :green_square:
  • 4/10 or :green_square:
  • 5/10 or :yellow_square:
  • 6/10 or :orange_square:
  • 7/10 or :orange_square:
  • 8/10 or :red_square:
  • 9/10 or :red_square:
  • 10/10 or :black_large_square:/:skull_and_crossbones:(there’s no way)
0 voters
13 Likes

This has been done before but nice guide!

2 Likes

Great guide!

that one was too hard for people to understand

3 Likes

thanks that means a lot to me

1 Like

Also I would recommend some kind of cipher so the players can’t cheat, like reversing the numbers or just making the pattern a bit more confusing.
(without this, the players could just get all the money/med packs/shield cans without doing anything for it)

2 Likes

Not I didn’t understand Esther of them :skull: I just skimmed through it :skull: :skull:

yeah, someone needs to encrypt that save code because someone could easily figure out the format and get infinite stuff…

4 Likes

i think this is incredibly late but my widget isn’t showing the save code

Bump

what is your pfp SirWyWy

It’s the sigma sign. it’s the hot new pfp trend

2 Likes

Join us in it again! Oooh a penguin I see, very yummy
image
Use this photo @Grahamathan15


I always thought save codes were the most complicated things when I saw them. Blocks were my worst nightmare lol

1 Like

for my protection, yes, I will

1 Like

great guide, just one quick question: How would I do this for something that isn’t manageable via inventory (e.g. a rank or score), is there a certain device I should use?

bumpo

i didn’t actually know there was a save code tutorial. finally!

1 Like

there’s a handful of them, actually.

burmp.

1 Like

can you reupload the pic’s please?
edit: sorry, should have searched before typing!

there’s other save code guides, also the op is inactive.
check if there’s other guides before you ask for new pictures please!

1 Like