[Lyralei's Pose Addon Guide] - Creating your own categories
Project: Lyralei's Pose Addon
by Lyralei
Uploaded Nov. 27, 2024, 5:16 p.m.
Updated Nov. 27, 2024, 5:16 p.m.
So, you just downloaded my Pose Addon mod, but you want to customize your own interactions, instead of using the default? Here's a quick guide on how to do that!
What you need:
- Lyralei's Pose Addon (duh :p)
- S3PE
- (optional) The text editor of your choice. I like to use Visual Studio Code for this, as it tells me in red whether a tag is incorrect.
Finding the XML:
Once you've installed S3PE sucessfully, go to the folder you installed the Pose addon. It's named "Lyralei's Pose Addon.package" :) And open this up in S3PE!
Now you should see this! The XML we want, is called "LyraleiPoseAddon_Categories. Click that so it's highlighted like in the picture.
Then, Right Click > Export > To File...
And save it somewhere you can find it back :p It's fine to rename it to something else, as long as it keeps .xml at the end!
Editing the XML:
And now we've gotten to the tricky part, the editing of the XML ;)
Find the XML file we exported, and open it in Notepad, or any text editor you prefer! (I will use Visual Studio Code)
Now you may look at this and think "AHH! Run! Scary tag thing!" and poke it with a stick, or attempt to set it on fire, but that's not what we're doing here! (plus that would get pretty expensive I can imagine :p). I'll explain what this scary beast does and what we can edit! :)
The XML Layout:
The XML, just like in game, comes with 3 "main" categories: Category (lol), Emotion and Common. Generally speaking it doesn't matter which one you edit your stuff in, but for your own sake, it may be easier to put it under the right category.
To find the category, look for the MASSIVE text above it. It looks something like this:
I will edit mine under "Category".
Now you may have noticed that, if you have a little bit of XML or HTML editing experience, that there is an empty one! DO NOT DELETE THIS! If you do, that may set your game on fire! (kidding, it will just mean that the entire "Category" list won't load in-game anymore 😉)
Note that each category has this 'empty' chunk of lines. It's really just a reference for the mod and EA's XML loader to realise "Ah! We're importing something! And this is what it looks like, cool!" Otherwise it get's confused and throws a tantrum, and we don't want that 😉
The XML Keyword_category Bit:
This is where the magic happens! This is what we see in our interaction list, but also, what the keyword filtering system figures out!
As you can see, the Tag is at the top and bottom. Except that the bottom one comes with a / at the beginning (). Every single time a "tag" closes with a /, it tells the computer that it's done reading that line and grabbing the keywords or name we put in.
However, you also see the same thing with "name_category" and "Keywords". It has a starting tag, and it eventually ends with a /.
Now let's see what happens in Visual Studio Code if we happened to not end it with a /
It highlights it in red! :) That way you know you accidentally screwed up the tags. To fix this, we add a / right after the < sign on the SECOND we see. With other words, we now have this:
But! If you're careful, you probably don't even need all this information at all ;) I'm just putting it out there, in case it does happen.
What is Name_category and Keywords?
name_category = the "main" category name you will eventually see in the pie menu. Keywords = The word that will help filter out the pose in the end and puts it under the name_category's interaction's pose list eventually.
A few things you need to know about the way Keywords are used internally: 1. a keyword will also be considered valid if part of the word is fine! So for example, if the keyword is 'Kiss' and the pose's name is 'we kissed', then it will consider this pose valid, since the first 3 letters of 'kissed' are 'kiss'! :) So no need to include past tenses! 2. You can actually do entire sentences! I have one that says "roll eyes", although here it's good to also add "rolling eyes" since here the code is precisely looking at a match of 2 words, rather than one word. Though, don't actually write an entire sentence, as it will screw up your search result. But pose pack names or such are totally fine! 3. EVERY ENTRY needs a comma (,) at the end! If you don't, it considers it multiple words. 4. Once you get to your last keyword, you don't need to finish it with a comma. just leave it blank. (so no period, additional comma, nothing!) 5. Think about the words. Some words have the same meaning (think: bow can be a weapon, but also a gesture). 6. Make sure they are words that pose creators would use! (Sit is much more likely to be used compared to settle for example). 7. Keep in mind to include british and american english words. You will thank me later for that one if you share your xml file with the word ;p
Making your own Category/Emotion/Common chunk:
Now with all that out of the way, let's get to real business!
To make things easier, what I always do, is copy paste the empty value we see at the top, and PASTE IT BELOW THE EMPTY CHUNK!!
We should now see something like the highlighted bit I highlighted! (To emphasise on BELOW the Chunk!!)
Okay, well, let's first figure out a name for our new category. Let's say I want to add a "friendship" category, I will now type between the >< of the two "name_category" tags, "friendship":
Great! But what about the keywords...
Assuming that you've read the bit of "A few things you need to know about the way Keywords are used internally" you know that we need to seperate each keyword by a comma. But we also need to come up with some keywords to begin with! So for friendship, I will add the following:
friend, reminisce, reminiscing, memory, memories, nostalgia, listen, listening, care, caring, empathy, understanding
And put these between the >< we see between the two "keywords" tag:
And that's it! :) You now made yourself a category! Wooh! :D The same principle counts for the Emotion and Common categories.
Importing it to the Game:
There are 2 ways you can do this: 1. You make an override mod essentially with your now new xml file. Though if that's the case, you shouldn't have renamed your xml file. Either way, I will help you out if you did in the "making an override mod of the XML" bit 😉 2. You override my XML file.
Making it as an Override Mod: It's really not as complex as it sounds! What we do is:
- Open S3PE. A blank, new package file with nothing in the right screen.
- Go to File > New
- We drag/drop our edited XML file into it...
And once we see this screen, make sure that IF you had renamed your file, that:
- Type says _XML 0x0333406C
- Group you put 0x0 (it will automatically add the additional 0s ;))
- Instance Says 0xE18147DF7D2C958D (or you put in LyraleiPoseAddon_Categories in the name, and press "FNV64" ;))
Make sure that ALL these numbers are correct! The reason all the numbers need to be the same as the original mod, is so that the game thinks "Hey, there are 2 resource keys with the same name... I guess I will load in the latest version I found!". (And now you know how EA made their patches too ;D))
IMPORTANT: Now save it and Dump it in your "Overrides" folder!!! That is, OVERRIDES FOLDER, again :p Because you really do NOT want to put it in your MODS folder, otherwise my mod will take over and eat your xml for breakfast. (as in, it won't override my xml... just like what the folder name implies... )
Override my XML file: IF YOU HAVE DONE THE OVERRIDE METHOD, PLEASE SKIP THIS!
- With S3PE, open up my Lyralei's Pose Addon package.
- Click, just like when we exported the file, the "LyraleiPoseAddon_Categories" XML resource in S3PE.
- Right Click > Replace...
- Go to your edited XML file... And Save! Wooh! You now edited the xml of the mod! :D
That's it! May you make many more cool and better categories suited for your game! :)