DarthParametric

Modders
  • Content Count

    4,671
  • Joined

  • Last visited

  • Days Won

    532

Posts posted by DarthParametric


  1. Edit his DLG (man26_echmerc1.dlg) and set k_pman_reprec01 as the script in the exit node (R1). Although that script was intended for a DLG with a different owner. Not sure what happens when you try to grab the nearest object to an NPC with the NPC's own tag. If it doesn't work you'll need to make a custom script, like so:

    void main() {
    	
    	SignalEvent(OBJECT_SELF, EventUserDefined(10));
    }

    Although possibly it might also need a small delay. Alternatively, the script could go in the EndConversation slot of the root node instead of in the exit node. Check out some other ambient NPCs for how this sort of thing works, like in Taris Upper City.

    • Like 1

  2. The related DLG is man26_repneg.dlg and the script responsible is k_pman_reprec01 that fires on R12 (exit node of the initial scene). The source is here:

    https://github.com/KOTORCommunityPatches/Vanilla_KOTOR_Script_Source/blob/master/K1/Modules/M26AA_Manaan_Ahto_West_manm26aa/k_pman_reprec01.nss

    which just signals a UserDefine event to the merc. So you check the merc's UTC and look at his script list to find his UserDefine script, which is k_pman_merc_d, the source for which is here:

    https://github.com/KOTORCommunityPatches/Vanilla_KOTOR_Script_Source/blob/master/K1/Modules/M26AA_Manaan_Ahto_West_manm26aa/k_pman_merc_d.nss

    The event itself is

    case 10:
    	ActionForceMoveToObject(GetObjectByTag("man28aa_nilko_exit", 0));
    	ActionDoCommand(DestroyObject(OBJECT_SELF));
    	SetCommandable(FALSE, OBJECT_SELF);
    break;

    This is a pretty standard exit script. It adds a move command and a destroy command to his action stack, and a SetCommandable command immediately. This is why he is non-interactive. If you comment out or delete the SetCommandable (or change it to TRUE) and recompile the script then you'll be able to interrupt him.


  3. On 6/10/2025 at 7:31 AM, Froggy89 said:

    This seems like it would take a ton of manual labor and time to place each one

    There's not really any other practical way to do it. At least for something that needs curation like the archway there. If you want to put them on regular trees, you might be able to get away with some sort of cloner that distributes them across the selected meshes. I assume Blender has something like that. Although you may need to duplicate the trees and subdivide them to create enough geo for that to work (that sort of thing usually distributes based on verts or polys).

    Btw, Odyssey has backface culling, so have you doubled up your planes? I'd also suggest in cases like this that you add some subdivisions and put it in whatever Blender's equivalent of a curve deformer is to add some more natural-looking droop.


  4. If all else fails, attach all your files for someone else to look at on their end.

    I recall I had a similar issue once in TSL where I tried to edit an existing walkmesh and could not get the room links to work properly afterwards. I can't find the files for it, so I can't check what the resolution was, but I have a sneaking suspicion that I put the walkmesh under the A node. @JCarter426: Do you think you could try searching the Reddit Discord server and check for anything about the Mando camp on Dxun and edits to the shuttle hangar walkmesh? Although even if that does prove to be the case, I would most likely put it down to TSL shenanigans. You shouldn't need to do anything special to get a walkmesh working in K1.


  5. SWTOR Saber Hilt Resource


    This is a dump of most of the double and single saber hilts from The Old Republic (as-of May 2025) as FBX files. There are 207 single hilts and 158 double hilts, although note that somewhere between half to two thirds of these are just texture variants, while a not insignificant number of the rest are just minor mesh variations (e.g. different emitter shroud).

    Notes:

    The meshes have been scaled to a rough ballpark approximation of KOTOR's hilt size, but will need manual adjustment as well as scene setup (addition of blade planes, etc.). Some will probably also require custom low poly shadowcasters as well, assuming you want to enable shadows. TOR uses texture-based emissive, which will necessitate either mesh splitting or custom mesh creation to replicate/approximate in Odyssey. I have left out some of the more fancy things that TOR gets up to with VFX involving separate meshes with emissive and multiple UV channels.

    Textures vary in their quality. Many of the launch-era textures are low resolution (256x256) compared to more recent additions (1024x1024), as well as very simplistic and cartoony. The models are similar, with launch hilts often being oversized with minimal geometry detail. Although note that even some more recent additions occasionally have low res textures, even when the models are more detailed.

    Each hilt archive includes a text file that specifies its material and texture names.

    Textures are included in their original DDS format. For PS users, install the Intel DDS plugin. For everyone else, you can use TexConv from MS's DirectXTex utilities to convert them to TGA. I have provided pre-swizzled and normalised normal maps in TGA, already in OpenGL format with a blank alpha, ready for conversion to TPC (thanks to ndix UR's normun tool). Check this SWTOR Slicers wiki page for information about TOR's texture setup. Note that the diffuse textures are made for TOR's renderer, so will likely require some adjustment to work correctly in Odysssey. You'll also need to make your own envmap masks.

    Given the sheer volume of files and the process of manually converting them, it's quite possible I have missed some textures or the like. Let me know if that's the case.

    If you're looking for a particular hilt and you only know its in-game name (from, for example, Swtorista) check TORCommunity's database (warning, site is often slow as hell) and find its model name in the Detailed Data tab of the item (search for gr2, for example - "Model": "\\art\\dynamic\\weapon\\model\\saber_high12_a01_v01.gr2"). Refer to the SWTOR Slicers wiki page for more detailed information.

    Posted in the K1 section, but naturally they'll work for either game depending on what format you export the models in.

    Terms of Use:

    I make no claims of ownership. This is all taken from TOR's asset files, I just extracted them. Credit belongs to Disney/EA/Bioware/Broadsword. Use as you see fit, although if you use them in a mod release an acknowledgement would be nice.


     

    • Like 1

  6. 5 hours ago, Untold Prophecy said:

    need to know how they can be implemented as drops without manually adding them to a container or NPC's inventory

    So you want them as random loot? Given the specified level range, this is presumably for TSL. Its vanilla random loot table script can't be decompiled via DeNCS, but @JCarter426 has been beavering away at an alternative for years. I'm not exactly sure what your options are for either including it as an addon for that or trying to integrate it into the vanilla system.

    • Thanks 1
    • Sad 1

  7. 22 minutes ago, Bespokey said:

    Still making rounds?

    I extracted those models from the beta in mid-2011, rendered them out and posted the image on LucasForums. Whoever put it on Imgur swiped it from there. I still see it pop up on Reddit and so forth occasionally all these years later, even though it's hideously outdated.

    22 minutes ago, Bespokey said:

    would you consider making me a Lord Scourge Hilt standalone?

    I'm not really in the saber making business any more, but you don't really need someone to model you one from scratch when you can just pull the model from TOR. I'll have a poke around tomorrow. I can probably provide an asset dump of the meshes for anyone that wants to set them up for KOTOR.


  8. There are two options if you want to apply a command to multiple NPCs with the same tag. The first is a loop iterating through every creature in the level (useful if you need to deal with multiple sets of tags), the second is to call the GetObjectByTag function multiple times, each with a different nth index to grab each creature. Check the full command:

    // 200: Get the nNth object with the specified tag.
    // - sTag
    // - nNth: the nth object with this tag may be requested
    // * Returns OBJECT_INVALID if the object cannot be found.
    object GetObjectByTag(string sTag, int nNth=0);

    Identifiers are 0 indexed, so the first creature is 0, the second 1, and so forth. So to get the 5th Tach, the command would be GetObjectByTag("c_tach", 4). Since you didn't specify an index, the compiler is pulling in the default index 0.

    In this case, I'd actually go with a combined variation so you can add a bit of randomness to things. Like so:

    void main() {
        
        object oTach;
        int i;
        location lPath1Run = Location(Vector(327.34, 206.69, 7.71), 0.0);
        
        for (i = 0; i < 5; i++)
        {
            oTach = GetObjectByTag("c_tach", i);
            DelayCommand(1.5 + IntToFloat(Random(3)), AssignCommand(oTach, ActionForceMoveToLocation(lPath1Run, TRUE)));
        }
    }

    Since pathfinding is pretty terrible, you may have to introduce additional delay between each to prevent them running into each other. You could probably just pad it by also adding in IntToFloat(i) in the delay value, which should force each subsequent value to increase while still retaining some randomness.


  9. I have no idea if KOTOR actually supports Chinese, since it was never released in that language. I think Neverwinter Nights does though, and Odyssey is based on Aurora (NWN's engine).

    Start by referring to these links:

    https://wiki.xoreos.org/index.php?title=Xml2tlk

    https://wiki.xoreos.org/index.php?title=TLK_language_IDs_and_encodings

    In theory you'd convert a UTF-8 XML with strings in simplified Chinese to a binary K1 TLK using Xoreos with the following command:

    xml2tlk --cp936 --kotor dialog.xml dialog.tlk

    The language ID would need to be changed at the top of the XML file

    <tlk language="130">

    based on the table from the link above.

    You can get Xoreos Tools here. Here's a vanilla English K1 XML if you need it:  dialogK1.7z

     

    But the actual translated text is only half the job. As I mentioned above, Odyssey uses a font sheet, not a font file. It's an image with each individual letter of the alphabet in a position that is defined in the accompanying TXI file. There are about half a dozen or so font sheets in K1. They have separate ones for the different resolutions apparently, plus additional ones for the end credits and the cheat console. A font sheet itself typically has a plain white RGB (aside from icons like controller buttons). The alpha channel is a mask. Here's a vanilla English example:

    fnt_d10x10b.jpg.578a51b5de3dcd16073c6ce2faf363e5.jpg     fnt_d10x10b_ALPHA.jpg.11b986f9381b31d37ed4ee5bb8e70366.jpg

    Since Wizard's tool doesn't support DBCS languages, you can try this older tool to generate a font sheet and TXI - https://deadlystream.com/files/file/535-kotor-font-tool-nwn-font-maker/

    I'm not sure if that will work either, but it's worth a try.  Unfortunately the texture sheets it creates are quite low resolution though. You'd need to duplicate the sheet TGA and TXI to match all the vanilla filenames:

    fnt_console
    fnt_credits
    fnt_creditsa
    fnt_creditsb
    fnt_d10x10b
    fnt_d16x16
    fnt_d16x16a
    fnt_d16x16b
    fnt_dialog16x16
    fnt_galahad14

    Although I'm not sure if that last one is actually used.


  10. Odyssey (KOTOR's engine) doesn't use regular fonts, it uses a font sheet (i.e. an image of the characters). So language is effectively "hard coded" unless you edit the font sheet. There is a tool that will help you do that - https://deadlystream.com/files/file/2375-kotor-autotranslate-tool/ - but unfortunately it doesn't support DBCS languages. But it might at least help you create a custom font sheet manually.

    I assume you already converted the translated text back into a binary TLK file? I'm not entirely sure if the TLK format even supports DBCS languages.

     


  11. If you're talking about a cutscene playing when loading a module, then the two avenues are either the module's OnEnter script (defined in the ARE and/or IFO), or the OnEnter script of a trigger placed over the module's entry point (script defined in the UTT, placement in the GIT).

    The former is

    https://github.com/KOTORCommunityPatches/Vanilla_KOTOR_Script_Source/blob/master/TSL/TSLRCM/Modules/907MAL_Malachor_V_Trayus_Core_(cutscene)/k_907_enter.nss

    which looks like what you want.


  12. You should be able to crib what you need from vanilla scripts. In this case, the end of the scene between Kreia and Atton in the polar academy ("Sleep, murderer") should be exactly what you want. I would guess they literally just kill him rather than applying an animation.