Some more questions about the AI

Program aborts? Network configuration? Graphic errors? Bugs? Post your question here.
posted on April 9th, 2020, 6:14 pm
AI wasn't my strong side when it comes to modding, so here are three, possibly trivial questions I would need to find an answer to:

1) Are the 5 techlevels hardcoded, or can more than 7 levels be defined in the AIP files?

2) Once a level is reached, may the AI fall back to an earlier level?
Example: A station is considered as the opening of Level 2, and the AI is already at level 4, when a certain ship is no longer built. I destroy that station. Will the AI step back to Level 2 and build the station and the ship it otherwise wouldn't build, or just replace the station (or not even that if the third number is 0)?

3) If the AI can fall back to earlier tech levels, what happens if a construction option is no longer available? For example if a ship had to be built from a shipyard, but the AI has no construction ships left to build that shipyard?

Thanks for the help in advance!
posted on April 12th, 2020, 2:40 am
I've been tentatively experimenting with tech levels, and I've been able to go higher without limit. I've used tech level 20, but this was not with a full 19 levels of tech below it, so it's still possible it won't work when fully implemented.

Every time the AI begins construction, it checks the list starting from the top. So if a destructible object sets a tech level, the destruction of that object will immediately cause the AI to "see" the lines above it that would otherwise have been masked; this effectively sets it back to the previous tech level. If you set a tech level based on a research pod, obviously it won't since they aren't destroyed.

If the AI cannot find a valid builder for its current build line, it will wait until one becomes available. There might have been a constructor higher up in the file that is currently under construction, which will be used once it's available. But if the AI is unable to build that line, it will stick there and never build again. I don't recall off the top of my head whether it will rebuild things higher up on the list if those things are destroyed, or not.
Reply

Who is online

Users browsing this forum: No registered users and 9 guests