SaveData/GameData documentation?

Post here for help and support regarding LunaLua and SMBX2's libraries and features.
yoshiegg
Hoopster
Hoopster
Posts: 122
Joined: Mon Jan 25, 2016 9:20 am

SaveData/GameData documentation?

Postby yoshiegg » Sat Apr 25, 2020 7:33 am

Hello guys,

as the PGEWiki states that the DataClass will be deprecated in favor of SaveDate and GameData upon B4`s release which has passed now but I'm unable to find documentation on SaveData and GameData myself, I wanted to ask if you could provide me a link to it if there's any or tell me if there's not.

Best regards
yoshiegg

Hoeloe
Foo
Foo
Posts: 1442
Joined: Sat Oct 03, 2015 6:18 pm
Flair: The Codehaus Girl
Pronouns: she/her

Re: SaveData/GameData documentation?

Postby Hoeloe » Sat Apr 25, 2020 7:50 am

There's not really much to say. I believe it's convered in the handbook though, which you should be using instead of the wiki, since the wiki is incredibly outdated.

In principle, SaveData and GameData are just tables like any other, and you can just store values in them, for example:

SaveData.myVariable = 1

Anything stored in GameData will stay there between loading screens, but it will be cleared when you exit the game. Anything stored in SaveData will also stay there between loading screens, but will also be saved when the game saves, and loaded when you load your save file.

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9491
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: SaveData/GameData documentation?

Postby Enjl » Sat Apr 25, 2020 8:06 am

Here's the SaveData section of the handbook for reference:
https://docs.google.com/document/d/1uOd ... vzsktm6utv


Return to “LunaLua Help”

Who is online

Users browsing this forum: cato and 2 guests