decoy88

K1 Republic Armor?

Recommended Posts

But wouldn't you be replacing the model for a whole class of armors? And if you went the disguise route, you'd either have to have a full body armor or some default head.

I'm confused now, what is even the point of JC's script if you say it's all possible anyway? 

Share this post


Link to post
Share on other sites

Like I said, JCarter's script approaches the problem from a different angle. It assigns the head dynamically, while the other approach is to have separate appearances for each head and have a script assign the correct one based on the player's current appearance. The advantage that JCarter's approach has is that it will work with any custom head the player might have, whereas the other approach would require the manual addition of support for said heads by the user (in other words, unlikely to happen).

Share this post


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

if he released it tomorrow fully working we wouldn't suddenly be inundated with new armour mods.

Yeah, that's true. People would still have to make models for such mods and set up all the items and follow my notes so it all works properly. If I finished my scripts and released them, that wouldn't change the amount of people with all the required knowledge and skills to do anything with them.

Perhaps I haven't been clear enough on what my code would actually do, however.

The situation now is that when you equip a clothing item, it does one of two things: a) assign a body slot and point to the model in that column of the character's appearance.2da line, or b) apply a disguise effect that points to a specific line of appearance.2da and use the cell from that line instead.

For option a we are limited to the available body slots in appearance.2da (9 for K1, 14 for K2). We can't add more.

For option b we're limited in that any character who equips the item gets the same disguise. So female characters still look like male Sith when they equip the uniform. Heads are tied to it the same way, so if you want to add a new appearance row for Bastila, anybody who equips the item will have to look like Bastila. The only provision to get around this, currently, is to restrict who can equip the item. In K2, there are provisions to restrict the item to specific characters (e.g. Atton's jacket, Mira's jacket, Handmaiden's robes, player's armband) while in K1 you can get the same effect if you restrict it to a feat only one character has (e.g. Battle Meditation for Bastila). That's doable right now, and several mods have done this. This does mean, however, that only that character can equip it. You need a different disguise item for each character.

It's that final issue that my code would eliminate, if completed. In my above video, Carth and the female player are equipping the same Sith armor item. The script applies either the male or female disguise variant depending on what it detects as their gender. If this were extended to account for body size and heads, then it would effectively function as if you added new body variation. Every character could equip the item and their body would change based on their gender and phenotype but their head would remain the same. But even if I smoothed out all the bugs, it wouldn't be a flawless experience. There would be a delay, a fade to black or some more ridiculous solution, and there's the feedback issue (in K1 only) that I mentioned. It could be done, but it would never be perfect, and it would be a lot of work for a simple armor mod.

Share this post


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

Like I said, JCarter's script approaches the problem from a different angle. It assigns the head dynamically, while the other approach is to have separate appearances for each head and have a script assign the correct one based on the player's current appearance. The advantage that JCarter's approach has is that it will work with any custom head the player might have, whereas the other approach would require the manual addition of support for said heads by the user (in other words, unlikely to happen).

Ok, I finally understand.

If you could (theoretically) make a universal system that's integrated into the heartbeat script and can somehow check for custom armors (maybe a specific prefix for the resref/tag or something), and then do the head duplication method, as well as check for various factors such as gender, then that would greatly simplify adding new custom armor models into the game.

But boy would that be a lot of work.

Share this post


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

No, it wouldn't. That's my point. It's just a different way of doing it.

No, but like you said, you'd have to add separate rows for all the different heads and genders. And it wouldn't support custom heads unless compatibility was manually added. You'd also have to create your own heartbeat script, which would conflict with similar mods. A universal system would simply that process.

Share this post


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

Ok, I finally understand.

If you could (theoretically) make a universal system that's integrated into the heartbeat script and can somehow check for custom armors (maybe a specific prefix for the resref/tag or something), and then do the head duplication method, as well as check for various factors such as gender, then that would greatly simplify adding new custom armor models into the game.

But boy would that be a lot of work.

I could, and for the most part I have, though I never finished debugging it to stop creating duplicate items. But it all does work, no maybes about it. The K1 version already accounts for gender and player class, and I have separate code I tested in K2 that duplicates the head, though I never united the two because I never decided how to deal with the clone NPC spawning as I mentioned before. Like I said, what I actually wanted to do with it wasn't what I judged to be worth the effort at the time. If there really were a use for it I'd be willing to take a look at the code again, but I don't exactly see people lining up with new player models that are just waiting to be put into the game.

1 minute ago, DarthParametric said:

No, it wouldn't. That's my point. It's just a different way of doing it.

Actually, the way I set it up is somewhat simplified. I intended to release it for general use at the time, so I accounted for people who don't know much scripting. If you wanted to add an item with that functionality to my system, all you would have to do is name your UTI files in a specific way and put the needed disguise effects on them. Though just that part alone requires knowledge of disguise items, new appearance lines, and how to use tokens in TSL Patcher, so it still isn't that simple.

Share this post


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

heartbeat script

That's only required for JCarter's approach. The other approach only requires a simple spawn script to initially generate the item.

1 minute ago, JCarter426 said:

Actually, the way I set it up is somewhat simplified.

It doesn't affect anything to do with actually creating the armour, which was ultimately what I was getting at.

Share this post


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

That's only required for JCarter's approach. The other approach only requires a simple spawn script to initially generate the item.

Right, but they'd still conflict with each other, wouldn't they? I mean, you could assign them to different spawn scripts, but that's just unorganized, don't you think?

Share this post


Link to post
Share on other sites

Yeah, the heartbeat script is the only compatibility issue. If you don't use it, you're fine. But in that case, though, you are still limited to the one item: one character issue. So you couldn't, for example, give Bandon's armor a custom model and have it wearable by the whole party. You'd have to pick a character and restrict it to them, or have multiple Bandon armor items, one for each character. Unfortunately the only way to add support with everything for everybody is the heartbeat script (or a similar script) and it's a mess to deal with. Though it's ironic, because editing it is so bad for mod compatibility, nobody edits it anymore. Kreia's Assorted Robes is the only mod I recall that does it and that I still see people using today.

6 minutes ago, DarthParametric said:

It doesn't affect anything to do with actually creating the armour, which was ultimately what I was getting at.

Agreed.

Share this post


Link to post
Share on other sites
Just now, DarthParametric said:

No, you have one spawn script. It looks at the player's appearance and spawns the UTC that matches.

Yes, but if someone else made a similar mod that utilizes the on-spawn script, it would overwrite the previous modified spawn script.

If you were using the same savegame you'd already have the other disguise that was previously spawned, no issues there, but if you went on a different savegame you wouldn't be able to spawn that older disguise in, since the spawn script would be overwritten by the new mod.

Anyway, let's stop arguing about how useful this mod would be. It's probably not gonna happen anytime soon, and, as JC said, people aren't exactly lining up with new armor models.

Share this post


Link to post
Share on other sites
Just now, eNoodles said:

Yes, but if someone else made a similar mod that utilizes the on-spawn script, it would overwrite the previous modified spawn script.

Yes, but those wouldn't be universal scripts used by the whole party (or worse, every NPC). They would be random scripts just to add the item in the game, like editing Bandon's OnDeath to give a specific UTI rather than dropping the one he does. That's your typical mod compatibility issue, and most mods don't edit the same things.

Share this post


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

Yes, but if someone else made a similar mod that utilizes the on-spawn script, it would overwrite the previous modified spawn script.

There is no "modified" script. It's a custom script unique to the mod. There is no compatibility issue, unless someone literally steals it and copies the name.

Share this post


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

There is no "modified" script. It's a custom script unique to the mod. There is no compatibility issue, unless someone literally steals it and copies the name.

Uh, can items have their own spawn scripts? There isn't an option in the KT UTI editor, but I'm not sure if it would work if you added in a new field with K-GFF. Probably not, but what do I know...

Anyway, if it was a mod that had it's own specific way of allowing the play to obtain the new item, yes, I see your point.

Share this post


Link to post
Share on other sites
7 hours 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

I'm not sure if this was ever attempted, but couldn't we simply fiddle with appearance.2da to add a new bodytype row to K1 version? Just copy over the values from, say the Heavy armor class 9, and name the models PMBKL, PMBKM, PMBKS, and PFBKL, PFBKM, PFBKS.

Again, not sure if this was ever attempted before and failed, but I figured that if it is possible, it would be the simplest solution.

Share this post


Link to post
Share on other sites
5 minutes ago, Kainzorus Prime said:

I'm not sure if this was ever attempted, but couldn't we simply fiddle with appearance.2da to add a new bodytype row to K1 version? Just copy over the values from, say the Heavy armor class 9, and name the models PMBKL, PMBKM, PMBKS, and PFBKL, PFBKM, PFBKS.

Again, not sure if this was ever attempted before and failed, but I figured that if it is possible, it would be the simplest solution.

I have a feeling it would be misread by the game when loaded.

Share this post


Link to post
Share on other sites
27 minutes ago, Kainzorus Prime said:

I'm not sure if this was ever attempted, but couldn't we simply fiddle with appearance.2da to add a new bodytype row to K1 version?

It's not a row, it's a column. It's not possible to add new columns to KOTOR 2DA files and have the game recognize them. I understand that it is possible for NWN, and that makes me sad.

  • Sad 1

Share this post


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

It's not a row, it's a column. It's not possible to add new columns to KOTOR 2DA files and have the game recognize them.

How about using 2DA Converter/Merger Tool? WIP now adding a new column to the spreadsheet. 🤞

Spoiler

1610407238_New2DAColumnWIP.PNG.0e894c29e4a625bf411cc296742b0d95.PNG

Update: The new column does appear after reconvert the sheet again to .2da. Still, haven't test if it actually works in-game though. 🤞

Spoiler

1436303541_New2DAColumnWIP2ndPhase.PNG.2ff08d3b6bbe3485185f29b3f7cfacae.PNG

Update: Doomed to fail. 🙃

Edited by ebmar
Failed attempt.

Share this post


Link to post
Share on other sites

It doesn't matter. The game won't read it because it won't know what it does. I've tried it before, though I don't remember if it crashes or just doesn't read the new information. If you want try it, go ahead.

  • Sad 1

Share this post


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

It doesn't matter. The game won't read it because it won't know what it does. I've tried it before, though I don't remember if it crashes or just doesn't read the new information. If you want try it, go ahead.

Lol the game did not crashes but all characters can't even move. Dang. 🙃

Yeah, it does make sense 'cause the new column is not connected to any UTI so it doesn't have its purpose that said.

Share this post


Link to post
Share on other sites
1 hour ago, ebmar said:

Lol the game did not crashes but all characters can't even move. Dang. 🙃

Yeah, it does make sense 'cause the new column is not connected to any UTI so it doesn't have its purpose that said.

That's not related to the column not being connected to a UTI. The main game executable simply doesn't know what to do with that row. That's the problem. So unless we get the sourcecode for the game, there's no chance of us ever adding columns to 2da files.

Share this post


Link to post
Share on other sites

So the idea with duplicating character model would probably be the best, though really painful to implement. But isn't there a possibility to put that duplicate "you" that will be a reminder for the script what head you have completely outside the map? Or is it somehow prevented from happening in the game?

Share this post


Link to post
Share on other sites
On 8/12/2018 at 2:13 PM, 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.

@superSzym

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.