hey I got a silly idea if you create a fort, then use turn the site into a hamlet, then dump a companion there will the companion become the inn keeper of the place making it save for sleeping or do we have to add the "is resident" flag on(I still couldn't find the Zombie/skeleton flags but found the 'wagon' 74 flag)?
70
also thanks for the quick fix.
edit:new discovery today
if a creature that was classed as a pet dies from abandonment when revived they will have all limbs non damaged.
so this might mean there is hope for a full revival with out the harsh effects of death.
edit: well after checking the wiki it's 12 and 13 which are the zombie and skeleton flags.
Hmm I got a working zombie revival but the kicker is that In adventurer mode harming the same creature twice will lead to a crash as found out again from having my awesome BogeyHuman go nuts after the zombie orc who body was turn into a bag little while after his death (made by his killer the bogeyhuman)
function adv_tools.undead()
--this will revive a dead soul from the grave as a somewhat zombie... chances of it following you not so much
myoff=offsets.getEx("AdvCreatureVec")
vector=engine.peek(myoff+16,ptr_vector)
indx=GetCreatureAtPos(getxyz())
flg=engine.peek(vector:getval(indx),ptr_Creature.flags) --get flags
flg:set(1,0)
flg:set(12,1) --note this person is now part live mostly part dead to fully rez further test on bringing back body parts will be needed.
engine.poke(vector:getval(indx),ptr_Creature.flags,flg) --save flags
end
been testing something I wonder would this code scan all creatures in the area then select them?
it's for a zombie mod I'm pitching in for.
function tools.selectall(vector)
tnames={}
rnames={}
--[[print("vector1 size:"..vector:size())
print("vector2 size:"..vector2:size())]]--
for i=0,vector:size() do
--print(string.format("%x",vector:getval(i)))
local name=engine.peek(vector:getval(i),ptt_dfstring):getval()
tnames[i]=name
rnames[name]=i
end
end
indx=rnames[r]
if indx==nil then return
end
end
return indx
end
function tools.zombiemode()
myoff=offsets.getEx("AdvCreatureVec")
vector=engine.peek(myoff+16,ptr_vector)
indx=tools.selectall(vector)
lzombie=engine.peek(vector:getval(indx))
flg=engine.peek(vector:getval(indx),ptr_Creature.flags)
if ~=flg:(1,1) then
flg:set(1,0)
flg:set(12,1)
flg:set(17,1)
end
end
engine.poke(vector:getval(indx),ptr_Creature.flags,flg) --save flags
end
end
I kinda got a little 'End' happy here.