Fluxkompensator Posted January 9, 2015 Report 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 Quote Link to comment Share on other sites More sharing options...
mimo Posted January 10, 2015 Report 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. Quote Link to comment Share on other sites More sharing options...
agentx Posted January 10, 2015 Report 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 Quote Link to comment Share on other sites More sharing options...
Fluxkompensator Posted January 11, 2015 Author Report Share Posted January 11, 2015 Alright,thank you! Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted January 11, 2015 Report Share Posted January 11, 2015 Make walls buildable through trees. This can remove 75% of obstructions. my opinion. 2 Quote Link to comment Share on other sites More sharing options...
FeXoR Posted January 30, 2015 Report 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 Quote Link to comment Share on other sites More sharing options...
agentx Posted January 30, 2015 Report 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.