Mods: Creating a text - JasXSL/FetishQuest GitHub Wiki

Go to your mod and click the texts button to list texts. Click insert to add a new text and edit it. This brings up the text editor. Here's what all the settings mean:

Note that you can leave

Text

This is the text that will be output. For these examples, I'll use the text "%S throws a punch at %T's %Tbsize %breasts!" You probably noticed the % signs. These are there to mark synonyms. The most common ones are by far %S and %T. Which stands for Sender and Target. These are replaced by the sender and target's names. Most texts are tied to an action (ability/spell) in which case the sender is the player that used the action, and target is the target of the action. You can scroll down in the editor to see all the synonyms you can use.

Underneath the text input is a preview of what your text might look like when run in game. You'll notice %T and %S being coloured.

Nr players

This is how many players this text is meant for. In most cases you'll want to use 1. But for actions with multiple targets you can enter the nr of players you want to target here. You can use %T2 %T3 etc to target the other players. The only issue is you don't know which player is one and which player is two. But all conditions are run on each player by default. Writing multi-target texts is difficult, so I suggest starting off with single target.

Conditions

Conditions are what ties the text to the game. Underneath the conditions field is a "collections" area. You can use these to add some of the most common conditions. HumOnHum for an instance says "this text should trigger when an action is used, it was successful, and both the attacker and target are humanoids". In the example case, we'll use HumOnHum to add those conditions, plus some extra: action_stdAttack, targetBreasts, targetUpperBodyNotHard, targetLowerBodyNotDamaged. You can add extra conditions by hitting the +Cond button. All conditions have to be met, but you can add a +Logic to add OR conditions. To remove a logic condition block, control click it. To remove a condition, leave it blank. Here's an explanation for each of the conditions now tied to the text:

  • targetNotBeast: Target of the action is not a beast, they are a humanoid.
  • actionHit: The action used was successful (not a miss).
  • senderNotBeast: The player who used the action is not a beast, they are a humanoid.
  • eventIsActionUsed: This text should trigger when an action is used.
  • action_stdAttack: The used action (the action that should trigger this text) was "attack" AKA stdAttack. It's very important to have an action_* condition. All action conditions start with "action_" so simply type that in and the editor will suggest actions for you.
  • targetBreasts: The target of the action has breasts.
  • targetUpperBodyNotHard: UpperBody and LowerBody refer to the item slots UpperBody and LowerBody. In this case the condition states the LowerBody armor must not be hard (like plate armor).
  • targetLowerBodyNotDamaged: Because physical attacks can damage random pieces of armor, this makes sure our text doesn't trigger if the LowerBody armor was damaged. Because it doesn't make sense to punch someone in the chest and then their pants take damage.

Is Chat

Can safely be ignored. These are for NPC speech bubbles while fighting and is a little more complicated. They'll end up in a separate guide.

Weight

If the text should be encountered more often. You can leave it all the way to the left which is default priority. If you make a text with a ton of conditions, you might want to increase the weight so it gets priority when its trigger eventually happens.

TurnTags

TurnTags are fun. These set temporary tags on the target and last until the next time that player is the victim of an attack, or until their turn starts. They can be used to essentially combo texts. These include tags like "tt_groin_exposed" which could be used for a text where the attacker pulls the target's pants down. And then another text can use the "targetGroinExposed" condition to do something to the target's exposed groin. You can technically add your own tags here, but then you'll have to write your own conditions.

MetaTags

These are used to give NPCs context about your text for roleplay reasons. Basically add any me_* tags that apply to what just happened in your text. You can add your own custom ones as well, just remember to begin with "me_". They aren't set anywhere, only included in the text event itself. In our example we'll use:

  • me_punch - Text described a punch
  • me_painful - Text described a painful action
  • me_slot_breasts - Text described an action taken against breasts

Armor Slot

This is primarily used for punches and heavy hits. If you set it, it will play a special taking damage sound when hit in that armor slot based on armor type. Ex a clunk when hit in a chestplate. In this case it would be set to upperBody.

HitFX

This adds hit visuals. You generally only want to use one, but you can use more if you need. You can technically build your own, but there are a lot of good preset ones. In this case I'm going to go with the "punch" one.

Additional Audio:

You can generally ignore this. But if you want to add sounds to play in addition to the sounds the HitFX play, you can add them here. In our demo I will ignore it.

Always Out

Can be ignored. It's for special case texts not tied to actions.

Debug

Leave it unchecked. Otherwise it's gonna generate a lot of debug text in your console and slow down your game.

Enabled

Allows you to enable or disable your text.

That's really all there is. The only difficult part is working with conditions.