I'm wanting to create a Disease / Pathogen system.
Im just wondering if anything like this exists already.
eg - Ability to incubate a Disease,
Spread Disease through Proximety
Spread Disease through physical contact.
Adverse Effects vs Races / Subraces
Cured by : Spells/Potions/Consumables
I know diseases exist already in the game.
However
1 . Can the disease 2da file be added to - as a server side 2da, without needing client 2da?
or would it be better to avoid the disease system in nwn already, altogether, and make a custom one?
I'd love to be able to data-drive my diseases as well.
eg-
Disease ID: 0001 - (Numerical value, that is cached onto the module, and used to reference all further settings)
Disease Name : Death Rot
Races Affected: 0 (for all)
SubraceIDs Affected: 21 (for my vampire subrace)
Incubation Time: 3600 (1 Hour for full effect)
Pre-Incubation HB Rate: 300 (Every 5 Minutes, the Pre-Incubation HB Script for the Disease fires)
Pre-Incubation HBScript: dis_drot_p_hb (When fired, it applies a 5 Minute Debuff to Charisma, Consitution, and Slow Effect.
Post-Incubation HB Rate: 120 (Every 2 minutes, after Incubation, the HB Script will fire)
Post-Incubation HBScript: dis_drot_pst_hb (After having the disease for 1 hour, and not being cured, it will debuff Charisma, Constitution, cause a Slow Effect, as well as cause 5% max hp Damage per hb.
InfectionRate: 1-100 (1 = Rare, 100 = Easy to infect others)
CureSpell: SpellID that cures it
CureItemTag:Tag of onUse Item that will cure it.
eg
string sDiseaseName = GetLocalString(GetModule(),"DISEASE_NAME_"+IntToString(iDiseaseID));
If this returns "" - then we retrieve from the database, and then store it on local module, as part of cacheing,
Meaning it reduces the database calls.
The CureSpell would have a function added into the SpellHooks system, that checks to see whether this spell ID is listed as a cure Spell, if so, it then gets the Diseases to which it can cure, and then it checks if the Spell target has any of them, and then cures the target.
The CureItemTag works in same way,
onActivate event for the module will have a function added in, that gets the item tag, and then checks to see if that item tag exists anywhere as a Cure Item, if so, it gets the Disease ID that it cures, and then if the player has any of them, it cures those diseases.