You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, I'm not sure if this is a HoloPatcher issue, user issue or simply a difference in implementation that probably needs to be documented.
I'm testing this with a mod edits k_ai_master.nss and adds 2 new includes. The mod works when compiled manually as well as when compiled using TSLPatcher. TSLPatcher recommends putting nwnnsscomp.exe and nwscript.nss in tslpatchdata (using nwnsscomp included with TSLPatcher and a KOTOR 1 nwscript from the Steam version). For setups without namespaces, all other files go here as well. For setups with namespaces, all source files (except nwscript.nss) go into the namespace folder (if a separate namespace folder is chosen). This is slightly rambly and step-by-step, so a more concise TLDR is at the end.
The relevant section of changes.ini in all cases is:
[CompileList]
Replace0=k_ai_master.nss
The first difference/issue I ran into is when I'm NOT using namespaces
This is how tslpatchdata looks
When running the install, everything compiles and works properly, but nwscript.nss is additionally moved into Override.
nwsscript.nss snippet from installer
Now, with namespaces (all of the relevant files are now in the "base" folder).
tslpatchdata setup that works for TSLPatcher
Attempting to install with holopatcher will now use built-in compilers and return a compilation error:
[Error] [17:15:59] Function 'CheckAppliedEffect' already has a prototype or been defined.
Attempting to remove the unnecessary define returns a different compilation error.
Moving both nwnnsscomp.exe and nwscript.nss into the folder with changes.ini resolves the issue, but nwscript.nss is now moved to Override yet again.
TLDR:
The installer copies nwscript.nss into Override. This is probably undesirable behaviour;
HoloPatcher looks for nwnsscomp.exe and nwscript.nss within the same directory as the changes.ini for a given namespace. This could either be fixed to work like TSLPatcher or (even better) just documented on the wiki in the HoloPatcher changes section.
Builtin compiler works differently from nwnsscomp.exe, at least with KOTOR 1 scripts. The fact that it even exists should probably be mentioned on the wiki.
Additionally, would you even recommend distributing mods as source nss files to begin with or is it better to just precompile them and include the source separately?
The text was updated successfully, but these errors were encountered:
We ran into each other in one of the kotor discords, since this was discussed I'll publicly post the information here as well.
The installer copies nwscript.nss into Override. This is probably undesirable behaviour;
At the time of introducing nwscript.nss being moved into Override, I was using the KTool version which requires it. It turns out there are actually 4 known versions of nwnnsscomp.exe, which have since been documented here nwscript.nss is required for KScript, V1, and KTool's versions.
The installer moving nwscript.nss is left in as an attempt to unify all 4 versions and abstract away the burden of determining if they are using the correct version.
You can prevent nwscript.nss from being moved by simply taking the file out of your tslpatchdata namespace. Eventually we will implement a check for which nwnnsscomp.exe version the user is using and only move that script if they are using the non-tslpatcher version.
TSLPatcher recommends putting nwnnsscomp.exe and nwscript.nss in tslpatchdata (using nwnsscomp included with TSLPatcher and a KOTOR 1 nwscript from the Steam version). For setups without namespaces, all other files go here as well. For setups with namespaces, all source files (except nwscript.nss) go into the namespace folder (if a separate namespace folder is chosen). This is slightly rambly and step-by-step, so a more concise TLDR is at the end.
HoloPatcher looks for nwnsscomp.exe and nwscript.nss within the same directory as the changes.ini for a given namespace. This could either be fixed to work like TSLPatcher or (even better) just documented on the wiki in the HoloPatcher changes section.
This was recently discovered behavior and is currently fixed on master and will be in the next beta5 version of v1.6. Seems we forgot consider namespaces when looking up nwnnsscomp.exe
Builtin compiler works differently from nwnsscomp.exe, at least with KOTOR 1 scripts. The fact that it even exists should probably be mentioned on the wiki.
First of all, I'm not sure if this is a HoloPatcher issue, user issue or simply a difference in implementation that probably needs to be documented.
I'm testing this with a mod edits k_ai_master.nss and adds 2 new includes. The mod works when compiled manually as well as when compiled using TSLPatcher. TSLPatcher recommends putting nwnnsscomp.exe and nwscript.nss in tslpatchdata (using nwnsscomp included with TSLPatcher and a KOTOR 1 nwscript from the Steam version). For setups without namespaces, all other files go here as well. For setups with namespaces, all source files (except nwscript.nss) go into the namespace folder (if a separate namespace folder is chosen). This is slightly rambly and step-by-step, so a more concise TLDR is at the end.
The relevant section of changes.ini in all cases is:
The first difference/issue I ran into is when I'm NOT using namespaces
This is how tslpatchdata looks
When running the install, everything compiles and works properly, but nwscript.nss is additionally moved into Override.
nwsscript.nss snippet from installer
Now, with namespaces (all of the relevant files are now in the "base" folder).
tslpatchdata setup that works for TSLPatcher
Attempting to install with holopatcher will now use built-in compilers and return a compilation error:
[Error] [17:15:59] Function 'CheckAppliedEffect' already has a prototype or been defined.
Attempting to remove the unnecessary define returns a different compilation error.
Moving both nwnnsscomp.exe and nwscript.nss into the folder with changes.ini resolves the issue, but nwscript.nss is now moved to Override yet again.
TLDR:
Additionally, would you even recommend distributing mods as source nss files to begin with or is it better to just precompile them and include the source separately?
The text was updated successfully, but these errors were encountered: