mxwqtkl
Members-
Posts
39 -
Joined
-
Last visited
-
Yeah I was able to accomplish what I wanted with a combination of event linker + a few lines of script. I've since started working on my own VR project from scratch though, since there really doesn't seem to be a lot of interest in BaS modding, at least not in making new enemies.
-
They were trying to walk me through using the weird in editor linker system instead of a proper script. I've been doing some more tinkering with the code and I'm sure it's doable with a little more knowledge. I accidentally made a gun that shoots people in half while trying, so that's progress. Also someone made a better alternative to my script, so check that out if you wanna make some enemies: https://github.com/loukylor/BasSDK/tree/CreatureSDK
-
I did load it up in VS and browse the list of methods and properties, but that's still not a lot to go on for me. I just barely know how to use Unity, and had to spend a lot of time in its API documents just to get the brittle script I did make working. Also I forgot a very important step in my write up. There's a bug where if custom NPCs are pooled and then dismembered, they respawn with invisible limbs. I already made a bug report about it. Really, there's a lot of things I wanna do that are currently held up by bugs. Eye animation is bugged, pooling is bugged, cutting torsos in half is bugged (though someone made a mod that circumvents the bug, they haven't responded to me with how they did it). I also want to make a component that tags a ragdoll part for easy slicing. I made a cyborg enemy with armor plates and glowing weak points. I want to script it so hitting the weak points immediately slices the ragdoll part for the armor plate. I tried making it work with linkers, but even with a developer trying to help me it wasn't working. It sucks because it's a cool effect if you turn on easy dismemberment, but that also means the head and limbs come off easily. Probably gonna have to dive into scripting for that.
-
Same person. I'm trying to drum up interest in modding enemies into the game since I think it's a great sandbox for that. The rigging process is simple enough since it's just Unity humanoid/mechanim. Grab the script I posted on Nexus to handle copying the bone information into the Unity components and a few other housekeeping measures and you can get human-shaped enemies up and running quickly. I've been poking at some of the event linker stuff they offer but haven't really looked at the scripts themselves due to a lack of api documentation. I'll get there eventually, probably.
-
People are sleeping on modding this game. Here's how you can bring your favorite Skyrim stuff over to play with. What you need: The latest Blender - https://www.blender.org/download/ The NIF plugin for it - https://github.com/niftools/blender_niftools_addon A skeleton to work off of. I'm using this one - https://www.nexusmods.com/skyrim/mods/98111 A texture editor of some sort. In this tutorial I'll be using chaiNNer to do my texture conversion - https://github.com/chaiNNer-org/chaiNNer and a little bit of Krita for editing -https://krita.org/en/ The BaS SDK - https://github.com/KospY/BasSDK/ Unity Hub - https://unity.com/unity-hub My BaS NPC script for Unity - https://www.nexusmods.com/bladeandsorcery/mods/9146 An outfit mod you want to make into an enemy or avatar. You can certainly bring over weapons as well, but the offical wiki covers how to make those already. Install all that mess. Open up the skeleton file, and import all the pieces you want to make into an NPC. Here I'll be using an older mod I made myself, plus the body pieces and skin textures it requires. Note that multiple armatures come in while doing this, since each NIF contains the bones that mesh requires. What I'm going to do is rename the full one to "Rig" (important for the Unity script later) and attach everything to that skeleton, making sure to apply all transforms as I go. You want your model to be human scale in Blender and facing the negative Y. I'm also gonig to lift up my character and move the toe bones down, since she's wearing heels. In Skyrim this had to be corrected via a mod at runtime, but here we want to adjust the skeleton. It's very important to rotate the head bone so it points up, not forward. While we're adjusting the skeleton, we need to make sure we have bones for every part of the unity humanoid, even if we're not using them. And in fact, as of this writing we should make sure not to skin anything to the eye bones. There's a bug with them on custom NPCs that causes the face to collapse, so for now we're just going to make sure our head is fully rigged to the head and jaw bones. For the skeleton I'm using in this tutorial, I have to add two eye bones and a jaw bone. We also need to sanitize the bone roll of the skeleton to match what BaS expects. Turn on bone axes in Viewport Display for the armature, then roll the bones so the Z axis is forward for everything. Roll the hands, hips, spine, and head bones 180 degrees. One of the things BaS lets us do is assign material types per mesh or with an ID map. ID maps are more performant (More individual meshes = more draw calls) but for a quick and easy way to separate materials, you can split them up in Blender. Next up, we need to convert the textures from Skyrim's format to one the BaS shader likes. The BaS shader takes a base color, a normal map, and then a mask texture that's split up like this: Red: Metallic Green: Occlusion strength Blue: Emission mask Alpha: Smoothness In Skyrim the metallic map is in the alpha channel of the normal map, so I'm going to use chaiNNer to extract that and put it in the new texture, along with a 50% occlusion strength, black emission mask, and as a quick kludge for the purposes of this conversion, reuse the metal map as my smoothness map. For a high quality result, go ahead and make a proper smoothness map. It's also important to convert everything from Skyrim's DDS settings to PNG, otherwise they import into Unity upside down. Just Unity things I guess. Skyrim skin base color textures are very dark due to the shader they use, so I take them into Krita and adjust the color curves until they're the tone I want. Before we export double check that your mesh is scaled correctly, facing negative Y, and has all its transforms applied. Then export with these settings: Pay close attention to the axis settings here. If they aren't exported like that, all your bones will be rotated wrong and you'll have a bad day. If your model comes out looking like jelly, this is probably what you skipped. Open up Unity Hub, load the BaS SDK, and make yourself a new folder to work in. Import all your textures and FBX file. On the model, make sure Read/Write is set (or dismemberment will glitch out) and set up your humanoid rig. You'll need to assign some of those dummy bones like the eyes. Set up your materials. Make them ThunderRoad/Lit. Use the textures we converted in chaiNNer. Set the occlusion slider to .5. For anything that's going to get damage decals, enable Reveal Layers and auto-fill them. Make a material to use to fill in cut body parts as well. If you don't have anything appropriately gory on hand, just a flat red standard material works. Once that's all set up, drop your character into an empty scene. Unpack the prefab completely. Drop the NPC helper script onto its root. Type in a name and assign the cut fill material in the script component. Click on the little menu dots in the upper right of the component and select Create BAS NPC. If it worked, examining the character should give you something like this: Under the Mesh group, click on each part and if it needs to show damage, give it a Reveal Decal component. If it's something other than flesh, give it a Mesh Part component and set the mesh and physic material. Note that the material does affect gameplay! Set your armor mesh to Metal and it's going to deflect blows. With that done, open up the ragdoll parts and examine each one. Underneath each part is a collider group. Adjust these colliders to fit your model as best you can. Duplicate or add more to the group as needed. You can assign physic materials to the colliders as well, if you want them to override the underlying mesh settings. If you have colliders that greatly intersect, click on the ragdoll part, and drag the other offending ragdoll part into the Ignored Parts list. If your character is jittering when ragdolling in game, it's probably because you need to do this. With all those edits done, drag the character from the hierarchy to the asset browser to make a prefab. Make that prefab addressable, make an addressable group for your mod, set the folder name and manifest info, then use the ThunderRoad SDK menu to build the bundle. Export it and you should now have a mod folder under \Steam\steamapps\common\Blade & Sorcery\BladeAndSorcery_Data\StreamingAssets\Mods\ Open up your Steam folder and find Blade & Sorcery\BladeAndSorcery_Data\StreamingAssets\Default\bas.jsondb. Extract this somewhere safe with your favorite archive program. Into your mod folder, copy Creature_HumanFemale.json and rename it something relevant to your mod. Open it up, and change the id to the name you gave the character when you ran the script, and set prefabaAddress to the address you gave it after you were done. There are some things you can tweak in here, but that's all you need to do to get it working for now. It is currently vital that you set the pooling maximum to 0. If you allow it to pool your NPCs and they are dismembered, they will respawn with invisible parts. I've reached out to WF about this bug already. Make a new file named something like CreatureTable_MyNPC and add this: { "$type": "ThunderRoad.CreatureTable, ThunderRoad", "id": "DemoGirlTable", "saveFolder": "bas", "version": 1, "description": null, "linkedToGenderRatio": false, "minMaxDifficulty": { "x": 0, "y": 3 }, "drops": [ { "$type": "ThunderRoad.CreatureTable+Drop, ThunderRoad", "reference": "Creature", "referenceID": "DemoGirl", "overrideFaction": false, "factionID": 0, "overrideContainer": false, "overrideContainerID": "", "overrideBrain": false, "overrideBrainID": "", "probabilityWeights": [85, 85, 85, 85, 85] } ] } And another file named Wave_MyNPC: { "$type": "ThunderRoad.WaveData, ThunderRoad", "id": "DemoGirl3", "sensitiveContent": "None", "sensitiveFilterBehaviour": "Discard", "version": 2, "category": "Mixi", "localizationId": "DemoGirl3", "title": "DemoGirl 1v3", "description": "Bwee!", "loopBehavior": "LoopSeamless", "totalMaxAlive": 3, "alwaysAvailable": false, "waveSelectors": ["Arena", "Ruins", "Market", "Canyon", "Citadel"], "playerHealthMultiplier": 1.0, "enemiesHealthMultiplier": 1.0, "factions": [ { "$type": "ThunderRoad.WaveData+WaveFaction, ThunderRoad", "factionID": 3, "factionHealthMultiplier": 1.0, "factionMaxAlive": 3 } ], "groups": [ { "$type": "ThunderRoad.WaveData+Group, ThunderRoad", "reference": "Table", "referenceID": "DemoGirlTable", "overrideFaction": false, "factionID": 0, "overrideContainer": false, "overrideContainerID": "", "overrideBrain": false, "overrideBrainID": "", "overrideMaxMelee": true, "overrideMaxMeleeCount": 2, "groupHealthMultiplier": 1.0, "minMaxCount": { "x": 20, "y": 20 }, "spawnPointIndex": -1, "prereqGroupIndex": -1, "prereqMaxRemainingAlive": 0 } ] } Save all that and run the game. Now in the spawn book, there should be a new category with your new NPC wave in it. Go and enjoy some perfectly normal mediaeval fantasy combat.
-
What if I told you porting Skyrim assets over was relatively simple? People are sleeping on modding this game. Edit: I've gone ahead and made a blog post on how to do this:
-
I just picked this game up and have been digging into modding the NPCs. I've recorded my findings so far in this mod, because there seems to be very little useful information out there otherwise: https://www.nexusmods.com/bladeandsorcery/mods/9126 I'd love if anyone else would help me experimenting with this. There's a couple other modders who've done work along these lines in the past, but they're working on other things now and didn't document their work publicly.
-
FUTA CONTENT THREAD - Futa News and More (1/26/17 Update)
mxwqtkl replied to tenzan's topic in Skyrim Adult Mods
NIFs are the mesh files. You find them under the Data/Meshes directory for whatever mod you're using. If a nif is incompatible with SE you get nothing or a big red error diamond when you try to use it in game. NIF Optimizer can fix some problems that make NIFs incompatible with SE. -
FUTA CONTENT THREAD - Futa News and More (1/26/17 Update)
mxwqtkl replied to tenzan's topic in Skyrim Adult Mods
Only use NIF Optimizer if the LE models don't work. SE uses half precision UV coordinates and can subtly distort your textures. The horsecock mod did need to be put through Optimizer to show up for me, though. -
Not that I know of, sorry. Because they're skinned meshes I don't think you can just duplicate, flip, and move them apart a little in NifSkope alone.
- 1687 replies
-
- bodyslide
- outfit studio
- (and 6 more)
-
This is a NiTriShape but the shader flags are in the same place in BSTriShapes. Notice how the inside of the jacket is so dark? It renders that way too in game because those are the back faces. Without Double Sided they're just transparent.
- 1687 replies
-
- bodyslide
- outfit studio
- (and 6 more)
-
NifSkope doesn't appear to have all the old mesh operations available for BSTriShapes, so no Flip Normals for them. What you could do is convert them back into LE meshes with NIF Optimizer and flip them. A couple things to consider: SSE NIFs use half precision UV coordinates so converting them back and forth can introduce texture distortion. Try to see if they work as LE NIFs before converting them back into SSE NIFS; some LE NIFs work fine in SSE. If it's a single mesh with half the normals flipped you're going to need to flip them in a 3D package. As far as I know NifSkope doesn't let you choose which triangles to flip, it just works on whole meshes. It's also possible the earrings are just flat meshes with the Double Sided flag set, in which case one side is always going to look wrong as far as I can tell in my experiments. The fact you can see the backside of the polygons at all means Double Sided is on; I suspect this is what's actually going on.
- 1687 replies
-
- bodyslide
- outfit studio
- (and 6 more)
-
The best tutorial at the moment is https://beyondskyrim.org/exporting-blender-2-7-skyrim/ which covers exporting statics and common error messages. However, the current version of the Blender plugin is outright broken when exporting skinned meshes. The Flatten Skin function is commented out, so you must export using an already flattened (not hierarchical) armature, for example what you get if you import an existing body. Even then the plugin exports bones with the wrong names. To fix that you need to replace this function in nif_common.py: def get_bone_name_for_nif(self, name): """Convert a bone name to a name that can be used by the nif file: turns 'Bip01 xxx.R' into 'Bip01 R xxx', and similar for L. :param name: The bone name as in Blender. :type name: :class:`str` :return: Bone name in nif convention. :rtype: :class:`str` """ if isinstance(name, bytes): name = name.decode() if name.startswith("Bip01 "): if name.endswith(".L"): return "Bip01 L " + name[6:-2] elif name.endswith(".R"): return "Bip01 R " + name[6:-2] elif name.startswith("NPC ") and name.endswith("].L"): name = name.replace("NPC ", "NPC L ") name = name.replace("[", "[L") name = name.replace("].L", "]") return name elif name.startswith("NPC ") and name.endswith("].R"): name = name.replace("NPC ", "NPC R ") name = name.replace("[", "[R") name = name.replace("].R", "]") return name return name After all this it will export, however the bone locations will be broken. To fix that, you need to import to and export from Outfit Studio.
- 1687 replies
-
- bodyslide
- outfit studio
- (and 6 more)
-
FUTA CONTENT THREAD - Futa News and More (1/26/17 Update)
mxwqtkl replied to tenzan's topic in Skyrim Adult Mods