Max Nielsen
Member
Sicne you sent me a message I figured Id answer here instead for others to see.
Its really hard to say what will work for your game. As for me I have a really complex game with hundreds of nodes and a ton of AI.
What I do is I save all SharedVariables Im interested in.
When I load I first initialize all variables then setup all references using saved guids. After that I enable my behaviour trees. There aare several ways you could go from here. I used to just let it find its way back to where it was on save which worked fine but would give you a second of units looking a bit lost when starting up.
What I do now is for each external behaviour tree (All my logic is seperated into external behaviour trees, for example baker, blacksmith, miner etc). Each of these trees will start by checking if this is a load, and if it is, it will set it self up using saved states, then go into the main repeater for that external tree.
Its a lot of work but it also gives you a lot of control. And thanks to external trees it doesnt get too messy. Tbh I doubt there is any way Justin can write a save/load that will work for 100% of cases, so managing it urself is not a bad idea.
Its really hard to say what will work for your game. As for me I have a really complex game with hundreds of nodes and a ton of AI.
What I do is I save all SharedVariables Im interested in.
When I load I first initialize all variables then setup all references using saved guids. After that I enable my behaviour trees. There aare several ways you could go from here. I used to just let it find its way back to where it was on save which worked fine but would give you a second of units looking a bit lost when starting up.
What I do now is for each external behaviour tree (All my logic is seperated into external behaviour trees, for example baker, blacksmith, miner etc). Each of these trees will start by checking if this is a load, and if it is, it will set it self up using saved states, then go into the main repeater for that external tree.
Its a lot of work but it also gives you a lot of control. And thanks to external trees it doesnt get too messy. Tbh I doubt there is any way Justin can write a save/load that will work for 100% of cases, so managing it urself is not a bad idea.