Kenshi Wiki
Advertisement
Kenshi Wiki

Things from Forgotten Construction Set


Dialogue Targeting

Conditions[]

- Incomplete -

Looks like FCS deals several conditions as OR not as AND. If you want specific result use only one condition per line. You can use empty lines (space bar). Also most conditions tend to treat the player faction as one, meaning you met one PC you have met them all. [Cattrina]

Example:

  • Dialogue
    • |c] <Empty> (condition T_TARGET_IF_PLAYER DC_RELATIONS > -1)
      • [*] T_ME "It costs 1000 cats"[c] T_TARGET_IF_PLAYER "I'll take it!" (condition T_TARGET_IF_PLAYER DC_PLAYERMONEY > 999) DA_TAKE_MONEY 1000
      • [c] T_TARGET_IF_PLAYER "I do not have that much" (condition T_TARGET_IF_PLAYER DC_PLAYERMONEY < 1000)


DC_Relations

  • Returns the relationship value with target faction. [Cattrina]
  • fe. condition T_TARGET_IF_PLAYER DC_RELATIONS > -1 [Cattrina]


I have used this and it works. It is just better to have ONE condition per line, looks like FCS deals several conditions as OR not as AND [Cattrina]

DC_Playermoney

  • Returns the number of cats the player has
  • fe. T_TARGET_IF_PLAYER DC_PLAYERMONEY > 5999 [Cattrina]

DC_Reputation

  • *Not tested*
  • Is not implemented, obsolete [Cattrina]

DC_Carrying_Bounty_Alive

  • Should return true if the character is carrying someone with a bounty on them that is alive

DC_Carrying_Bounty_Dead

  • Should return true if the character is carrying someone with a bounty on them that is dead

DC_Faction_Variable

  • *Not tested*

DC_Imprisoned_By_Target

  • *Not tested*

DC_Imprisoned_By_Other

  • *Not tested*

DC_Is_Leader

  • Returns true if the character is the squad leader
  • For example the squad leader of a trade caravan is usually the main trader that all the animals and caravan guards follow

DC_Met_Target_Before

  • Triggers if the NPC has spoken with a player character before. Does not matter which character. The entire player faction is then known. [Cattrina]

DC_Target_Last_Seen_X_Hours_Ago

  • Triggers if the NPC has not spoken with a player character within the time limit. Does not matter which character. Use with DA_Remember_Character 0 to save the time. If used without the condition it will trigger constantly. [Cattrina]

DC_Broken_Leg

  • True if the character has a leg with health below 0

DC_Broken_Arm

  • True if the character has an arm with health below 0

DC_Is_Running

  • True if the character is both at a running speed and is moving away from ME
  • Always returns true when run on ME

DC_Cops_Around

  • Returns true if there are law-enforcing guards or patrols nearby

DC_Target_In_Talking_Range

  • Checks to see if the TARGET is nearby
  • Used for things like gate guards, so that they don’t talk to someone that’s far away

DC_Is_Player

  • Returns true if the character is a member of the player’s faction

DC_Squad_Size

  • Returns the number of people in that person’s squad
  • fe. T_TARGET_IF_PLAYER DC_SQUAD_SIZE > 6

DC_Nearly_KO

  • Checks if the character is low on health
  • Not affected by hunger meter

DC_Is_Nearly_KO

  • Seems to always be true

DC_Is_Sneaking

  • Should return true if the character is sneaking.

DC_Is_Indoors

  • Returns true if the character is inside a building.

DC_Has_Illegal_Item

  • Returns true if the character has hashish in their inventory

DC_Starving

  • Returns true if the character has low hunger (hunger meter is below 200).

DC_Mixed_Gender_Group

  • Should return true if the squad has both male and female characters in it.

DC_Has_AI_Contract

  • Returns true if the character currently has an AI contract (when hiring mercenaries, when finding the broken ones, etc.)
  • Sometimes only the squad leader will have the contract, such as with mercenaries. In these cases the condition should also be run along with DC_IS_LEADER in order to work.

DC_Has_Robot_Limbs

  • Returns true if the character has robotic limbs attached.

Effects[]

- Incomplete -

DA_Trade

  • Opens a trade window with the character

DA_Join_Squad_With_Edit

  • Character joins squad, opens the character editor for that character. (make sure this is at the end of the dialogue or it will lock the game.)

DA_Take_Money

  • Takes away the specified number of cats from the player. Should be used with Target_if_player DC_Playermoney > (desired sum -1) first [Cattrina]

DA_Run_Away

  • Causes the character to run away. Does not work on player characters [Cattrina]

DA_Arrest_Target

  • Causes the character to try and arrest the target by attacking them and sending them to a cell

DA_Follow_While_Talking

  • Causes character to say following dialogue at the target while following them.

DA_Join_Squad_Fast

  • Character joins squad without opening the character editor for that character.

Editable Properties[]

AI Contract

  • “Activates the given AI package as a contract job, val0 is the number of hours it lasts for.”

Change AI

  • “Permanently changes the AI package, doesn’t affect the AI Contract. BE CAREFUL, remember it will change the whole squad, slaves and masters. May want to use with DA_SEPERATE_TO_OWN_SQUAD”

Change Relations

  • “Adjusts the relations with the given faction by this amount.”

Crowd Trigger

  • “Triggers the given dialogue to start on all other squad members. Use this for things like group cheering, laughing, and war cries. Should usually be 1 liners. The number is % of squad members to trigger.”

Give Item

  • “Action: Give target this item. Will conjure the item out of thin air.”
  • Will provide the player with a “received item” notification, even when the item was given to an NPC instead.
  • Items such as weapons, maps, armor, and limbs cannot be selected
  • NPC can give to Player, Player cannot give to NPC and NPC cannot take from the Player [Cattrina]

Has Item

  • PLAYER DIALOGUE OPTION (T_TARGET_IF_PLAYER): Returns true if any character of the player squad has the item, does not necessary need to be on the person who speaks, does not seem to matter if used target_if_player or target CD_is_player==1 [Cattrina]
  • NPC DIALOGUE OPTION: Returns true if the speaker character has the item [Cattrina]

Interesting fact is, if you make the dialogue line check if the player has an item to give a dialogue option (NPC: do you have the book? Player [1] No I don't [2] Yes I have (condition has item book) it checks against the whole squad. But if you have it as condition for a NPC line, it checks against the individual player character. (NPC: "Yes, yes I see you have the book" (condition has item book))[Cattrina]

>Take Item<

  • Does not exist, but you can make a machine, that consumes an object and produces the reward, if you want to make quests (remember to remove aggression on looters from the quest giver NPC) [Cattrina]

Has Package

  • “Condition: Has a specific dialogue package. Refers to speaker only, unless its on an interjection node.”

In Town Of

  • “Adds a condition: That we must currently be in town/base belonging to the given faction.”
  • True when inside or near a town owned by the given faction

Interrupt

  • “If the player interrupts us with a talking event, this will be the conversation chosen. Reset at the end of conversation, or until changed.”
  • Commonly used for characters that are trying to talk with the player, such as guards when they want to search you.

Is Character

  • “Condition: Is a specific named character. Refers to speaker only, unless its an interjection node.”

Lock Campaign

  • “Essentially sets the campaign’s [territorial] setting to false.”

Locks

  • “Locks the given dialogue, use for special cases when you gotta lock something?”
  • Commonly used to relock dialogue that was previously unlocked
  • The dialogue to be locked needs to be also assigned to the NPC speaker who does the locking [Cattrina]

My Faction

  • “Adds a condition: I belong to the given faction.”
  • If my faction is:___

My Race

  • “Adds a condition: My race is any of the given races. Multiple races are treated as an OR condition.”

My Subrace

  • “My specific sub-race. Multiple races are treated as an OR condition.”

No Target Race

  • “Adds a condition: Target squad has NO member who is any of the given races. Multiple races is treated as an OR condition.”

Target Carrying Character

  • “Adds a condition: Target is carrying a specific character. Refers to target.”

Target Faction

  • “Adds a condition: Target belongs to the given faction.”

Target Has Item

  • “Adds a condition: Target has this item, or any of these items.”
  • Items such as weapons, armor, and limbs cannot be selected

Target Has Item Type

  • “Adds a condition: Does the target have an item of the same TYPE as this one (eg. narcotics, meds, food)”
  • Items such as weapons, armor, and limbs cannot be selected

Target Race

  • “Adds a condition: Target squad has a member who is any of the given races. Multiple races is treated as an OR condition.”

Trigger Campaign

  • “Triggers the given campaign, which will start after a random number of hours between val0-val1, val2 is %chance (is absolute chance, so if you list 2 things which total to less than 100, then there is a chance of nothing)”

Unlock But Keep Me

  • “Unlocks the given dialogue, must be actually in the NPC’s dialogue package somewhere for it to work. Will NOT cause the dialogue to then become locked.”

Unlock Campaign

  • “Essentially sets the campaign’s [territorial] setting to true, so doesn’t actually trigger it, just makes it possible.”

Unlocks

  • “Unlocks the given dialogue, must be actually in the NPC’s dialogue package somewhere for it to work. Will cause THIS dialogue to then become locked. Used for conversations that progress to other conversations in stages.”

World State

  • “Adds this world state as an AND condition. 1=true, 0=false”