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?
Migrated from: NickHugi/PyKotor#105
Original author: @Nereithr
Original created: 2024-05-17T14:25:32Z
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?
Migrated from: NickHugi/PyKotor#105
Original author: @Nereithr
Original created: 2024-05-17T14:25:32Z