Jump to content

Home

Custom influence


Mindtwistah

Recommended Posts

Is it possible to create a influence system? Another one for TSL. Like adding a variable to a certain party member and raise and lower it with scripts.

RedHawke's Mistake Correction Armband Mod V. 1.1 does this through an item's dialogue.. so you should be able to do it via an npc's dialogue as well. Dialogue's are the easiest way to attach scripts, plus you have the advantage of using custom parameters to really beef up the options :D

Link to comment
Share on other sites

But that only increases and decreases your influence over party members. I want to create a whole new influence system. An influence system I can use in this mod: http://z11.invisionfree.com/KotOR2_dialoguemod/index.php?act=idx

 

It will act as a "flirt influence system", Atton and Bao will get a number of 50 when you free them from their cells in Telos hidden academy and you can raise and lower this number trough scripts. The higher you have, more dialog nodes will be available because of conditionals that checks that number.

Now I want to know if it is possible to make a copy of the real influence system and if it is, how?

Link to comment
Share on other sites

It will act as a "flirt influence system", Atton and Bao will get a number of 50 when you free them from their cells in Telos hidden academy and you can raise and lower this number trough scripts. The higher you have, more dialog nodes will be available because of conditionals that checks that number.

Now I want to know if it is possible to make a copy of the real influence system and if it is, how?

 

You can't make a copy of the influence system, but from what you describe you wouldn't need that anyway. For your purpose it should be enough to add two new global number variables to globalcat.2da and then use a series of scripts that modify and check the value of those. You wouldn't need to make any new scripts for that since TSL already comes with a series of scripts for checking and manipulating the values of global variables from dialog files.

 

Action scripts:

  • a_global_dec - decrease the value of the variable set by the String Param by the value set in P1.
  • a_global_inc - increase the value of the variable set by the String Param by the value set in P1.
  • a_global_set - set the value of the variable set by the String Param to the value set in P1.

Conditional scripts:

  • c_global_lt - returns true if the value of the variable set by String Param is lower than the value set in P1.
  • c_global_gt - returns true if the value of the variable set by String Param is higher than the value set in P1.
  • c_global_eq - returns true if the value of the variable set by String Param exactly matches the value set in P1.
  • c_global_bet - returns true if the value of the variable set by String Param is equal or higher than the value in P1 and equal or lower than the value set in P2.

 

So, if you for example have added a global number variable called FLIRT_ATTON you'd set the initial value (50) by assigning a_global_set to a node in the dialog where they are freed from the cells, with the P1 field (for that script on the dialog node) set to 50 and the String Param field (for that script on the dialog node too) set to FLIRT_ATTON.

 

Likewise, to check if Atton's flirt value is higher than 60 to trigger some special dialog, you'd assign c_global_gt as conditional script for that dialog node, set the P1 field to 60 and the String Param field to FLIRT_ATTON.

 

 

(P1, P2 and String Param refer to the fields to the right of the script name box in tk102's DLG Editor where you assign parameter values to pass to the script.)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...