Sulibor: I was wondering if it it could be possible to add an option that would allow drop of multiplayer only spell books/scrolls (heal other, resurrection) in singleplayer in devilutionX.
I know those would not have any use, but for roleplay/completion sake I think it could make an interesting addition.
advowson: That should be pretty easy. Go to each site that tests for a spell of SPL_HEALOTHER or SPL_RESURRECT and for gbMaxPlayers == 1. Delete the test and the associated statement. For example, in Source/items.cpp, find the line
void GetBookSpell(int i, int lvl). Look down for the
test section:
---
if (gbMaxPlayers == 1) {
if (s == SPL_RESURRECT)
s = SPL_TELEKINESIS;
}
if (gbMaxPlayers == 1) {
if (s == SPL_HEALOTHER)
s = SPL_FLARE;
}
---
Delete that section. It causes attempts to drop Resurrect to instead drop Telekinesis, and attempts to drop Heal Other to instead drop Flare (Blood Star). There are similar blocks elsewhere
for spells on staves,
for random magic items,
for random unique items,
for random items (site #2),
for witch items, and
for healer items. I can't say why there are multiple blocks for random items. Diablo has a number of unused / unreachable paths, and since Devilution seeks to recreate Diablo, it must have those paths, even if they may be unreachable.
Those are all Devilution links, but DevilutionX should have similar code at similar offsets if you prefer to work with it.
Great, Thank you for your reply, I will try it.