PDA

View Full Version : Question about romance mod ..


NeoShodan
01-16-2004, 07:12 AM
Is there something like that out there or could someone tell me how to change the gender in the savefile. Should be easy enough .. i even found a entry in the savefile using a hexeditor that said gender but the value is always 00 no matter what gender you play.

Hoa_Binh
01-16-2004, 08:09 AM
I have been looking into this and have found a way to alter it, but! the save will not load after altering the gender of the main character.

I'm checking out any other way of doing it and have so far found two script used to return the gender of the user and two that checks for flirting but have not gone further than that.

Fair34
01-17-2004, 09:01 PM
I was dorking around with that this morning and I seem to have managed to get the flirting dialogue with Bastila with a female PC. It wasn't with the save files though, I just did a little tweaking with the k_con_flirt/no and the k_con_is(fe)male scripts.

NeoShodan
01-18-2004, 02:45 AM
where and what did you change excactly ? its the first time im trying to change something in this game so i have no idea where to find this k_con .. =/

Gloranor
01-18-2004, 06:33 AM
k_con_* are scripts that are checking if something is in a spcific condition... for example, if the PC is female.

First you have to extract said scripts from the script.bif. To do that, get teh NWNexplorer (from http://www.torlack.com ), start it, and open the chitin.key which is located in the main kotor directory.
Goto NWN Main Data -> Scripts.bif -> Scripts and search "k_con_isfemale.nss", "k_con_ismale.nss", "k_con_flirt.nss" and "k_con_flirtno.nss" export theese into a directory.

Now open the exported nss-files (neverwinter script source ir whatever...) in a normal texteditor - emacs, notepad, wordpad, whatever.

Change the k_con_ismale nss into this (Bold - here is what changed, italic - added comments):


//:: k_con_ismale
/*
checks if pc is male
*/
//:: Created By: Jason Booth
//:: Copyright (c) 2002 Bioware Corp.

#include "k_inc_debug"

int StartingConditional()
{
int iGender = GetGender(GetFirstPC());
if (iGender == GENDER_FEMALE)
{
return TRUE;
}
return FALSE;
}



k_con_isfemale:

//:: k_con_isfemale
/*
checks to see if pc is female
*/
//:: Created By: Jason Booth
//:: Copyright (c) 2002 Bioware Corp.

#include "k_inc_debug"

int StartingConditional()
{
int iGender = GetGender(GetFirstPC());
if (iGender == GENDER_MALE)
{
return TRUE;
}
return FALSE;
}



k_con_flirt

//:: k_con_flirt
/*
checks to see if npc and pc are of the opposite sex and the pc's
charisma is normal or better
*/
//:: Created By: Jason Booth
//:: Copyright (c) 2002 Bioware Corp.

#include "k_inc_debug"

int StartingConditional()
{
int nGender = GetGender(GetPCSpeaker());
if(GetAbilityScore(GetPCSpeaker(),ABILITY_CHARISMA ) >= 10)
{
if(nGender == GetGender(OBJECT_SELF))
{
return TRUE;
}
else
{
return FALSE;
}
}
return FALSE;
}


k_con_flirtno



//:: k_con_flirtno
/*
checks if pc charisma is low or pc and npc are same sex
*/
//:: Created By: Jason Booth
//:: Copyright (c) 2002 Bioware Corp.

#include "k_inc_debug"

int StartingConditional()
{
if((GetGender(GetPCSpeaker()) != GetGender(OBJECT_SELF)) ||
GetAbilityScore(GetPCSpeaker(),ABILITY_CHARISMA) < 10)
{
return TRUE;
}
return FALSE;
}



Now you have to recompile your edited scripts, todo that you need a compiler - I recommend the commandlinecompiler HazardX modified for the use with kotor, http://www.megamods.de/_data/parts/dl.php?file=37 . Put the executable into the directory in which the nss are, start a command prompt and goto that directory, and type "nwnnsscomp.exe -c k_con_*", switch back to the windows explorer and copy the for .ncs-files you now have into the overridedirectory in the swkotor main directory.

I haven't tested it, but it should do the trick.

HTH

Hoa_Binh
01-18-2004, 07:12 AM
It will take until Dantooine before you can be certain if it works (it is there where the flirting with Bastila really starts). I'm currently playing a game to test and has so far, I think, gotten somewhat different dialog options.

I don't know if it matter when you add this mod to the game, but I'm going to try it from before I get Bastila.

(edit)

And in my version of the mod I changed the two flirt scripts to only check for high charisma and not for gender like this:

int StartingConditional()
{
if(GetAbilityScore(GetPCSpeaker(),ABILITY_CHARISMA ) >= 10)
{
return TRUE;
}
return FALSE;
}

Gloranor
01-18-2004, 07:40 AM
IIRC teh first different dialog option is "and saved the damsel in distress" (or something similar, I have the german version and don't know what the original line was) when you talk to her the first or second time in the taris apartment...

And yes, if you want all flirts possible, that is the best way *grin*

NeoShodan
01-18-2004, 08:28 AM
normaly haden trys to come on to the female pc (the seedy guy in the lower cantina) and now hes not. so i gues its realy working ! trying with a guy now but im pretty sure thatll work as well, Thanks alot for all the help ! btw someone should make a real mod out of this and host it somewhere , im pretty sure alot of people would be interested in it.

Hoa_Binh
01-18-2004, 09:38 AM
I'm aming to make a mod that allows the player to select with whom they want to be able to have a romance with, Carth, Bastila or Juhani (or any two, or all three). The small mod I have done so far will only work with a female character and Bastila but I aim to make it totally up to the player.

Hoa_Binh
01-18-2004, 09:39 AM
Originally posted by Gloranor
IIRC teh first different dialog option is "and saved the damsel in distress" (or something similar, I have the german version and don't know what the original line was) when you talk to her the first or second time in the taris apartment...

And yes, if you want all flirts possible, that is the best way *grin*

I got that. That might mean that this works!

:)

Fair34
01-18-2004, 12:01 PM
I played through last night with a female PC and I got "the kiss"
Now Im going to see if Carth hits on a male PC. That should be good for a couple of laughs. hehehe

k0la
01-20-2004, 10:40 AM
Originally posted by Hoa_Binh

int StartingConditional()
{
if(GetAbilityScore(GetPCSpeaker(),ABILITY_CHARISMA ) >= 10)
{
return TRUE;
}
return FALSE;
}


Originally posted by Hoa_Binh
The small mod I have done so far will only work with a female character and Bastila but I aim to make it totally up to the player.

mkay, I don't know much bout scriptin.. could you please tell me why that mod would'nt work with male-carth or female-juhani?

Hoa_Binh
01-20-2004, 11:16 AM
Originally posted by k0la
mkay, I don't know much bout scriptin.. could you please tell me why that mod would'nt work with male-carth or female-juhani?

The first thing would of course be that Juhani is only interested in women from the start. But both of them (Carth and Juhani) uses other scripts to set variables for the romance depending on gender. My aim was to make one that worked for Bastila and a female PC and that one works.

To be able to change the romance with Juhani at least the script "k_hjuh_p17.nss" needs to be changed.

And for Carth the script "k_swg_carth13.nss" needs to be changed.

To be certain about which scripts to be changed someone needs to go trough all of the conversations with those two and check everything. I still can't read the conversation files completely so I can not be certain that an alteration works or not.

k0la
01-20-2004, 01:52 PM
Hoa_Binh:

ah ok then i get it, i just thought that all of em used the same script to check gender etc.. but as I said earlier i dont know much bout scripting :) I guess I'll play a female char and see if i can get some from juhani, while i wait for ur mod ^^

tee hee

Hoa_Binh
01-20-2004, 03:22 PM
I could probably put together a small mod that alters all of the scripts that I have found so far. Unfortuately there is no guarantee that anything other than the Bastila part will work.

(edit)

I have uploaded the mod. As I said there is no guarante that it will work beyond Bastila. Try it, and if you find something wrong, please let me know.

http://freehost01.websamba.com:8081/andershemsida/romancemod.zip

(edit 2)

If the direct link does not work try http://www.websamba.com/andershemsida and then follow the link on that page.

Kath Hound
01-21-2004, 03:23 AM
I have uploaded the mod. As I said there is no guarante that it will work beyond Bastila. Try it, and if you find something wrong, pleas let me know. I've noticed one problem. To progress on Taris you need an offduty Sith from the cantina to invite you to a party. Normally the male officer invites female characters and the female officer invites male characters, but with the modified k_con_isfemale and k_con_ismale files being used, neither officer will invite a female character. Either the files need to be changed, or they should not be used until after this point in the game. Ah well, thanks for making them available anyway.

Aven'aeris
01-21-2004, 05:32 AM
you don't have to do it that way
If you go to that same room without talking to either of them, then you can kill a sith officer and get the armor that way

psen
01-21-2004, 05:33 AM
In NWN, first branch in dialog with text appears condition TRUE is used. It might be necesary to revisit all dialogs and adjust them.

Probable dialog checks you mentioned (I didn't verify it):

- male officer checks for female and gets FALSE, so he asumes he speaks with male.
- female officer checks for male and gets FALSE so he assumes he speaks with female.

Changing conditionals that way might work in seweral cases, but better (and unfortunately much harder) would be to modify scripts attached to dialogs.

Problem you mentioned might be just a top of iceberg.

PSen


Originally posted by Kath Hound
I've noticed one problem. To progress on Taris you need an offduty Sith from the cantina to invite you to a party. Normally the male officer invites female characters and the female officer invites male characters, but with the modified k_con_isfemale and k_con_ismale files being used, neither officer will invite a female character. Either the files need to be changed, or they should not be used until after this point in the game. Ah well, thanks for making them available anyway.

Hoa_Binh
01-21-2004, 07:18 AM
What I aim to make is to alter all of the conversations with Carth, Bastila and Juhani to check for a new global that the player can set to be allowed to romance whomever they want. This mod would not create the trouble that others characters will respond wrong to the characters gender but it will take some time to implement.

What I also aim to do is to change the conversation with Tanis and the Twi-lek slaves in Davik's house.

Hoa_Binh
01-21-2004, 07:49 AM
Originally posted by psen
- male officer checks for female and gets FALSE, so he asumes he speaks with male.
- female officer checks for male and gets FALSE so he assumes he speaks with female.

Changing conditionals that way might work in seweral cases, but better (and unfortunately much harder) would be to modify scripts attached to dialogs.

Problem you mentioned might be just a top of iceberg.

PSen

Yes, I know. My alterations will probably alter lots of other conversations too. That is why I aim to do it another way next time.

My scrips will always report that the main character has the sought gender, the script that checks for male will always return true and the female also always true. Don't know why the two officers' dialogs do not work, but I will check them out and try to alter them not to respond to the altered gender of the character.

Soulouri
01-21-2004, 07:11 PM
that link doesn't seem to work for me..

Stator
01-21-2004, 07:28 PM
Originally posted by Kath Hound
I've noticed one problem. To progress on Taris you need an offduty Sith from the cantina to invite you to a party. Normally the male officer invites female characters and the female officer invites male characters, but with the modified k_con_isfemale and k_con_ismale files being used, neither officer will invite a female character. Either the files need to be changed, or they should not be used until after this point in the game. Ah well, thanks for making them available anyway.

Unless your mod has changed the game completely, you don't have to get invited to the party. You can simply enter the apartment complex and you will see a sith interrogation scene. Kill the siths and you will get armor from them to get into the lower city.

Stator

Aven'aeris
01-21-2004, 08:32 PM
LOL that's what i said ;)

Hoa_Binh
01-21-2004, 08:37 PM
Originally posted by Soulouri
that link doesn't seem to work for me..

Maybe it is because I made a direct link. Try http://www.websamba.com/andershemsida and the use the link from there.

Leonie
01-27-2004, 07:32 PM
Any progress with your project, Hoa?

Can't wait to see it!:)

Hoa_Binh
01-27-2004, 08:26 PM
Originally posted by Leonie
Any progress with your project, Hoa?

Can't wait to see it!:)

Yes, actually. The project itself will not take that long time but I have to develop a dialog editor first. The dialog editor is soon done and then I'll fix the mod.

Or I borrow NWN from a friend and use that to alter the dialogs. But the dialog editor will have to be done anyway.


/HB

Leonie
02-03-2004, 06:44 AM
I tried your above zip file.

Works beautifully for Juhani.

Works for Bastila until and including the temple summit (You get the "lover and apprentice line" if you choose to do so.

It does NOT work for Bastila on the Star Forge though - you don't get any of the 'love' options.

Also it does not seem to work for Carth (at least I could not get it to work)

Neat. Wish it'd generate the dialogue on the Star Forge though. :(

Hoa_Binh
02-03-2004, 01:54 PM
Originally posted by Leonie
I tried your above zip file.

Works beautifully for Juhani.

Works for Bastila until and including the temple summit (You get the "lover and apprentice line" if you choose to do so.

It does NOT work for Bastila on the Star Forge though - you don't get any of the 'love' options.

Also it does not seem to work for Carth (at least I could not get it to work)

Neat. Wish it'd generate the dialogue on the Star Forge though. :(

I'll get on the Bastila error right away. Carth will have to wait for a bit. RL eats to much of my time.

And thank you very much for trying it out. The amount of time that is needed to test everything is too big for me to do since lot of the alterations I do demand that I play trought the game.

(edit)
I have found the dialog files that contain the conversations on the Star Forge. I will check if I can alter them to work.
(/edit)


/HB

Ellderon
02-03-2004, 07:19 PM
GO! GO!

Hoa_Binh
02-04-2004, 06:08 AM
Originally posted by Ellderon
GO! GO!

I found the script that was used for checking the dialog options in the Star Forge. It is called k_psta_bastrom. Unfortunately it is only available in compiled format so I do not know what else it checks for, but I have created an altererd one and uploaded it to my homepage.

Check it out and let me know if it works. This mod is like my first Romance mod not made in the best way. It will work, but next version will be better.


/HB

P.S. And the link to my page just in case:
http://www.websamba.com/andershemsida

psen
02-04-2004, 07:03 AM
Hi you mentioned that you will have to create your own dialog utility. When I was searching Sourceforge several weeks ago I found utility called Ghamina

http://sourceforge.net/projects/nwnede/

I have no idea how usable it is, since it was designed for NWN and it is still in beta ...


Unfortunately project doesn't seem to be very active, but perhaps you could contact its author and speed up your developing cycle ;).

Looking forward to see your mod finished.

PSen



Originally posted by Hoa_Binh
Yes, actually. The project itself will not take that long time but I have to develop a dialog editor first. The dialog editor is soon done and then I'll fix the mod.

Or I borrow NWN from a friend and use that to alter the dialogs. But the dialog editor will have to be done anyway.


/HB

Hoa_Binh
02-04-2004, 07:30 AM
Originally posted by psen
Hi you mentioned that you will have to create your own dialog utility. When I was searching Sourceforge several weeks ago I found utility called Ghamina

http://sourceforge.net/projects/nwnede/

I have no idea how usable it is, since it was designed for NWN and it is still in beta ...


My editor has gotten so far that it is possible to view the dialogs. I'm just lookin to finish some small bugs before releasing it. The modifying part will take some more time.


/HB

Leonie
02-04-2004, 02:22 PM
Very nice, Hoa!

Just tested your new file and it works 100% beautifully for Bastila and Juhani now through all the options (including the Star Forge).

Thank you for taking the time to do it! :)

Ellderon
02-04-2004, 08:53 PM
It looks like more amd more great MOD's are coming!

First Malaks great-saber, now this!

Gotta download the NetFramework allready, so I can start doing some serious modding of my own...*56k modem...ugh....*

Ellderon
02-07-2004, 10:26 PM
Any progress?

Goran
03-07-2004, 07:16 PM
Originally posted by NeoShodan
Is there something like that out there or could someone tell me how to change the gender in the savefile. Should be easy enough .. i even found a entry in the savefile using a hexeditor that said gender but the value is always 00 no matter what gender you play.

There is a way to change the gender.2da file to have both genders. Thereby being able to have all 3 romances work. Juhani, Carth, and Bastila.
I can't seem to find an editor that works, and I don't think I know enough about Hex to be able to change it myself.

Kinda hoping someone will throw me a bone, like just altering the file so I can slam it into my overide file.

Creed20@cox.net

tk102
03-07-2004, 11:22 PM
Hoa_Binh -- at the start of this thread you mentioned you were trying to tweak the savegame but it ended up corrupting the game... I haven't seen that effect with KSE v1.2.2 which added the ability to change genders. I was able to change from Male to Both for example and the game still worked. I don't know what effect that has throughout the game though -- do any scripts check for GENDER_BOTH or all they all "IF MALE" or "IF FEMALE" based?

Goran
03-08-2004, 01:23 AM
Ignore my previous post. TK's new savegame editor did it all for me. Awesome job man.

grayjo
07-31-2005, 05:09 AM
Firstly: I know nothing about scripting so take everything i say with a grain of salt.

instead of changing the checks for male and female, why don't you change how they are used? if there is a script that checks if you are eligible to flirt with someone, just changing that should fix it right?

I am using the code from above... it was changed right? it would seem to only allow same sex rather than opposite... so i m showing what I would do.. slightly change so you need more charisma for same sex



Code:
//:: k_con_flirt
/*
checks to see if npc and pc are of the opposite sex and the pc's
charisma is normal or better
*/
//:: Created By: Jason Booth
//:: Copyright (c) 2002 Bioware Corp.

#include "k_inc_debug"

int StartingConditional()
{
int nGender = GetGender(GetPCSpeaker());
if(GetAbilityScore(GetPCSpeaker(),ABILITY_CHARISMA ) >= 10)
{
if(nGender =! GetGender(OBJECT_SELF))
{
return TRUE;
}
else
{
if(GetAbilityScore(GetPCSpeaker(),ABILITY_CHARISMA ) >= 15)
{
return TRUE;
}
else
{
return FALSE;
}
}
}
return FALSE;
}


As i said, i know nothing about scripting, so i don;t know if this would work

{edit: umm... hmmm.... i dont see where ismale and isfemale is used in this script... silly me... so these are scirpts used in the conversations to check if a flirt text comes up? talk about redunency... if PC is male and the dialog is from a female char, then why do they need a opposite sex sxript? cOnFuSiNg!}

Darth333
07-31-2005, 10:15 AM
Welcome to the forums :)

...er...in case you didn't noticed, you dug up a very old thread which had no posts since March 2004 ;)

And the romance mod was made a very long time ago too: http://alvin777t.tripod.com/

At least this confirms that the search function is working fine :p

Anyways, if you'd want to make a higher charisma check for same sex, the script could be somehting like this:



Code:
//:: k_con_flirt
/*
checks to see if npc and pc are of the opposite sex and the pc's
charisma is normal or better
*/
//:: Created By: Jason Booth
//:: Copyright (c) 2002 Bioware Corp.

#include "k_inc_debug"

int StartingConditional()
{
int nGender = GetGender(GetPCSpeaker());
if(((GetAbilityScore(GetPCSpeaker(),ABILITY_CHARIS MA ) >= 10) && (nGender =! GetGender(OBJECT_SELF))) || ((nGender == GetGender(OBJECT_SELF)) && (GetAbilityScore(GetPCSpeaker(),ABILITY_CHARISMA) >= 15)))

{
return TRUE;
}
else
{

return FALSE;
}
}

Chance
08-11-2005, 07:45 PM
This thread was exactly what I was looking for... Ack, and guess what, the tweaked romance script by Hoa_Binh is no longer online. Can someone point to a new page, if it exists, or send me their copy of the script?

(The script Darth333 pointed to speeds up romances but doesn't change the requirements, as far as I can tell.)

If someone is willing to send me Hoa_Binh's script and more people want it, I'll put it online myself.

Det. Bart Lasiter
08-11-2005, 09:05 PM
Hoa_Binh didn't include .nss sources as well... :(

cry_of_paine
08-16-2005, 02:09 AM
I have a script that works as a workaround. It involves changing the save file to GENDER_BOTH though, and so that doesn't seem like a very elegant solution. Basically what I'd like to do is rewrite the IsMale script to check and see who called it. If you're in a conversation with Bastila, return TRUE, otherwise, perform the normal check, and return whatever is appropriate (presumably false, otherwise, why bother with the switch). No changing saves, and no problems somewhere down the line with other characters.

So now I just need to find out either how to determine the caller of the script, or determine if you're in a conversation, and who with. That however, is lower on my list of priorities (got 2 other mods I'm working on), so it might be a couple of days till I get back to it.

stoffe
08-16-2005, 05:39 AM
Basically what I'd like to do is rewrite the IsMale script to check and see who called it. If you're in a conversation with Bastila, return TRUE, otherwise, perform the normal check




int StartingConditional() {
if (GetTag(OBJECT_SELF) == "Bastila")
return TRUE;

return (GetGender(GetFirstPC()) == GENDER_MALE);
}

cry_of_paine
08-16-2005, 11:11 PM
Apparently I don't know what OBJECT_SELF is then. I thought it meant the PC. That explains a few problems I'm having elsewhere. So what does the OBJECT_SELF reference? Specificly, since this was called from a dialog, how do you know which speaker this will reference?

Chance
08-17-2005, 09:01 AM
OBJECT_SELF is the object that is running the script. Setting GENDER_BOTH results in a few small bugs, by the way, eg. when talking to the Sith who invites you to that party on Taris.

Larandir
08-22-2005, 08:52 PM
Alright i'm still a little green around the gills with with this modding idea, so bear with me just a little. I've been tinkering with the game for the past few days and have discovered that intuition and a "little" programming just dont cut the mustard. So can some nice person please give me a set of idiot proof instructions on just what i need to do to get "Romance side dialogue" between female PC and Bastila?

cry_of_paine
08-22-2005, 09:12 PM
First, go to your override folder, and make a new text file, and name it k_con_ismale.nss

Then, copy and past this into that new file.

#include "k_inc_debug"

int StartingConditional()
{
int iGender = GetGender(GetFirstPC());
if ((GetTag(OBJECT_SELF) == "Bastila") || (iGender == GENDER_MALE))
{
return TRUE;
}
else
{
return FALSE;
}
}

The code Stoffe had works, but this is a little more intuitive I think. If you're male, or you're talking to Bastila, then return true (game thinks you're male). Otherwise, false (you're a female). That's all you need. Just compile that and you're set. I'm not sure what the tool is to compile, but you can find it on this forum somewhere.

Larandir
08-22-2005, 10:01 PM
Thanks for the help neighbour, will try it after knockoff.

Larandir
09-06-2005, 08:20 PM
Alright tried alteration, works fine full remance right up to "the kiss". not getting any love options on temple summit or within the command centre of the star forge though, so I ask again for idiot proof intsructions, this time as to how to enable love options after Bastila turns.

cry_of_paine
09-07-2005, 12:20 AM
That's a bit tougher. There are two scripts that the dialog refers to: k_punk_bastrom and k_punk_bastromn. Unfortunately, those are both compiled, so I don't know what they're supposed to do.

The way I see it, there's two options. First, see if some kind soul on here will help translate the pcode file into something easier to understand.

Second, try and guess what that code is doing and make a whole new script to override it.

I'd prefer to know what it was supposed to do, but I can't make heads or tails of this pcode stuff. So I'll see if I can gain a clue based on the dialogs. And keep a close watch on this spot just in case someone wants to earn a couple ls points. :D

[edit]
Actually, I've been thinking about this, and I really would like to know how to read this stuff, since I can think of a few other scripts that I want to mod in the near future. I've read the tutorial by Torlak ( http://www.torlack.com/index.html?topics=nwndata_ncs ) but it didn't really help much. Any suggestions?

Tupac Amaru
09-07-2005, 05:27 AM
That's a bit tougher. There are two scripts that the dialog refers to: k_punk_bastrom and k_punk_bastromn. Unfortunately, those are both compiled, so I don't know what they're supposed to do.


All they do is check a global variable. Don't know if it will help.

// k_punk_bastrom.nss
int StartingConditional() {
int iResult = (GetGlobalNumber("K_SWG_BASTILA") == 12);
return iResult;
}

// k_punk_bastromn.nss
int StartingConditional() {
int iResult = (GetGlobalNumber("K_SWG_BASTILA") != 12);
return iResult;
}

cry_of_paine
09-07-2005, 09:00 PM
Is that all? I could tell that it was doing that much, but I couldn't tell what it was doing with all the movs and stuff.

If that's all it's doing then, there shouldn't be any problems. If you get to the point of the kiss, DO NOT talk to Bastila, EVER AGAIN (other than when you have to - if she starts it). If you talk to her once she exits the room, you screw up the romance and won't get those dialogs later on. At least, I'm pretty sure that's what I've read. But right now, I just got to the kiss point, and that variable is set to 12. And I haven't talked to her after that, so I'm pretty sure that's what you need to do.