LucasForums

LucasForums (http://www.lucasforums.com/index.php)
-   Holowan Laboratories (http://www.lucasforums.com/forumdisplay.php?f=324)
-   -   Looking for two scripts (http://www.lucasforums.com/showthread.php?t=179663)

Master Zionosis 06-20-2007 02:43 PM

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. :)

stoffe 06-20-2007 02:54 PM

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.)

Master Zionosis 06-20-2007 02:59 PM

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?

Pavlos 06-20-2007 03:18 PM

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 :).

Master Zionosis 06-20-2007 03:36 PM

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?

The Source 06-20-2007 04:23 PM

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.

Master Zionosis 06-20-2007 04:36 PM

:( 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.

The Source 06-20-2007 04:44 PM

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.

Master Zionosis 06-20-2007 05:07 PM

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?


All times are GMT -4. The time now is 04:30 AM.

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