I am not asking for an entire script that makes a complex ai, but I need help in knowing how to get started with a project idea.
Without giving away too many details, I made a map generation system that uses tiles and contains resources and terrain types.
What can I use to get started on a strategy ai that makes units and builds up their territory?
Any guides or tips are appreciated.
I have zero clue how to get started, but I have worked with other types of AI.
You can guide them based on the best decision possible (e.g. AI makes stuff based on their enemies’ buildings, troops, vehicles, etc.). This might lead to very difficult to beat AI, so if possible, you should turn the difficulty down a bit if it happens.
There are many things you could do with this. You could make the AI have your mindset and have it make decisions that you would, or you could give the AI a random strategy out of what players might do, ex: one that focuses on units and only on territory when needed, another one that focuses on expanding territory and has little units, or a mix of both.
Since every tile has their own data (buildings, resources and terrain modifiers), would it be a good idea to have a script calculate how “Valuable” each tile is based on the things on it. Then make the ai go for the ones in their territory and do whatever to them? Or is there a different method that works better.
That’s up to you to decide if you want to add that. But, personally, I think that a script calculating value is a good idea.