prideslayer Posted February 5, 2012 Author Posted February 5, 2012 Argh. It appears that the faction membership information is stored in the NPC, not in the Faction, within the ESM or ESP. This means that me adding the creatures to those factions is being "undone" in this mod (and any other mod that modifies creatures). Next version I will empty out those faction lists and add all the creatures to their factions in a script instead. This means it was probably working fine in the last version as you suspected.
paladuin Posted February 5, 2012 Posted February 5, 2012 ok well thanks for taking a look at it, will just have to tell cheyenne to stay at the saloon for now
prideslayer Posted February 5, 2012 Author Posted February 5, 2012 ok well thanks for taking a look at it' date=' will just have to tell cheyenne to stay at the saloon for now [/quote'] I'll have an updated version out soon. It's a PITA but needs to be done, I'm sure this isn't the only mod that was affected by the faction change.
prideslayer Posted February 5, 2012 Author Posted February 5, 2012 *throws up hands in disgust* I give up! This creature business has me at my wits end. First thought: Go sortof back to formlists. Create formlists to hold all the creatures, since these don't modify the creatures themselves, one list per creature type exactly as with factions. Quest script to loop through the form list entries adding the creatures to the appropriate faction. No go. For whatever reason, this method seems to like just blowing up. AddToFaction or SetFactionRank makes no difference. Thought two: Ok then, settle on SetFactionRank but instead of adding the item directly, use GetBaseObject on it first. "set tmpBase to tmpRef.GetBaseObject" and then use SetFactionRank on tmpBase. Again, no dice, just silently kills the script like the other one. Thought three: Go nuclear. Create a new ESP and drag n' drop the creatures into their factions as was done in the ESM. The ESP can then be loaded after other ESMs and ESPs, undoing their changes. This would make the ESP load order sensitive and not even really solve the problem. Loading this before the sunny companion mod will mean cheyenne is still not available for sex. Loading it after would mean the changes that mod makes to cheyenne would be lost. I'm basically at the end of my rope with this. I'm going to leave it as-is until inspiration strikes (if it ever does), and recommend that if you have a mod that alters creatures, rendering them inoperable in sex, that you edit that mod in the GECK, set sexout as a master, and add the creature back to the correct faction. Maybe someone else will have another idea I have yet to try.
saladboy21 Posted February 5, 2012 Posted February 5, 2012 Pride thanks for working so hard to accommodate us, sorry it is causing you so much frustration.
prideslayer Posted February 5, 2012 Author Posted February 5, 2012 Pride thanks for working so hard to accommodate us' date=' sorry it is causing you so much frustration. [/quote'] I'm hopeful someone else will have some ideas they (or I) can try. The real solution here would be an overall faction-fixing ESM that sexout can set as a master. That or a new NVSE command to give me the actual category of a creature. They are all very nicely organized in the GECK (e.g. Creature\Abomination\centaur", but that organization isn't exposed to scripts anywhere I can find. Maybe inspiration will come in my sleep, but I'm doubtful. As is, creatures are working better than they ever have in the past, despite being incompatible with a few mods, so I'm not too upset.
Halstrom Posted February 5, 2012 Posted February 5, 2012 *throws up hands in disgust* I give up! This creature business has me at my wits end. First thought: Go sortof back to formlists. Create formlists to hold all the creatures' date=' since these don't modify the creatures themselves, one list per creature type exactly as with factions. Quest script to loop through the form list entries adding the creatures to the appropriate faction. No go. For whatever reason, this method seems to like just blowing up. AddToFaction or SetFactionRank makes no difference. Thought two: Ok then, settle on SetFactionRank but instead of adding the item directly, use GetBaseObject on it first. "set tmpBase to tmpRef.GetBaseObject" and then use SetFactionRank on tmpBase. Again, no dice, just silently kills the script like the other one. Thought three: Go nuclear. Create a new ESP and drag n' drop the creatures into their factions as was done in the ESM. The ESP can then be loaded after other ESMs and ESPs, undoing their changes. This would make the ESP load order sensitive and not even really solve the problem. Loading this before the sunny companion mod will mean cheyenne is still not available for sex. Loading it after would mean the changes that mod makes to cheyenne would be lost. I'm basically at the end of my rope with this. I'm going to leave it as-is until inspiration strikes (if it ever does), and recommend that if you have a mod that alters creatures, rendering them inoperable in sex, that you edit that mod in the GECK, set sexout as a master, and add the creature back to the correct faction. Maybe someone else will have another idea I have yet to try.[/quote'] Hmm, oh well let it bounce around for a few days and some inspiration will come. Worst comes to worst could write a script with 200 lines of: if rPartner == NVFeralGhoul Set GroupFeralGhoul to 1 endif For each creature
astymma Posted February 5, 2012 Posted February 5, 2012 Pride thanks for working so hard to accommodate us' date=' sorry it is causing you so much frustration. [/quote'] I'm hopeful someone else will have some ideas they (or I) can try. The real solution here would be an overall faction-fixing ESM that sexout can set as a master. That or a new NVSE command to give me the actual category of a creature. They are all very nicely organized in the GECK (e.g. Creature\Abomination\centaur", but that organization isn't exposed to scripts anywhere I can find. Maybe inspiration will come in my sleep, but I'm doubtful. As is, creatures are working better than they ever have in the past, despite being incompatible with a few mods, so I'm not too upset. There are really only 2 ways you can solve this problem... Method One TAG every mod that applies appropriately and use Wrye Flash for Fallout to create a merged lists plugin OR hand make your merged lists patch yourself (my method) which is far simpler than it sounds. Method Two Place all your script faction adds in some block guaranteed to come after all esp/esm loading like the first cell change the pc does or even pressing "w" to move forward.
prideslayer Posted February 5, 2012 Author Posted February 5, 2012 Worst comes to worst could write a script with 200 lines of: if rPartner == NVFeralGhoul Set GroupFeralGhoul to 1 endif For each creature Even that wouldn't do the trick I don't think. Conceptually it would, but it would probably blow the script size through the roof too. Nevermind having to type in 200 different stupid creature names!
prideslayer Posted February 5, 2012 Author Posted February 5, 2012 Place all your script faction adds in some block guaranteed to come after all esp/esm loading like the first cell change the pc does or even pressing "w" to move forward. This part was one of the options I tried, though I wasn't as concerned with it running right away. I had it just checking to see if the from the formlist (that I dragged all the creatures into) was in the faction, and if not, it was added. Letting it run at the default rate (once every 5 seconds) wouldn't impact performance much. However, the faction add was failing both ways (AddToFaction or SetFactionRank) for many of the creatures, which bombs out the whole script, killing it and preventing it from running again. A try/catch block would certainly be a welcome addition to this shitty language. It's irritating since adding them all to the factions via the geck works just fine.
astymma Posted February 5, 2012 Posted February 5, 2012 Place all your script faction adds in some block guaranteed to come after all esp/esm loading like the first cell change the pc does or even pressing "w" to move forward. This part was one of the options I tried' date=' though I wasn't as concerned with it running right away. I had it just checking to see if the from the formlist (that I dragged all the creatures into) was in the faction, and if not, it was added. Letting it run at the default rate (once every 5 seconds) wouldn't impact performance much. However, the faction add was failing both ways (AddToFaction or SetFactionRank) for many of the creatures, which bombs out the whole script, killing it and preventing it from running again. A try/catch block would certainly be a welcome addition to this shitty language. It's irritating since adding them all to the factions via the geck works just fine. [/quote'] Did you try this method with SetFactionRank or just AddToFaction? It should work running against all base types but fail on references. I'm thinking that references that are unspawned, i.e. have never been "seen" by the player in that save, might fail randomly. I think vanilla scripts wait for player being in same cell before "promoting" boss npc's that inherit from base types to their correct rank using ModFactionRank.
prideslayer Posted February 5, 2012 Author Posted February 5, 2012 If you're particularly curious, here's a trimmed version of the quest script I was fucking around with. New quest. Formlists created for each creature type, matching the faction names. Emptied the factions and dragged all the creatures to the formlists instead. scn SexoutCreatureFactionQScript int init int nIdx int nCnt int whileCaz int whileCent ref tmpRef ref tmpBase begin GameMode if (0 == init) set init to 1 set whileCaz to 1 set whileCent to 2 endif ; Now we go through every form list, adding each creature to the appropriate faction. ; Cazadores set nCnt to ListGetCount SexoutCListCazador set nIdx to 0 if (nCnt > 0) Label whileCaz if ((nIdx + 1) <= nCnt) set tmpRef to ListGetNthForm SexoutCListCazador nIdx PrintToConsole "Adding %n" tmpRef tmpRef.SetFactionRank SexoutFacCazador 0 PrintToConsole "Added" set nIdx to nIdx + 1 goto whileCaz endif endif ; Centaur set nCnt to ListGetCount SexoutCListCentaur set nIdx to 0 if (nCnt > 0) Label whileCent if ((nIdx + 1) <= nCnt) set tmpRef to ListGetNthForm SexoutCListCentaur nIdx tmpRef.SetFactionRank SexoutFacCentaur 0 set nIdx to nIdx + 1 goto whileCent endif endif end Also tried it with set tmpRef ... set tmpBase to tmpRef.GetBaseObject tmpBase.SetFactionRank... Where appropriate, and no go.
prideslayer Posted February 5, 2012 Author Posted February 5, 2012 Did you try this method with SetFactionRank or just AddToFaction? It should work running against all base types but fail on references. I'm thinking that references that are unspawned' date=' i.e. have never been "seen" by the player in that save, might fail randomly. [/quote'] Both. AddToFaction first, then SetFactionRank. They both cause the script to bail out on the first attempt. Now, I did just "blindly" copy all the creatures, even the ones I know are not actually "creatures", into the formlists -- I did this with the factions as well, and that worked fine. That's how the ESM is setup right now. The first one it hit was 'Caz', which is under "Actors\Creatures\Mutated Insect\NVCazadores" Deleted that one from the formlist, and it failed on the next one.
prideslayer Posted February 5, 2012 Author Posted February 5, 2012 It might be possible for me to go back to the formlist method and ditch the factions, and use GetBaseObject on the reference at runtime and see if that is in the list. When I decided to go with factions it was to ensure that new creatures that get created would be 'caught' so long as they were templated from a base creature. I forgot that gbo existed when I was shooting for that as a goal. This should work though I would think: set tmpBase to actorA.GetBaseObject if tmpBase.IsInList SomeCreatureList ... else .. do the 9.2 dance .. endif
astymma Posted February 5, 2012 Posted February 5, 2012 Yeah that looks like it "should" work but we both know that ain't always the actual results hehe I think vanilla handles critters by putting all factions in the base type and then "promoting" bosses or underbosses when the player is first in their cell as a doOnce using ModFactionRank.
astymma Posted February 5, 2012 Posted February 5, 2012 Do one try with formid's instead of referenceid's. I know that's a silly thought but ya never know.
prideslayer Posted February 5, 2012 Author Posted February 5, 2012 Do one try with formid's instead of referenceid's. I know that's a silly thought but ya never know. I can't say if it's silly or not.. because I'm not sure what you mean..
zippy57 Posted February 5, 2012 Posted February 5, 2012 Do one try with formid's instead of referenceid's. I know that's a silly thought but ya never know. I can't say if it's silly or not.. because I'm not sure what you mean.. Use the FormID 00021474 instead of DeathclawFaction? I think that's what he's saying.
astymma Posted February 5, 2012 Posted February 5, 2012 Do one try with formid's instead of referenceid's. I know that's a silly thought but ya never know. I can't say if it's silly or not.. because I'm not sure what you mean.. Use the FormID 00021474 instead of DeathclawFaction? I think that's what he's saying. I meant : "000xxxxx".SetFactionRank DeathClawFaction 1 or even: "000xxxxx".SetFactionRank "00021474" 1
prideslayer Posted February 5, 2012 Author Posted February 5, 2012 That is making my eyes bleed. This is all in a script, so I'm going to have to do a GetModIndex and BuildRef on myself in order to get those values.. do you really think this has a chance at working because it smells like crazy talk.
astymma Posted February 5, 2012 Posted February 5, 2012 That is making my eyes bleed. This is all in a script' date=' so I'm going to have to do a GetModIndex and BuildRef on myself in order to get those values.. do you really think this has a chance at working because it smells like crazy talk. [/quote'] No, I meant run one test against a known ID... not whole hog with getmodindex, etc.. hehe
prideslayer Posted February 5, 2012 Author Posted February 5, 2012 GECK doesn't like straight hex IDs like that in a script. PrintToConsole "Mark 1" "0012914C".SetFactionRank "0F06A621" 0 PrintToConsole "Mark 2" Results in "Invalid reference '0012914C' (only object references and reference variables are allowed in this context)" I don't think that would save me anyway, it would be just as much work as tossing all the creatures individually in by name.. more even. Going to do a quick formlist test with the other idea and see what happens.
prideslayer Posted February 5, 2012 Author Posted February 5, 2012 Created a new formlist, SexoutCListDog. Added GSCheyenne to the formlist in the geck via drag n' drop. Stuffed this in a quest script. if (GetGameLoaded || GetGameRestarted) PrintToConsole "Mark 1" ref tmpRef ref tmpBase set tmpRef to player.PlaceAtMe GSCheyenne PrintToConsole "Mark 2 %n" tmpRef set tmpBase to tmpRef.GetBaseObject PrintToConsole "Mark 3 %n" tmpBase if tmpBase.IsInList SexoutCListDog PrintToConsole "Mark 4" endif PrintToConsole "Mark 5" endif no dice. Last thing to fire was Mark 3, no Mark 4 or Mark 5. Means the script bombed out / died on the tmpBase.IsInList. Confirmed in console that GetBaseObject is working and returns the proper ID.
prideslayer Posted February 5, 2012 Author Posted February 5, 2012 Strangely, this seems to work correctly. Eureka(?) PrintToConsole "Mark 1" ref tmpRef ref tmpBase int foo set tmpRef to player.PlaceAtMe GSCheyenne PrintToConsole "Mark 2 %n" tmpRef set tmpBase to tmpRef.GetBaseObject PrintToConsole "Mark 3 %n" tmpBase set foo to ListGetFormIndex SexoutCListDog tmpBase PrintToConsole "Mark 4 %g" foo Maybe IsInList is just crap.
prideslayer Posted February 5, 2012 Author Posted February 5, 2012 Time to get everyone angry at me again. The creature formlist thing seems to be working so far with this new method. I'll need to do more testing, but plan to put a beta for download again later. If it all works out, I'm going to have to ask everyone using the factions to switch back to the (new) formlists. Using them is a bit different from normal. IsInList appears to be bugged and not working correctly. The NVSE function ListGetFormIndex is working correctly however. It will return -1 if the form isn't in the list, or it's position otherwise. So in order to use this in if statements, you will have to change code like this: if (YOURREF.IsInFaction SexoutFacDog) ... endif To this (or something that works the same way) ref BASEREF set BASEREF to YOURREF.GetBaseObject if (0 <= (ListGetFormIndex SexoutCListDog BASEREF)) ... endif You need the "0 <=" (or "-1 < "). If you just try this: if (ListGetFormIndex SexoutCListDog BASEREF) It will not match the first creature in the list, since that creature has index 0, which will evaluate to false rather than true. An alternative, if it makes more sense to your brain, that should work is: if ((ListGetFormIndex SexoutCListDog BASEREF) + 1) I will leave the factions in place and populated for a few days (or weeks) after the release of the next version so those of you using them can get rid of them and switch to the formlists, assuming this version tests ok. Right now I believe only SexoutRocket and Pregnancy are using the factions, but I could be mistaken. EDIT: Updated to show GetBaseObject / BASEREF stuff.
Recommended Posts