Jump to content

Adding Children to adoption scripts and quests


blindhamster

Recommended Posts

Hey folks, wondering if anyone has any advice...


I've been looking into how the adoption system works in Hearthfires as part of a mod I'm helping out with.


Initially I'd planned to do what just about every other adoption based mod appears to do and just add the child to the BYOHRelationshipAdoptable faction and set the rank to 10 (making the child available for adoption as a result)


However as the children being worked on currently are for the orphanage, I decided a better approach would be to setup the child in such a way that they get added to the orphanage by the game itself.


this resulted in me doing a bit of digging and discovering the child needed to be added to the Orphanable child list, which meant updating the input params for the BYOHrelationshipadoptableAccessor script, or doing it the way the guys at Bethesda did it with Aeta and having a script run as part of game load that would add the child to the list.


The only other criteria I can see then, is that a child seems to need to have Linked Refs for parents - and those parents need to be dead, no problem, i created an npc, placed them in the world, gave them a ref and set them to start dead.


I then modified the child in their starting cell (Bee and Barb for what its worth) added their mother as a linked ref in LinkCustom02 (which is supposed to be mother), I also for good measure added a relationship between mother and child.


According to the BYOHRelationshipAdoptableScript the child should now meet all the criteria to become orphaned and then get moved to the orphanage where they'd get managed by the orphanage quest and scripts and as a result seamlessly integrate into the world with absolute minimal interference with anything else.


But here's the problem... the above doesn't appear to be working, the child remains in their originally placed location, if I select them and enter: GetLinkedRef LinkCustom02 it brings back the ref of the mother, and prid on that ref followed by getdead confirms that she is dead... (value of 1)


this is in a clean install of the game, the only mods involved are the offical DLC and the unofficial patches.


So my question is, does anyone out there have any experience with these scripts and the adoption system as a whole and have any suggestions?





Link to comment
Share on other sites

  • 2 weeks later...

I don't know about all this stuff, but it seems like you are trying to replicate the game's existing system, which is good. Maybe the game needs to recognize that the parent was alive before they die? I have no clue, just throwing some ideas out there, but that's the only difference I can see in your approach - in the game, the parents have to actually die for the kids to be adopted, & perhaps making them start already dead is not initiating some step. I've noticed similar things with trying to resurrect characters - if they died in the game I can resurrect no problem, but if they were already dead, then I cannot. I know that's a stretch, but it might be worth trying out.

Link to comment
Share on other sites

Unless you copy the system used by the children in the orphanage to start with. They probably are using the game mechanics you're trying to replicate the best. That way you won't have to create dead parents, etc.

Edited by ToppDog
Link to comment
Share on other sites

I'm quite familiar with this system (both vanilla and multiadoption like the one from TMPhoenix)...

 

1) the function UpdateOrphanablesStatus won't run if you have already adopted the max. amount of children (vanilla = 2) and triggers only once per 24hrs (says the script but the log file shows that it runs every 4 minutes)

2) I'd rather set the BYOHRelationshipAdoptableFaction rank to < 0 (but 10 should work as well)...

3) it's not necessary to create the dead parent because the function will pass even if those linkedrefs01-04 = None

4) indeed the child must be added into the list (array) OrphanableChildren

5) the player can't be in the same location as the child

6) transfers occur only after DB01 has been completed, Constance is alive, and fewer than 7 children (vanilla) have been transfered

7) the player can't be waiting at the RiftenHonorhallOrphanageLocation

 

... if I remember it right this should be all... I've tried just to add some children that are originally not in the OprhanableChildren list (e.g. Grimvar), then killed all the linkedrefs (if any) and that's all you actually have to do... you should check papyrus log file for lines "Updating Orphanables Status", "Transferring" or "Transfer of" to see what's happening...

Edited by cubedj21
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...