Skip to content

FullStackForger/Drape

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drape - Data-driven game stat modeling framework

How it works

Stat types

  • Stat (simple stat)
  • Modfier
  • Resource
  • Multistat

Stat and modifiers

stat components
---------------
B - base value
R - raw modifier
F - final modifier

modifier types
---------------
f - flat
m - multiplier

raw value formula
-----------------
R = (B + Rf) * Rm
Rf = Rf(a) + Rf(l) + Rf(g) + … + Rf(x)
Rm = Rm(a) + Rm(l) + Rm(g) + … + Rm(y)

final value formula
-------------------
F = (R + Ff) * Fm
Ff = Ff(a) + Ff(l) + Ff(g) + …. + Ff(x)
Fm = 1 + Fm(a) + Ff(l) + Ff(g) + … + Ff(x)

Serialization

Json

JSON serialization supported with SaladLab fork of Newtonsoft Json.NET. You can get latest DLL file from here.

Private setter serialization supported with custom contract resolver method as described in Daniel's blog.

Yaml

Yaml serialization supported with YamlDotNet. Get latest release dll from here.

Known issues

  • BaseStatData.ToJSON() method only serializes public properties and doesn't allow to serialize memebers.
  • Is BaseStatData needed? Can Stat be serialized directly?
  • Applying global modfier to multiple stats of same type not supported. Eg. improved melee damage should apply to all melee damage type stats: sword damage, axe damage, etc.
  • What is the reason of using final stat modfier (F)? Is it needed at all?

About

Data-driven game stat modeling framework

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%