Jump to content

Doll Possession Mod?

Recommended Posts

I'm currently trying to create a mod in which you can switch between two characters: one being the doll maker and the other being the doll. You can create other "minion" dolls as the dollmaker, kind of like how the Codex Umbra works, but you can't control them until you switch to the doll character. I've currently got an idea of how to make the transformation work, but it's being complicated by the fact that I want the body of the dollmaker to remain on the floor once you transfer to being the doll (and vice versa).

I've thought of making it so that every time you switch back to say, the dollmaker, you just switch back to being the dollmaker while the item for the dollmaker's body is deleted and the item for the doll's body is spawned anew. But this seems to be faulty because whatever damage the doll sustained while active needs to be retained in the new "doll body item" so that you, as the dollmaker, can repair it.

(I'm adding this just in case it complicates any matters, but the item for the dollmaker's body is going to act a little like food, so it has an expiration date that, upon reaching, will despawn the body and replace it with some bone shards and the ghost of the player.)

(Also please note that this is my first time creating a mod, so I might be a little slow on the uptake. unu)


Link to comment
Share on other sites

So unless I miss my mark - similar to as you describe, wouldn't you just...

  • have the character's definition have two states, person & masterdoll
  • on <event> toggle between the states
  • on <toggle> spawn variable-enabled prefab in the world (either body[indestructible] or doll) - this way you don't ever need to 'recreate' the player
  • On toggle away from doll-state, store a variable in the player for the doll's dmg stats
  • On create of doll prefab, pass over the doll's dmg stats such that the doll item needs repairing

Should be as simple as creating a named (create variable to store the thing) doll body prefab, and re-defining it repeatedly in the player's prefab?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...