Skip to content

How to add descriptions

wofsauge edited this page Nov 10, 2020 · 12 revisions

Descriptions are the core feature of EID. They describe the effect of the item in a short, precise and easy to understand way.

Adding descriptions

EID-Descriptions can be added to any item or entity of the game. To do this, the EID API provides the following functions:

-- For Collectibles.     Optional parameters: itemName, language
EID:addCollectible(id, description, itemName, language)

-- For Trinkets.         Optional parameters: itemName, language
EID:addTrinket(id, description, itemName, language)

-- For cards/runes.      Optional parameters: itemName, language
EID:addCard(id, description, itemName, language)

-- For pilleffect ids.   Optional parameters: itemName, language
EID:addPill(id, description, itemName, language)
  • id is refering to the specific subType of the entity.
  • description is a string containing the itemdescription. See more on that >>> further down <<<
  • itemName (Optional) Can be used to define a custom name. If not set, the mod takes the name from the ingame ItemConfig (XML-files)
  • language (Optional) Can be used to add the description into a specific language-pack. Default is en_us(english)
  • Valid languages are: en_us(english),fr(French) ,pl(Polish) ,spa(Spanish) ,pt(Portuguese) and ru(Russian)

Examples

  • EID:addCollectible(1, "Some text") -- Overrides the description for "Sad Onion" collectibles_001_thesadonion
  • EID:addCollectible(1, "Some text", "New name") -- Overrides the description for "Sad Onion" and renames it into "New name" collectibles_001_thesadonion
  • Seting a russian translation for a custom item:
local myItemId = Isaac.GetItemIdByName("My Item Name");
EID:addCollectible(myItemId, "водка лучше пива", "Блядь", "ru")

Adding transformations

TODO

Adding descriptions to any entity

In addition to adding descriptions to items, it is also possible to add descriptions to any entity of the game. this can be achieved with the following function:

-- For any entity.       Optional parameters: language
EID:addEntity(id, variant, subtype, entityName, description, language)
  • id, variant and subtype define the specific entity. When subtype is -1 or empty, it will affect all subtypes of that entity.
  • entityName will be the text that is displayed in the "name" field of the description
  • description is the description of the entity
  • language (Optional) Can be used to add the description into a specific language-pack

Descriptions and Formatting

Descriptions are defined using a single string.

New Lines

New lines are added with the # Character.

Every new line starts with a bulletpoint indicator or an icon.

Example: "Test description#A second line#A third line"

Editing Bulletpoints.

The bulletpoints infront of each line can be replaced with inline Markup Icons. The mod will try to read a markup string in the first position of a new line.

The markup needs to be followed by a space!

Example:

Description:"Some text#↑ Some text#↓Some text#{{Heart}} Some text#{{Blank}}#{{Blank}} Some text"

bulletpoints

Explanation of the lines:

  1. Default bulletpoint -- Line doesnt start with something special. Normal bulletpoint will be rendered
  2. ↑ space after icon -- Line starts with markup. Use Markup icon as bulletpoint icon
  3. ↓no space after icon -- No space after icon will render the icon at the start of the text, rather than as a bulletpoint
  4. {{Heart}} a custom icon as bulletpoint -- Same as 2. but with an explicit icon markup definition
  5. {{Blank}} -- (a Line with only a {{Blank}} in it) Renders an empty line without bulletpoint or text. Good for spacing things
  6. {{Blank}} A line without a bulletpoint -- Renders the text without any bulletpoint

Markup and inline icons

Every text rendered with EID does support the usage of the custom "Markup" of the mod. This allows mods to render icons and colored text inside their descriptions and objectnames.