Picked up a perk but it's horrible? No worries, this mod lets you remove picked up perks!
Not compatible with custom perks unless mod authors provide a function to remove that perk.
Unremovable perks (like new ones that I haven't added a removal function for yet) do not show up in the selection.
For mod developers:
If you want to make your perk removable, give it a custom table property when appending your perk to perk_list called _remove, which should be a function that gets the perk owners entity_id passed as it's only argument. game_effects are removed automatically, you don't need to remove them yourself. For example:
table.insert(perk_list, {
{
id = "YOUR_PERK",
ui_name = "Your perk",
ui_description = "Does something custom",
ui_icon = "mods/yourmod/ui_gfx/perk_icons/custom.png",
perk_icon = "mods/yourmod/items_gfx/perk_icons/custom.png",
stackable = STACKABLE_DEFAULT,
func = function( entity_perk_item, entity_who_picked, item_name )-- blabla do somethingend,
_remove = function(entity_id)-- here you undo whatever you didend
}
})
I didn't bother to make extra wand slots and extra mana removable, because the logic would be too hard and error prone.
For instance, let's say you have a wand with 1 slot, you take extra slots, get to 3, then take extra mana, which removes 2 slots and is back down to 1, now you remove the extra slots perk, ending up with -1.
However I did just release an update that makes it so that you can remove the perk, or at least its icon, but it won't drop the perk anymore, so it cannot be abused for infinite slots/mana.
29 909
We Use Cookies 🍪We use cookies to improve your user experience. Will you allow us to store them?
I didn't bother to make extra wand slots and extra mana removable, because the logic would be too hard and error prone.
For instance, let's say you have a wand with 1 slot, you take extra slots, get to 3, then take extra mana, which removes 2 slots and is back down to 1, now you remove the extra slots perk, ending up with -1.
However I did just release an update that makes it so that you can remove the perk, or at least its icon, but it won't drop the perk anymore, so it cannot be abused for infinite slots/mana.