Durability/damage system, starting
Posted: Sun Oct 04, 2015 12:34 pm
My thoughts about the beginning of a damage/durability system;
I think most of the code would fit inside the current lua framework.
First step would be to add stats to equipment in Equipment.lua
My suggestion is the following:
durability {
current = 0..100,000,000
--whatever the current durability of the module is, my thinking is that most equipment is sold in a used state, so to get factory new modules you would have to visit special starports and get them off bbs posts. choosing a high number (100million) by default to allow very fine-grained control of maintainance-state, even if you take 1 million durability off each hit. extra durable items could start off higher (200 million?)
lastservice =
--what current durability was last time maintainance or repairs were attempted. my thinking is that maintainance can never restore 100% of durability since last service, so that no matter how good you maintain your equipment, it will eventually decay.
original =
--whatever the durability was factory new, to compare to current to give a sense of how damaged the module is (may or may not be presented to the player). extra durable items might start off with original = 100mil and current = 200mil to hide the decay and make the module appear as strong quality. so, durability over 100% should be handled by any durability code.
complexity =
--how complex the module is, more complex means more skill/time is needed for repairs/maintainance and/or less durability retored each time repair/maintainance is attempted
}
ships themselves could have 2 durability stats, one for the ship itself, one for the on board computer, or the computer could be made into a module itself
I think most of the code would fit inside the current lua framework.
First step would be to add stats to equipment in Equipment.lua
My suggestion is the following:
durability {
current = 0..100,000,000
--whatever the current durability of the module is, my thinking is that most equipment is sold in a used state, so to get factory new modules you would have to visit special starports and get them off bbs posts. choosing a high number (100million) by default to allow very fine-grained control of maintainance-state, even if you take 1 million durability off each hit. extra durable items could start off higher (200 million?)
lastservice =
--what current durability was last time maintainance or repairs were attempted. my thinking is that maintainance can never restore 100% of durability since last service, so that no matter how good you maintain your equipment, it will eventually decay.
original =
--whatever the durability was factory new, to compare to current to give a sense of how damaged the module is (may or may not be presented to the player). extra durable items might start off with original = 100mil and current = 200mil to hide the decay and make the module appear as strong quality. so, durability over 100% should be handled by any durability code.
complexity =
--how complex the module is, more complex means more skill/time is needed for repairs/maintainance and/or less durability retored each time repair/maintainance is attempted
}
ships themselves could have 2 durability stats, one for the ship itself, one for the on board computer, or the computer could be made into a module itself