Jump to content

Home

Can someone help me merge some .ncs files?


Recommended Posts

I've tried to install a lot of mods, and for most of the process I got lucky and didn't have too much problems. However, the following has goofed:

 

I've installed the mod that adds the Jedi Temple on Courscant as a location you can fly to. (At least, I suspect this mod is the culprit.) Then I tried to install Stoffe's Handmaiden for Female PCs mod.

 

Here's where it gets ugly; Handmaiden for Females modifies and copies a whole crap-ton, so uninstalling it and everything else would probably involve a clean sweep of my KotOR2. I don't want to go to that extreme, so I need to figure out how to merge three files:

 

k_enter_601.ncs

k_hen_discipdlg.ncs

k_sup_galaxymap.ncs

 

The trouble is I have no clue. The closest to modding any game I ever got was making uberitems for NWN, so I'm in the deep end. Can someone tell me what I need to do, what tools I need to merge these?

Link to comment
Share on other sites

I've tried to install a lot of mods, and for most of the process I got lucky and didn't have too much problems. However, the following has goofed:

 

I've installed the mod that adds the Jedi Temple on Courscant as a location you can fly to. (At least, I suspect this mod is the culprit.) Then I tried to install Stoffe's Handmaiden for Female PCs mod.

 

Here's where it gets ugly; Handmaiden for Females modifies and copies a whole crap-ton, so uninstalling it and everything else would probably involve a clean sweep of my KotOR2. I don't want to go to that extreme, so I need to figure out how to merge three files:

 

k_enter_601.ncs

k_hen_discipdlg.ncs

k_sup_galaxymap.ncs

 

The trouble is I have no clue. The closest to modding any game I ever got was making uberitems for NWN, so I'm in the deep end. Can someone tell me what I need to do, what tools I need to merge these?

 

TSL Patcher might be able to merge them; if you don't know how to use this there are tutorials on this site or you could try requesting for someone to merge the files using the TSL patcher program; i think this is the only way to get two incompatible mods to work with each other.

 

Hope this helps in some way.

Link to comment
Share on other sites

TSL Patcher? Sorry - completely in the deep end here. What is TSL patcher?

 

Here's a link for the program:

http://www.lucasforums.com/showthread.php?t=149285

 

A quick tutorial:

http://knightsoftheoldrepublic.filefront.com/info/TSLpatchercharacter

 

If you don't know how to use it, contact the authors of the mods you are using (contact information should be in the readme) and ask them if they will make a patcher with the program, which will then combine the mods your using; all you have to do then is run the installer and voila!! Also ask Stoffe, a prominent member of the community and the author of the TSLPatcher tool if you need any assistance. Basically the program was designed with these problems in mind to help modders make mods that would be compatible with other mods in the community; it therefore allows for a more diverse modding community!

 

BE WARNED HOWEVER THAT NOT ALL MODS CAN WORK TOGETHER, EVEN WITH THE TSLPATCHER, BUT THIS SHOULD GET YOU ON THE RIGHT TRACK.

 

Hope this helps! :thumbsup:

Link to comment
Share on other sites

I need to figure out how to merge three files:

k_enter_601.ncs

k_hen_discipdlg.ncs

k_sup_galaxymap.ncs

 

The trouble is I have no clue. The closest to modding any game I ever got was making uberitems for NWN, so I'm in the deep end. Can someone tell me what I need to do, what tools I need to merge these?

 

You'll need the latest version of KotorTool to compile scripts. Further you'll need the NSS file (source code) variants of the above mentioned scripts. Most modders tend to include the script source code with their mods.

 

It's probably easier to take the NSS file from the other mod you have and apply the changes the Handmaiden mod does, since it only modifies a few lines here and there.

 

Open k_enter_601.nss from your other mod with KotorTool's script editor, and find the line that looks like...

AssignCommand(GetObjectByTag("disciple"), ActionStartConversation(GetFirstPC(), "disc_enc"));

...and replace it with...

AssignCommand(GetObjectByTag("disciple"), ActionStartConversation(GetFirstPC(), "602disc_enc"));

 

Next open k_hen_discipdlg.nss and find the lines that look like...

   // If Atton is on escape from 650DAN to 006EBO.
   else if(GetGlobalNumber("000_Disciple_Joined") == 0)
   {
       BeginConversation( "disc_enc" );
       return;
   }

...and replace them with...

   // If Atton is on escape from 650DAN to 006EBO.
   else if(GetGlobalNumber("000_Disciple_Joined") == 0)
   {
   	if (GetModuleName() == "602DAN")
       	BeginConversation( "602disc_enc" );
       else
       	BeginConversation( "disc_enc" );
       return;
   }

 

Finally, open k_sup_galaxymap.nss and first find the line that looks like...

   else if( (GetGlobalNumber("000_Jedi_Found") >= 1) && (GetGlobalNumber("000_Jedi_Found") < 4) && (GetGlobalNumber("000_Atriscs1") == 0) && (GetGlobalBoolean("000_PLAYER_GENDER")))

...and replace it with...

else if( (GetGlobalNumber("000_Jedi_Found") >= 1) && (GetGlobalNumber("000_Jedi_Found") < 4) && (GetGlobalNumber("000_Atriscs1") == 0) && IsAvailableCreature(NPC_HANDMAIDEN))

...and then find the line...

else if( (GetGlobalNumber("000_Jedi_Found") >= 2) && (GetGlobalNumber("000_Jedi_Found") < 4) && (GetGlobalNumber("000_Siscut1") == 0) && (GetGlobalBoolean("000_PLAYER_GENDER")))

...and replace it with...

else if( (GetGlobalNumber("000_Jedi_Found") >= 2) && (GetGlobalNumber("000_Jedi_Found") < 4) && (GetGlobalNumber("000_Siscut1") == 0) && IsAvailableCreature(NPC_HANDMAIDEN))

 

Save and compile your modified scripts, and make sure the resulting NCS files are saved in the override folder.

 

TSL Patcher? Sorry - completely in the deep end here. What is TSL patcher?

 

It's a mod installer utility that is sent with some mods to place files in the proper places, modify game data files and merge some types of data files together to make them compatible. It can however not make standard scripts modified by different mods compatible, so it's not relevant to your current problem. :)

Link to comment
Share on other sites

Stoffe's method is, however, a lot easier and less time-consuming than mine, and there is no gaurantee that you'll be able to get the mods in question working with each other with the TSLPatcher. It'll therefore probably be easier if you stick to the above method than with the Kotor Tool rather than with the TSLPatcher, especially since you don't seem to have a clue what the TSLPatcher is - it'll save you a lot of hassle in the long-run! Besides, Stoffe will definately know what he/she is talking about so i'd definately stick to her/his advice.

 

It can however not make standard scripts modified by different mods compatible, so it's not relevant to your current problem. :)

Didn't realise that Stoffe! I still think the tool is pretty awesome though, as we would have less choices in terms of mod installation without it - good work on the tool anyways, i don't think i ever thanked you for it! :thumbsup:

Link to comment
Share on other sites

Ugh, I think they may have come from three different mods. (Headache time).

 

Is there any way to decompile an NCS into an NSS? Also, I have the latest KotOR Tool. I'll keep looking for those phantom files, though.

 

Which is the third mod aside from the Handmaiden for Females and the Coruscant mod? Check in the RAR/ZIP/7z file you downloaded the mod in if the NSS files are included. They usually aren't put in the override folder since the game doesn't use them directly (it uses the NCS bytecode files).

 

If the mod does not include the source files for some reason the easiest way is probably to contact the mod's author and ask for the files.

 

You can reconstruct NSS source code from NCS bytecode using the DeNCS utility, but the code it produces isn't very clean or optimally human readable so it can be a bit confusing if you aren't somewhat familiar with NWScript and what the script in question is supposed to be doing. So I would only use this as a last resort if you can't find the NSS files for the mod, or get in contact with the mod author.

Link to comment
Share on other sites

Well, I found the source nss files - the galaxy map was from the Jedi Temple mod, k_enter was from the USM, and k_hen_discipledlg was from Stoffe's Improved AI mod.

 

Now, how do I open an nss file in KotOR tool? Really, really newbish here... I'm looking, but I don't see an option for nss files.

Link to comment
Share on other sites

Well, I found the source nss files - the galaxy map was from the Jedi Temple mod, k_enter was from the USM, and k_hen_discipledlg was from Stoffe's Improved AI mod.

 

Now, how do I open an nss file in KotOR tool? Really, really newbish here... I'm looking, but I don't see an option for nss files.

 

I think it's part of the text editor. Don't know exactly since I don't use the script editor in KotorTool and haven't bothered to install the latest version yet. :)

 

Look in the Tools menu --> Open Text editor. Check the menus of that window to see if it has any commands for compiling scripts.

 

As long as all the mods don't modify the same file you should be able to use the modifications I described above. (And if they did all modify the same script two of them would already be incompatible if you haven't merged them already :))

Link to comment
Share on other sites

Houstan, we have a problem.

 

This is the entirety of the k_enter_601.nss file that I found:

 

//k_enter_601
void main()
{
    object oEntering = GetEnteringObject();
    if (GetIsPC(oEntering))
    {

              ExecuteScript("old_enter_601", OBJECT_SELF);
              ExecuteScript("dan_replcwep", OBJECT_SELF);
   }
}

 

Somehow I think this is wrong, as the lines you told me to change in k_enter_601 don't even appear.

Link to comment
Share on other sites

I'm thinking it might be easier to merge the above information with the .nss file I took from the handmaiden file, which actually appears to be complete. But honestly, I don't know what any of this is referring to. I'm not even sure what k_enter_601 does. There's some clear calls for Vrook's status, and some other stuff about the disciple and other characters, but I'm not sure why the USM would modify this file.

 

I'm kinda confused at this point.

 

 

[edit] To be clear, the version of k_hen_discipledlg that I found was already the same as the information you gave me above - it seems to have been emplaced already by the improved AI mod. So that's all set. I merged the map file, but I just don't know what to do with k_enter_601.

Link to comment
Share on other sites

Houstan, we have a problem.

 

This is the entirety of the k_enter_601.nss file that I found:

Somehow I think this is wrong, as the lines you told me to change in k_enter_601 don't even appear.

 

Take the file from the Handmaiden mod and paste this in as the first line after void main() instead:

ExecuteScript("dan_replcwep", OBJECT_SELF);

 

That should merge them. That mod uses a renamed version of the original script that's fired from the script you found. All the things that mod itself does are run from the line above, so pasting it into the full script should work just as well.

 

But honestly, I don't know what any of this is referring to. I'm not even sure what k_enter_601 does.

 

It is a script that runs when the player enters the Khoonda Interior on Dantooine. The change to this script by the Handmaiden mod makes the short cutscene where the unrecruited Disciple contacts Adm. Onasi/Cede play properly.

Link to comment
Share on other sites

Okay, I got that... But I'm experiancing yet more unusual weirdness.

 

I installed the AI update, but when I unequipped T3's mining laser (so the only weapon he had was his shock arm), he instead chose to close to melee range.

 

I'm thinking I'm totally screwed up here, so I'm thinking of doing a clean re-install of KotOR2, or at least bombing the Override and everything else and starting over.

 

Here's the list of mods I want to install, I'm trying to figure out the proper order to install them:

 

The Ultimate Saber Mod

Everything by Stoffe except the Arena

The Courscant Jedi Temple

Slender Bodies for Females 1.1 (I have a strong feeling this one will conflict with the new look for Visas Marr and the Handmaiden - I think I'll just wind up not using the new look mods for those two)

Feat Progession for TSL

 

Here's my plan:

Step 1: Slender Females

Step 2: Feat Progression

Step 3: USM

Step 4: Jedi Temple

Step 5: Stoffe's Files

Step 7-n: Merge the files used by Stoffe's mods with the ones from the other mods.

 

 

Should I try a clean re-install, or should I just wipe out Overrides and start over?

Link to comment
Share on other sites

Slender Bodies for Females 1.1 (I have a strong feeling this one will conflict with the new look for Visas Marr and the Handmaiden - I think I'll just wind up not using the new look mods for those two)

 

I don't think there should be any conflict if you install the Visas/HM look mods after you've installed the Slender mod.

 

 

Here's my plan:

Step 1: Slender Females

Step 2: Feat Progression

Step 3: USM

Step 4: Jedi Temple

Step 5: Stoffe's Files

Step 7-n: Merge the files used by Stoffe's mods with the ones from the other mods.

Should I try a clean re-install, or should I just wipe out Overrides and start over?

 

If you only have mods that install into the override folder then it should be enough to clear that out. If you have mods that modifies or puts files in the Stream* folders, the Modules folder or modifies the dialog.tlk file you should remove or restore those as well.

 

The install order above seems OK to me. Generally you'll want to install mods that come with an installer after those that do not, since the installers (if properly configured) tend to modify files rather than replace them entirely.

 

When you install the Handmaiden for Females mod, make sure you pick the install option that's USM compatible. If that option doesn't exist, or your copy doesn't come with an installer, you should download the latest version that does.

Link to comment
Share on other sites

Okay, I've got you. I'm not sure exactly what all has been altered - I know StreamVoice is one of the things that gets altered by one of these mods, as is Dialoge.tlk - that's the one that really worries me.

 

Whenever I (tried) to install your Visas/Handmaiden mod, it said that Appearance.2da was present in the Override folder, but was not in a binary format. I don't know what that means, that's why I'm thinking they're incompatable.

Link to comment
Share on other sites

Whenever I (tried) to install your Visas/Handmaiden mod, it said that Appearance.2da was present in the Override folder, but was not in a binary format. I don't know what that means, that's why I'm thinking they're incompatable.

 

That usually mean that some mod for some reason use the old 2DA V2.0 plain text format (legacy from NWN) rather than the faster KOTOR 2DA v2.b binary format. Neither KotorTool nor TSLPatcher will handle this old file format, so it will cause trouble with any mod using an installer that modifies the appearance.2da file. This will eventually cause trouble so you should use a 2DA file with the proper format instead.

 

I suggest you remove this old appearance.2da file from your override folder and determine which mod it originates from, and then extract a new copy of the file with KotorTool from the game data to your override folder, and use KotorTool's 2DA editor to apply the changes the offending mod as done to this file manually.

 

(If you have a decent text editor or text compare utility that can ignore whitespaces you can convert a copy of the clean appearance.2da to text and then compare it to the modified file from the mod to see what has been changed.)

Link to comment
Share on other sites

Well, I don't have a text compare utility...

 

But it dosen't really matter. apparently some virus hit my computer awhile back, and it went through maliciously removing uninstall utilities for some unknown reason. I can't make KotOR 2 UNinstall - and yes, I tried using Windows Add/Remove Programs utility. I honestly do not know what to do at this point.... *sigh*

 

Anyway, as far as the faulty appearance.2da, I'm pretty certain it originates from the slender bodies mod, as it's the only one which seems to have a copy of appearance.2da.

Link to comment
Share on other sites

Anyway, as far as the faulty appearance.2da, I'm pretty certain it originates from the slender bodies mod, as it's the only one which seems to have a copy of appearance.2da.

 

I had a look at it, and the only thing that mod changes in the appearance.2da file is that it replaces the standard clothes appearance of all the female player appearance types. If you want to apply this change manually, find appearance.2da inside 2da.bif with KotorTool, extract it to the override folder and open it with KotorTool's 2DA editor.

 

Then, for every line where the text in the label column starts with P_FEM_ go to the modelb column and replace the value N_CommF (that should be there) with pfbbm. Then go to the texb column right next to it and replace N_CommF there with pfbb.

 

That will change the clothes model from the standard commoner outfit to whatever model this mod includes.

 

I can't make KotOR 2 UNinstall - and yes, I tried using Windows Add/Remove Programs utility. I honestly do not know what to do at this point....

 

If the CD launcher won't let you install or uninstall the game you could try to remove the game's registry keys and see if that's what it checks for.

 

Go into the registry editor (do Start menu --> Run... and type in regedit in the box) and navigate to the key...

HKEY_LOCAL_MACHINE\SOFTWARE\Obsidian\Star Wars(R) Knights of the Old Republic(R) II: The Sith Lords(TM)

If it exists then right-click on that key and choose Remove... in the context menu that pops up.

Link to comment
Share on other sites

You're a genious, Stoffe.

 

What I wound up doing was manually removing every reference to "kotor" that was actually referencing the game itself from my registry - KotOR1 wasen't installed, so I only got swkotor2, and then removing the file dir completely. A manual uninstall, for only the most desperate/determined/bullheaded computer users.

 

I'm gonna clean reinstall KotOR 2 - I'll have to fight my way through Peragus again, but c'est la vie, or however it's spelled. Eh, I wasen't happy with my PC name anyway... And this time, I think I'll take the female Twi'lek. :)

Link to comment
Share on other sites

Okay, now, this leaves me confused.

 

Do I have to install Update 5 for the USM if I get the latest version of your Handmaiden mod?

 

You shouldn't have to install both. If you pick the USM Compatible install option when installing the Handmaiden mod it should incorporate those fixes already, unless I'm forgetting something. :)

Link to comment
Share on other sites

Okay, something didn't work right.

 

I did exactly what you said - I changed all the P_FEM_*s to pfbb, manually, and started the game with only that appearance.2da and the other files from that mod in my appearance folder.

 

I started a new game, to test - it froze on "loading", and I had to quit the game. I think something may be wrong here... :)

 

Should I replace all the N_CommFs with pfbbs?

Link to comment
Share on other sites

I did exactly what you said - I changed all the P_FEM_*s to pfbb, manually, and started the game with only that appearance.2da and the other files from that mod in my appearance folder.

 

Check that you aren't missing the m at the end of the name (pfbbm) in the modelb column. The texb column should just have pfbb set.

 

Also check that there are files named pfbbm.mdl, pfbbm.mdx and pfbb01.tga in your override folder.

Link to comment
Share on other sites

Check that you aren't missing the m at the end of the name (pfbbm) in the modelb column. The texb column should just have pfbb set.

 

Also check that there are files named pfbbm.mdl, pfbbm.mdx and pfbb01.tga in your override folder.

 

That's gotten me most of the way there, anyway...

 

It's not crashing anymore, but when I get to the load screen, the two female Jedi that aren't Consulars (Guardians and whatever the middle one is) have entirely white outfits. While this isen't exactly unwelcome, seeing as how it looks pretty fly, it's also not what's supposed to happen. I've moved every single file from the slender females mod into the Override folder except for appearance.2da, so it's gotta be something from that. I think something else is missing and needs changing.

 

[edit] I thought I fixed it - I only made things worse. Here's what happened:

 

I thought that the first set of P_Fems was the only one - there were two more in the file, which I found by looking at his appearance.2da with a text editor, and then changing it in kotor tool.

 

But all that did was turn all THREE Jedi females into ladies wearing pure white, 1960s PVC sex-kitten suits. While not a bad change, not what was desired, I think.

 

I suspect that there are yet more differences than meet the eye.

 

[edit2] pfbbm.mdl, pfbbm.mdx and pfbb01.tga are all present and accounted for... I just don't get it. As near as I can tell, these two appearance.2das are identical.

 

[edit3] okay, now I'm just plain out confused. When I start the game, sometimes the female models show up with the blue outfit, sometimes they show up pure white. It's like it's deciding arbitrarily whether or not to apply pfbb01.tga as a skin!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...