Jump to content

Trying to apply scripts from another mod to a custom race


Joehtosis

Recommended Posts

My problem:

Trying to add the feet from Khajiit Paws As Ability to the races from Elsweyr: DOA.

 

Context:

Within the script of Khajiit Paws was this line:

If player.getisrace khajiit ; for "DesuChan's Kawa-Khajiits.esp" add this: || DCKawa || DCKawaKuro || DCKawaShiro || DCKawaZZPale

; for "Elsweyr Anequina.esp" add this: || ANQKhajiitCathay || ANQKhajiitCathayRaht || ANQKhajiitOhmes || ANQKhajiitOhmesFurred || ANQKhajiitOhmesRaht || ANQKhajiitOhmesTattooed01 || ANQKhajiitSuthay || ANQKhajiitTojay
I added the || or functions and names after the if player.getisrace in many different permutations, none of which worked. I tried [ If player.getisrace khajiit || ANQKhajiitCathay ], [ If player.getisrace khajiit || player.getisrace ANQKhajiitCathay ], set it all in lower case, I also tried replacing the first entry of khajiit with ANQKhajiitCathay. None of it worked.
Then I found this:
So, I tried adding ElsweyrAnequina.esp to the mod as a master. No results. I tried merging the Khajiit Paws As Ability mod with Elsweyr DOA just to see if it would even work, but TES4Edit started spitting errors at me and I didn't like that as a solution anyway. I thought of copying the races from Elsweyr: DOA into an esm to reference in the Khajiit Paws mod, but then you get load order issues where the esm is going to load first but is a child of the higher ElsweyrAnequina.esp, so I don't want to do that. I'm running out of ideas for how to approach this.
Is what I'm trying to do even possible without creating an .esm out of Elsweyr: DOA? Semtex seemed to think so by including that line I bolded, which added the race entries into the script but no matter what I do, nothing is panning out here. From what I read in that thread, without the races of Elsweyr being set in a master, it seems that I'm basically running into a dead end. Curious if anyone would know a way to work around this.
———UPDATE———
Merged the plugins using merge plugins. Still no results. To be clear, the script will still work with the vanilla khajiit race, it just won't apply to the custom races from Elsweyr: DOA, even if I merge the script into the mod containing the races.
Edited by Joehtosis
Link to comment
Share on other sites

Hmm, I would have to take a closer look into the working of the scripts, but the changelog says it's not affecting the race, so I take it the race check part you posted is inside some global kind of script and defining which races to add the ability to.

If so, then getting the plugin to "know" the custom races would be the only thing needed, yes. This is done through parenting/mastering, but there's an additional problem in Oblivion's CS with parenting to an ESP. The normal CS can't save that state. Only ESMs can be made parents/masters in that.

There's 2 ways to get around that limitation:
1) Use Wrye Bash's ESMify to temporarily turn the ESP into an ESM (it's just a header flag flip, not changing the actual file type), then open it together with your plugin as "active file" use its race IDs and save. Turn it back into an ESP through ESPify before you start the game. And keep in mind to always do it in this order every time you're going to touch your plugin again.
2) Use Shademe's Construction Set Extender (CSE) instead of the normal CS. It is an OBSE plugin extending the CS when the CS is launched through OBSE ("obse_loader.exe -editor", the manual explains it all). The CSE can define ESPs as masters/parents and also save that state.

And yes, the correct syntax for "getIsRace" only takes 1 race ID each. So your second notation with the "||" ORs was correct:

if (player.getIsRace Khajiit) || (player.getIsRace ANQKhajiitCathay)

I just prefer to also use brackets in such cases, as I've run into functions which will take everything behind them as additional parameters instead.

With all this done your plugin must only load after the masters/parents, then it should work.
However, I've also read a note in the instructions saying NPCs won't be affected immediately but take some time. So maybe you even had it working already once but never gave it enough time to see the effect.

Link to comment
Share on other sites

Thank you very kindly for the detailed response.

I'll try to approach in the way you outlined in the next few days. Just responding to note that I'm aware of the time delay and accounted for that, which wasn't fun lol. Left me paranoid each time I tried checking it if I was giving it enough time, but I'm fairly certain I did.

 

Anyway, thanks again. Hopefully I figure this out.

Edited by Joehtosis
Link to comment
Share on other sites

@DrakeTheDragon

So, for whatever reason the ESMify option under the Wrye Bash context menu is gone now. There's an Add ESM flag option, not sure if that does the same thing, but that doesn't matter because using CSE worked flawlessly!

Thanks a million for your guidance on this! I've only tried my hand at editing with TES4edit, I wasn't aware there were limitations like this.

Link to comment
Share on other sites

It's undocumented, but back in the days it was commonly known.

 

Huh, so the newer versions of Wrye Bash renamed it to reflect what it actually does. Nice to know. My version of Wrye Bash, and such my knowledge about it, is probably as old now as my last mod release, which was... aeons ago.

 

I'm glad I could help, and congrats to your release! :thumbsup: I think I'll give it a try myself the next time I reinstall EDOA into my game. (Had to remove it the last time I was able to play as it became too taxing on my PC. It's not exactly a performant one, this virtual machine.)

Link to comment
Share on other sites

It's undocumented, but back in the days it was commonly known.

 

Huh, so the newer versions of Wrye Bash renamed it to reflect what it actually does. Nice to know. My version of Wrye Bash, and such my knowledge about it, is probably as old now as my last mod release, which was... aeons ago.

 

I'm glad I could help, and congrats to your release! :thumbsup: I think I'll give it a try myself the next time I reinstall EDOA into my game. (Had to remove it the last time I was able to play as it became too taxing on my PC. It's not exactly a performant one, this virtual machine.)

 

Thank you kindly, I appreciate it. I mean I was around back in '08 but I barely knew how to properly install mods, let alone create them or mess around with scripts, so most common knowledge was likely well beyond me lol. Thankfully screwing with html and css for a near decade is translating over to this pretty well. Also yes, I find it can be pretty taxing especially with RAEVWD LODGen created. Managed to get around that by deleting most of the rocks from the far nif folder, it's at least playable for me now, although Riverhold can still get pretty clunky with how many NPCs there are. Unlike vanilla I find Elsweyr is generally pretty stable in the wilderness and starts getting rickety near towns. I guess all the sand helps lol.

Edited by Joehtosis
Link to comment
Share on other sites

  • Recently Browsing   0 members

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