Quote: "Vegeta! What does your scouter say about his oversights level?
It's over... NINE-THOUSAAAAAAAAAAAAAAND!"
I thought this too
I think i have a nice simple decision maker based on percent. If the logic is wrong can someone point it out because ive not had time to test this yet and it may be flawed.
A) I have a decision counter that is a random number between say 2 seconds and 5 seconds (so every 2-5 seconds it will make a decision).
Once its made a decision this is reset for that particular faction.
B) So now its time for that faction to make a decision. There are only 5 states it can be in (or 5 decisions it can pick).
1) Build a tower (for defence)
2) Build a knight (for attack)
3) Repair a damaged turrent (based on an if statement for if a turret is damaged otherwise it can only pick 4 options)
4) Attack another faction
5) Do nothing (possibly the most common so it is not always constantly battering out commands)
C) For it to pick one it rolls a random number between 1 - 100.
D) Depending on its tactic the number it lands on is ranged for a decision. For example a defensive tactic will not attack as much as repairing turrets and building them.
Defensive Tactics
1 - 20 = Build turret (this should be a 20% chance of happening)
21 - 30 = Build knight (this is a 10% chance of happening)
31 - 35 = Attack a faction (5% chance)
36 - 90 = Do nothing (most chance of happening)
If turret is damaged
91 - 100 = Repair turret otherwise 36 - 100 Do nothing.
Versus an Agressive AI tactics
1 - 5 = Build Turret
6 - 30 = Build Knight
31 - 45 = Attack a faction
etc etc
Does this make sense. Im sure this would technically allow me to control things based on percent chance of it happening.