Parent Child Saving process

Discussion and help for Easy Save 3
Post Reply
Atto
Posts: 1
Joined: Fri Sep 03, 2021 5:58 am

Parent Child Saving process

Post by Atto »

Hi there,

I have been trying to use ES3 and ran into some general process questions. The place Im starting from is trying to have an item be stored on a shelf, and trying to adapt how I was coding the systems to work with how ES3 wants to save. I am using the auto save, and have 1 SaveController script that Load() all the dynamic objects, and reassigns with LoadInto() to all the static.

So with that, if I have the shelf and an item, each right now have an auto save script attached, but if the item is placed onto the shelf, I am assigning the item to be a child of the shelf. If I do attach the item to shelf , should I have the item not save itself anymore and let the shelf handle it as a child? Or do I have both items still try to save themselves independently? And then when loading, will the shelf now try to load the item as its child, or do I still want to load the items independently.

Second, is it better to have each item try to save itself, or should they all report to 1 SaveController that then saves everything?

Thank you very much for any help!
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Parent Child Saving process

Post by Joel »

Hi there,

Either way is appropriate, so my general advice would be to do whatever is easiest for you. If the item is to be saved when it's off the shelf, it would make sense to save it individually. However, if it only needs to be saved when it's a child, it might make more sense to save it only when it's a child.

Regarding your second question, again it's about whatever is easiest for you. Technically having a save manager might be quicker, but ultimately this difference is likely to be neglible and you should instead prioritise ease of implementation and ease of debugging.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply