shinyquagsire23 / OpenJKDF2

A cross-platform reimplementation of JKDF2 in C
Other
487 stars 38 forks source link

Lightsabers too thin if using Enhancement Mod #288

Open LeiFangBaby opened 7 months ago

LeiFangBaby commented 7 months ago

If I use Enhancement Mod with OpenJKDF2, either vanilla or MOTS, the lightsaber blades look matchstick-thin, and not at all like in screenshots that show how they're supposed to. I am talking about these mods: https://www.moddb.com/mods/todoa/downloads/emjk and https://www.moddb.com/mods/todoa/downloads/emsith

It doesn't matter if it's a new game or loaded save, any level, and issue persists with both Dark Forces 2: Jedi Knight and Mysteries of the Sith. I have them on Steam. Tried fresh installs, remastered pack, any way, and they look like this, blade doesn't even fill the hilt: Screenshot 2023-11-26 09-52-23 Screenshot 2023-11-26 09-53-15 Screenshot 2023-11-26 09-54-07 Screenshot 2023-11-26 09-54-22

And yes, Enhancement Mod says it's made for JkGfxMod, but I like OpenJKDF2 better, and wonder if it's possible to make the wide lightsabers from the HD pack work for it... or if it's an issue specific to me? I tried every option I could to no avail.

Help me, people on Github, you're my only hope!

Vortikai commented 5 months ago

So some lightsaber edits are though cog edits, but I think this specific issue can be resolved by editing level files. I'd check with the author of enhancement mod to see about the best solution. An example of where we need to look is here

J-McFc commented 3 months ago

Any news on how to resolve this??

nikumubeki commented 2 months ago

Due to rendering differences between JkGfxMod and OpenJKDF2, the original COG parameters used in EMJK/EMSITH make the saber blade quite thinner with openjkdf2.

EMJK/EMSITH saber sizes have this line in the COG files:

jkSetSaberInfo(GetLocalPlayerThing(), side_mat, tip_mat, 0.002, 0.002, 0.100, tpl_wall, tpl_blood, tpl_saber);

If you change those 0.002 values to 0.003, the saber looks like this:

saber1 saber2 saber3

So if you wanted to change the saber blade size parameters, you'd have to go through each COG file (from EMJK/EMSITH) with the jksetsaberinfo stuff and change the parameters accordingly.

And of course, those parameters above are for the player's saber blade, the dark Jedis etc. have different parameters that'd have to be tweaked further. Also note that changing the values might not work as simply as that because of the trickery, shortcuts and work-arounds I used with the saber blade placements in EMJK/EMSITH, so an enlarged blade might clip with the model (which already happens under EMJK/EMSITH anyway, but usually quite subtly).

LeiFangBaby commented 2 months ago

So if you wanted to change the saber blade size parameters, you'd have to go through each COG file (from EMJK/EMSITH) with the jksetsaberinfo stuff and change the parameters accordingly.

Nice write-up, thanks! Nobody explained it before... is it possible for mod authors to make a compatible version?.. Wait, that's you, it's your mod... So can these files be edited with text editor, or we need another program?! If it's just text I can do it... probably.

nikumubeki commented 2 months ago

Oh yeah, since you have to change a lot of the same COG parameters, opening all the required files in something like Notepad++ and replacing all instances of the same line makes it rather quicker.

In EMJK's case, you'd have to edit the cogs under \Episode\JK1\cog\ and the darkjedi_*.cog files in the EnhancementMod.gob file (would need ConMan for the latter https://www.moddb.com/mods/todoa/downloads/conman).

For EMSITH the files are under \Episode\JKM\cog\ + all the cogs that don't start with weap in EnhancementAddon.goo

And yeah, some of the dark Jedis (and Sith statues in MotS etc.) have different saber blade values than 0.002, 0.002, 0.100 so they have to be changed manually (luckily there aren't that many of them)