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
Screenshot 2024-07-18 7.01.51 AM
for each of them along with their own number-type, player-scoped property.


Screenshot 2024-07-18 7.04.05 AM

Make each inventory item manager update their corresponding property
Screenshot 2024-07-18 7.09.36 AM
Screenshot 2024-07-18 7.09.59 AM
(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).
Screenshot 2024-07-18 7.11.59 AM
Get a button that says “Export Data”/“Get a Save Code”
Screenshot 2024-07-18 7.13.50 AM
and wire it or “channel it” to a popup.
Screenshot 2024-07-18 7.15.01 AM


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.
Screenshot 2024-07-18 7.19.31 AM
In the blocks, make this:

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


Now to import the data, just have 3 counters,
Screenshot 2024-07-18 7.22.27 AM
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”.
Screenshot 2024-07-18 7.23.52 AM
Make the counters update their corresponding “----Grant” property.
Screenshot 2024-07-18 7.25.34 AM
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”.
Screenshot 2024-07-18 7.27.52 AM
Make the “Next Digit” button increment a new counter.
Screenshot 2024-07-18 7.29.39 AM


Have this counter track a new, player-scoped, number-type property (ex. “digitNum”)
Screenshot 2024-07-18 7.30.53 AM
and make sure the counter’s default value is 1.
Screenshot 2024-07-18 7.33.03 AM
Give the counter a target value of 4, and when it reaches it’s target value, make it broadcast on channel “resetImportCounter”.
Screenshot 2024-07-18 7.33.48 AM
Also have the counter reset when receiving on “resetImportCounter”.
Screenshot 2024-07-18 7.34.27 AM

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).
Screenshot 2024-07-18 7.42.45 AM
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”).
Screenshot 2024-07-18 7.45.04 AM
Get 3 item granters: one item granter grants money, one item granter grants medpacks, and the last item granter grants shield cans or whatever.
Screenshot 2024-07-18 7.46.53 AM
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
Screenshot 2024-07-17 9.16.02 PM

name it ‘‘save code’’ make property type text and set the end of widget to the new property
Screenshot 2024-07-17 9.24.55 PM
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 :arrow_down:
Screenshot 2024-07-17 9.29.48 PM
second leave as is. now wire relay to first wire repeater

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

and wire second wire repeater to the tirgger⬇

and it look likes this
Screenshot 2024-07-17 9.17.52 PM


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
7 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