Skip to content

Legacy Feature support

wofsauge edited this page Nov 29, 2020 · 6 revisions

The legacy way of adding descriptions does still work, but it is recommended to use the new EID:AddXXX() functions to add descriptions.

The new better function enables you to:

  • Define a custom item name
  • Add transformations to any object
  • Add translated versions of any description

How to use the new method: >>> How to add descriptions <<<


Legacy Features

The old version 2.0 of EID featured 6 global tables for mods to define their descriptions in:

  • __eidTrinketDescriptions for trinkets
  • __eidCardDescriptions for cards
  • __eidPillDescriptions for pills
  • __eidItemDescriptions for Collectibles / items
  • __eidItemTransformations to assign Transformation informations to a collectible
  • __eidEntityDescriptions for entities

Adding an entry to either of those tables adds that description to the description-database for both the old and the new version of EID.

Example usage of legacy "Add Description" feature

local item = Isaac.GetItemIdByName("My Item Name"); -- get ID of item
if not __eidItemDescriptions then -- create the EID datatable if it doesnt exist
  __eidItemDescriptions = {};
end	
__eidItemDescriptions[item] = "Most Fitting Description"; -- add description to your item

Example legacy add transformations

local item = Isaac.GetItemIdByName("My Item Name"); -- get ID of item

if not __eidItemTransformations then -- create the EID datatable if it doesnt exist
  __eidItemTransformations = {};
end
__eidItemTransformations[item] = "Test Transformation"; -- add transformation with name "Test Transformation"

Example legacy add entity description

if not __eidEntityDescriptions then -- create the EID datatable if it doesnt exist    
  __eidEntityDescriptions = {};
end
__eidEntityDescriptions["ID.Variant.Subtype"] = {"HEADLINE","DESCRIPTION"} -- assigns a headline and description to any entity