lfnetwork.com mark read register faq members calendar

Thread: Looking for two scripts
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 06-20-2007, 02:43 PM   #1
Master Zionosis
Relax On Air
 
Master Zionosis's Avatar
 
Join Date: Sep 2006
Location: High In The Sky
Posts: 1,280
Current Game: TR 8: Underworld
Contest winner - Modding 
Looking for two scripts

Hey people I'm at the near end of a mod and i need two scripts.

1. A script to give an amount of influence (e.g 50).
2. A script to check for an amount of influence (e.g 50) and if you have 50 influence with that person the dialog line will be accessible to choose.

Thank you to whoever can post the two required scripts.

Master Zionosis is offline   you may: quote & reply,
Old 06-20-2007, 02:54 PM   #2
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by master zionosis
Hey people I'm at the near end of a mod and i need two scripts.

1. A script to give an amount of influence (e.g 50).
Code:
void main() {
    ModifyInfluence(NPC_KREIA, 50);
}
...where 50 is the amount of influence (on the 0 - 100 scale) to give (it accepts negative values for influence decreases), and NPC_KREIA is the party table slot of the party member to modify the influence of.

If this is for use in a dialog there are already the standard a_influence_inc and a_influence_dec scripts you can use instead of making your own, where you set the P1 parameter to the NPC to modify.

Quote:
Originally Posted by master zionosis
2. A script to check for an amount of influence (e.g 50) and if you have 50 influence with that person the dialog line will be accessible to choose.
There are standard dialog conditional scripts for this:
  • c_influence_bet - check if NPC P1's influence is between values in P2 and P3
  • c_influence_eq - check if the influence of NPC P1 is exactly the value in P2
  • c_influence_gt - check if the influence of NPC P1 is greater than the value in P2
  • c_influence_lt - check if the influence of NPC P1 is lower than the value in P2

The P1 parameter of all those scripts should be set to the Party Table slot number of the NPC to check (equivalent of NPC_* constants, or row number 0 - 11 in npc.2da.)

stoffe is offline   you may: quote & reply,
Old 06-20-2007, 02:59 PM   #3
Master Zionosis
Relax On Air
 
Master Zionosis's Avatar
 
Join Date: Sep 2006
Location: High In The Sky
Posts: 1,280
Current Game: TR 8: Underworld
Contest winner - Modding 
Thanks Stoffe this information will help in the future, though after reading this I'm assuming that you can't have influence for puppets?

And if that is the case is there any other way to get around an influence type thing for a puppet?

Master Zionosis is offline   you may: quote & reply,
Old 06-20-2007, 03:18 PM   #4
Pavlos
Scruffy Englishman
 
Pavlos's Avatar
 
Join Date: Sep 2005
Location: The real world/ivory towers
Posts: 1,974
Current Game: Viking Warrior Poets
Quote:
Originally Posted by master zionosis
Thanks Stoffe this information will help in the future, though after reading this I'm assuming that you can't have influence for puppets?

And if that is the case is there any other way to get around an influence type thing for a puppet?
No influence for anyone but the party members. It's possible to emulate the system with a global number which represents the amount of pseudo-influence you have with the puppet. Of course, you wouldn't need to emulate alignment shifts (unless you want to be pernickety about gameplay mechanics) because the player won't see them. It is, of course, a simple matter of checking the player's alignment, comparing it to the influence and setting the NPCs alignment accordingly, of course - if you did feel inclined to do so .
Pavlos is offline   you may: quote & reply,
Old 06-20-2007, 03:36 PM   #5
Master Zionosis
Relax On Air
 
Master Zionosis's Avatar
 
Join Date: Sep 2006
Location: High In The Sky
Posts: 1,280
Current Game: TR 8: Underworld
Contest winner - Modding 
Ok, well thats a bummer, as it is only a puppet the story i have made for it is only an extra line after the first to be revealed, it isn't to long, so how would i go about having a script that sets a global and another script that checks if that global has been set yet?

Master Zionosis is offline   you may: quote & reply,
Old 06-20-2007, 04:23 PM   #6
The Source
Rest In Peace
 
Join Date: Nov 2004
Posts: 2,304
Contest winner - Modding 
Quote:
Originally Posted by master zionosis
Ok, well thats a bummer, as it is only a puppet the story i have made for it is only an extra line after the first to be revealed, it isn't to long, so how would i go about having a script that sets a global and another script that checks if that global has been set yet?
If you are using KotOR II, you will find a script under the Script directory of the KotOR Tool. You can place it in one of the dialogue conditions in the DLGEditor, and you can set the parameter to your specific value. The script looks something like 'c_chkinflu', but not in that exact designation. Any script with 'chk' in the name, under the Script tree in the KotOR Tool, are used so the modder can test conditions. Just start looking in the Script directory, which you can find with the KotOR tool.

I am thinking about making a comprehensive dialogue and script tortorial, which everyone can use as a cheat sheet. Since most of the veterans used scripts soley, they will most likely give you the old school way. I used a combination of script, dialogue, and journal entry testing. You know what. I am going to start working on it tonight. I will use DAP as my example, and I will try to make it as simple as possible. I will also make a list of basic scripts that people use to test conditions, and show you everyone how I did it. Everyone has their own way, and maybe I can contribute to the modding world a little. I just need to sit down with the mod to go over what I did.



R.I.P. to 'The Source' and 'MacCorp'
2004-2008
The Source is offline   you may: quote & reply,
Old 06-20-2007, 04:36 PM   #7
Master Zionosis
Relax On Air
 
Master Zionosis's Avatar
 
Join Date: Sep 2006
Location: High In The Sky
Posts: 1,280
Current Game: TR 8: Underworld
Contest winner - Modding 
I can't see anything that looks like c_chkinflu i can see allot of c_chk's but nothing that looks like c_chkinflu.

Master Zionosis is offline   you may: quote & reply,
Old 06-20-2007, 04:44 PM   #8
The Source
Rest In Peace
 
Join Date: Nov 2004
Posts: 2,304
Contest winner - Modding 
Quote:
Originally Posted by master zionosis
I can't see anything that looks like c_chkinflu i can see allot of c_chk's but nothing that looks like c_chkinflu.
As I mentioned above, my designation is way wrong. Try opening the source files to see what they are. Normally, the source script will say, "This is used to test for this or that." I can see the script in my head, but I do not seem to remember it clearly. Sorry if I am not much of a help.



R.I.P. to 'The Source' and 'MacCorp'
2004-2008
The Source is offline   you may: quote & reply,
Old 06-20-2007, 05:07 PM   #9
Master Zionosis
Relax On Air
 
Master Zionosis's Avatar
 
Join Date: Sep 2006
Location: High In The Sky
Posts: 1,280
Current Game: TR 8: Underworld
Contest winner - Modding 
Ok, there is so many scripts that begin with c_chk, there is now way i can go through all them and not miss it, so how do i make the scripts i will need?

Master Zionosis is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > Looking for two scripts

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:12 AM.

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