Delzaron Posted November 20, 2016 Posted November 20, 2016 Hi I wish to develop some cross over quests in my mods. Projects are : - a cross over between TID and AFS : Improve the BroodMaiden by making a ritual with Kolduns (so, a link between the Whispering One, and Vulkos + Phage + Katalia). And there is Arachne, a Koldun who lives ina falmer cave, and loves spider. So, there is something for a quest between Forsworns and Ibn. - I implemented some links between TID and FTD, TID and Sexlab stories, and TID and captured dreams, but it don't really works... - maybe some stiff between other mods... - Night Mistress Mansion will be based on that... The only things I know for that is : If Quest.GetQuest("SimpleSlavery") sendModEvent("SSLV Entry")else debug.messagebox("you don't have Simple Slavery. Lheelvu can't sell you")EndIf Problem is I'll need to detect actors, to register them in Aliaises, and to modify the actors factions by using other mods factions. For example, in a cross over between TID and AFS, I need to add to the player and Arachne the aTIDfalmerfriendfaction
heroko Posted November 20, 2016 Posted November 20, 2016 i dont know about this but wouldnt it be possible to just make an patch or something that uses both mods as masters to handle that ?
nosdregamon Posted November 20, 2016 Posted November 20, 2016 Possibly with GetFormFromFile http://www.creationkit.com/index.php?title=GetFormFromFile_-_Game something along the lines of actorRef = Game.GetFormFromFile(0x0000ABCD, "tid.esp") As ActorRef But, I haven't gotten that to work so far...
Content Consumer Posted November 20, 2016 Posted November 20, 2016 SkyrimLL is very good at doing things like that. I'm not certain how he does it all the time, but you might consider asking him about it. A good way to do things like that is with storageutil variables. They're quick, easy, and have a very low papyrus footprint. The only problem is that they can't be directly used in dialogue conditions, so if you want to do that you'll have to make a workaround, like setting a mod global variable based on the storageutil variable and then referencing the global instead. Probably the best way to do it is with a combination of modevents and storageutils. If Quest.GetQuest("SimpleSlavery") sendModEvent("SSLV Entry")else debug.messagebox("you don't have Simple Slavery. Lheelvu can't sell you")EndIf This will work, but generally speaking getquest() is not as well regarded as getmodbyname() because it puts a heavier load on the engine. getquest() will look at every single quest in the game, including base games and all loaded mods, one at a time, until it finds the quest you've specified. getmodbyname() also iterates through a list, but only to a maximum of 255, because it only looks for .esp and .esm files. I'm not certain, because I've never heard of this happening, but I assume that getquest() can also return a wrong result if two modders use the same name for their quests (quests with the same name but different form IDs are valid I believe). It's probably a one-in-a-million chance and, for that matter, probably has never actually happened, though. getmodbyname() isn't ideal, in fact it kind of sucks, but there's no real better way to do it. i dont know about this but wouldnt it be possible to just make an patch or something that uses both mods as masters to handle that ? That's probably a much better way to do it. I've never encountered a problem making an .esp that uses two .esp files as masters, but I've read that it can cause problems (using multiple .esm files as masters is just fine). Possibly with GetFormFromFile http://www.creationkit.com/index.php?title=GetFormFromFile_-_Game something along the lines of actorRef = Game.GetFormFromFile(0x0000ABCD, "tid.esp") As ActorRef But, I haven't gotten that to work so far... Getformfromfile is an excellent way to do it. There are potential problems with it though, primarily it can lead to saved game corruption and instability if a referenced mod is uninstalled mid-game. Ideally you'd put your getformfromfile() function inside an if statement checking getmodbyname(), or some other way of only calling getformfromfile() if the mod exists. For example, you could make a modevent in TID that uses getformfromfile() and references TID, then call that modevent in AFS. @nosdregamon, IIRC your problem is in "actorref" instead of "actor" I think. Not certain, but for example this is a line of code I use in CCAS that uses getformfromfile: armor MME_MilkCuirass = game.getformfromfile(0x04005b10, "MilkModNEW.esp") as armor I'm creating a new armor object, not just a temporary reference. Not sure if that's your problem, but it might be?
Guest Posted November 20, 2016 Posted November 20, 2016 Aliases are difficult to get with gettFormFromFile. But actors are easy. So you can just create alias clones in one quest and then do something like if Game.GetModByName("SimpleSlavery.esp")!=255 && Game.GetModByName("SimpleSlavery.esp")!=-1 ; We have the mod myAliasClone1.forceRefTo(Game.getFormFromFile(0x1234566, "SimpleSlavery.esp") as Actor) myAliasClone2.forceRefTo(Game.getFormFromFile(0xabcdef0, "SimpleSlavery.esp") as Actor) endIf
nosdregamon Posted November 20, 2016 Posted November 20, 2016 @nosdregamon, IIRC your problem is in "actorref" instead of "actor" I think. Not certain, but for example this is a line of code I use in CCAS that uses getformfromfile: armor MME_MilkCuirass = game.getformfromfile(0x04005b10, "MilkModNEW.esp") as armor I'm creating a new armor object, not just a temporary reference. Not sure if that's your problem, but it might be? I think, back in the day I wanted to get all Actors by their ActorBase, but it was more of a "ProofOfConcept", than an actual problem, anyways...
Delzaron Posted December 11, 2016 Author Posted December 11, 2016 I'm trying something.... Function SetBroodAlias() If Quest.GetQuest("_SLS_QST_Encounters") Alias_aTIDInfo.forceRefTo(Game.getFormFromFile(0x1234566, "SexLab-Stories.esp") as Actor) else Alias_aTIDInfo.forcerefto(aTID2WhisperBookRef) EndIfEndFunction I just need the ID of the BroodMaiden, but, if it's work, that's mean I could use Lotte and the cyborg in TID ! And AFS characters !
Delzaron Posted January 2, 2017 Author Posted January 2, 2017 Function SetAlias() Alias_aTIDChaurTegoth.forceRefTo(Game.getFormFromFile(0x8a2176d4, "zThingsInDark.esp") as Actor) Alias_aTIDWhisperingOne.forceRefTo(Game.getFormFromFile(0x8A486E6C, "zThingsInDark.esp") as Actor) Alias_aTIDAzenithDerleth.forceRefTo(Game.getFormFromFile(0x8A019C08, "zThingsInDark.esp") as Actor)EndFunction It should work, right ?
Guest Posted January 2, 2017 Posted January 2, 2017 Function SetAlias() Alias_aTIDChaurTegoth.forceRefTo(Game.getFormFromFile(0x8a2176d4, "zThingsInDark.esp") as Actor) Alias_aTIDWhisperingOne.forceRefTo(Game.getFormFromFile(0x8A486E6C, "zThingsInDark.esp") as Actor) Alias_aTIDAzenithDerleth.forceRefTo(Game.getFormFromFile(0x8A019C08, "zThingsInDark.esp") as Actor) EndFunction It should work, right ? Better if you check before that "zThingsInDark.esp" is available. Or you may get a None object as result, and then do some potential damage to the other quest.
Delzaron Posted January 2, 2017 Author Posted January 2, 2017 Function SetAlias() Alias_aTIDChaurTegoth.forceRefTo(Game.getFormFromFile(0x8a2176d4, "zThingsInDark.esp") as Actor) Alias_aTIDWhisperingOne.forceRefTo(Game.getFormFromFile(0x8A486E6C, "zThingsInDark.esp") as Actor) Alias_aTIDAzenithDerleth.forceRefTo(Game.getFormFromFile(0x8A019C08, "zThingsInDark.esp") as Actor) EndFunction It should work, right ? Better if you check before that "zThingsInDark.esp" is available. Or you may get a None object as result, and then do some potential damage to the other quest. Yes, I added a getquest condition, like simpleslavery one... And it's only the third choice... the two previous choices are only Madanach dependant. By default, the script make a setstage to 200, and complete the quest.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.