#4801 closed defect (fixed)
Move damage types to json files
Reported by: | leper | Owned by: | Freagarach |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 24 |
Component: | Simulation | Keywords: | |
Cc: | Patch: | Phab:D2337 |
Description
Currently damage type definitions are specified in globalscripts/DamageTypes.js.
The structure of this is quite similar to how we handle Resources (see Resources.js in the same folder).
It would be nice to move the actual damage types to JSON files and load them from there. This would make it easier for modders to add new damage types (eg magic damage).
Since we don't need as many properties for damage types as for resources we should be good with a code, a name (which is currently the same as the code, but translated), and some order property (which is used to sort the damage types, thus allowing to change the display order in the gui).
An extension to this would be changing the schemas (and adjusting the code to deal with that) of all users of damage types (cmpAttack, cmpDamageReceiver, cmpDeathDamage) to allow specifying only a few damage types.
Change History (14)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Milestone: | Alpha 23 → Backlog |
---|
comment:4 by , 5 years ago
Component: | UI & Simulation → Simulation |
---|
Move tickets to Simulation
as UI & Simulation
got some sub components.
comment:6 by , 5 years ago
Milestone: | Backlog → Work In Progress |
---|---|
Patch: | → Phab:D1836 |
comment:7 by , 5 years ago
Patch: | Phab:D1836 → Phab:D1936 |
---|
comment:9 by , 5 years ago
Keywords: | simple removed |
---|---|
Milestone: | Work In Progress → Backlog |
Owner: | removed |
Patch: | Phab:D1936 |
Priority: | Should Have → If Time Permits |
Status: | assigned → new |
Backlogging again for this is no longer useful following r22527, but might become so again in the future if damage types start requiring metadata (I'm thinking of status effects GUI for example).
comment:11 by , 5 years ago
Patch: | → Phab:D1936 |
---|---|
Priority: | If Time Permits → Should Have |
Looks like this is a should-have if we want to store the strings "Hack", "Pierce", ... only once, and if we want the order to be defined, but not defined in the JS code.
comment:12 by , 4 years ago
Milestone: | Backlog → Work In Progress |
---|---|
Owner: | set to |
Patch: | Phab:D1936 → Phab:D2337 |
Type: | enhancement → defect |
comment:14 by , 4 years ago
Milestone: | Work In Progress → Alpha 24 |
---|
It might be a good idea to also create a wiki page similar to ModdingResources once this is done.