DarthParametric

Modders
  • Content Count

    4,737
  • Joined

  • Last visited

  • Days Won

    539

Posts posted by DarthParametric


  1. 12 minutes ago, Lane said:

    Well the print screen stuff is another one of my earlier patches to re-enable the AurPostString function, which is also separately not implemented in the base game. That patch is a little more complicated, as I essentially need to redirect the execute command call to actually invoke the PostString function.

    Ah, ok, that tracks more with my expectations after my aforementioned previous discussions on the matter with ndix UR. But if you have enabled some provision for debug messages then that is extremely useful. Traditionally the only option has been using SendMessageToPC to pipe stuff to the Feedback window, which is pretty limiting. Although speaking of which, if you can increase the scrollback buffer of that window, that might be another handy change.

    On a different note, something else that comes to mind is the debug camera option that they left in the Xbox version but apparently removed entirely for the PC version. If you don't already have access to the Xbox version I can give you the XBE to look at, if that's of use/interest. Maybe there are other goodies in there that are missing from the PC version.

    • Like 1

  2. 5 hours ago, Lane said:

    Here ya go:

    Ok, so the print string stuff still appears to be functional then? What about external logs? Does it dump any of those? I recall asking ndix UR about it once when he was going through the Apple Store version and he suggested that they probably removed the code for it.

     

    7 hours ago, darthbdaman said:

    a level cap increase should be doable

    There's already an existing exe hack for that - https://deadlystream.com/topic/11814-kotor-1-level-cap-mod-to-level-50/


  3. The problem with the vanilla lightmaps is that they reduced them down to tiny sizes. In some cases a single room might comprise two or three lightmaps each only 64x64. So whatever quality they were in their raw state (probably not that high res to begin with circa a quarter century ago using 3DS Max 8/9 and Photoshop 6/7), once they crunched them down for the shipped version everything got turned into blobs. It's honestly impressive they look as good as they do, all things considered. But they didn't "paint" them. If you look in the vanilla models you'll like see a bunch of empty null/dummy objects with light names. Those were all the fill lights they used originally to bake the lighting. They presumably got converted to nulls by their exporter since they weren't of an appropriate game type.

    As to vertex painting, no. The engine doesn't support displaying any colour information that way. Not that it would help you for lightmaps anyway.

    • Like 1

  4. Lightmaps are arguably the hardest thing in KOTOR modding, both because of the fiddliness of setting them up and baking them in the first place, but also in trying to match the vanilla artistic lighting intent (assuming you are baking vanilla modules). It's a lot more straightforward in custom modules where you don't have pre-existing restrictions.

    To the first part, KBlender has made the baking process a hell of a lot better than it used to be in KMax, albeit you have to deal with all of Blender's alien logic for the setup. Since you mentioned UVs, I take it you're not doing this, but it's worth noting that you can't use vanilla lightmap UVs because the bakes will be terrible, even 20 years later at 50+ times the resolution. I gather Bioware baked the maps and then repacked the UVs afterwards for performance reasons on the Xbox, remapping the lightmaps to suit. My experiments with KBlender routinely found issues across UV seams, so my suggestion is to try and keep to contiguous islands as much as the geometry allows. In practice, this means condensing all meshes with shared diffuse textures as much as possible. I'm not sure how you do this in Blender, since I don't use it for modelling. Same with remapping the UVs - no idea how to do it in Blender. To give you an idea of the sort of thing I'm talking about, here's an example from some of my rebake experiments with the "hangar" of the Dantooine enclave. You can see most of the main floor geometry is a single contiguous island to minimise seam artefacts. At the bottom is a comparison of the vanilla maps vs the re-UV'd/rebaked maps.

     

    Dantooine_LM_Rebake_Example_01.jpg.ed929a899b635717ee8edad85fc850b3.jpg

     

    Dantooine_LM_Rebake_Example_02.jpg.e2d869228271bc1bd701cc149fa4b247.jpg


  5. The target would be his UTC file, since that's where his inventory is stored. As to how you'd do it, while you could just edit the UTC directly and add it to his inventory via Holocron Toolset or KGFF, a better approach might be to use scripting to do it, since that allows for more control. It would also mean it wouldn't be affected by the edge case of people loading a save where he had already been spawned before they installed the mod, since in that case a modified UTC wouldn't take affect (creatures, placeables, etc. are saved in the GIT file stored in the user's save as soon as they are spawned). Probably not a big deal in this instance, but it can be a significant consideration in other circumstances.

    • Like 1

  6. 12 minutes ago, vurt said:

    one root node

    More correctly, this is the OdysseyBase.

    13 minutes ago, vurt said:

    Meshes cannot be children of empty collections, lights, or non-trimesh objects

    Incorrect. Meshes can indeed be child objects of null/dummy/empty objects. Indeed, this is actually a requirement in some cases. Specifically, what is known as the "A node". This applies to level models where any animated mesh must be the child of a null/dummy that is named the same as the OdysseyBase with "a" appended to the end.

    16 minutes ago, vurt said:

    It expects a simple diffuse texture link — typically .tga or .tpc.

    Except in the case of walkmeshes, which use the walkmesh multi-material, not a usual texture reference.

    17 minutes ago, vurt said:

    KOTOR MDL doesn’t use Blender’s secondary UV maps or lightmap channels.

    I'm not sure how Blender handles UV channels, but lightmapped level models absolutely require a second UV channel for the lightmap UVs.

     

    One thing you have missed is that each node requires a unique ID. This is important for character models because bone ID must match the equivalent ID in the supermodel hierarchy. The KMax/MDLEdit workflow gets around this by loading the target supermodel to map the nodes where needed, but KBlender compiles to a binary directly so requires they be set in the editor. I recall I was playing around with an automated mapping script at some point. I know I talked to seedhartha at some point about adding it. Not sure what became of that.

    • Light Side Points 1

  7. Something extremely useful for mod testing/debugging would be to make the ShipBuild() function functional. That would allow external script logging as well as on-screen script notifications using the vanilla include debug functions like Db_PostString. Although I'm not sure how much of the related logging code was just excised altogether.


  8. 3 hours ago, vurt said:

    glossy and bumpmap / normal map together doesnt work afaik

    That's what the bumpyshinytexture semantic is for, it enables both simultaneously. But it comes with the downside that both share the same alpha mask, so you can't have one type showing in one section and the other type showing in a different section. You get both or neither. Although for the normal map you can at least make it flat in sections where you don't need any detail. 


  9. 12 minutes ago, vurt said:

    no need to edit the mesh

    You don't need anything special for envmaps. Only normal maps require a mesh flag to be set. "Gloss" is just a cubemap being blended with the diffuse according to the alpha mask.

    • Like 1

  10. 31 minutes ago, vurt said:

    So these are straight from TOR? 

    Not exactly, no. The original source was Jakarro, an NPC from one of the expansions that was a lot beefier than the vanilla Wookiee model they had:

    Jakarro.jpg.983928f1d9b4bed0dcf7a6ddbe9eac87.jpg

    The bits for Hanharr were modelled mostly from scratch I think, from memory. The Zaalbar belts were taken from one of the scrawny Wookiees and sliced and diced to fit the new model:

    TOR_Bowdaar_Customization_5.jpg

    And of course there was some massaging required to get the model to fit the KOTOR Wookiee rig.

    • Light Side Points 1

  11. 21 minutes ago, vurt said:

    Do you have a link to the mod?

    It was never released. It was just something I was playing around with. But here are the models and textures if you want to try generating some new textures. If you produce something you like you're welcome to release it yourself. Although it seems I never got around to remapping the Zaalbar belt meshes to fit into a more reasonably-sized texture. I can probably do that for you if you do decide to release it. Re-exporting the models with the vanilla names would also make life easier. There's also presumably the issue of female Wookiees needing a replacement in such a mod. TOR does have a scrawny Wookiee model that would work I guess.

    TOR_Wookiees.7z

    • Light Side Points 2

  12. 2 hours ago, vurt said:

    So for doing normals on heads i bet you must edit the models

    Yes. For normal maps to work, each mesh that the normal map is applied to must have the bumpmappable flag enabled. You can do this relatively simply by loading the model into KBlender, selecting any appropriate meshes, and enabling the flag in the KOTOR properties section before re-exporting.

    • Like 1
    • Light Side Points 1

  13. 6 minutes ago, Salk said:

    it would be good to have some sort of software that prints out what textures each game model uses

    It wouldn't be particularly hard. Wizard and I created a Powershell script to dump all the lightmap assignments in K1 to identify all the cases of missing lightmaps. You could do the same thing for diffuse textures.

    • Like 1

  14. 28 minutes ago, vurt said:

    you mean to be able to select it separately from the other player faces i take it. 

    Yes. Adding it as an additional head rather than simply overriding an existing head. It requires new rows in appearance.2da, heads.2da, and portraits.2da, plus a uniquely named head model (and textures, which is obviously the primary goal in this case). 

    30 minutes ago, vurt said:

    would any of this lead to issues?

    Possibly compatibility issues, especially for more popular heads (like Mullet Man). While it takes some initial setup the first, a custom head is pretty easy to knock out once you've done it once or twice.

    31 minutes ago, vurt said:

    it is obviously also possible to change head during play

    You can do this by editing the save with KSE and changing to whatever appearance you want (including the other sex or non-player races).

    • Like 1

  15. 4 hours ago, vurt said:

    I need to look up some mods doing player races, see what is needed. 

    There's nothing particularly complex, unless you want custom models for alien races. You will need to at least have a custom named model for each added head. Both the filename and the internal OdysseyBase name. This can be done via a hex editor if you don't want to deal with loading up the model, otherwise Blender with the KotorBlender I/O script will do what you need. The base (LS) diffuse texture needs to be specified in the head model directly in K1 (TSL added the option to apply it as an override in heads.2da). Everything else - the DS transitions and portraits, adding it as an additional option in the character creator - is just 2DA and ini setup. Technically you don't actually need to edit any 2DAs. Once you know what you're doing you can just generate the required data in the ini directly.

    There should be some posts around detailing how to set one up. I thought I posted a template TSLPatcher setup for it at some point. I'll go digging tomorrow.

    • Like 1

  16. 52 minutes ago, vurt said:

    So i am guessing those mods will end up pretty broken

    No. That specific warning is just saying that a MOD (overrides a module's RIM pair) already exists, so it doesn't need to put a copy there first. Changes will just be injected into the existing archive. It's probably the most common misconception about how TSLPatcher works, and unfortunately its presence has a knock-on effect because people say to ignore it, so users then assume they should ignore all warnings, which is not the case. Suppressing this message was high on my list of feature requests for HoloPatcher, TSLPatcher's successor.

    • Like 1

  17. A 1060 should be fine.

    Are you on Windows 10 or 11? If so, you can try this. Go here - https://github.com/mmozeiko/build-mesa/releases/latest - and download either mesa-d3d12-x64-xxxx or mesa-d3d12-x86-xxxx, depending on whether you have x64 Windows or not. Open the archive and extract opengl32.dll and put it in the game's folder next to swkotor.exe. This is a wrapper that will run the game in DirectX 12 instead of OpenGL. Might help with certain issues. Alternatively, there's also mesa-zink-x64-xxx/-x86-xxx that is a wrapper for Vulkan instead. They aren't compatible with GLIntercept or anything else that also hijacks the same DLL.