v2.1.0 New entities saving loading system


* New entities saving and loading system

Previously, the system automatically saved all entities within chunks, but additional variables for saving had to be written in an awkward form in the "CHUNKS" script. Now this is no longer necessary and the "CHUNKS" script becomes a fully updatable script (unless you have made changes to it). To save the additional variables of each entity, you register the variables to be saved inside a particular entity object in literally a couple of lines, and the system will save and load them in the correct order by itself!

For this purpose, i added functions to entities such as registerSaveVariable("variable", buffer_type) and registerLoadFunction(function).

If you previously had to write the variables to be saved in the "CHUNKS" script this way:


And the same for loading:


Then now it is enough to register variables to be saved inside the required object in the "create" event, which is inherited from oEntities:


Update Recommendations:

Updated resources: 

  • objects "oEntities"(Create event), "oEntity"(Begin step event)
  • script "CHUNKS"(Be careful when replacing if you have entered your own data to save and load entity data. You will have to transfer them to each entity using the new format)
  • scripts "WORLD", "WORLD_GEN", "ENTITIES", "REGIONS"(corrected comments)

Files

Lime.Chunks.2.2023.10.30_2.1.0.yymps 1.7 MB
Oct 30, 2023

Get Lime.Chunks.2

Buy Now$4.99 USD or more

Leave a comment

Log in with itch.io to leave a comment.