LucasForums

LucasForums (http://www.lucasforums.com/index.php)
-   Holowan Laboratories (http://www.lucasforums.com/forumdisplay.php?f=324)
-   -   [KotOR 2] Influence with Custom Party Members (http://www.lucasforums.com/showthread.php?t=212267)

Fallen Guardian 05-19-2013 02:29 PM

[KotOR 2] Influence with Custom Party Members
 
Basically, if I were to add a custom companion, how would I go about making it so that every time the PC gained or lost influence with the companion, it would say the companion's name and that influence was gained or lost? As it stands now, if I call the constant of the NPC the companion replaced, it'll show the replaced companion's name (So if my companion replaces GOTO, it will say GOTO lost influence).

supreme kotor 05-19-2013 02:34 PM

It's in the dialog.tlk I don't know how to make a completly new pop up but you can just find the line the says GOTO lost influence and then replace it with you NPC. Although that dosent do much good unless making a TC. Might I suggest changing all the refrences so they just say something like: "Party member influence lost".

Fallen Guardian 05-19-2013 05:28 PM

Quote:

Originally Posted by supreme kotor (Post 2832699)
It's in the dialog.tlk I don't know how to make a completly new pop up but you can just find the line the says GOTO lost influence and then replace it with you NPC. Although that dosent do much good unless making a TC. Might I suggest changing all the refrences so they just say something like: "Party member influence lost".

It is in the dialog.tlk, but it uses a token in place of party member names. So it goes like this: Influence Lost: <CUSTOM0>

Fair Strides 2 05-20-2013 02:57 PM

Quote:

Originally Posted by Fallen Guardian (Post 2832711)
It is in the dialog.tlk, but it uses a token in place of party member names. So it goes like this: Influence Lost: <CUSTOM0>

In that case, make an armband that activates this script:
Show spoiler


That will tell you what's what and should give you each of the party members. Then, in the recruit script, you can just add a line to the code like this:

Show spoiler


We could use custom tokens for an influence system in K1, couldn't we?! Just the tokens and a few .tlk entries...

supreme kotor 05-20-2013 03:05 PM

Quote:

Originally Posted by Fair Strides 2;
We could use custom tokens for an influence system in K1, couldn't we?! Just the tokens and a few .tlk entries...

Does someone wanna start a project? :lol:

-Supreme Kotor

Fair Strides 2 05-20-2013 04:40 PM

Quote:

Originally Posted by supreme kotor (Post 2832743)
Does someone wanna start a project? :lol:

-Supreme Kotor

*Raises Hand*

Since I know now that the devs used custom tokens for the system, I can probably tell you how to script the functions for an influence system, without touching the .exe.

supreme kotor 05-20-2013 04:56 PM

Quote:

Originally Posted by Fair Strides 2 (Post 2832748)
*Raises Hand*

Since I know now that the devs used custom tokens for the system, I can probably tell you how to script the functions for an influence system, without touching the .exe.

Cool, but i dont want to jack Fallen Gaurdian's thread so lets move this over to PM's maybe we can get something started.

Fallen Guardian 05-20-2013 06:35 PM

Quote:

Originally Posted by Fair Strides 2 (Post 2832740)
In that case, make an armband that activates this script:
Show spoiler


That will tell you what's what and should give you each of the party members. Then, in the recruit script, you can just add a line to the code like this:

Show spoiler


We could use custom tokens for an influence system in K1, couldn't we?! Just the tokens and a few .tlk entries...

Thanks I'll try this out and get back to you.

Quote:

Originally Posted by supreme kotor (Post 2832750)
Cool, but i dont want to jack Fallen Gaurdian's thread so lets move this over to PM's maybe we can get something started.

Hey if you guys do figure something out I'm sure we'd all love to know.

EDIT: All right, I tried compiling the script and it spat an error out at me for every single custom token. The error was this: "Syntax error at "integer constant."

I tried putting it in Atton's dialog file, to see if the custom tokens could be used within a dialogue, and here's what I got:

Show spoiler


So <CUSTOM0> and <CUSTOM1> are... apparently 0 and 11. Whereas <CUSTOM3> appears to be the date (though it's five days off) and the amount of hours played, or the current time. And then the next few that don't show up as invalid look to be just random numbers again.

JCarter426 05-20-2013 08:46 PM

I hate to say it, but I think you're out of luck. <CUSTOM0> is the correct token and it gets set upon an influence increase or decrease. Try calling an influence script, and then call the token again in a new conversation. The problem is this function is appears to be hard coded in the influence script functions.

It's possible that it's getting the name from somewhere else, though. But I know it's not from npc.2da or influence.2da. It could be some other TLK entry; I searched for a few party members and I always saw more than one entry with just the name. So uh... try changing them all? That's really all I can think of. :giveup:

As far as using tokens for a new influence system... well, that's not what's going on here. The token is used to display the name of the character whose influence has been adjusted, that's all. You could make a new influence system, theoretically, but I don't think you can do it with tokens; I believe they get reset upon loading a module. That's what all the <UNRECOGNIZED TOKEN> business is about. You'd need some new global variables for that sort of thing.

Fallen Guardian 05-21-2013 05:45 PM

Quote:

Originally Posted by JCarter426 (Post 2832762)
I hate to say it, but I think you're out of luck. <CUSTOM0> is the correct token and it gets set upon an influence increase or decrease. Try calling an influence script, and then call the token again in a new conversation. The problem is this function is appears to be hard coded in the influence script functions.

All right, that changed <CUSTOM0> to Atton. I then tried changing <CUSTOM0> using the SetCustomToken function, and it didn't change. However, I changed <CUSTOM10> and that change was reflected. It seems odd that I can set <CUSTOM10> but not <CUSTOM0>.

Quote:

Originally Posted by JCarter426 (Post 2832762)
It's possible that it's getting the name from somewhere else, though. But I know it's not from npc.2da or influence.2da. It could be some other TLK entry; I searched for a few party members and I always saw more than one entry with just the name. So uh... try changing them all? That's really all I can think of. :giveup:

Okay, change everything. Oh jeez. :ohdear:


All times are GMT -4. The time now is 02:34 AM.

Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
LFNetwork, LLC ©2002-2011 - All rights reserved.