Vampire mod suggestions

So I was wondering if anyone else in the CDDA community is a vampire fan, someone with modding skills, as my past attempts to get them implemented in the main game have never gone anywhere.

First, I’m wondering if it is possible to make it so that 's’mashing an object grants nutrition? If so, perhaps it could be coded so that 's’mashing an NPC or wild animal in combat would act as feeding on their blood.

The vampire would need to have the sundeath flag, and there would also need to be some kind of warning prompt when the sun is about to come up so the vampire player and NPCs could find shelter.

Just a couple of ideas, in case anyone was interested in creating a vampirism mod.

Smashing corpses to drink sounds rather counter-intuitive to me.

If I was implementing vampire mechanics, I’d add eating off the floor first (very common mechanic in roguelikes). It would be useful even for people not using the mod.

Then I’d handle eat action used on corpses to drain them.
Currently eating mechanics handle both regular eating and “eating” flammable stuff to power Internal Furnace. Corpses aren’t edible and Internal Furnace explicitly forbids corpses, so handling corpses wouldn’t even require significant changes to core game code.

You could handle it all with mutations. Make a vampire tree even - there’s a sunburn mutation, fangs, nightvision and the like. It would only require adding stronger versions, like bloodsucker evolving from carnivore, strong sunburn causing damage comparable to standing in small flame etc.

Sounds good! Now we just need someone to code it. (pokes Coolthulhu)

(unpokes self) I’ll have several important things to do this week. IRL stuff.
Also my vehicle controller mod needs fixing, so that’s next in the queue.

If you care enough, do the easy part of the work yourself. Create the entries for mutations in the json, copypaste the code for the easy ones (heavy sunburn in player.cpp, vampire fangs in melee.cpp, no regular food in player.cpp - all easy stuff).
Also come up with as much of a coherent idea as you can. Think what should be edible (humans yes, but cows? zombies also bleed red), what happens when hungry, what vampiric traits you want etc.
Then when I have enough free time to waste (possibly by next weekend), I’ll write and test the a-bit-harder stuff, like drinking blood from corpses, eating off the ground, drinking blood when you hit with your fangs in combat (only if the target has proper blood, not goo) and other vampire stuff.

To add a mutation, you only need to add its entry in data/json/mutations.json. The category for the mutation doesn’t even need to exist, if you added a mutation with category MUTCAT_VAMPIRE, it should still work. Then you check for the mutation in relevant source files using g->u.has_trait(TRAIT_NAME_HERE).
For example SUNBURN is in src/player.cpp (and only there, except for mutations.json).

It’s not the writing part that I’m trying to avoid. It’s the compiling part. My computer is a toaster, so if I change a single letter in a header file, I need to wait more than an hour before I can test it.

Wow, you actually responded!

Ok, ideas for vampires: Extremely Strong, Dextrous, Intelligent, & Perceptive(or whichever the highest of each is). Perhaps as development progresses there will be different levels of vampirism, you become stronger as you age; a newly turned vampire would only have +1 STR/DEX/INT/PER, but an ancient would have +10/each or more.
Can’t remember what the mutation is called, but basically it’s reversed night vision; you can see as well in the dark as normal human characters can see in the day, but you can only see as well in the day as normal human characters can see in the dark. Sunglasses would decrease the daylight vision penalty somewhat, Welding goggles a lot, and Anti-glare Compensator CBM completely.
Vampires would be impervious to cold, vulnerable to heat and fire, not sure how this would be coded.

I’m not sure where to start with the jsons, I’m largely computer illiterate when it comes to dealing with code.

Json work is easy - you open the file in text editor and copypaste stuff taking care not to break the layout (braces, commas). Then you change values, find mutations you like and add your category to them (let’s say MUTCAT_VAMPIRE) in the same line other MUTCAT_something.
Then you test if it works by starting the game, creating a character and trying to mutate said character in debug menu. If your newly added mutations exist and no error messages occur, json part of the work is OK.
Most of them won’t do anything until coded, but it’s OK - content creation can start with placeholders that do nothing and then are progressively implemented.

The mutation you’re looking for is Ursine Vision. It would be easy to make another mutation that works similarly.

Immunity to cold could be just a lower cap on temp_conv in player.cpp - very easy to implement, though it would prevent you from ever feeling cold.

One thing I don’t like is the aging part. Not because it’s hard to implement, but because it doesn’t fit nicely in the game. Unless you meant something like Unstable Genetics except limited to adding vampire-type mutations - then it could be cool, provided there are enough bad mutations in the tree.

Think up the complete idea of how you want things to work. Better write it down somewhere with a neat list of mutations, what they are supposed to do, what other mutations they require (claws need long fingernails, for example). The more it fits within current game the better. If it’s actually good, it could probably be mainlined.
Think more “mutant vampires from Blade” and less “World of Darkness”, as mutated bloodsuckers would fit the game quite well, while fantasy undead would not.

Aren’t vampires very charismatic, meaning you can scrap by getting minions of other survivors? And essentially obey your every ORDER!

Ursine Vision is Nearsighted + HNV. It’s not, repeat NOT, reversed glare penalties or otherwise flipping sight around. I’ve considered that, checked how glare was handled, and opted not to mess with the existing code.

[quote=“WIndburns, post:7, topic:8120”]Aren’t vampires very charismatic, meaning you can scrap by getting minions of other survivors? And essentially obey your every ORDER![/quote]I am pretty sure it is just an acquired thing. If you were a vampire that was not charismatic then you typically got steak’d, captured as an experiment, etc. Unless you want to make up some kind of pheremone power for vampires or give them wacky charming spells then their charisma should be on par with a normal person going through similar experiences of persecution. Best i can imagine is vampire line just having mainly low visibility/ugliness mutations, as we already have Alpha and Elf-A lines for human interaction. I honestly doubt mutating away from the human race would make you better at sympathising with them, and anything that would make you better at manipulating them would probably be best reflected with bonuses to the Int stat.
Also, i kind of honestly find flat +10 bonuses to all stats a bit… nuts, unless you want it to be some kinda mary sue mutation line. If anything, make the flat boosts weaker than Alpha, and add in more variety of stuff to balance it out.