So from what i can tell saving your file while that mob is linked in etc could cause a rollback.
So...
Would having a similar thing for guilds and or villages cause the same thing?
e.g.
mob/var/villages/village = spider_village.
villages
spider_village
snake_village
as far as i know that -would- cause a rollback bug and a solution would be to make the village variable tmp. so that its never saved.
Is the only way to bypass this to make it a temporary var and an additional perma var (that contains the village name) that then has a proc ran on load that simply puts humpty dumpty back together?
or is their another way?
Midgetbuster wrote:
Your code as posted will only be potentially harmful in that regard if in its expanded form the village datums had references to player mobs in non-tmp vars.
Since when is there only one way to design anything in programming?
The basic idea is not to save what doesn't need to and should not be saved, and restore it upon load instead. But there are multiple possible approaches to this. The pool of them also varies according to your situation.
Nothing requires to, for example, create a new dummy var for the mob to carry. You can control your object saving, so you can prevent (f.ex.) the guild's list of mobs from being saved and save key (or character) identifiers instead. If you're using a guild datum, then similar things would be done with it, as there's no need for the player to actually save that datum with himself neither for the guild to save the player mobs (and both of those would be stupid and potentially problematic).
Of course, with a guild... you'd probably want a /guild to have some sort of textual list of its members at all times anyway, if only for display purposes.