Saved Games

Everything about development and the OpenMW source code.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Saved Games

Post by scrawl »

The actorIds appear to work. But I just noticed this is not enough for saving projectiles (which currently use handles for keeping track).

Projectiles I have seen are either ESM::Weapon or ESM::Static, but in theory could be anything.

What options do we have?

1) Move actorIds to RefData.

2) Do not manage projectiles as MW-objects. Instead only use the MW-base-object they use to determine the model to create, and store the base object id in the projectile manager for determining the effects on hit. Note: collisions are already handled manually anyway.
- This would also solve a glitch that allows you to pick up a projectile mid-air with the spacebar.
- No need for object garbage collection (which is a nice thing, projectiles are probably the most used objects with a short lifetime. Depending on how long you play, there'd be tons of garbage left behind in cells, if projectiles were MW-objects).

3) Create a custom MWClass to use for projectiles, which would be mostly a proxy-class, but stores its own actor-ID, too. Add a facility to create a reference with a custom MWClass. Note: this would only work if the delegate MWClass does not already use CustomData (for Weapon and Static, it would be fine)
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Saved Games

Post by Zini »

#1: Bad. We already have too much redundant shared data. LiveCellRef is quite bloated.

#2: Sounds reasonable.

#3: Better than #1, but I would prefer not to extend actorIDs beyond actual actors.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Saved Games

Post by scrawl »

2) was my preference too. Will give it a try.
Post Reply