decoy88

K1 Republic Armor?

Recommended Posts

I've been looking for a Republic armour mod that uses the models of the republic soldiers in Kotor 1.

So far I've only found this: https://www.nexusmods.com/kotor/mods/330

And this: https://deadlystream.com/files/file/932-complete-republic-armor/?tab=comments

But they both only replace existing models (class 5 armor) making the textures messed up for every armour there. Has anyone found a mod with separate MDL/MDX files or maybe knows a way to reuse them so it doesn't create a conflict?

 

Thanks

Edited by decoy88

Share this post


Link to post
Share on other sites

The way KOTOR works, the only way to add a new outift without replacing an entire armour class is as a disguise. Because this means it will replace the entire character, including the head, it's not overly practical to use it for anything that doesn't have a full helmet, unless you are making it for your own personal use and only care about having one head.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
28 minutes ago, DarthParametric said:

The way KOTOR works, the only way to add a new outift without replacing an entire armour class is as a disguise.

So, could it be confirmed that creating a new custom armor [complete with its UTI] would not be possible without affecting others that using the same tag/name for the model? I mean, for blasters, blades and masks, there are variables following the tag but would it be possible with armors?

Share this post


Link to post
Share on other sites

I have no idea what you are trying to say, but the way armour works is that each armour class has a single model. Variants of that class just use a different texture. Weapons also have classes, but they don't share a common model. Instead, each variant uses its own unique model.

Share this post


Link to post
Share on other sites
45 minutes ago, DarthParametric said:

I have no idea what you are trying to say...

Sorry that my words got you confused, I believe a new thread would be better to address this issue I have. 😁

Share this post


Link to post
Share on other sites

Then why can't a new model be created and an item mapped to that? It should only need an entry in baseitems.2da no?

Share this post


Link to post
Share on other sites

If I were you, I would replace models and textures of class clothes from the original to the republican one.  Here, try this (in two versions: the first - all class armor is replaced by the republican armor, the second each class has a republican version of clothing for its class):
 If you want your armor (model and textures) worn by companions - replace their original clothes.
For kotor TSL (if you are interested) you can replace flight armor (in the game you can find one option, but in fact there are at least three of them - they are in game files), make three variants, say republican, TSF armor and additional texture.

Republic Armour by Todevuch (version 1).zip

Republic Armour by Todevuch (version 2).zip

  • Like 1

Share this post


Link to post
Share on other sites

As the Dark Lord says, for K1 we're limited to the 9 body types in the game, all of which are already used for the player character. To be specific:

  • A - Underwear
  • B - Clothing
  • C - Light Armor (Class 4)
  • D - Light Armor (Class 5)
  • E - Medium Armor (Class 6)
  • F - Medium Armor (Class 7)
  • G - Heavy Armor (Class 😎
  • H - Heavy Armor (Class 9)
  • I - Jedi Robe
  • J - Revan Armor

Additionally, K2 has:

  • J unused (there's no Revan armor item in the game)
  • K unused
  • L - Dancer Outfit (unused for male characters)
  • M - Zeison Sha
  • N - Jedi Master Robe

You can change what models those slots use, and you can change which items use which slots, and you can create new item types and configure them to use whichever slot (including underwear) but you're locked with using one of the existing slots and any changes will affect all models in that slot.

In K2, you can use the J and K slots for whatever you want, and in fact I released a mod that uses them for Republic armor and uniforms a long time ago.

In K1, you're not so lucky. You could replace one of the models with the Republic soldier armor if you did new textures for every other item that uses the same model, or configure them to use a different model. I thought about doing that once, and I think I even made textures, though it was so long ago that I assume they were awful.

There is a method of circumventing this, for either game. A really convoluted method that requires editing some core files that would be a nightmare for mod compatibility. But it would work. I wrote and tested some code for it a couple years ago and got a proof of concept going, but ultimately decided it was too convoluted to be worth doing. It would work something like this:

  • You equip a dummy item. This doesn't have the appearance you actually want, just whatever placeholder you choose (perhaps clothing or underwear). It will only be visible for a few seconds.
  • The player and party heartbeat script (k_hen_heartbt01) constantly checks what item the character is wearing. When it detects that the character is wearing the dummy item, it fires some new code that will ultimately give us the look we want.
  • First, the script removes the dummy item from the character's inventory.
  • Second, the script spawns a clone of the character elsewhere in the game. The main problem here is that due to the way the script functions work, the character must be spawned in the game world, even though we don't want to see this character. To get around this, one option would be to spawn them in an unseen utility room... but you would have to add such a utility room to every area in the game. Or maybe you could live with fading to black for a few seconds.
  • Third, the script detects the character's size and gender in order to equip them with an item that matches their body type.
  • The new item will be a disguise item, pointing to a new line in appearance.2da. Each body type would require a different line and item pointing to that line. This appearance is a placeholder - it won't have the correct head.
  • Fourth, the script copies the head from the clone NPC to the player, thus restoring the player's original head.
  • Finally, the script destroys the clone NPC.
  • The heartbeat script also checks if the player has unequipped the disguise item in order to destroy it and replace it with the original dummy item.

I've tested most of this - I had scripts to swap out the items working in K1, though it was a bit of a buggy experience. For example, part of the GUI would have to be disabled in game options or else you'd get a feedback note every time the item was changed. I only tested changing the gender in K1 and not the body size or head. I had it replace the Sith trooper disguise with a female version for female PCs. I did test the head thing in K2, and I believe I wrote code for the body size that could be enabled if needed. But I gave up working on it because it's just too ridiculous. I could be convinced to reconsider if there was enough of a demand for it, and maybe we could work out a compatibility solution for the heartbeat script, but at the time the stuff I specifically wanted to do with it - female versions of the Sith trooper, Sand Person, and Mandalorian disguises - was so minor compared to the amount of effort required to make it function, and it would never function perfectly, so I gave up.

I think you'd be better off porting all of K1 to K2. That way you get the extra K, L, M, and N body slots and you can do whatever you want with them. Or just replace one of the nine in K1. I'd rather have different outfits like the Republic armor, Sith armor, dancer outfit, and so on rather than several slightly different looking armors that I'm only putting on for the stats, anyway.

  • Light Side Points 4

Share this post


Link to post
Share on other sites
17 minutes ago, ebmar said:

Wow, those were some nice re-textures there, todevuch! Definitely interested to see how they look in-game! :cheers:

In fact, I confused the name of my archive - version 1 is version 2, and vice versa, version 2 is version 1.
 I did not invent a bicycle, I simply borrowed textures from a good modification of Scout / Scoundrel Uniforms, the model remained the same for a scoundrel and scout.  The soldier's uniform model became like a republican soldier)

Share this post


Link to post
Share on other sites
15 minutes ago, JCarter426 said:

As the Dark Lord says, for K1 we're limited to the 9 body types in the game, all of which are already used for the player character. To be specific:

  • A - Underwear
  • B - Clothing
  • C - Light Armor (Class 4)
  • D - Light Armor (Class 5)
  • E - Medium Armor (Class 6)
  • F - Medium Armor (Class 7)
  • G - Heavy Armor (Class 😎
  • H - Heavy Armor (Class 9)
  • I - Jedi Robe
  • J - Revan Armor

Additionally, K2 has:

  • J unused (there's no Revan armor item in the game)
  • K unused
  • L - Dancer Outfit (unused for male characters)
  • M - Zeison Sha
  • N - Jedi Master Robe

You can change what models those slots use, and you can change which items use which slots, and you can create new item types and configure them to use whichever slot (including underwear) but you're locked with using one of the existing slots and any changes will affect all models in that slot.

In K2, you can use the J and K slots for whatever you want, and in fact I released a mod that uses them for Republic armor and uniforms a long time ago.

In K1, you're not so lucky. You could replace one of the models with the Republic soldier armor if you did new textures for every other item that uses the same model, or configure them to use a different model. I thought about doing that once, and I think I even made textures, though it was so long ago that I assume they were awful.

There is a method of circumventing this, for either game. A really convoluted method that requires editing some core files that would be a nightmare for mod compatibility. But it would work. I wrote and tested some code for it a couple years ago and got a proof of concept going, but ultimately decided it was too convoluted to be worth doing.

 

Wow. thanks for the detailed explanation. It pretty destroys any hope I had for a separate mod but at least I know why now.

Share this post


Link to post
Share on other sites

I remembered I had an old save from my testing, so I recorded what my work in progress was a couple years ago:

As you can see in the video, though, I never finished debugging. The script started adding duplicate items to my inventory. Actually, I remember that started happening after I fixed another bug.... Anyway, it's not in any releasable shape, but you can see proof of concept at least. It's just a ridiculous and buggy proof of concept, which is why I never finished it.

An easier option, I think, would be to eliminate some of the armor models to free up the slots. Keep different models for light, medium, and heavy armors but eliminate the other half and you free up three body slots. Then you could use those for such things as Republic armor or Darth Bandon's armor or whatever you want. Somebody could do a poll to see what armor models people want kept or eliminated maybe.

  • Like 2

Share this post


Link to post
Share on other sites

Yeah, that would be an eventual possibility if the thing were finished. But just getting a gender change was buggy enough on its own....

I've tested the head thing in K2 separately but I don't have a handy video showing it because I never implemented it into the K1 code. That's more complicated because to accurately copy the player's head, including any modded heads, you have to use the DuplicateHeadAppearance() function and that specifically requires two spawned characters. That's what's used in the revelation flashback to copy the player's head onto the stunt model. This clone has to be spawned somewhere and I never figured out a good solution for the where. I still think the best solution would be a hidden utility room, if it didn't require editing every bloody area in the game to work. I've made a mental note that if I ever get into video game development, to include such rooms just in case. I've seen them in other games, and even KOTOR uses them sometimes, but there's no standardization here. The next best option would be to spawn them wherever (such as the player's location) but have the game fade to black during the whole process, which would probably only amount to a second or two anyway.

Share this post


Link to post
Share on other sites

Not where there isn't a walkmesh, no. They'd be spawned to the nearest walkmesh, which would make them visible to the player in many modules - especially given how K1 likes its single-room modules.

Share this post


Link to post
Share on other sites
32 minutes ago, decoy88 said:

Seems like a lot of work for a simple armor mod

No, not just a simple armor mod; this technique would allow many new armors with custom models to be added into the game, which opens up many possibilities.

 

43 minutes ago, JCarter426 said:

Not where there isn't a walkmesh, no. They'd be spawned to the nearest walkmesh, which would make them visible to the player in many modules - especially given how K1 likes its single-room modules.

What about applying a visual effect to make the clone invisible? Or would that mess with the head duplication?

Share this post


Link to post
Share on other sites

Even if it didn't mess with it, I don't think it could be applied quick enough to hide the character. I haven't tested it but I'm assuming there would be a brief lag between the character being spawned and the invisibility effect being applied through their OnSpawn or whatever. I also don't remember if there's a true invisibility effect or if we're limited to the distortiony cloak effect that doesn't even work on all video cards or if frame buffer effects are turned off.

Mind you, the visibility is going to be brief regardless. 1 or 2 seconds, max. I'm just being fussy about that.

Share this post


Link to post
Share on other sites
8 minutes ago, eNoodles said:

this technique would allow many new armors with custom models to be added into the game

No it wouldn't. It's still just using disguises. If people can't even manage setting the basics of that up, they are never going to come at some convoluted script setup.

Share this post


Link to post
Share on other sites
1 minute ago, DarthParametric said:

No it wouldn't. It's still just using disguises. If people can't even manage setting the basics of that up, they are never going to come at some convoluted script setup.

Yes, but disguises with custom appearances. Aren't we trying to fake "custom amors", or am I misunderstanding the intent of this mod?

Share this post


Link to post
Share on other sites

All a disguise is is an appearance.2da row. That's it. JCarter's script is an attempt to deal with the issue of assigning heads dynamically to minimise some of the hassle, but really it's just moving the hassle to a different area. It doesn't add something that was unavailable before, and if he released it tomorrow fully working we wouldn't suddenly be inundated with new armour mods.

Share this post


Link to post
Share on other sites
1 minute ago, DarthParametric said:

All a disguise is is an appearance.2da row. That's it. JCarter's script is an attempt to deal with the issue of assigning heads dynamically to minimise some of the hassle, but really it's just moving the hassle to a different area. It doesn't add something that was unavailable before, and if he released it tomorrow fully working we wouldn't suddenly be inundated with new armour mods.

But wouldn't we able to assign new custom models to that new appearance.2da row, then using JC's script assign our player heads to that disguise (while we have it equipped), and ultimately achieve a new armor model with our head attached to it? Which would remove the limitations of armor classes using the same models...

Wouldn't this make creating new armors with custom models much easier and more compatible with existing armors?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.