Jump to content

Home

Looking for two scripts


Recommended Posts

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

Link to comment
Share on other sites

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

 

void main() {
   ModifyInfluence([color=Pink]NPC_KREIA[/color], [color=Yellow]50[/color]);
}

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

 

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...