Skip to main content

[Technical TL;DR] Sorting out indexing

Fallout4, like Skyrim, uses ID numbers for each sculpt in the looks menu.
Each ID assigned to a sculpt has to be unique (within the context of the looks menu), or weird things happen, the least of which is one or both sculpts sharing an ID stop working and/or fail to show up.
It's also important to get IDs right, the first time, because the list in-game sorts sculpts from low to high; the vanilla ones are in the 0-10063 range so they show up first.
Why are the vanilla ones so haphazardly sorted? itisamystery.gif, but I think it's because they were never meant to be displayed; expired's RaceMenu is what makes that possible.

When I started adding sculpts, I started at ID 500000 and increased by 1 from there.
The problem with that is, down the road, if I want to add any sculpts between the ones that I already had, I would end up having to shift sculpts "down" to make room; e.g. 500010 is "Forehead Ext" now, but if something needs its spot I would have to move it to 500011.
Indeed, I almost immediately encountered problems when adding rotations for everything, leading to the current state of the ID index.

Shifting things around, by itself, isn't terrible as long as an ID number hasn't been used in the savegame or preset. But if it has, and you have values saved for ID 500010, they continue being applied to ID 500010.
This means that in the above example, if you scale ID 500010 "Forehead Ext" up as high as it goes, but then replace that with ID 500010 "Eyes Ext", you end up with huge eyes because the game doesn't know or care what that ID is "actually" for: it keeps applying the saved scale to 500010.

It's not a world-ending problem - you can manually edit the savegame/preset to remove the IDs and their values, or simply spend some time fixing it in-game - but it is a nuisance and can seriously wreck a saved face if enough IDs are moved around at once.
Incidentally, this is why all of the new sculpts are at the bottom of the list, in their own number range; I started out modifying the vanilla sculpts (bad idea, changing the min/max values of a sculpt will cause saved values to be interpreted differently, wrecking every face ever touched by showlooksmenu), then I tried moving vanilla ones out of their IDs to make room (bad idea because of literally everything above).

Currently there is some "padding" (essentially empty space in the index, e.g. "Forehead Ext" is 500010 and the next closest is "Temples Ext" at 500020), but just prior to the first release of the mod I realized that I could add some things, things that would need room and would easily eat up a lot of the limited padding present.

That in mind, new index. This one is permanent; from the next release on, it will be "safe" to use the mod for permanent characters and presets (as long as you don't mind that adjustments made to the sculpts might cause some oddities e.g. I might increase maximum scaling of Forehead Ext by 0.1, which would mess with saved data for it --- I'll be trying to release sculpts as well-tuned as possible to avoid having to modify them down the road).


New indexing system will be as such

Base number: 500000. I expect to also be occupying 600000 and 700000 by the end of things, but who knows, counting is for neeeeeerds.
---padding 500---
xxx5xx - Main sculpt
xxxx1x - Fine sculpt
xxxx30 - Sculpt scale X
xxxx34 - Sculpt scale Y
xxxx37 - Sculpt scale Z
xxxx60 - Sculpt rotate X
xxxx64 - Sculpt rotate Y
xxxx67 - Sculpt rotate Z
---round to nearest 100---
---padding 400---
xx1xxx - Main sculpt
xxxx1x - Fine sculpt
xxxx30 - Sculpt scale X
xxxx34 - Sculpt scale Y
xxxx37 - Sculpt scale Z
xxxx60 - Sculpt rotate X
xxxx64 - Sculpt rotate Y
xxxx67 - Sculpt rotate Z
---round to nearest 100---
---padding 400---
xx15xx - Main sculpt
xxxx1x - Fine sculpt
xxxx30 - Sculpt scale X
xxxx34 - Sculpt scale Y
xxxx37 - Sculpt scale Z
xxxx60 - Sculpt rotate X
xxxx64 - Sculpt rotate Y
xxxx67 - Sculpt rotate Z
---round to nearest 100---
---padding 400---
etc. zutto~


This is a ridiculous amount of padding - room for 4 additional sculpts between the existing ones, many, many "sub sculpts" for each main one, and even several around existing sub-sculpts - but it adequately alleviates my paranoia that I'll have to shift something down the line and end up breaking everything.


I want, more than anything, for people to be able to use my mod to make their characters ASAP, without having to worry about a future update screwing their character's face up. I feel that this is the single biggest step in accomplishing that goal.

Comments

Popular posts from this blog

[Release] 0.5 is up

No more Beta? No more Beta. Patch notes: - Changed to using an NMM installer, no more juggling multiple files - Split the mod into two versions; one with single-side sculpts, one without - Rearranged the Mouth sculpts a bit, grouping the tops and bottoms together, as having them separate was driving me up the wall - Added separate Fine and Y/Z scales for the Forehead - Added a full set of sculpts for the Cheekbones, Chin, Adam's Apple, Upper Neck Sides and Lower Neck Sides - Rewrote some of the main file description - Probably something else I'm forgetting, find it and win a prize

[Curiosity/Technical TL;DR] A note on selecting sculpts using the mouse.

I'm sure anyone who's used EFS has noticed that when mousing over the face, the sculpt list will freak out and generally zoom down to the last sculpt that moves whatever is under the mouse. Generally this is the single-side sculpt for that. The criteria seems to be: Is there 1 or more sculpts that ONLY use this bone? If yes, go to the LAST one parsed that fits this condition. If no, Is there 1 or more sculpts that INCLUDE this bone? If yes, go to the LAST one parsed that fits this description. I thought I could trick the selection by putting the single-side sculpts high in the list (so they don't fit the "parsed last" condition), but since the game seems to prefer them regardless, it doesn't make much of a difference. That in mind, I'm probably going to make a shortened version of the sculpt list that excludes the single-sided sculpts, since I get the impression that people don't use them much anyway. The full list will still be available too,

[Status] Still alive

Dunno if anyone actually reads this thing, but might as well write something in case they do. I haven't felt much like working on FO4 stuff for more than a month, for various reasons, but I'm going to make an effort to get back into it. Extended stuff in the next update: Upper Nasolabial (moved by the Upper Jowls vanilla sculpt) Jaw - Outer Jaw - Inner Face - Lower Separate left/right for the eye sculpts, possible for the eyelid morphs too (need to make sure it's possible) Possibly more, but I think that would be a fair-sized update. Upper Nasolabial sculpt is done (just need to make sure I got one of the rotations mirrored), the rest should go reasonably quickly once I get on them. Update 0.6 coming soon to a game near you, probably.