Forum Overview :: Wasteland 2
 
Wherein I make a load of assumptions by Entropy Stew 07/25/2012, 4:36pm PDT
Ice Cream Jonsey wrote:

I *think* the Bard's Tale handled this by giving each character an array that had elements that corresponded to each possible weapon, armor and so forth in the game. So Snake Vargas would have an array called Possessions[] or whatever, and if Possesions[10] was equal to 2, then he had 2 long swords. That is my GUESS. It is not based on looking at any source.


Sounds like a good guess. I took a look at the Hugo manual - seems like this should work. Could you maybe use that Possesions array as the pickled hero state, and use the normal object system for active characters? You could have a CurrentPossessions property routine in the hero class which walks the object tree of a hero and returns an encoded array representing it, which gets saved into Possessions on pickling, and restored on rotation back into the active party. I don't know if that solves the static object issue, but I assume some kind of object pool for the objects to get allocated from and released to (I'm assuming we don't care about object IDs, just that we have any instance) would work.

-/ES/-
PREVIOUS NEXT REPLY QUOTE
 
Saving characters and character items by Ice Cream Jonsey 07/24/2012, 10:56am PDT NEW
    damn that seems backwards by jeep 07/24/2012, 9:46pm PDT NEW
        Re: damn that seems backwards by N 07/25/2012, 9:50pm PDT NEW
        Re: damn that seems backwards by Ice Cream Jonsey 07/25/2012, 9:54pm PDT NEW
    Wherein I make a load of assumptions by Entropy Stew 07/25/2012, 4:36pm PDT NEW
        Re: Wherein I make a load of assumptions by Ice Cream Jonsey 07/25/2012, 10:01pm PDT NEW
            yw! by Entropy Stew 07/25/2012, 10:39pm PDT NEW
                Also by Entropy Stew 07/25/2012, 10:52pm PDT NEW
                    Re: Also by Ice Cream Jonsey 07/27/2012, 6:17am PDT NEW
    Multi-dimensional array? by Flack 07/25/2012, 5:30pm PDT NEW
        Re: Multi-dimensional array? by Ice Cream Jonsey 07/25/2012, 9:48pm PDT NEW
 
powered by pointy