Repository navigation
Adding Pills
AgentCucco edited this page Jan 28, 2021
·
2 revisions
Encyclopedia.AddPill(itemTab)ItemTab: 'table'. A table containing the main arguments for the item.
List of arguments in ItemTab:
- General Pocket item arguments
-
Color: 'number'. The color of the pill you want to add (for autogenerating the sprite).- Color is determined based off the PillColor enumeration.
- Note: You can add your own pill graphic by using the Sprite argument in ItemTab.
- Note: Adding a custom [Description] is recommended, since pills don't have them by default.
- General Color-Description combo.
-
1: Blegh. -
4: Negative. -
9: Positive. -
10: Neutral.
-
You can choose to register your pill differently depending on how much effort you wanna put into the encyclopedia compatibility.
local MyMod = RegisterMod("Super Mod", 1)
local FunkyPill = Isaac.GetPillEffectByName("Funky Pill")
if Encyclopedia then
Encyclopedia.AddPill({ID = FunkyPill})
endlocal MyMod = RegisterMod("Super Mod", 1)
local FunkyPill = Isaac.GetPillEffectByName("<Funky Pill>")
if Encyclopedia then
Encyclopedia.AddPill({
ID = FunkyPill,
Name = "Funky Pill",
Color = 9,
})
endlocal MyMod = RegisterMod("Super Mod", 1)
local FunkyPill = Isaac.GetPillEffectByName("Funky Pill")
if Encyclopedia then
local Wiki = {
Funky = {
{ -- Effect
{str = "Effect", fsize = 2, clr = 3, halign = 0},
{str = "Gives you some massive funk boost."},
{str = "If you get enough funk boost (20), summon Funky Kong."},
{str = "+1 Funk point when you are funky."},
},
{ -- Trivia
{str = "Trivia", fsize = 2, clr = 3, halign = 0},
{str = "I made this pill because I honestly really like funky kong."},
},
}
}
Encyclopedia.AddPill({
ID = FunkyPill,
WikiDesc = Wiki.Funky,
Color = 9,
})
endlocal MyMod = RegisterMod("Super Mod", 1)
local FunkyPill = Isaac.GetPillEffectByName("Funky Pill")
local FunkyDescription = "{{ArrowUp}} Gives you a lot of funk. #If you get enough funk, you will summon Funky Kong."
if EID then
EID:addCard(FunkyPill, FunkyDescription)
end
if Encyclopedia then
Encyclopedia.AddPill({
ID = FunkyPill,
WikiDesc = Encyclopedia.EIDtoWiki(FunkyDescrption),
Color = 9,
})
endlocal MyMod = RegisterMod("Super Mod", 1)
local FunkyPill = Isaac.GetPillEffectByName("Funky Pill")
local FunkyDescription = "{{ArrowUp}} Gives you a lot of funk. #If you get enough funk, you will summon Funky Kong."
if Encyclopedia then
Encyclopedia.AddPill({
Class = "Funky Kong Pack (25+ Pills)",
ID = FunkyPill,
WikiDesc = Encyclopedia.EIDtoWiki(FunkyDescrption),
Color = 9,
})
endlocal MyMod = RegisterMod("Super Mod", 1)
local FunkyPill = Isaac.GetPillEffectByName("Funky Pill")
if Encyclopedia then
Encyclopedia.AddPill({
ID = FunkyPill,
StatusFunc = function(self)
self.Name = "Funky Mode!"
return self
end,
Color = 9,
})
endlocal MyMod = RegisterMod("Super Mod", 1)
local FunkyPill = Isaac.GetPillEffectByName("Funky Pill")
local FunkyPillUnlocked = false
if Encyclopedia then
Encyclopedia.AddPill({
ID = FunkyPill,
UnlockFunc = function(self)
if not FunkyPillUnlocked then
self.Desc = "Defeat Funky Kong to unlock"
return self
end
end,
Color = 9,
})
end