Combat Preferred Targetting
Posted: Sat Aug 18, 2018 12:32 pm
Following the discussions about flak and space boats i had a look at the combat system. I found that a general targetting system could enhance the system in an easy to implement way.
General Design:
FOCS/content interface:
Stop-gap Combat system details:
General Design:
- weapons and space boats get a precision value. Higher precision value means it is more likely to hit an intended target
- weapons and space boats get a preferred prey condition. This condition specifies intended targets.
FOCS/content interface:
- weapon and hangar part have a field 'precision' - an integer value ; a value of 1 means no targetting preference; higher values increase chance to hit preferredPrey; default value 2
- weapon and hangar part have a field 'preferredPrey' - a condition which gets matched against eligible targets; default is to match any target
Stop-gap Combat system details:
- in the combat system there is a random "target dice roll" which target to hit for every shot. precision is interpreted how often a shot may get rolled in order to hit an intended target. Thus if precision is 2 and space ships are preferred prey, and the first target roll is a planet, the target roll is repeated once, more or less doubling the chance to hit a space ship.
- The preferredPrey is a normal FOCS condition matched against universe objects. As there is no FOCS symbol yet for space boats (universe/Fighter), And [ Not Planet Not Ship ] is used to match boats
- Compared to before, the random roll is now inside a for loop with precision as the number of repetitions. After the roll the preferredPrey condition is matched against the universe object. If it matches, it breaks out of the loop.
- spinal antimatter cannon - hunts for ships with high hitpoints
- flak - hunts for space boats
- bomber boat - hunts for space ships
- interceptor boat - hunts for space boats
- Content - e.g. should all short range weapons prefer to hunt ships?
- Content - what about monster weapons etc.?
- Content - should there be weapons targetting planet defenses?
- TBD: code cleanup/review
- Content - precision balancing
- How to balance AI designs?
- Should there be other sources of precision/preferredPrey and combination of those?
- Extensions of the preferred prey condition; e.g. taking into account statistics of the combat; or taking into account the current number of rerolls