Banning items?

Iloei

Member
Feb 11, 2016
6
0
I am interested in banning certain consumables from dropping. (Edit: or, auto-destroying them when they drop, if that would be easier. Though... even better... would be to also ban non-encounter events which do nothing but drop those items (increasing the odds of other events).)

However, I do not know enough about the game to know how difficult it would be to adapt a mod to make this happen.

Is there someone with familiarity with modding who could tell me roughly what kind of work this would involve?
 
Last edited:

Iloei

Member
Feb 11, 2016
6
0
To answer my own question, perhaps the simplest way to effectively remove an item from the game would be to insert
JavaScript:
return false;
for the first line of the consumable's useItem() method.

This might not pass the test suite (I do not know -- the tests keep timing out for me), but it's close enough for me.

Edit: actually, doing a clearOutput(); and then leaving myself an outputText about the thing vanishing before the return false works even better.

For example, "banning" goblin ale:

JavaScript:
clearOutput();
outputText("The ale vanishes when you try to drink it.");
return false;

Update:

I've been playing with this, and I decided that this should really be a curse, so I made a cursed variant of a potion (mostly that means that instead of clearOutput() when drinking that potion, it adds a blank line -- this is loosely patterned after the snake oil consumption you get when sleeping while wearing the naga dress.

So instead of "vanishes" , the ale now "transforms" and...

And I might change this further to make it a random chance instead of always happening.

The idea is to force certain transforms onto the player character, but for motivational purposes, I am thinking that maybe it should not be quite so blatant.

(I have also been making a few other changes, like arranging so that any DemonSoldier encounter has a small chance of being an encounter with a buffed Ceraph, if the player has had any Ceraph piercings.)
 
Last edited: