Page 1 of 1

equipdoll

Posted: Fri Sep 07, 2012 1:46 am
by minmay
I want to change the equipdoll for a race. But adding equipdoll = "alchemist_golem" to dwarf.lua, say, doesn't seem to do anything.

So...what do I need to do to give a race a specific equipdoll?

Re: equipdoll

Posted: Fri Sep 07, 2012 7:04 pm
by darkgod
It should work. Can you make sure once generated game.player.equipdoll is correctly set ?

Re: equipdoll

Posted: Fri Sep 07, 2012 8:06 pm
by minmay
game.player.equipdoll doesn't appear to exist. Lua console doesn't find it, grep doesn't find it...closest things would seem to be self.actor.equipdoll and self.c_doll, but self is a nil value...

Re: equipdoll

Posted: Fri Sep 07, 2012 8:43 pm
by edge2054
How are you putting it on the race?

I just tested in game and doing game.player.equipdoll = "alchemist_golem" works fine.

So you must not be adding it to the birth descriptor correctly or the default birth descriptor is over writing it. You may need to toss it inside a generic resolver function to make sure it happens after everything else is resolved so it's not over written.

Maybe past your birth code?

Re: equipdoll

Posted: Sat Sep 08, 2012 12:32 am
by minmay
edge2054 wrote:Maybe past your birth code?
What I did to try and minimize the chances of something going wrong was simply this - the only change was that second to last line. I tried putting it in a few other places too, though I'm afraid I can't remember exactly where. The game doesn't seem to react in any way.

Code: Select all

newBirthDescriptor
{
	type = "subrace",
	name = "Cornac",

...

		starting_intro = "cornac",
	},
	equipdoll = "alchemist_golem",
}

Re: equipdoll

Posted: Sat Sep 08, 2012 10:56 am
by darkgod
this needs to be in the "copy" table of the descriptor

Re: equipdoll

Posted: Sat Sep 08, 2012 2:17 pm
by minmay
Wow. Sorry about my Sep 7 posts. I may have been on a drug or two.

Anyway that works and I feel stupid