EtG Modding Guide
  • ETG Modding Guide
  • Getting started
    • Modding EtG: Installing Mods
    • Modding EtG: Creating a Mod
    • Uploading a Mod
    • Useful Tools
      • Using IlSpy
  • Making An Item
    • Creating A Passive
    • Creating An Active
    • Creating An Ammolet
    • Creating A Guon
    • Synergies
  • Making a Gun
    • Creating A Gun
      • Setting Up Gun Sprite Folders
      • Creating Gun Jsons/Jtk2ds
        • Pixel Measurement Conversions
    • Setting Up Projectiles
      • Adding Components To A Projectile
      • Projectile HitEffects (Visual Effects)
      • Adding status effects to a projectile
    • Continuous Fire Animations
    • Gun Ammo Types
  • Custom Characters
    • Creating A Standalone Custom Character
  • Making a Floor
    • Introduction
    • Setup
    • Making The Dungeon
    • Tileset
    • Rooms
    • Making the flow
    • Making the Entrance
    • All Files
  • Text, Text Boxes, Etc
    • Textboxes
    • Text Formatting
  • Sounds
    • Using Custom Sounds
    • Customising Gun Sounds
    • Basegame Sound List
    • wwise Sound Dump
  • Misc
    • Making Asset bundles
    • Assetbundles: How-To
    • How to create a hook
    • Creating A Command
    • Subscribing Methods to Actions
    • Reversing Player Controls
    • Undodgeable Projectiles
    • Creating An Enemy
  • Shaders
    • Creating Shaders
  • All things Spriting
    • Important Sprite Creation Information.
    • Importing a Sprite To Visual Studios
  • Monobehaviour Documentation
    • BounceProjModifier
    • PierceProjModifier
    • KeyProjModifier
    • CompanionFollowPlayerBehaviour
  • Various Lists of IDs, Sounds, Etc.
    • List of Item and Gun IDs
    • Enemy Guids
    • List of Base Game Synergies
    • dfSpriteList
    • All Custom Ammo Types
    • Gun .Json Dump
  • OFF TOPIC MEMES
    • Modders Anthem
Powered by GitBook
On this page
  • Types of Text Box
  • Panels
  • Audio Tags

Was this helpful?

  1. Text, Text Boxes, Etc

Textboxes

A short overview of how to use Text Boxes, like those used for shrine popups or NPC dialogue.

PreviousAll FilesNextText Formatting

Last updated 10 months ago

Was this helpful?

Enter the Gungeon uses a variety of different text boxes to represent character dialogue, or other general information that would otherwise be unavailable to the player. This short guide aims to explain how to make and use text boxes.

Text boxes are handled by the TextBoxManager class, which contains a variety of methods to display text ingame. The main one for dialogue is ShowTextBox. Below is an example of using the TextBoxManager.ShowTextBox method, with a table explaining what each variable does.

//An example of the ShowTextBox method with value names written out in full, including default values.

TextBoxManager.ShowTextBox(Vector3 worldPosition, Transform parent, float duration, string text, string audioTag = "", bool instant = true, TextBoxManager.BoxSlideOrientation slideOrientation = TextBoxManager.BoxSlideOrientation.NO_ADJUSTMENT, bool showContinueText = false, bool useAlienLanguage = false);
//An example of the method as you would write it in your code. This example places the text box on the transform of a gameobject, which lasts for two seconds, and invites the player to have a seat by the fire. It speaks in a female character voice, and has no other special settings.

TextBoxManager.ShowTextBox(base.transform.position, base.transform, 2f, "Welcome traveller, have a seat by the fire.", "female", false, TextBoxManager.BoxSlideOrientation.NO_ADJUSTMENT, false, false);

A fuller explanation of variables used in the above example.

Variable
Type
Default
Effect

worldPosition

Vector3

N/A

The position of the text box in the game world.

parent

Transform

N/A

The object that the text box is originating from. If this object moves, the text box will move too. Additionally, the parent is used by the TextBoxManager to organise boxes. If a new text box is created on the same parent as an existing text box, the existing text box will be closed.

duration

float

N/A

How long the text box will remain on screen before automatically closing. Measured in seconds. If the value is set to -1f, the text box will last forever until manually closed by more code.

text

string

N/A

The text that appears in the box.

audioTag

string

""

Determines what 'voice' the text box speaks in. Different NPCs use different voice sound effects. See the Audio Tags section for a full list of voices.

instant

bool

true

If set to true, all the text in the box will appear instantly. If set to false, the text in the box will appear in the form of a quick scroll.

slideOrientation

TextBoxManager.BoxSlideOrientation

NO_ADJUSTMENT

Controls how the textbox appears. Text boxes, by default, will appear relative to the origin point in a way that is most optimal for screen space. IE; if there is more camera space to the right of the origin point, the text box will be predominantly to the right. If set to FORCE_RIGHT, the text box will always appear to the right of the origin regardless of available screen space. FORCE_LEFT has the same effect on the left. side.

showContinueText

bool

false

If set to true, three dots will appear in the lower right region of the text box. Has no function, but is used in the vanilla game to indicate that the player must press a key to progress the current conversation.

useAlienLanguage

bool

false

If set to true, the text in the box will appear in Professor Gooptons alien language font.

Types of Text Box

In addition to the ShowTextBox method, there are other methods which produce similar boxes but with different visual appearances. These methods all take very similar arguments to ShowTextBox, although ShowInfoBox and ShowThoughtBubble do not use character voices, do not take slide adjustments, and cannot be written in Goopton's Alien Language.

Method Name
Example Code
Ingame

ShowTextBox

TextBoxManager.ShowTextBox(user.sprite.WorldCenter + new Vector2(0f, 1f), user.transform, -1f, "Lorem ipsum dolor sit amet", audioString, instant: false);

ShowInfoBox

TextBoxManager.ShowInfoBox(user.sprite.WorldCenter + new Vector2(0f, 1f), user.transform, -1f, "Lorem ipsum dolor sit amet", instant: false);

ShowThoughtBubble

TextBoxManager.ShowThoughtBubble(user.sprite.WorldCenter + new Vector2(0f, 1f), user.transform, -1f, "Lorem ipsum dolor sit amet", instant: false);

Panels

Panels are a different type of text display also handled by the TextBoxManager class. Panels are typically used when interacting with inanimate objects that display a significant amount of text such as shrines, notes, and signs.

Each different type of panel takes the exact same arguments and works in the exact same way, save for their visual appearance. These arguments are the same as some of the arguments used to display regular textboxes.

Vector3 worldPosition, 
Transform parent, 
float duration, 
string text, 
bool instant = true, 
bool showContinueText = false

A table of the different types of panel and an example of how to use them. (Note that usually when spawning a panel, you'd make it's source position and parent relative to the object that the text is supposedly written on, such as a shrine, rather than the player.)

Method Name
Example Code
Ingame

ShowLetterBox

TextBoxManager.ShowLetterBox(user.sprite.WorldCenter + new Vector2(0f, 1f), user.transform, -1f, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", instant: true);

ShowStoneTablet

TextBoxManager.ShowStoneTablet(user.sprite.WorldCenter + new Vector2(0f, 1f), user.transform, -1f, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", instant: true);

ShowWoodPanel

TextBoxManager.ShowWoodPanel(user.sprite.WorldCenter + new Vector2(0f, 1f), user.transform, -1f, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", instant: true);

ShowNote

TextBoxManager.ShowNote(user.sprite.WorldCenter + new Vector2(0f, 1f), user.transform, -1f, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", instant: true);

While panels can be set to scroll like character dialogue, they tend to look much better with instant set to true, as there is no character 'speaking' the text.

Audio Tags

Audio Tags, as explained above, are string identifiers used to define what 'voice' a text box speaks in. The 'voice' in this case is the jumbled sound effects that play as the text is drawn on screen. Different voices might use different sounds, pitch, etc.

If no valid audio speech tag is set, the text box will appear in complete silence.

Tag
Link
Used By...

"male"

Lost Adventurer, Circle Knight, Square Knight

"female"

Sorceress, Patches, Mendy, Blacksmith

"shopkeep"

Bello, Trorc, Old Red, Henchman

"alien"

Professor Goopton

"fool"

Sell Creep, Ledge Goblin

"robot"

Drunkard, Muncher, Evil Muncher, Welcome Bot

"goofy"

Tonic

"jolly"

Frifle

"oldman"

Old Man, The Grey Mauser, Flynt, Save Button, Dr. Wolf

"gambler"

Winchester

"dice"

Daisuke

"bower"

Bowler

"gunslingking"

Gunsling King

"golem"

Ox

"truthknower"

Brother Albern, Manservantes, Tailor, The Robot (Unlock Scene)

"teen"

Cursula

"brat"

Cadence

"rat"

Resourceful Rat (NPC)

"ratboss"

Resourceful Rat (Boss Intro)

"witch1"

Hunchie

"witch2"

Squintie

"witch3"

Beakie

"tutorialknight"

Ser Manuel, Gunknights, The Bullet, Hegemony Soldiers, Dying Scientist

"owl"

Monster Manuel

"lady"

Synergrace

"bug"

Doug

"vampire"

Vampire

"manly"

The Marine, The Gunslinger, The Paradox, Black Stache

"frump"

Blockner

"coop"

The Cultist

"computer"

The Robot

"convict"

The Convict, The Hunter

"spacerogue"

The Pilot

"agunim"

Agunim

"mainframe"

EMP-R0R

None

N/A

Dragunfire Cultist, Cop, Gunther

Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Link
Example of a Text Box