Skitso Posted March 20, 2015 Share Posted March 20, 2015 (edited) I started tweaking the AI and the first thing I'd like to do is make defensive and command units shoot even when they are cornered in a low accuracy situation, rather than just move aimlessly between spot A and B, turn after turn. I know the value I need to change is minimum accuracy, but I wonder how it works as there are values set on both different scripts (aggressive, passive and so forth) AND on each races. So, which one the game uses or are they both calculated in somehow? Edited March 20, 2015 by Skitso Quote Link to comment Share on other sites More sharing options...
kabill Posted March 20, 2015 Share Posted March 20, 2015 I'm fairly certain that the AI values work as overrides rather than being combined in any way. And I've always assumed that the AI script type takes precedence over the race/class AI settings. However, I don't know whether that's actually the case or not. (A quick look at the code implies yes but I'm still not sure). Quote Link to comment Share on other sites More sharing options...
Skitso Posted March 20, 2015 Author Share Posted March 20, 2015 Thanks Kab! I know you have made a simple mod that did something similar. How did that turn out? Do you still play with those settings? Quote Link to comment Share on other sites More sharing options...
fall19 Posted March 20, 2015 Share Posted March 20, 2015 kind of offtopic but does the ai understand the risk of friendly fire , or more importantly to not throw a grenade right on top of his own head ? Quote Link to comment Share on other sites More sharing options...
Max_Caine Posted March 20, 2015 Share Posted March 20, 2015 TacticalDragon spent a lot of time working with AI. TD, do you have any suggestions for Skitso? fall, I know that aliens can care for freindly fire if you set it up right. Quote Link to comment Share on other sites More sharing options...
llunak Posted March 20, 2015 Share Posted March 20, 2015 (edited) I started tweaking the AI and the first thing I'd like to do is make defensive and command units shoot even when they are cornered in a low accuracy situation, rather than just move aimlessly between spot A and B, turn after turn. Does the AI still do that (running between two points)? I thought I have fixed it to stay in the same place if there's not a better one around. I know the value I need to change is minimum accuracy, but I wonder how it works as there are values set on both different scripts (aggressive, passive and so forth) AND on each races. So, which one the game uses or are they both calculated in somehow? It appears to me it's always the race value used. I get always 0.35 for Caesans and Sebbies and 0.05 for drones. So I guess this is broken. Well, part of it is just not implemented, given the aiprops.xml comment about only Pathing being overrideable. In fact, the whole overrides part is probably broken in principle. Script type alone shouldn't just replace every value from race/rank, a defensive guard caesan and defensive warrior sebillian shouldn't be the same just because they are both defensive. Maybe overrides should be additive rather than replace? Or some other idea? And I don't think just lowering minimumAccuracy will do a good job. That kabill's mod you're referring to did that and IIRC he eventually said that it just made the aliens mostly stand still and take lame shots. This is actually one of the AI things that I'd like to fix soon, I think it'd be better to have a separate value for another decision by the time the alien is ending its turn, so it would try to get to a good position, but if it decides that's not possible, it would try to take a worse shot. EDIT: Indidentally, I was planning to post next week asking if somebody would be interested in modding/testing/improving the AI. I'd like to do a number of AI improvements for 0.33, and I can do the code part, but the aiprops.xml values are an important part of the work, and I'd prefer if somebody else did that, so that I could spend more time on the code part of it. Edited March 20, 2015 by llunak Quote Link to comment Share on other sites More sharing options...
Skitso Posted March 20, 2015 Author Share Posted March 20, 2015 Thanks for the information llunak. Great to hear that you'll consentrate on improving the AI in the next release. I'm not sure if I'm the right person to help with ai modding though, as I've never done anything related. Either TD or kabill would probably be the one you need? Btw, did you find the cause for the movement crash? (Did the save I provided work?) Quote Link to comment Share on other sites More sharing options...
kabill Posted March 20, 2015 Share Posted March 20, 2015 Does the AI still do that (running between two points)? I thought I have fixed it to stay in the same place if there's not a better one around. I've not seen any odd behaviour recently, but I've also been playing with a lot of changes to GC so have no idea if this is a quality of XCE or something that I did. It appears to me it's always the race value used. I get always 0.35 for Caesans and Sebbies and 0.05 for drones. So I guess this is broken. Well, part of it is just not implemented, given the aiprops.xml comment about only Pathing being overrideable. Ah, sorry, you may be right. I was thinking of the pathing variables when I replied above, forgetting that this was about something else. In fact, the whole overrides part is probably broken in principle. Script type alone shouldn't just replace every value from race/rank, a defensive guard caesan and defensive warrior sebillian shouldn't be the same just because they are both defensive. Maybe overrides should be additive rather than replace? Or some other idea? Adding them together seems like a fairly simple but effective solution to me. Thanks Kab! I know you have made a simple mod that did something similar. How did that turn out? Do you still play with those settings? And I don't think just lowering minimumAccuracy will do a good job. That kabill's mod you're referring to did that and IIRC he eventually said that it just made the aliens mostly stand still and take lame shots. This is actually one of the AI things that I'd like to fix soon, I think it'd be better to have a separate value for another decision by the time the alien is ending its turn, so it would try to get to a good position, but if it decides that's not possible, it would try to take a worse shot. Yeah, it definitely made them shoot more but they were also pretty static. Not necessary a problem for command room aliens but definitely not recommended for general use. Relatedly, something to consider: when the scatter system was changed the short-range to hit bonus was toned down to account for the fact that missed shots could in fact still hit their target. I presume, however, that the AI wasn't adjusted to factor that in when comparing against its minimum to-hit threshold. So, leaving aside for a moment any significant AI changes, would it be worth reducing the values across the board just a little to account for that? Quote Link to comment Share on other sites More sharing options...
llunak Posted March 20, 2015 Share Posted March 20, 2015 Thanks for the information llunak. Great to hear that you'll consentrate on improving the AI in the next release. I'm not sure if I'm the right person to help with ai modding though, as I've never done anything related. Either TD or kabill would probably be the one you need? I didn't actually aim this specifically at you, but anyone willing to spend the effort on this would be the right person. Btw, did you find the cause for the movement crash? (Did the save I provided work?) Yes. Relatedly, something to consider: when the scatter system was changed the short-range to hit bonus was toned down to account for the fact that missed shots could in fact still hit their target. I presume, however, that the AI wasn't adjusted to factor that in when comparing against its minimum to-hit threshold. So, leaving aside for a moment any significant AI changes, would it be worth reducing the values across the board just a little to account for that? Good point. The accuracy function can take this into account, but I think I might not have made the AI use it, I'll check. 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.