Wednesday, January 31, 2024

ODOS Update - Bookcases, Armor and Clothing Display, and a lot of polish

Tons of work has been done since last update. A few new features, and a lot of polish and fixes, which I will go through one by one.


First, the new stuff:


Bookcases


I managed to replicate the bookcase system from Skyrim. The bookcases themselves are activators using furniture models. This makes it easy to make new bookcases with custom models, as you just need to make a new activator, choose a NIF file, and slap on the script, and you are good to go! 


Once the bookcase is placed in a cell, you parent to it book markers, which will not only serves as book location, but also defines how much the bookcase can hold. These markers can be put in any position you want. If you place more books in the bookcase than there are markers parented to it, then any book that doesn't fit on the shelves will be returned to the player. You can see how it works in the video. Also, once the book are on the shelves, they can be picked up like any object, it doesn't affect the script.



These bookcases do not work with the LOTD-style collection system of my mod. Instead, these are for any extra books you have lying around, and want displayed. There is a book marker that can be filtered and works with the collection system. 


Armor and Clothing Displays

While figuring out displays for amulets and rings, I found a new way to display them that work with all clothing and armor. This means now that there are two ways to display armors and clothing, mannequins and armor stands!




This new system doesn't use the function SetModelPath, but I found out that it needs to change the Ground model of the armor, so I have to use the SetMaleGroundPath and SetFemaleGroundPath functions, and then do the trick I used to make the item "forget" it has havok. Works like a charm!


One thing of note: this type of display uses the CloneForm function, once per display, which creates a duplicate reference and baseform that is saved in the savegame. This can increase bloat on the save file, but nothing significant (think of each display counting as a player-made potion or spell in game). If planning on using them, don't go wild and make a million of them, and you will be just fine. (I wish we had access to a function to delete Cloneforms, like in Fallout 3, or better yet, a way to use string variables in the SetMaleGroundPath function. Then I wouldn't need cloneforms).


Polish

Now for the smaller stuff. There were a lot of bugs and little things I forgot to add to some of the scripts, all of them fixed now. For example, mannequins can now handle leveled items, which I forgot to do before... whoops. There was also a bug where sometimes the mannequin would stop working if you changed the gender. That is also fixed. 


Also, I made it so that mannequin can always see you, so you can't train your sneak in front of them, and cheese some levels, lol.


A nice change I've made is to the Display Ledger. Before, all it did was give the option to drop items to be displayed, and check how many displays are filled. Now, you see that number immediately, and it has a new option, which is to check what is missing!



When that option is pressed, it will open up a book that will list all displays that don't have an item yet (those that have filtered items). It is a very useful feature, that will help players figure out what they still need to get to finish a collection!



There are also a lot of minor fixes and some finishing touches, but with that, the display part of ODOS is... complete! I think.


With that done, I will turn my attention to the Storage system part of the mod. Like I said before, it should be way easier! I hope...


Saturday, January 20, 2024

ODOS Update - Mannequins and Visual Models for the Weapon Racks!

Big progress has been made since lasts update. On a smaller note, there are now activator markers for misc items of various sizes. They are for things like books, hourglasses, sigil stones, skulls, plates, etc... They function like the weapon displays, except that they can only work with a reference item as a filter (since you can't wear misc items or books lol)

 


Like I said, they come in various sizes, and if the item you want to place there is bigger, then just scale up the marker to make it aproximately the same size. Easy!

Also, each model comes with 3 variations, with the model's point of origin at the bottom, center, and top of the model. This is to accomodate certain items that have strange origin points on their models (looking at you, bust of Llathasa and fur pelts, among others...). 


 Now for a big update:



Mannequins!


Clothes and Armors now have displays! I found that the display system I developped for weapons (using Update3D) doesn't work on armors and clothing, because their models are handled differently. I had to make a different method, so here are mannequins!

Just like the weapons, it is an invisible activator you put in the game, and in game, a mannequin is placed at its position. 

They work like the Skyrim mannequins, in that they only accept armors and clothing. Objects like weapons, shields, rings, or amulets will just be returned to the player.

Just like the weapon displays, mannequins can be filtered by parenting reference items to the marker. Then, the mannequin will only accept those items. Also, when filtered, the mannequin can be connected to the LOTD style display system, and the auto display system will work and count it toward the total display count.

The mannequins can of course be simply dragged in to be used normally. You can then place clothing and armors to it and it will display them. You can also change the mannequin's gender to your liking.

See the video for a demo!


Visual models for the weapon displays


I have modeled a few plaques to be used with the weapon displays. They are static items that have no collisions, they are just for decoration. They come in 4 different colors: raw wood, red, green, and blue. There is also a square model, for shields and larger setups.

There is also a metal "hook" model, to make it look like the item isn't just floating in front of the plaque. That model is separate, and can be placed anywhere. You could even just use it on a wall, and not use the plaque, the choice is yours!

 


  

Almost there

There are still a few things I need to do, but I am very close to having the display system complete! I still need to get a solid display for amulets and rings, which are technically clothing, and my system is a bit glitchy with it, so I need to figure that out. 

And I have an idea for making Skyrim-like bookshelves, where you click on a shelf and it opens an inventory where you place books, which then gets dropped on the shelf. I think I can make it work, but no promises!

Once those two are done, I will turn my attention to the storage and sorting sytem part of the mod, which should be easier in comparison! But I'd say the mod is close to 75% done!


On a side note, if you are looking for fancier mannequins, that can accept weapons and have poses etc, check out Reznod Mannequins, which is a great mod! They won't work with my LOTD display system, but they are still great if you want more personalization on your mannequins!

Sunday, January 7, 2024

ODOS Update - Massive breakthrough, new model handling, and skyrim-style weapon racks!

I'm pretty excited to say that I have managed to solve one of the biggest problems I had when creating the original display system: item physics, or havok. It was so much of a problem that I resigned myself to making models for each display where I manually removed the havok using Nifskope, a process that, although simple enough, was tedious and really slow. But now, Nifskope is no longer needed!

Finding this solution meant I went back and took a totally different approach to the displays, which in turned enabled me to have as close a weapon rack system as Skyrim's!

And what is even better, with this new system, modders only have to drag a display in, make it a permanent reference, and it is good to go! If you want it to filter that display to accept only certain items (so they act like in Legacy of the Dragonborn for Skyrim), simply drop the item you want displayed in a cell (preferably in a separate unaccessible cell), parent it to the display, and you're done!

    These weapon marker are visible in the CS for placement, but invisible in game.

The only difference to Skyrim's system is that I had to make separate displays for each weapon type, because of the way the models are positioned. For example, placing a warhammer on a sword display will work, but the hammer will be upside down...

 


The New Method

Item havok in Oblivion is baked into the item mesh, so even if the model is used on a static object (like tables or walls), it can still be moved. But I noticed something: until the item is triggered, either colliding with something or grabbed by the player, the item is "static", the physics aren't being calculated by the engine, and it acts just like any static object, so its performance is good. 

Then I discovered that the OBSE function Update3D, which reloads the item's model, resets that trigger! At least, on models that have just simple collision boxes (like weapons). So my script detects when the item placed moves too far away from its original position (with a small deadzone to avoid spamming the function all the time), updates its model, and repositions itself, returning to its static, non-havoc, state. The script has very good performance, as shown in this stress test, where I run over 1000 swords. I added some earlier attempts too, just to show the difference...



As for items that have more complex collision boxes, or several points of physics, Update3D alone doesn't reset the havoc. Items like floppy clothes or armors, or quivers, which have one collision for the arrow being shot, and one for the quiver itself. However, I found a solution: As soon as the item moves too far away, I change its model to an empty .NIF file I made, which has no havoc. Waiting about 1.5 seconds gives time for the game to "forget" that item ever had physics, and when I return it to its original model, it is once again static! So some items will be a little slower to display, but I can live with that for now.

Now I just need to look again at the auto sorting to send those items to the display from a remote location, and I will be well on my way to a big milestone in ODOS! 

 

In other news, I have a pretty robust storage system created, which I will be developing more as soon as the display system is finished.