SageThe13th Posted February 27, 2017 Share Posted February 27, 2017 I need to running combat testing to generate data. To eliminate pilot error/pilot awesomeness I need to run battles using my ship designs with the AI controlling them on opposite sides. How would I do this? Link to comment Share on other sites More sharing options...
Thundercraft Posted February 28, 2017 Share Posted February 28, 2017 I don't have an answer, sadly. But I am very interested in finding out if there is one. As I just explained in my Enemy of my enemy suggestion, my current singleplayer galaxy has the condition where normally friendly factions are now allied with bandits. It's such that for every bandit ship I destroy, I lose over 13000 rep with any faction in the system! Yet these waves of bandits keep coming for my blood, like clockwork. Link to comment Share on other sites More sharing options...
oreganor Posted February 28, 2017 Share Posted February 28, 2017 On the documentation, ShipAI entities have 2 interesting functions that could help you: function registerEnemyEntity(int index) function unregisterEnemyEntity(int index) I havent' tested them personally... But in theory if you have a shipA and shipB, this pseudocode will make them enemies to each other independently of the faction they belong to, and if there is no other nearby hostile entity close, they will attack each other: local aiA = ShipAI(shipA.index) local aiB = ShipAI(shipB.index) aiA.registerEnemyEntity(ShipB.index) aiB.registerEnemyEntity(ShipA.index) -- Put both to aggresive aiA.setAggressive aiB.setAggressive Far from home this week... So can't access my gaming desktop to check 100% that works, but hope it helps you as a starting point. Link to comment Share on other sites More sharing options...
DoorsMonster Posted March 1, 2017 Share Posted March 1, 2017 I don't have an answer, sadly. But I am very interested in finding out if there is one. As I just explained in my Enemy of my enemy suggestion, my current singleplayer galaxy has the condition where normally friendly factions are now allied with bandits. It's such that for every bandit ship I destroy, I lose over 13000 rep with any faction in the system! Yet these waves of bandits keep coming for my blood, like clockwork. Are those factions allied with pirates? They could have the "Empathy" trait instead. In my galaxy I have one of those empathic factions. But they still fight pirates, so I just weaken them and wait. Alternatively, I eliminate those pests hitting them with asteroids or with each other (force turrets). First option is easier. Link to comment Share on other sites More sharing options...
LogicSocket Posted March 2, 2017 Share Posted March 2, 2017 Have a look at the xsotanbehavior.lua file where it dictates they become aggressive if anyone shoots. 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