Fun game design lesson
2023-Nov-24, Friday 14:48![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
So I had a problem I was trying to solve. I'm working on electrokinetics for my Cataclysm: Dark Days Ahead mod and the top-level power is supposed to manipulate a corpse's nervous system to raise it back up to fight for you briefly before it expires again. However, by default, the raised corpse is hostile. Which approach would you take, given that:
Lesson--don't overthink things, and if it seems like it works from the player's perspective, that's what matters.
- Look up the spell effect in C++ and follow it through to the function in monster.cpp that turns items back into monsters. See if you can pass through a check for a spell flag that will cause the raised corpse to be friendly or, failing that, duplicate the methods so you can have a revive_but_friendly one that causes revived monsters to ally with the player, then make sure that monsters who revive naturally don't become friendly...
- Remember that there's a "Charm Monster" spell effect, and just chain that after the revive so from the player's perspective it looks like the monster comes back friendly.
Lesson--don't overthink things, and if it seems like it works from the player's perspective, that's what matters.