Lion King - what difficulty level was that?
It was on Emperor and on Deity. Do you see the different picture there?
Lion King - what difficulty level was that?
I have tried this twice now & come up mixed results. Firstly, I enjoy that the AI is far more competitive; however, the settling behavior is way out of common sense. I am on the Play Europe Again TSL map (Deity), and Poland (for example) settled right next to Paris. This is well over 30 away. All of the other Civs are also doing this stupid stuff of settling 20 to 30+ hexes away; and ignoring good land right next them. In the above, obivously Poland saw something great in the hexes 4 to 6 away from Paris, but France was busy settling Prague, below Berlin. To me, this kills it completely for the AI trying to act better.
So I've done some digging: the file delnars_fixes.xml is superfluous. All the changes inside of it have been added to the Vanilla game, the file doesn't even load at the moment because the SQL constraints fail. All it does is clutter up the logs with a bunch of errors, which is rather bad form. You can just get rid of the entire file without side effects.
* The only thing it does do is give an AIUnitType to spies. As spies are not units that can move, this almost certainly does nothing at all.
So I'm back to CIV 6 for the first time after the summer patch, and AI+ isn't working.
When I try to create a new game, it just says 'start game' briefly and then returns to the main screen. I've reinstalled the game and disabled all other mods, and I still get this error. I've uploaded my log files here.
As far as I can see, database.log is complaining that some unit types don't exist.
Hey guys,
I am trying to alter the mod to make AI using ships and airplanes more often. Re ships - I think of two ways: either special operation needs to be creates e.g. "Naval Assault" where you can put minimum number of ships and force AI to use them. However, I am not familiar with operations node writing so I can very easily mess the whole thing.
Or alternatively I can put max number of ships as non-zero value in current operations and this should also make AI to use them sometimes. However this might change other land operations impacting them in a negative way.
Ah, thanks for the info, that's good to know! I'll remove it for the next patch
Messing things up is part of the charm!
So yeah I've considered both aswell. I'm pretty sure the non-zero value on standard operations isn't going to work well. If you set a minimum number, they wont ever attack over land. If you dont, its basically free to ignore the ships. In my own tests using that strategy it does end up rarely sending a ship along with an assault if you do set a value. However, it seemed to struggle more with some attacks where it wanted to send a ship along, but couldnt for pathing related reasons (it can get stuck in operations if it cant complete move orders). I wasn't really happy with that so ended up not going for it.
The new operation method is more promising. I've not tried this extensively myself and it can work in theory. The biggest problem youll probably encounter is that there is no good control over what operations are launched when. If you set different priorities, they may either never start the ship operations or may never start the regular operations (even when there arent any ships). If they have the same priority, they may still end up not starting operations (the way it determines when to start what operations is basically a mystery) or theyll be trying to fill up both operations at the same time with recruits, failing on both.
I'd just try it using a best guess on the variables (there are some examples of new operations in my military.xml that may help on the structure), then keep an eye on the game and especially on the logs (especially the operations and behaviortree related ones). Then tweak if it isnt working right. Be especially mindful of the 'priority', 'minoddsofsucces', the allowed distances, and operation limits that are scattered throughout the system. You may need a new category of operations, or could try reusing another. If you reuse another, the game has a tendency to completely some operations
Just make sure to mentally prepare for a lot of test games..
Thanks!@DemonEmperor
The behaviortrees are very simplistic and don't really offer a lot of options. They're indeed essentially linear. The most you can really get out of them is structures like:
state = 1;
if state == 1{
dostuff();
state = 2;
}
if state == 2{
dootherstuff();
}
Honestly I wouldn't bother trying on them too much. Besides not having much of control over flow, the conditionals are extremely limited and the actions basically consist of a few pre determined options only a few ever make sense in their context. They're also combined together using variables held invisibly somewhere in the c++ code that you cant really access. As a cherry on the cake, mistakes here often crash the client, and even if they don't, usually don't really give you any useful info.
Structure wise, you basically have 3 types of xml tags.
1. Definitions /datatypes. You cant do anything with these. It just helps you to see what can be done
2. BehaviorTreeNodes. The meat of the behaviortrees. These form the 'tree' structures and indicate what type of node were dealing with.
3. TreeData. Variables belonging to the nodes. The combination of NodeId and TreeName points to a unique node among the BehaviorTreeNodes. The DefnId shows you what type of variable it describes. Look up what nodetype its refering to in BehaviorTreeNodes, then combine that with the DefnId here. That points to a unique value in the NodeDataDefinitions that will tell you what kind of variable it is. If NodeDataDefinitions mentions a DefnId that isnt used in the TreeData, then you can add it yourself if you want to.
The Jumptos in BehaviorTreeNodes organize the flow somewhat. A node with a jumpto is basically like a set of brackets, starting with the node youre in, ending right before the mentioned node, or if you want, they form a branch. Use a jumpto with the first nodeid no longer in the tree to exit the tree, the operation that this tree was running on will end when you do that. Since the jumptos basically indicate branches/brackets rather than gotos you cant actually jump back to earlier nodes nor can you switch to other branches. Using Concurrent, Priority and Sequence nodes you can create a sort of structure of if statements. "Sort of" because as far as I remember (it's been a while) it's impossible to do proper "else" and "elseif" blocks. I gave up trying anyway
Some node types basically halt execution of the tree until some condition is met. For example, a move to node will not complete until the units have reached their goal. Others basically pass instantly, sometimes unexpectedly. The make formation node for example always passes instantly. If units cant make formations the turn that node is acitvated, the tree will keep going on
If you want more detailed info on any of the nodes in particular I could try and give you some pointers. All my knowledge is experimental/inferred though, so in some cases I don't know what exactly is going on either
By the way, looking through the base game code I was impressed that there is no difference in pseudoyields for difficulties/"under siege" conditions and so on.
Update:
It looks like simple shifting max number of naval units to non-zero works with AI+. I don't know Siesta what you did with the behaviour tree, but I finally able to see naval units in AI operations, both defending and attacking cities.
E. G:
67, 2, Attack Enemy City, Operation Recruit, 1 units, Recruited 1, Contract for: UNIT_GALLEY
AI doesn't distinguish between naval melee and naval ranged units. In some situations naval ranged units can bombard city for a number of turns without taking it with melee ship/unit.
I suspect it is because I removed minimal requirements from land melee units. There is a split required for naval_melee and naval_ranged in tea to make sure at least one melee ship/unit is participating.
AI doesn't distinguish between coastal and non-coastal cities and that's a bigger problem. AI can get a solid pack of units to the siege but ships won't be able to reach the city. That doesn't block AI from starting the attack but obviously chances to take that city are small.
Hoorah, Siesta is back! Now we can hope for a new version of AI+)
Thanks!
More detailed information would be helpful - I'm thinking of making a mod that overhauls the diplomatic and governmental aspects of the game.
A planned component was modular unit/weapon building - e.g. if you want to build a battleship you first need to build a hull, and then add guns. And total tonnage/number of ships could be limited by treaty (mostly on defeats, but also as way to avoid war). same goes for land units.
Was trying to figure out if
1) the AI would be able to handle said arms limitation treaties and actually follow them
2) the AI would actually use the treaties (AFAIK the easiest/best way within the framework is to treat them as diplomatic promises, which I've never seen the AI use with each other)
3) the AI would be able to properly handle the diplomatic repercussions of breaking a treaty (against another AI, would be insta-denounce unless they're declared friends)