Custom NPC Tutorial: Difference between revisions
bonfire-wiki>Sonic260 →Section 4 - Custom Actions: Added Section 4's images |
bonfire-wiki>Sonic260 |
||
| Line 540: | Line 540: | ||
This concludes Section 4's lesson on Custom Actions. By this point we've learned how to design our NPC. Then we gave them a voice by creating basic dialogue. Next we've learned how to branch our conversation with dialogue choices and responses. And lastly we added some interactivity with Custom Actions. With these four concepts, you now have enough knowledge to create fully functioning NPCs on your own. | This concludes Section 4's lesson on Custom Actions. By this point we've learned how to design our NPC. Then we gave them a voice by creating basic dialogue. Next we've learned how to branch our conversation with dialogue choices and responses. And lastly we added some interactivity with Custom Actions. With these four concepts, you now have enough knowledge to create fully functioning NPCs on your own. | ||
In the next few sections we'll go over some more advanced concepts, and introduce conditional flags to our NPC. | |||
A sample Orc, Demonstrating Section 4's concepts is available here: '''[]''' | A sample Orc, Demonstrating Section 4's concepts is available here: '''[]''' | ||
== Section 5 - Conditionals == | |||
In this section, we'll learn about how Conditionals add an extra layer of complexity with our NPCs. Conditionals allow us to make comparisons between | |||
== Section 5 - Conditionals | |||
Revision as of 12:07, 11 June 2019
Welcome In this tutorial we will learn how to use Bonfire's built-in Character Editor to create Custom NPCs. First, we'll explore how to design your NPC's appearance and place them in the world, then we'll give them basic dialogue and enable them to speak to the player. Afterward, we'll learn how to create branching dialogue and Custom Actions to interact with our NPC. We'll enable our NPC to "remember" the player, and lastly we'll wrap up the lesson with a simple fetch quest.
At the end of each section, a sample Orc will be provided to demonstrate what we learned.
Setup
Before we begin, it's recommended that you have some familiarity with the Command Console as we'll be using a couple of them in this tutorial. You don't need to remember everything, but knowing some of the Basic or Debugging commands like save or rel will be useful.
The NPC Editor can be accessed from Bonfire's Main Menu. From the title screen, click Mods, then Character Editor.
Interface Overview

- File Menu - Save your NPC; Load Existing NPCs; Import one of your profiles to use as a Custom NPC; rename the file.
- Character Profile - Give your NPC a name, and manage their inventory by clicking the '+' icon
- Attributes - This will apply a default "state" for your NPC when they load in the scene.
- Location - Sets your NPCs coordinates and the scene (or level) that they will appear in
- Metadata - Holds data about the Mod creator and a description of the NPC. Please fill this out if you intend to share your NPCs with other players.
- Character Dialogue - This space holds the entire conversation
- Navigation - "Tiny View" allows you to collapse the entire dialogue tree so it's easier to traverse. The Jump field lets you move to a specific line number.
- Exit - Exits the character editor and reloads the current scene.
Section 1 - Creating the NPC
First, we'll need an Orc to import into the Character Editor. A NPC's appearance is generated by importing one of your pre-existing profiles. So we have the option of either creating a brand new profile, or, if you would rather use your own Orc as an NPC, you can skip ahead to Step 2.
- Create a brand new profile, or load an existing one
- From Bonfire's Main Menu, click Profiles, then click Create New. Spend as much time as you want designing your NPC's appearance, and be sure to give them a name. When you're finished, click Enter to save your Profile and exit the character creation.
- Set your NPC's spawn point
- Decide where you want your NPC to spawn in the world. Do you want them to show up in the Outback? Occupy the Inn? Lounge at the island? Etc.
- For this tutorial, we'll spawn our NPC on the Island. Load up one of your profiles, open the console with F1, and then type:
- travel Sea1
- This will instantly warp you to the Island. Next, find a good location to spawn your NPC. When you're ready, open the console again and type:
- refpos
- refpos will save your character's current X, Y, and Z coordinates into the console.
- Import the character
- We're now ready to create our NPC. Return to the character editor by opening the Main Menu, then click Mods then Character Editor. Alternatively you can open the console and type:
- chedit
- Click the "Import Character" button and find the Orc you created in Step 1, or import one of your pre-existing characters. You'll see that your Orc's name will appear within the Character Attributes section.
- We're now ready to create our NPC. Return to the character editor by opening the Main Menu, then click Mods then Character Editor. Alternatively you can open the console and type:
- Manage your NPC's Inventory
- Expand the Items... field by clicking the " + " button next to it. This section will let you control your NPC's inventory, including their clothing. By default, new Orcs will only contain a leather Loincloth, but if you imported one of your profiles, you may see all the items you collected in-game.
- Click New Item to add an inventory slot. Click Change to select a new item from the list. Click Remove to delete inventory slots.
- Check in Wear this item to make your Orc equip this when they spawn.
- Set your NPC's attributes (Optional)
- This section is used to apply a default "state" for your NPC when they load in the scene. For example, you could have them execute a console command, or prevent them from spawning unless the player is at a certain point within Bonfire's story. This isn't necessary for our purposes, so we will skip this part.
- Set the location
- This is where we'll use the coordinates we saved in Step 2. In the Scene field, click "World1" and select "Sea1."
- In the Position field, select "Paste from Console," and the X, Y and Z fields will populate the coordinates from the refpos command.
- Write the Metadata
- Use the text boxes to sign your name as the author of this NPC, and write a brief description of this NPC. This is recommended if you intend to share your NPC with other players.
- Character Dialogue - Hello World

- In the Speech section of the dialogue box, type the following message:
- Hello @playername, my name is @playerinterest. Congrats on creating your first NPC!
- Don't worry if you don't know what the rest of the buttons and fields in the dialogue box are for. In the next section we'll go over the functions of a dialogue box, and learn how to create basic dialog.
- In the Speech section of the dialogue box, type the following message:
- Save your NPC and exit the Character Editor.
- When you're finished, click the "Save" button, and this will save your NPC as a .bab file located at:
- C:\Users\%userprofile%\AppData\LocalLow\Prasetto\Bonfire\Mods\Characters
- Click the "Exit" button. This will immediately reload the game, and place you back at the entrance to the island.
- When you're finished, click the "Save" button, and this will save your NPC as a .bab file located at:
- Enable your NPC
- When the scene reloads, you'll immediately notice that your NPC hasn't spawned in the world yet! That's because we'll need to enable them.
- From Bonfire's Main Menu, open Mods then Mod Manager. You'll see the list of modes you have installed currently. Find the name of the NPC you just created, and click the check mark.
- Click "Done" and the scene will reload again. Back at the Island's entrance, you should see our newly created NPC. Go speak to them, and they will speak the "Hello" dialogue we gave them.
- Link to Section 1 Sample: []
Section 2 - Basic Dialogue
Well done on creating your first NPC! Now that they have a presence in the world, next we'll give them a voice and learn how to create basic dialogue.
Dialogue in Bonfire is made by creating several objects, called "Dialogue Boxes" and linking them together in a series. When you speak to the NPC, they will read the Speech field in first box (usually Line 0) then read the rest of the Dialogue Boxes in the order they appear.
Dialogue boxes follow a "Parent-Child" relationship. A dialogue box with another box nested under is called the "Parent," while the nested box is the "Child." If the "Child" has other children, then it becomes "Parent" to those children, and so on.
Dialogue Box Colors

Dialogue Boxes come in three colors, each representing its purpose within the editor:
- Black - Normal Dialogue Box, or "SimpleText" box. This is the default type. The conversation will flow from the parent box to the child box until the branch ends. A parent box of the "SimpleText" type is allowed to have multiple children, however, the conversation will only flow to the first child that was created. Any additional children created will appear as a red box marking them as "inactive" lines of dialog. This means they won't appear in the conversation normally, and will require additional setup to be reached.
- Green - Choices / Conditionals. "TextAndChoice" or "Conditional" types change the flow of the conversation, either when the user selects a response from a choice menu, or if a certain condition is met. When done properly, they can be used to create complex quests and conversations. This type is relies on the parent box's "type" setting to exist. In order to create them, the parent must be of type "TextAndChoice" or "Conditional." Afterward, any new children will be green to represent a dialogue choice, or a line that will execute under a certain condition. Because the Parent-Child relationship is necessary to create these, this means the root of the dialogue tree, Line 0, cannot be used as a choice or condition.
- Red - "Inactive" box. This occurs when a "SimpleText" parent has more than one child. The dialogue will flow to the first child naturally and ignore the "inactive" children. In order to reach the "Inactive" blocks, rather than creating a New Line, you can also click the box to "Derive to existing line," and enter the line number you want the conversation to jump to. There's an example of how to pull this off later.

Anatomy of the "SimpleText" box
- Line Number
- This is a dialogue box's ID number, but it DOES NOT represent the order in which the lines are spoken. For example, the typical order of a conversation is "0 > 1 > 2 > 3 > 4 > " and so on, but it's possible to re-order the lines of dialogue and have the order as "0 > 4 > 1 > 2 > 3 > " .
- In addition, when adding or removing dialogue boxes, Bonfire will start from the highest available line number, and continue from there, even if there are gaps in progression. For example, if you start with an order like this:
- 1 > 2 > 3 > 4 > 5
- But then remove lines 2, 3, and 4, any new lines created will continue from 5 onward:
- 1 > 5 > 6 > 7 > 8
- While speaking to an NPC, you can keep track of which lines are spoken by using the console command: showdiagindex. When you speak to your NPC, you'll see number at the beginning of every sentence, representing the line number.
- Character Starring
- This represents the speaker, and it also defines the default target when any Custom Actions are activated. For example, if there's an action that starts a growth buff, then "Person2" will receive the effect. If there's an action to start sex, then "Person2" will take the top position.
- Lastly, "Person2" represents the NPC, while "Player" represents the player
- Dialogue type
- This is set on the Parent to determine the child box's Type.
- SimpleText - Creates a black dialogue box that represents the normal flow of a conversation
- TextAndChoice - Causes this line to display a text menu, where the player can select subsequent lines as dialogue options.
- Conditional - A line of dialogue that will only execute when a specific condition is met (ex: Is the player cursed; are they holding a certain item; is the NPC at a certain height range, etc.)
- Text Display
- This is how the text will appear when the line is spoken
- Custom - Will print out whatever is written in the Speech field as normal.
- Generated Orskera - Will randomly generate Orcish language, disregarding the Speech field
- Invisible - The text box will not appear at all, and the camera look at the speaker. Useful for apply facial expression or running other actions.
- Speech
- The spoken line of dialogue, if the Text Display is set to "Custom."You can use parameters like @playername or @playerinterest in the place of the participants' names.
- "Start from here" - Deprecated as of 0.31
- Acts as a marker for where the dialogue will continue if the conversation ended for any reason. However, this field is buggy. Excessive use can cause this NPC's conversation to leak into other NPCs, overwriting their speech. Furthermore, if you teleport to a different scene, this placeholder is lost, and the player will have to start the conversation from the very beginning.
- As of version 0.31, this has been deprecated, and will no longer work. To make NPC's remember conversations, we now need to use Item Flags, as will be explained in the Conditionals Section.
- Custom Actions
- These are actions that are performed when this line is reached. Custom Actions have numerous uses. They can be used to execute console commands during the conversation, and they can also initiate buffs, start sex, warp the player or NPC to different scenes, etc...
- Start Actions - These are actions that will activate the moment the speaker opens their mouth.
- End actions - These are actions that will execute just before the next line, when the player clicks the mouse button to continue the conversation.
- Remove
- Delete a full branch of dialog. If used on a parent with children, all of the children and their children will be deleted along with the parent.
- Derive to existing line
- Sends control of the conversation to a different line of dialogue that might not be a direct child of this box. A common use is to access red dialogue boxes marked as "inactive"
- New Followup line
- Creates a new child dialogue box. The type is dependent on the parent's "Dialogue Type" setting.
- Set
- This is used to re-order lines of dialog. When clicked, the current dialogue box and all of its descendants will move underneath the line specified.
- Note: This field will not appear on Line 0.
Dialogue Example
Now lets give our NPC a voice. In this example we'll learn how to create a basic conversation. We'll introduce how to use @playername and @playerinterest as place holders for each participant's name. Next, we'll play with the order of the dialogue boxes to demonstrate how the conversation flows from one line to the next.
This section and the rest of the tutorial are heavily focused on using line numbers as a guide. As such, it's recommended that you try to follow the tutorial as best as you can and only create new lines when asked.

- Line 0
- Clear out the text we created in the last section
- Add the following text to the Speech field:
- Hello @playername! Welcome to Part 2 of the Bonfire Dialogue tutorial!
- Click "New followup line" to create a new child dialogue box.
- Line 1
- Set "Character starring" to "Player." This will make your character speak this line.
- By default the Type of this dialogue box is "SimpleText" and the Text Display is "Custom"
- Add the following to text to the Speech field:
- Thanks, @playerinterest! What are we doing this time?
- Click "New followup line" to create another dialogue box. From this point onward, I'll shorten this step as "New Line."
- Set "Character starring" to "Player." This will make your character speak this line.
- Line 2
- By default "Character starring" is always set to "Person2"
- Set the Speech:
- Right now we're trying to get your feet wet it building basic dialog.
- New Line
- Line 3
- Keep the "Character Starring" value as "Person2." As you can see, we don't need to alternate between the player and NPC for every line.
- Speech:
- Okay, now we'll end the conversation here.
Click "Save" to save your NPC, and click "Exit" to reload the scene. Find your NPC and speak to them. You'll see the conversation we just wrote, the camera will flip to show your character once, and the conversation will end at the fourth (numberOfLine - 1) line.
Now we'll play with the line order a little. Go back into the character editor and load your NPC to make the following changes. Use the "Jump" or "Tiny view" buttons to quickly navigate to the appropriate lines.
- Line 3
- Replace Speech with:
- This is actually line 3...
- New Line
- Replace Speech with:
- Line 4
- Speech:
- I've moved this line out of order. This is actually line 4!
- New Line
- Speech:
- Line 5
- Speech:
- This is line 5. The conversation is back in numerical order from this point on.
- New Line
- Speech:
- Line 6
- Set "Character Starring" to Player"
- Speech:
- Alright, I'll end this conversation now.
Don't save just yet. Either scroll up to Line 4, or type "4" in the "Jump to Entry number:" field, and click "Jump." This will move the dialogue interface to Line 4.

- Line 4
- In the "Set" field, change the value from 0 to 2, and click "Set." This will move line 4 under line 2 instead of line 3.
- However, moving line 4 under line 2 causes both line 3 and line 4 to be direct children of line 2. Because line 2 is marked as a "SimpleText" block, the conversation will only flow to the first child created under it, in this case, line 3. This means any more children created under line 2 will be marked as "inactive." If you were to speak to your NPC again, the conversation would flow as:
- Line 0 > Line 2 > Line 3 > Line 4 > end. Line 4 is unreachable in this state, and thus is never spoken. To remedy this, we'll change the order around once more.
- Line 3
- In the "Set" field, change the value from 0 to 4, and click "Set"
- Line 3 is now a child of Line 4... but wait! Because line 5 was the first child of line 4, line 3 is marked as inactive. We'll fix this once and for all next.
- Line 5
- Change the "Set" value from 0 to 3, and click "Set." Line 5 now becomes a child of line 3. As a bonus, line 6 moved with.
Phew! With that done, the new order of the conversation is:
- Line 0 > 1 > 2 > 4 > 3 > 5 > 6
Save your NPC, exit the editor, and speak to them again. The conversation will follow the new order we created. To check the line numbers while the conversation is in progress, open the command console and use the showdiagindex command. This will place a number before each sentence to show the line index.
Next we're going to add an "Inactive" line on purpose, and show you how to access them. Return to the Character Editor and and load our NPC once more. Go to line 0.

Line 0
- Click "New followup line"
Scroll all the way down to the bottom, and you'll see the newly created line 7, but it's in an "inactive state." As mentioned before, if we leave it like this, the conversation will never reach line 7 naturally. However, there's a way to access this that doesn't involve re-ordering the conversation. Jump to line 6:
Line 6
- Set "Character Starring" back to "Person 2"
- Speech
- Now we'll deal with "inactive" dialog..."
- Instead of "New followup line," click "Derive to existing line," and change the value from 0 to 7
Line 7
- Speech
- This is LIne 7. It's still in an "inactive" state, but we can reach this line thanks to the "Derive to existing line" box we created.
- Click "New followup line"
Line 8
- Set "Character starring" to "Player"
- Speech
- Nice!
Save and speak to your NPC. Again, use the showdiagindex command to show line numbers during the conversation. Notice how, even though Line 7 was "inactive," the conversation still moved on to Line 8. That's because whichever line is given control, the conversation will continue down that branch of dialogue until either it ends, or passes control through choices, conditions, or deriving to another line.
This concludes Section 2 of the Custom NPC tutorial. A sample orc of this section is available here: []
Section 3 - Adding Dialogue Choices
Now that we know how to create basic dialogue, it's time to make our conversation branch out a little bit with dialogue choices! These are moments in the conversation where the player is presented with a menu of responses. When the player clicks a response, the conversation will continue and play that branch of dialogue until it's conclusion. This enables you to create in-depth conversations with your NPCs with multiple outcomes (see Bolt Sunder), or create a simple menu for sex.
Anatomy of a Choice Box
To create a Choice Box, simply change the Type of the Dialogue Box to "TextAndChoice." But wait a second, the box is still black! This is because the TextAndChoice type requires the parent and its children to work together to form a text menu. The parent creates the context, giving the player a question or phrase at which they must respond, while each child serves as one of the responses.
If you click "New followup line," the newly created dialogue box will be green rather than the usual black. You also might notice that it's type is "SimpleText" rather than "TextAndChoice." This is because the "Type" of the dialogue box really indicates the behavior of its children, and not the box itself. If you were to set this box to "TextAndChoice," this would just make the speaker open a new menu when the player clicks this response.
When the parent's line of dialogue is spoken, the game will print out several options as responses, each representing a child box:

Choice boxes are nearly identical to the SimpleText box, with a few differences:

- Line Number - "Line" now has "(as choice)," placed next to it, indicating this will show up as a response for the parent.
- Choice representing this line - This is how the response will appear on the menu (See the image above). It's recommended to keep these short and concise.
- Speech - This is the actual dialogue that will be spoken, either by the NPC or the Player, only after this response has been chosen.
Choice Example
Open up the NPC we worked on in Section 2, and go to Line 7.
Line 7
- Character Starring is the Player
- Replace the Speech:
- Alright, so now that we have basic dialogue and an understanding of how the dialogue is order, what else can we do?
Line 8
- Character Starring is "Person2"
- Replace the Speech:
- Now we'll move on to Part 3 of the tutorial: choices.
- New Line
Line 9
- Change Type to "TextAndChoice"
- Speech:
- During sexy time, would you rather be on the giving end or receiving end?
- Press "New followup line" TWO times.
Lines 10 and 11 will both appear as direct children of line 9. You'll notice immediately that even though they're both children of line 9, neither of them have turned red. Green boxes signify dialogue that activates only after a certain condition has been met. In this case, the condition is if the player clicks one of them as a response. Since whether or not they appear is up to the player, they're both considered "active" lines of dialogue.

Line 10
- Character Starring is the Player
- Speech:
- I'd rather be the one on the "giving" end
- In the "Choice representing this line" field, change the text to: "Giving"
- Click "New followup line" to create your NPC's response.
Since line 10 is marked as "SimpleText," the next box will be black instead of green. You'll also notice that this new line starts with 12. Once again, the index for newly created line will always come after the highest available index, which was 11 previously. From this point on, the line ordering will get weird. That's why it's highly recommended you follow the tutorial as closely as possible, to avoid confusion.
Line 12
- Speech:
- Then I guess that makes you a top, right?
LIne 11
- Character Starring is the Player
- Speech:
- I like being on the receiving end!
- Choice representing this line: Receiving
- New Line
(The newly created line index is 13, since 12 was the previous highest.)
Line 13
- Speech:
- Then I guess that makes you a bottom.
Save and go speak to your NPC. When line Line 9 is reached, two responses will appear under the NPC's speech. These are the dialogue choices we created, representing Line 10 and Line 11. If you click on one of them, your character will say whatever was written to the "Speech" field, and the conversation will continue from that branch.
This concludes Section 3 of the Custom NPC tutorial. A sample orc of this section is available here: []
...What? You were expecting actual sex? Don't worry, we'll get to that in the next section.
Section 4 - Custom Actions
Now we'll add a little flair to our conversation using Custom Actions. Actions have a variety of uses. They can be used to initiate sex, Fuse with the orc you're conversing with, apply facial expressions, call console commands, and much more!
All dialogue boxes contain fields for "Start Actions" and "End Actions." Start Actions are applied the moment the speaker opens their mouth. End Actions are applied when the player clicks their mouse to start the next line. Dialogue boxes can contain multiple actions.
Check the Custom Actions page for the list of available actions, and their function.
Actions Example
First, let's remove some unnecessary dialogue.
Line 1
- Click "Remove"
"Remove" will delete Line 1 and all of its descendants down to Line 6. Be mindful when using this button, as you can potentially delete an entire branch of dialogue unintentionally. If you want to remove a single line within a branch, it's best to re-order the conversation with "Set" to isolate that line first before removing.
Since Line 1 is gone, Line 7 can move in to be the first child of Line 0. This causes the box to become black, no longer marking it as "inactive." Now we'll replace the text we created thus far.

Line 0
- Speech:
- Hello @playername! Welcome to Part 4 of the Bonfire Dialogue tutorial!
- Press the "+" button next to "0 custom actions" to reveal the Start and End Action fields.
- Start Action:
- Click "New Action" and by default a new "CustomCall" action is created by default.
- Click the "CustomCall" button to show the list of available actions.
- Find and click "Expression"
- The Default Expression is "Neutral." Click this, and find "Happy."
- In the "Sec" field, change the value to 10.
- The "Apply to" field can be left blank. The default behavior for Actions is to affect whomever the Starring character is. In this case, it's Person2, our NPC. However, we can change this behavior by writing our target's name, and they will have the facial expression applied to them instead, even if it's an NPC not a part of this conversation!
Line 7
- Speech:
- We've got basic dialogue and choice. What's next?
Line 8
- Speech:
- Now we'll learn how to create Custom Actions. If you were paying attention you'd noticed how I smiled at you when you first greeted me.
Line 9
- Set Type back to "SimpleText"
- Speech:
- But enough of that. Let's do something a bit more... practical.
- Start Actions
- Expression
- Pleased
- 10 Secs
- Expression
Line 10 and Line 11
- Remove both of these lines, and add a new line under Line 9.
Line 14
- Set Type to "TextAndChoice"
- Speech:
- What do you want to do?
- Click "New followup line" SIX times.
Lines 15 - 20
- In each new we created, set "Character Starring" to "Player."
Line 15
- Choice representing this line: Console Command
- Speech:
- Let's try out a console command
- New Line

Line 21
- Speech:
- Alright, so the command we're using is the "dwarve" command. This will change your target into a dwarf, like so!
- Start Actions
- Leave "CustomCall" the default
- In the "String Parameter" field, enter the following:
- dwarve @playerinterest,100,2,0
- New Line
Line 22
- Speech
- Next, I'll show you an End Action. I'll go back to my regular self, but this will only happen just after you click the mouse to start the next line.
- End Actions
- CustomCall:
- batch target @playerinterest;origins;targetclear
- CustomCall:
- New Line
Line 23
- Speech:
- Annnd done.
In Line 22's CustomCall we just added three console commands. First, the batch command allows us to string multiple commands in a single line, separated by a semicolon(;). We then target the NPC in front of us with target @playerinterest. Next, we restore our NPC's form with the origins command, and finally we return control of the console back to the player with targetclear.
All of this was added on one line thanks to the batch command, but it's perfectly legal to have multiple CustomCall actions within the same dialogue box. The command will run in the order they're created.
A Warning on Console Commands
Any time you use console commands in dialogue, it's extremely important that you use targetclear at the end to return control back to the player. This helps minimize conflict between other mod creators' NPCs, who might also use console commands for some task or another.
We're done with this branch. Save your NPC and go speak to them again. Select the Console Command option, and your NPC will run the command we just gave them. The other options don't do anything except make you speak a generic line, as we hadn't created those reponses yet.
Next, let's turn the menu into a loop, so whenever you pick an option, the dialog will come back to the menu, without having to view the introductory text every time.
Line 23
- Click "Derive to Existing Line" and set the value to 14.
Now when you select this option again, the dialogue will return to line 14, and your NPC will ask you to select the next response. Let's create an exit out of the conversation so you wont be stuck in an infinite loop. Jump to Line 20
Line 20
- Choice representing this line: Leave
- Speech
- That's enough for now, I'll see you later, @playerinterest
- New Line
Line 24
- Speech
- Alright see you.
You can test this if you want, but now let's go create the rest of the choices. Jump to Line 16.
Line 16
- Choice representing this line: Sex
- Speech
- Let's bang!
- New Line
Line 25
- Set Type to "Text and Choice"
- (You can nest menus within menus)
- Speech
- Heh, I was wondering when you were going to pick that. So... do you feel like topping or bottom?
- Click "New followup line" TWO times. This will create two choices.

Line 26
- Character Starring is the Player
- Choice representing this line: Top
- Speech
- I'll top this time. Turn around.
- End Actions
- Click "CustomCall" and find "QuickInteraction." These are the list of available sex positions.
- Leave the interaction type as "SexAnal1." This is Doggy style.
- Leave "Swap Role" blank. We'll use that next.
- Click "CustomCall" and find "QuickInteraction." These are the list of available sex positions.
- New Line
Line 28
- Speech
- Oof... that was awesome
- Derive to Existing Line: 14
- NOTE: When we test this, it's not going to work as expected. More on that later...
Line 27
- Character Starring is the Player
- Choice representing this line: Bottom
- Speech
- I wouldn't mind getting pounded.
- End Actions
- QuickInteraction
- Set Interaction Type to "SexAnal2." This is the Missionary style.
- Click "Swap Role." By default, whichever participant is selected in the "Character Starring" field will take the top's position. This will reverse that behavior, and make them bottom instead.
- QuickInteraction
- New Line
Line 29
- Speech
- How'd that feel?
- Derive to existing line: 14
- NOTE: again, this won't work as expected.
Save your NPC an test the new Sex option. You'll immediately notice that after either of you cum, the post-sex dialog we implemented will not play, and you won't be sent back to the dialog menu. Instead, the game's vanilla dialogue appears and the conversation ends.
Try this: Start choose the Sex option again, and press the ESC key to cancel the animation early. Now our post-sex dialog will play like it's supposed to. What's going on here? That's because dialogue works slightly differently when sex is involved. Don't worry about this for now. A section on how to implement Post-Sex dialogue has been included in Section 7.
Now let's return to the editor. To free up some space, go Line 15 and 16 and press the "-" symbol in the top right corner. This will collapse those branches of dialogue, making it easier to stay organized.
Line 17
- Choice representing this line: Buff
- Speech
- How about a Buff?
- New Line
Line 30
- Speech
- Alright, one buff coming right up!
- End Actions
- Add one CustomBuff
- Click "Sweat" and set Buff type to "HeightIncrease"
- Set "Sec" to 30
- Set "Repeats" to 15
- Add another CustomBuff
- Set Buff type to "HeightIncrease"
- Set "Sec" to 30
- Set "Repeats" to 5
- Check in the option to "Apply to other character"
- Add one CustomBuff
- New Line
In Line 30 we changed the Sec and Repeats fields to modify the strength and duration of the buff, respectively. "Sec" is the buff's duration, and can be any value between 0 and 1E+08. "Repeats" refers to how many units are added to that specific attribute while the buff is active. This can be any number between 1 and the attribute's max value (usually 100). For example, if the Repeats amount is 100, that attribute will instantly max out when the buff activates. If Repeats is 1, that attribute will fill out slowly.
The "Apply to other character" fields works the same way as the QuickInteraction Action. By default, buffs will only affect whomever is selected in the Character Starring field. If you check this in, you'll affect the other participant in the conversation instead.
Line 31
- Speech
- And here we go! I applied a HeightIncrease buff to both of us. If neither of us are at the max height already, I should be growing rather quickly, while you should grow at a snail's pace.
- New Line
Line 32
- Character Starring is the Player
- Text display is "Invisible" - This will cause the camera to show your character, but without text.
- Speech can be left alone since it's invisible.
- New Line
Line 33
- Speech
- Alright, that's enough for now. I've stopped the buffs and turned us back to normal.
- Start Actions
- RemoveAllBuffs
- Add Another RemoveAllBuffs
- Apply to other character
- CustomCall
- batch target @playerinterest;origins
- Add another CustomCall
- batch targetclear;origins
- Derive to Existing Line: 14
Save and test our buff. In case you and your NPC are already as the max height, open the console and use the lordofshapes command to open a compact editor. From here you can adjust your heights so you can view the buff's effect.
Return to the editor and jump to Line 18
Line 18
- Choice representing this line: Fuse
- Speech
- Let's try fusing?
- New Line
Line 34
- Speech
- Okay, but first there are two ways to break up fusions. Along side the "Fuse" actions, there's also an "Unfuse" action to split us up again. Alternatively, if you open your inventory, you'll see the essence of all of your fusion partners. Right-Click any of them to take them out of the fusion.
- New Line
Line 35
- Speech
- Now then...
- New Line
Line 36
- Character Starring is the Player
- Speech
- Ahhh, there we go!
- Start Actions
Fuse(This is currently buggy as of 0.31.0. Until it gets fixed, use the CustomCall below instead)- CustomCall
- fusenew
- New Line
Line 37
- Character Starring is the Player
- Type is "TextAndChoice"
- Speech
- The fusion is complete. Do you want to unfuse now, or stay like this a little longer?
- Click "New followup line" TWO times
Lines 38
- Character Starring is the Player
- Choice representing this line: Unfuse
- Speech
- I think that's enough for now.
- New Line
Line 40
- Speech
- And there you have it.
- Start Actions
UnFuse(This is currently buggy as of 0.31.0. Until it gets fixed, use the CustomCall below instead)- CustomCall
- unfuse
- Derive to Existing Line: 14
Line 39
- Choice representing this line: Stay like this
- Speech
- I think I'll stay together a little longer.
Save your NPC and test the fusion.
Note: The Fuse and UnFuse actions are special. They must be created as Start Actions only. If you try to set them as an End Action, Bonfire will re-assign them to Start actions when the NPC is saved.
Note II: As of 0.31.0 the Fuse and UnFuse actions aren't working properly. When the actions execute, they will skip over the Speech field, and they will skip over the next line that follows. Also, if the next line is of type TextAndChoice, the game will soft lock, forcing the player to reload the scene. For now, we're substituting those actions with the fusenew and unfuse commands.
Return to the editor and jump to Line 19
Line 19
- Choice representing this line: Teleport
- Speech
- What is teleporting?
- New Line
Line 41
- Speech
- Exactly what it sounds like! When the action activates, either you or I will teleport to the coordinates specified.
- New Line
Line 42
- Speech
- Tell you what: I'm going to teleport somewhere on this island. See if you can find me.
- New Line

Line 43
- Speech
- And here I go!
- Start Actions
- TeleportToCoordinate
- By default the character will teleport to the world's "Origin" point, which is (0,0,0). But we're going to change this so our NPC teleports to the nearby island.
- First, save our NPC but don't speak to them yet. Walk over to the island where you found the Genie's Bracers. Open the console with F1 and enter the refpos command. This will copy your coordinates to the clipboard. Open your NPC in the Editor again and jump to line 43.
- Click "Paste" and you'll see the coordnates we obtained from refpos. For reference, the coordinates I'm using are:
- X = 77, Y = 10, Z = -155
- TeleportToCoordinate
Save, then speak to your NPC to test the Teleport action.
This concludes Section 4's lesson on Custom Actions. By this point we've learned how to design our NPC. Then we gave them a voice by creating basic dialogue. Next we've learned how to branch our conversation with dialogue choices and responses. And lastly we added some interactivity with Custom Actions. With these four concepts, you now have enough knowledge to create fully functioning NPCs on your own.
In the next few sections we'll go over some more advanced concepts, and introduce conditional flags to our NPC.
A sample Orc, Demonstrating Section 4's concepts is available here: []
Section 5 - Conditionals
In this section, we'll learn about how Conditionals add an extra layer of complexity with our NPCs. Conditionals allow us to make comparisons between
