Asher Posted 6 hours ago Share Posted 6 hours ago So I am trying to make certain structures "invisible" to bot players. My idea is to change the code in the file that checks for the nearest structure, and make it so it only sets that as attack point if the structure is not a certain class. I don't know if that would be easy, I think it would be somewhat easy. If someone could point me to where the file is and where in the file that would be, that would be helpful. I may also need help with the coding, if anybody would want to help. Thanks! 1 Link to comment Share on other sites More sharing options...
stevenlau Posted 1 hour ago Share Posted 1 hour ago (edited) First look at https://gitea.wildfiregames.com/0ad/0ad/src/branch/main/binaries/data/mods/public/simulation/components/UnitAI.js I think the first thing you will need is some tools that allow you to quickly search for a certain keyword in ALL files in 0AD. For example, inside UnitAI.js you would see cmpAttack.IsTargetInRange, then you need to search for where is it defined. You will be keep moving between many files, and up and down within a 5000 lines file. You will easily get lost if you don't have a convenient tool. I personally use Emacs, but I don't think you will want that. Perhaps ask ChatGPT if they have better tools suggestion for you. Edited 1 hour ago by stevenlau Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now