Cross-mod feature - Implementation question(s)

Post » Mon Aug 19, 2013 11:56 am

I'm currently working on two separate mods, for the purpose of this discussion, we'll call them ModA and ModB.

I want to add a special feature to ModB which unlocks only if ModA is in the users load order.

I already know how to let ModB know ModA is running by checking for the existence of a form unique to ModA through the power of GetFormFromFile(). The bit I'm having trouble planning out is the feature itself.

Here is what I need to happen:

ModA has added a new activator, then references of this are placed in multiple exterior locations all over skyrim.

Now what I want to happen is a quest in ModB gets Start()ed when the player walks into a cell containing ModA's Activator and the ObjectReference of the specific Activator gets saved either as a property in a script or by filling an alias in the quest (just so I can use it to MoveTo() a special xmarker to it in the near-future)


Anybody got any ideas?

- Hypno
User avatar
Robyn Howlett
 
Posts: 3332
Joined: Wed Aug 23, 2006 9:01 pm

Post » Mon Aug 19, 2013 7:26 am

OnCellDetach, have modA's activator, well, do whatever.

the thing about GetFormFromFile is this: you can totally use this object from the other mod. so if that "form" from the other file is a quest, you can start, stop etc it from the other mod, if it's a form list, you can add and get forms and so on and so on. so like, if it's an activator you can just activate it to pass ref. or if it's a form list, have the activator with the OnCellAttach add itself there. and so on.

hope i got across what i mean and that's not too crude here :-)

edit...: or like make your FormFromFile a keyword and have mod b look for that, you'd not need CellAttach on mod a's activators then

edit2...: an example how i set up such things: in every mod, i have a permanent quest with a player alias, OnPlayerLoadGame, this activates a master activator and does nothing else than this.

the activator now has all the stuff scripts on it like: checking if the other mods are still there, then enabling/disabling items for them as needed and such.

and i have an empty form list in every mod that's my FormFromFile (0x00AAAAA for me), which i use to pass stuff between mods.

so in your case, i'd like, put said keyword in other mod's trans-form list (if keywords can be put in form lists, not sure, else i'd make the kw itself the FormFromFile), other mod gets it there (0.5 sec delay to make sure it's already in there work fine), fills it into a keyword property and have check for this, conditioned to a bool on your master activator you set according to if that other mod is there

User avatar
Rachel Eloise Getoutofmyface
 
Posts: 3445
Joined: Mon Oct 09, 2006 5:20 pm


Return to V - Skyrim