Fluxkompensator Posted January 9, 2015 Share Posted January 9, 2015 Hello guysIn headquarters.js is a function named "buildDefenses".In this function is the line:queues.defenseBuilding.addItem(new m.ConstructionPlan(gameState, "structures/{civ}_defense_tower"));In this way I can tell the AI (_petrabot.js) to build defens towers, but what about walls?Does anyone know a way to do this or have any idea?Thanks for your time and attention. 1 Link to comment Share on other sites More sharing options...
mimo Posted January 10, 2015 Share Posted January 10, 2015 hi, that's not implemented. The difficulty with walls is in the positioning and checking of obstructions.But if you want to look at it, you can take inspiration from the function findDefensiveLocation (also in headquarter.js) which find the best location for towers and fortresses. It is called from the constructionPlan (in queueplan-building.js) when asked to build a tower. Link to comment Share on other sites More sharing options...
agentx Posted January 10, 2015 Share Posted January 10, 2015 Once you have a list of wall corner positions, look here: http://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/simulation/helpers/Walls.js 1 Link to comment Share on other sites More sharing options...
Fluxkompensator Posted January 11, 2015 Author Share Posted January 11, 2015 Alright,thank you! Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted January 11, 2015 Share Posted January 11, 2015 Make walls buildable through trees. This can remove 75% of obstructions. my opinion. 2 Link to comment Share on other sites More sharing options...
FeXoR Posted January 30, 2015 Share Posted January 30, 2015 (edited) hi, that's not implemented. The difficulty with walls is in the positioning and checking of obstructions.But if you want to look at it, you can take inspiration from the function findDefensiveLocation (also in headquarter.js) which find the best location for towers and fortresses. It is called from the constructionPlan (in queueplan-building.js) when asked to build a tower....yet another argument for shared libraries for simulation and RMGen IMO.Make walls buildable through trees. This can remove 75% of obstructions. my opinion.I agree. An RMGen patch for this is in progress - maybe that could help for the in-game wall placement as well as for AI wall placement, not sure. Edited January 30, 2015 by FeXoR Link to comment Share on other sites More sharing options...
agentx Posted January 30, 2015 Share Posted January 30, 2015 > ...yet another argument for shared libraries for simulation and RMGen IMOI wish, I could use my JS helper lib for simulation, rmgen, trigger and bot... 1 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