Skills And Weapons

Started by Redfire1200, November 05, 2017, 04:45:06 PM

Previous topic - Next topic

Redfire1200

I was just wondering if you could make a weapon use another skill other than shooting/melee eg magic weapons and intellect or medical and potions
The Red Empire shall rise, The Red Empire shall grow... POTATOES!!!

Alistaire

The easy part would be making a weapon give you experience in a skill.

Create a CustomClass : Verb_Shoot and override WarmupComplete() such that base.CasterPawn.skills.Learn(SkillDefOf.Shooting, xp, false); is your chosen SkillDefOf. Assign this verb to the weapon in XML.

Then, harder is making a custom static CustomClass based on ShotReport where HitReportFor() contains f = pawn.GetStatValue(StatDefOf.ShootingAccuracy, true); with your chosen StatDefOf and defining a StatDef (XML) like MagicAccuracy or something and making a StatWorker for the stat so it's influenced by your chosen skill.