WildKarrde

MOD:Transparent Environment Suit Faceplates for K1

Recommended Posts

Transparent Environment Suit Faceplates for K1


This mod makes the spacesuit and diving suit faceplates transparent so that you can see the head of the character wearing them, as opposed to the opaque faceplates on the vanilla suits.  There is also an option to install only the diving suits, if you prefer the spacesuits to keep their  mirrored vanilla faceplates (similar to real spacesuits).  I have also made the following edits to the suit models:
- Adjusted texture UVs to hide texture regions that appear unfinished.
- Added a bright texture to the squares on either side of the faceplate (which were apparently intended to look like lights but instead appeared reflective in the vanilla game).
- Added light beams and in-game light sources to the diving suit to simulate helmet-mounted floodlights.  (I have also included an option that does not have these lights if you prefer.)
- Added a new environment map for the spacesuit which approximates the surroundings during the spacewalk.

I have also included two optional variations:
- No Diving Suit Floodlights - Omits the diving suit's new floodlights
- Less Transparent Spacesuit Faceplates - Reduces the transparency of the spacesuit's faceplate, if you prefer a more mirrored look but would still like some transparency.  The diving suit is not affected by this option.

Please note that if you are using a non-vanilla player head, the diving suit and spacesuit will default back to the vanilla-style mirrored faceplates.  See the "Compatibility" section below for further information.

IMPORTANT:  A save from before exploring the Manaan seafloor for the first time is required.

Thank you for downloading, and I hope you enjoy this mod!

-------------------------------------------------------------------
INSTALLATION

Run INSTALL.exe and select the install directory for your game.  Select which version of the mod you would like to install from the drop-down menu at the top of the window, and click the "Install" button.  The "Full Install" options make changes to both the space suits and the diving suits, while the "Diving Suits Only" options only affect the diving suits.
IMPORTANT:
- Select one of the "K1CP 1.10+" options if you are using KOTOR 1 Community Patch (K1CP) version 1.10
  or higher.  If you are using K1CP 1.9.2 or lower, use one of the "General" options.
- Select one of the "K1R" options if you are using the KOTOR 1 Restoration (K1R) with the option "Party on
  the Sea Floor".  If you are using K1R without "Party on the Sea Floor", use one of the "General" options.

If you would like to use the "No Diving Suit Floodlights" or "Less Transparent Spacesuit Faceplates" options, select the corresponding option from the drop-down menu after the main installation is complete, and click "Install" again.

This mod includes the Windows version of HoloPatcher for installation.  If you are running on Mac or Linux, you can find the appropriate versions of HoloPatcher here, along with the latest Windows version:  https://deadlystream.com/files/file/2243-holopatcher/. This mod requires HoloPatcher version 1.5.2 or higher of HoloPatcher.

If you have other mods installed, it is normal to see warnings that some or all of the following files already exist and have been skipped:
- appearance.2da
- heads.2da
- lev40ad.mod
- manm28aa.mod
- manm28ab.mod
- manm28ac.mod
- manm28ad.mod

Selecting the "Diving Suits Only" option will still install the UV fixes and new environment map for the spacesuit.  If you do not want these changes, delete the following files from Override:
- UV Fixes: spacesuit01.mdl, spacesuit01.mdx
- Environment Map: P_WaterSuit02.txi

If you would like to edit the scripts in this mod for personal use, please note that most of the provided script source files cannot be directly compiled because they include 2DA memory tokens, placeholders which are automatically replaced by appearance.2da row numbers when compiled during installation.  Running the installer and selecting the option "MODDING TOOL: Build Script Source" will save copies of the source scripts to the subfolder "temp_nss_working_dir" within "tslpatchdata" with the necessary appearance.2da row references automatically filled in.

-------------------------------------------------------------------
COMPATIBILITY

This mod is compatible with the KOTOR 1 Community Patch (K1CP) and the KOTOR 1 Restoration (K1R).  Note that if you are using K1CP 1.10 or higher or K1R with the "Party on the Sea Floor" option, you must install the appropriate option as described in the "Installation" section above.  It is not compatible with any mods that alter the following files:
- k_plev_airouopn2.ncs
- k_pman_airlock02.ncs
- k_pman_airlock03.ncs
- k_pman_airlock11.ncs
- k_pman_starmap05.nss
- k_pman_starmap02.nss (K1CP 1.10+ installation option only.  K1CP itself is, of course, the exception that is compatible.)

This mod's edits to m28ad_01a.wok are sufficiently minor that overwriting this mod's version with one from another mod will not cause any significant issues.

For best results, install this mod after K1CP, K1R, or any other mods that make significant edits to:
- The walk speed of the space/diving suits
- The module with the Leviathan spacewalk
- The Manaan seafloor or undersea base modules

This mod is compatible with reskins and texture mods that affect vanilla heads.  It will not conflict with mods that edit the MDL/MDX files of vanilla heads, but the changes to the head model will not carry over to the head seen inside the spacesuit.  Similarly, due to the nature of a work-around used by this mod, any mods that edit the Star Map MDL/MDX will not affect the Manaan Star Map.  Mods that reskin the Star Map are compatible.

Due to the way this mod is implemented, the environment suit faceplates will still be opaque if you use a non-vanilla player head.  If you would like to see a non-vanilla head in the spacesuit, I have included instructions for making the new head compatible with this mod.  For further information, please see "Instructions to Add New Heads.pdf".
-------------------------------------------------------------------
LIMITATIONS AND KNOWN BUGS

The new lights on the diving suit do not equally affect all objects, likely due to game engine limitations.

If you are using the compatibility patch for the K1R "Party on the Sea Floor" option, your weapons will not be reequipped automatically when you reenter the underwater base.  This is a work-around for a bug where party members were somehow still able to use blasters underwater to shoot the Firaxan sharks.  Apologies for the inconvenience.

-------------------------------------------------------------------
CREDITS

KotorBlender by seedhartha
tpcview and tga2tpc by ndix UR
NWNSSCOMP by Torlack and tk102
DeNCS by JdNoa and Dashus
K-GFF by tk102
HoloPatcher by Cortisol and th3w1zard1
ERFEdit by stoffe and Fair Strides
Kotor Tool by Fred Tetra

Thanks to Nehua for suggesting an option to keep the mirrored faceplates on the spacesuits.  Thanks also to Salk for suggesting an option with intermediate transparency.

A big thank you to th3w1zard1 and Cortisol for their time and effort spent upgrading HoloPatcher to be able to compile all of the scripts in this mod.

Vanilla scripts are based on the K1CP team's repository of unaltered, decompiled vanilla scripts (found at https://github.com/KOTORCommunityPatches/Vanilla_KOTOR_Script_Source). This mod makes use of the script function CP_RemoveForceSpeed developed by the K1CP team.

The K1R-compatible version of k_pman_airlock11.ncs/nss includes edits originally developed by the K1R team.  Similarly, the K1CP-compatible version of k_pman_starmap02.nss includes edits developed by the K1CP team.

-------------------------------------------------------------------
VERSION HISTORY

1.0 - Initial Release
1.1 - Added option to install only the diving suits (suggested by Nehua).
1.2 - Added option to reduce the spacesuit faceplate's transparency (suggested by Salk).
    - Applied spacesuit environment map with a TXI file instead of a full TPC to improve compatibility
      with mods that reskin or upscale the original texture (also suggested by Salk).
1.3 - Added work-around for the Star Map to render properly when seen through the diving suit faceplate
    - Revised suit bubbles to more closely match vanilla behavior
    - Revised inner suit geometry around neck
    - Adjusted head motion during walking and running animations
    - Added code to Manaan airlock scripts to clear Force Speed before going out to the seafloor
      (vanilla issue originally documented by the K1CP team)
    - Streamlined the K1R installation process
    - Switched installer to HoloPatcher to improve cross-platform installability.  Special thanks to th3w1zard1
      and Cortisol for their substantial efforts to improve HoloPatcher's script compiling ability.

-------------------------------------------------------------------
DISCLAIMER AND PERMISSIONS

This modification is provided as-is and is not supported by Disney, Lucasarts, or Bioware.  Use at your own risk.  The author shall not be held responsible for damage to your game installation, computer, or saved games resulting from the use of this mod.

This mod shall not be reposted, in whole or in part, on any sites other than Deadly Stream without the author's permission.  Assets from this mod shall not be redistributed in other modifications without the author's permission.


  • Submitter
  • Submitted
    05/27/2023
  • Category
  • K1R Compatible
    Yes

 

  • Like 1

Share this post


Link to post
Share on other sites

Hello!

First of all, congratulations on this new modification. It was yet another neat idea coming from you.

I would like to ask you if you could elaborate a little more about one of the limitations you acknowledged in the description:

Any portion of the Manaan star map viewed through the helmet will not be visible.  I believe this is due to how the game engine handles rendering order.

What does it mean, exactly? That the Manaan Star Map (the globe) won't be rendered at all if the player switches to first-person view?

If that is the case, I find it extremely bizarre. But perhaps I misunderstood what you meant?

Cheers!

(e) Additional questions:

1) I noticed you don't use the vanilla's k_pman_airlock02.nss source script but a "decompiled by the K1CP" team version. May I ask why?

2) May I ask the reason for editing one of the two doors in the manm28ad module?

3) I noticed that in v1.1 you offer a version that applies your changes only to the water suits but not the space suits (suggested by one Forum user). I'm failing to understand why one would want this.

Thanks again!

 

Edited by Salk
Requesting more information

Share this post


Link to post
Share on other sites
16 hours ago, Salk said:

First of all, congratulations on this new modification. It was yet another neat idea coming from you.

Thank you!

16 hours ago, Salk said:

What does it mean, exactly? That the Manaan Star Map (the globe) won't be rendered at all if the player switches to first-person view?

This picture should demonstrate.  If you look closely, you can see that the part of the Star Map behind the helmet glass has disappeared.  As I understand it, it's because the game engine uses shortcuts to decide rendering order, so you sometimes get glitches like this when a transparent object is incorrectly drawn before another object behind it.  Sometimes there are ways to coax the game  into drawing things correctly, but I haven't yet found one that works here.  Fortunately, the Star Map is apparently the only placeable in this module that this happens to.

Spoiler

1464042463_DivingSuitScreenshot2.png.62a6f00d73a0f0c00860462445094ef4.png

 

16 hours ago, Salk said:

1) I noticed you don't use the vanilla's k_pman_airlock02.nss source script but a "decompiled by the K1CP" team version. May I ask why?

I actually hadn't noticed that scripts.bif had source code for it.  I saw that there was a version packaged in manm28ac.rim and jumped to the conclusion that I needed to decompile it to edit it (or, in this case, go to K1CP's repository for a pre-decompiled version).  Now that you point that out, though, k_pman_airlock02.ncs in scripts.bif is definitely not the same as the one in manm28ac.rim.  The compiled scripts are different sizes, and the decompiled code doesn't completely line up either.  (Here's the decompiled version from manm28ac.rim for comparison:  https://github.com/KOTORCommunityPatches/Vanilla_KOTOR_Script_Source/blob/master/K1/Modules/M28AC_Manaan_Hrakert_Kolto_Control_manm28ac/k_pman_airlock02.nss).  All of the scripts work like they're supposed to, so the module version must take precedence.  So...I meant to do that?

16 hours ago, Salk said:

2) May I ask the reason for editing one of the two doors in the manm28ad module?

One of the doors was disappearing behind the helmet glass just like the Star Map (only much more noticeably).  I discovered that some of its properties didn't match the other doors, and changing them to match fixed the issue without any apparent adverse side-effects.

16 hours ago, Salk said:

3) I noticed that in v1.1 you offer a version that applies your changes only to the water suits but not the space suits (suggested by one Forum user). I'm failing to understand why one would want this.

@Nehua made a good case for it in the comments section of the file.  It made sense to me, so I added it as an option.  (I think real spacesuits have a reflective visor essentially for this reason.)

Quote

To me, space suit visors still make sense to me to be kept as reflective in order to protect from dangerous space rays. Whereas for scuba suits I imagine you'd want to maximize how much light can go in or out due to the limited light conditions so transparent would be the way to go.

 

  • Like 1

Share this post


Link to post
Share on other sites
7 minutes ago, WildKarrde said:

@Nehuamade a good case for it in the comments section of the file.  It made sense to me, so I added it as an option.  (I think real spacesuits have a reflective visor essentially for this reason.)

At the risk of being pedantic, shouldn't the mod then be called something like "Transparent Diving Suit Faceplates for K1"?

Interesting mod idea!

  • Like 1

Share this post


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

At the risk of being pedantic, shouldn't the mod then be called something like "Transparent Diving Suit Faceplates for K1"?

That's a fair point...but then I'd be missing the spacesuits for the regular option, so it's a no-win scenario. And "Transparent Diving and Pressure Suit Faceplates" just seems too long.

Come to think of it, "Transparent Environment Suit Faceplates" is a decent catch-all name.  I'm going ahead and updating the title.  As long as no one minds that the readme will still say "spacesuit" until I release another update.

  • Like 1

Share this post


Link to post
Share on other sites

Hi again, WildKarrde.

Thanks for the very detailed answered. Much appreciated.

1 hour ago, WildKarrde said:

This picture should demonstrate.

Oh now I got it. It's actually worse than I thought then. I first thought it'd be an issue when using first person view only but now I see it's actually a visual glitch of a certain importance. Too bad.

@CarthOnastyreleased a star maps revamp modification. An update that should have been including new models has been in the works for many years but unfortunately never came to so I never really got to even try it. I wonder if the same glitch would happen.

1 hour ago, WildKarrde said:

Now that you point that out, though, k_pman_airlock02.ncs in scripts.bif is definitely not the same as the one in manm28ac.rim.

Yes, I noticed this only later. Sometimes the game uses more than one script with the same name in different modules and they are often similar but not identical.

1 hour ago, WildKarrde said:

@Nehua made a good case for it in the comments section of the file.  It made sense to me, so I added it as an option.  (I think real spacesuits have a reflective visor essentially for this reason.)

Indeed. It does make sense.

I'm wondering if it might not be possible to have the visor of the space suit be less transparent and more reflective than the version of the water suit so that your changes would still partly apply?

Cheers!

Share this post


Link to post
Share on other sites
55 minutes ago, Salk said:

@CarthOnastyreleased a star maps revamp modification. An update that should have been including new models has been in the works for many years but unfortunately never came to so I never really got to even try it. I wonder if the same glitch would happen.

Don't know for certain, but I suspect it would, unfortunately.  My best guess is that it happens because the Star Map also uses mesh alpha transparency, which is required for the map portion to appear and disappear.  It could be worse, the dark lighting on the sea floor makes it less obvious than it otherwise might have been.

 

58 minutes ago, Salk said:

I'm wondering if it might not be possible to have the visor of the space suit be less transparent and more reflective than the version of the water suit so that your changes would still partly apply?

That's a possibility, is there enough interest to merit adding that as an additional option?  It might also work to delete my mod's version of P_WaterSuit02.tpc, which will revert the environment map back to the vanilla CM_BareMetal.  That looks somewhat less clear and more gold, as you can see in the screenshots for the TSL version.

  • Like 1

Share this post


Link to post
Share on other sites

Hi! 🙂

1 minute ago, WildKarrde said:

It could be worse, the dark lighting on the sea floor makes it less obvious than it otherwise might have been.

Still hope you might someday find a solution. Perhaps asking a few of the modding gurus here at Deadlystream (although I think you are a fantastic modder in your own right).

3 minutes ago, WildKarrde said:

That's a possibility, is there enough interest to merit adding that as an additional option?

Well, it would most definitely be the version I'd go for. It would strike a very fine balance, in my opinion.

I could test it for you, if you'd like me to.

Cheers!

  • Like 1

Share this post


Link to post
Share on other sites

Could a second placeable be created and overlaid on top of the current starmap that looks like the starmap base and uses it's textures but isn't transparent?

Share this post


Link to post
Share on other sites
15 hours ago, Nehua said:

Could a second placeable be created and overlaid on top of the current starmap that looks like the starmap base and uses it's textures but isn't transparent?

Splitting the model out into opaque and transparent components is an interesting idea (although that would probably mean the transparent projected components of the map would still disappear).  Unfortunately, KOTOR 1 is severely limited in terms of adding new placeable models, as outlined in this thread:  

I gather that current modding practice is to avoid adding new placeables if at all possible for this reason, so unfortunately that probably wouldn't be a practical solution in this case.  But thanks for the idea.

Share this post


Link to post
Share on other sites
On 5/29/2023 at 8:56 PM, Sith Holocron said:

At the risk of being pedantic, shouldn't the mod then be called something like "Transparent Diving Suit Faceplates for K1"?

Interesting mod idea!

Did you forget that you get to take a short stroll in space on the Leviathan?? it's still Environment suits for K1. LOL😂🤣

Share this post


Link to post
Share on other sites
38 minutes ago, ConansHair said:

Did you forget that you get to take a short stroll in space on the Leviathan?? it's still Environment suits for K1. LOL😂🤣

I was talking about the mod name, which the author changed at my suggestion.  😋

  • Haha 1

Share this post


Link to post
Share on other sites

Several months later, I’m pleased to report that I’ve finally found a work-around to fix the render issue with the Star Map seen through the diving suit faceplate.  It’s a little outside the box:  I replaced Manaan’s Star Map placeable with a stationary NPC (essentially a turret) which looks exactly like the Star Map.  I was inspired by this thread, which mentioned making placeables into NPCs as a way to get around the appearance.2da row limit bug.  That plus changing the faceplate TXI to "blending additive" (suggested by DarthParametric back when I originally released this) finally made the Star Map render correctly through the helmet:

Spoiler

1188302533_StarMapRenderingFix-Inset.jpg.90b74c8297853614725adc3b205e2472.jpg

I have updated the mod to include this fix along with a few other minor tweaks.  I have also switched over to HoloPatcher for the installer—thanks a ton to th3w1zard1 and Cortisol, who spent a lot of time upgrading HoloPatcher’s script compiling ability to handle the scripts in my mod.

  • Like 2

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.