Project editing... AI behavior... colors... game acceleration
Hej
Can someone tell me in which file in the project can I modify the behavior of the AI bot? I want to change the current behavior such as demolishing military buildings in the interior and disconnecting roads from these buildings... I also want to somehow solve the stupid AI reforestation in existing forests where the AI player then gets stuck and is unable to continue expanding his territory...
I would also welcome information about where in the project I can change-tune the colors of the players in the game and in the lobby sample next to the nationality... I don't want to solve the minimap but only the gamelobby sample and then the color in the game... so the color of the characters... soldiers... flags... signs on buildings etc.
Also where should I focus in the project if I want to expand the existing game acceleration... currently the limit is I think 4x game acceleration and I should increase it even more... so that I don't have to play some maps for dozens of hours
The AI stuff is in the libs\s25main\ai\aijh subfolder. In the AIPlayerJH.cpp in the function AIPlayerJH::MilUpgradeOptim is the code for disconnection of the military buildings. Demolishing military buildings is in the function void AIPlayerJH::PlanNewBuildings(const unsigned gf) at the end of the function.
The forester stuff should also be somewhere in this file or in the buildingplanner.cpp.
The colors are defined in external\libutil\libs\common\include\s25util\colors.h
Ok thanx
In libs\s25main\gameData\GameConsts.h you can find the values for the speed of the game. If you search for SPEED_GF_LENGTHS in the code base you should find the places.
I see you have an overview =D Could you please tell me where I need to intervene if I want to increase the maximum number of players in the game? The standard is now 8... I would welcome 10
I see you have an overview =D Could you please tell me where I need to intervene if I want to increase the maximum number of players in the game? The standard is now 8... I would welcome 10
libs\s25main\gameData\MaxPlayers.h
Yes, I found it... but this probably won't be enough, right? Are there any other dependencies in other cpp... gamelobby... gameclient etc?? Or can this one line really automatically apply it to all other dependencies?
There can be additional places which may not respect the MaxPlayers constant though (UI, ...) thats something you need to check and find out
Ok Thanx
There can be additional places which may not respect the MaxPlayers constant though (UI, ...) thats something you need to check and find out
It's strange, but it was really enough to rewrite MaxPlayers.h from eight to ten players and it works in the game... at least in single player.
Solved...