Jump to content

[X:CE 0.34.2] Custom alien race passiveness


Policenaut

Recommended Posts

New custom alien races introduced in aiprops.xml suffer from passiveness that does not effect the standard alien races. Custom alien races often end up moving next to Xenonauts without doing anything. They also seem incapable of reaction fire. I've also noticed that if a standard alien race unit stands next to a custom alien race unit, it kind of activates the custom alien race unit making it behave like it should and be more aggressive. However, if the custom alien race unit is alone or together with only other members of its race, it will retain the faulty AI.

Copying the exact settings of a custom alien race and its ranks into a standard alien race, i.e Caesan, makes them behave like they should, so there seems to be some part of the AI code that is hardcoded to only accept the names of the standard alien races (i.e Caesan, Sebillian, Andron etc). I tried seeing if it was related to the Soldier, Warrior, Elite etc. rank naming convention as well, but it made no difference for custom alien races.

While on the topic of AI and aiprops.xml I would like to request the ability to change the "zombify/spawnreaper" animation and sound effect on a per race basis. The standard animation and sound effect does not fit some of the new alien types I'm creating that use the new "spawnreaper.race.rank.turns" functionality and being able to change it on a per race basis would be of great help.

Edited by Policenaut
Link to comment
Share on other sites

10 hours ago, Policenaut said:

While on the topic of AI and aiprops.xml I would like to request the ability to change the "zombify/spawnreaper" animation and sound effect on a per race basis. The standard animation and sound effect does not fit some of the new alien types I'm creating that use the new "spawnreaper.race.rank.turns" functionality and being able to change it on a per race basis would be of great help.

Why does this sound so familiar ? Maybe because we requested that weeks ago ? Hm ... .

+1. Sounds as awesome as it was when we suggested it.

He walks right into the darkness, and he doesnt even know it ... :D. 

 

On a more brighter note though ( get the pun ? ), you can already make custom animations per race with the deathExplosion code. Just make a custom deathExplosion where you can freely set the animation used, and overwrite the vanilla one with a blank file. That ofcourse has different drawbacks, like not being able to use a proper deathExplosion for the race, or the fact that you would then have to set up the vanilla animation for vanilla units as a deathExplosion again.

 

On a different note, the vanilla races AI has a lot of behaviour implemented as hardcoded, to optimise some behaviour, but it can also play out quite queer, and none of the variables are in the aiprops.

The most twisted AIs are the "Reaper" ones, and the "Andron" ones. X-Division did a lot of AI testing in this and the not shooting thing applies to when androns and drones ( big/small ) are in close proximity to each other, with the result that Androns dont shoot and drones do. When there are no drones around androns start to shoot again.

The Reaper behaviour is VERY odd, as it seems to give civilians/locals at least a 75% percent higher target value, and an behaviour optimised for the "Zombify" ability. There can be some connections to "marking" AI behaviour, as we call it. "Marking", 90% of the time only occuring for melee units, means that when the AI decides what to do, it assigns an alien unit a target, "marking" it. All other melee AI actions before the chosen melee alien can move are directed to different targets/actions. I guess this is to maximise the "Zombify" ability, which kills in one hit.
Keep in mind the "marking" behaviour occurs 90% of the time, but there can also be different behaviour merged together producing less comprehensible movements.

Heres the info, enjoy :).

Link to comment
Share on other sites

3 minutes ago, Solver said:

Does this custom alien race attack in a melee fashion or use normal ranged weapons?

Goddamit, 3 minutes too late :D:D:D.

It can happen in both cases, for ranged units we confirmed it for androns, and we also confirmed this kind of behaviour for custom races units as long as they have the MeleeVehicles ability.

@Policenaut

I forgot to mention, the MeleeVehicles ability is 100% tied to the Reaper race code, so as soon as a unit has this ability the game treats it as if it was under the "Reaper" race, and adjusts the AI accordingly.

Link to comment
Share on other sites

1 minute ago, Charon said:

On a different note, the vanilla races AI has a lot of behaviour implemented as hardcoded, to optimise some behaviour, but it can also play out quite queer, and none of the variables are in the aiprops.

This is something I do not understand. It simply doesn't seem to be that way. I'm searching the code for the race names, and only find a few references to them.

Caesan:

Code that spawns the forced crash site on lower difficulties. And code that creates defaults if maptypes.xml is missing.

Sebillian:

Exactly the same.

Andron:

Same, plus code that disables crouching, and that changes their move sound.

Reaper:

This one has more references, for the old zombify code.

Harridan:

The glowing stuff code when shooting.

Link to comment
Share on other sites

2 minutes ago, Charon said:

I forgot to mention, the MeleeVehicles ability is 100% tied to the Reaper race code, so as soon as a unit has this ability the game treats it as if it was under the "Reaper" race, and adjusts the AI accordingly.

It works for non-Reapers now...

Link to comment
Share on other sites

1 minute ago, Solver said:

It works for non-Reapers now...

No, you didnt get it.

The sentence meant that the hidden AI tweaks for the reaper race get applied as soon as a unit has the MeleeVehicles ability.

3 minutes ago, Solver said:

This is something I do not understand. It simply doesn't seem to be that way. I'm searching the code for the race names, and only find a few references to them.

Did you look into the AI decision making process ?

This is all empirical data collected over hundreds of hours of coding, testing, and small adjustments. I am not saying we are making the connection right, but its a different hidden variable, but it appears to be there, and it majorly influences the AI behaviour in 100% visible way.

The latest test were with custom race reaper "stages", as soon as a unit got "killed" and spawned a unit with the MeleeVehicles ability, which it didnt have before, it behaved totally differently.

Maybe the game counts all "melee" units together and sees them as a group of units where everone has a different task ? 

Link to comment
Share on other sites

I'm sure you are correct, I'm just saying it's not a direct race check. The AI decision making as a whole is complicated and it's of course not a simple table or something like that, it's a complex interplay of the AI variables. But then in my understanding it should only depend on the aiprops variables, not on the races themselves. Which seems not to be the case.

Link to comment
Share on other sites

The more i think about it, the more i get the feeling the game has "groups" which it can pull units into to form some sort of collective decision making.

This "groups" tells androns not to shoot when paired with drones, most of the time and it tells the melee "group" to not overtarget a single unit.

Caesan and Sebillian are all getting processed as lone wolfes, but a different decision making seems to apply to either "Reaper" or melee units, and androns.

Link to comment
Share on other sites

Yes, the AI tries to use collective decision making. It's a good system overall. What the AI units then prefer to do depends on their aiprops. For example, whether they will target the same enemy or not, and whether the group will prefer to stick together or run searching for enemies. What I am not seeing how that grouping or behaviour could be different based on whether the race is custom or not.

Stuff's complex :D Specific GC saves might help understand this though.

Link to comment
Share on other sites

1 minute ago, Solver said:

I'm sure you are correct, I'm just saying it's not a direct race check. The AI decision making as a whole is complicated and it's of course not a simple table or something like that, it's a complex interplay of the AI variables. But then in my understanding it should only depend on the aiprops variables, not on the races themselves. Which seems not to be the case.

Nevertheless, drages coded the whole andron race under a custom race to avoid those interferences, and i am coding the Xenomorph race under custom races not tied to "Reaper"s, although i cant avoid the connection if i want to use the MeleeVehicles ability.

The only thing we can say for sure is:

  • It happens for androns put together with drones
  • the "Reaper" code AKA reaper race majorly tweaks behaviour, and this applies to units possesing the MeleeVehicles ability as well.

 

There is an additional behaviour @Policenaut mentioned, and that is overreserving TU units, AKA not moving at all, as soon as it gets too close to xenonaut units, especially when the xenonaut units have full TU.

This majorly seems to apply to andron units, under the "Andron" race, as Caesan/Sebillian units hardly show this kind of behaviour.

 

I dont think this is a bug, because i really think GJ has put this in intentionally for andron races, as it corresponds perfectly to the androns advertised patient behaviour.

 

Think about the development of X1 like this. GJ made the decision making GC AI the same for all races. After that was done he additionally implemented some characteristics for the races he felt needed a bit more "punch". Hence the "Reaper" characteristics and the "Andron" characteristics were born.

Voíla, we just back engineered the game.

Link to comment
Share on other sites

3 minutes ago, Solver said:

Yes, the AI tries to use collective decision making. It's a good system overall. What the AI units then prefer to do depends on their aiprops. For example, whether they will target the same enemy or not, and whether the group will prefer to stick together or run searching for enemies. What I am not seeing how that grouping or behaviour could be different based on whether the race is custom or not.

We have been telling that there are more variables that influence AI behaviour for a long time :):D.

4 minutes ago, Solver said:

Stuff's complex :D Specific GC saves might help understand this though.

Im sure drages has some saves lying around from his tests you saw in the videos.

Link to comment
Share on other sites

I don't have specific saves, even I had it would be at Xdivision. 

After years of ai testing, I can say that you can't just create an aiprob file as written at descriptions. Because the game engine is taking the numbers and use them on a chaotic battlefield with tons of data included. As I believe that some descriptions are already wrong and not enough at aiprob file, there is something happening at background too. 

That group system stops androns to fire when there is drones. Probably there is something wrong at that code part. I can't say it's totally about androns or drone race because those were the only race which uses so many drones with them. 

Game act different for some unique situations too which you won't expect to see. For example if u use badly against many aliens, the melee are hugging your last soldier and the last one kills you. 

I tried many ai codes and I am using the best one now but it was not planned. Because some stats like cover and ambush behave so chaotic. 

If you ask me, nobody can create a totally controlled ai because of the ai progress by the situations. I can make them more aggressive and more logical because the best working stats are about the Los and hiding. 

If an unit is passive, there should be many problems. A wrong minus can change everything. If ai got low damage weapons with low acc and low tu would make it very passive too. 

As I know that, melee vehicle ability make the unit crazy for civilian and vehicles. 

I did not have any problem at new races I created too. 

Link to comment
Share on other sites

1 hour ago, Solver said:

Does this custom alien race attack in a melee fashion or use normal ranged weapons?

In my tests they can use both but are more reluctant to attack in short range and after a while they stop attacking all together. Sometimes they never attack at all. You could replicate it by copying Caesans in aiprops for example and renaming them into something new and then editing the lightscout UFOcontents entries to only have the edited Caesans. Then shoot down a lightscout and see the faulty AI behaviour.

If this whole thing is too complicated to figure out, a way to hack this would be to allow the specific settings that can only be applied to a race, to be applicable on individual rank entries so we can put new aliens into the existing working races and just adjust the race exclusive settings for the new rank entry.

Link to comment
Share on other sites

1 hour ago, drages said:

Mod merge at aiprob is a bit tricky. For that reason, at Xdivision we replace the file nearly,  just to be sure to have our stats in the game. 

You just have to add mod merge to every nested entry, i.e race, rank and equipment/belts. I'm 100% sure this is not a mod merge issue.

Link to comment
Share on other sites

14 minutes ago, Policenaut said:

You just have to add mod merge to every nested entry, i.e race, rank and equipment/belts. I'm 100% sure this is not a mod merge issue.

Then i don't know. As i said, i don't have any problem about new created races, but i edited every single thing at my AI (not harridans). You can take our AI if you don't want to go into AI.. because many people tried many things and they died for this cause.. I am the only one alive..

Link to comment
Share on other sites

It could be helpful to see your aiprops so could you please upload it? However, you might not have noticed it if you mix your custom race with standard races in the ufocontents, since standard races seem to "activate" custom races when they're in close proximity as I mentioned in the first post.

Link to comment
Share on other sites

@Charon @Solver

Interestingly enough Charon mentioned that adding the MeleeVehicles ability makes units inherit the hardcoded Reaper AI behaviour and adding it to my custom alien races actually fixed the passiveness! This pretty much fixes it and also works for ranged units so no need to spend too much effort on fixing this, but the things the MeleeVehicles ability does is a clue towards figuring out the hardcoded AI behaviour.

I'd still appreciate custom "SpawnReaper" animation and sound, since the deathexplosion work around Charon also mentioned has some scaling issues with the gore_transformation animation.

Link to comment
Share on other sites

10 hours ago, Policenaut said:

It could be helpful to see your aiprops so could you please upload it? However, you might not have noticed it if you mix your custom race with standard races in the ufocontents, since standard races seem to "activate" custom races when they're in close proximity as I mentioned in the first post.

I did not understand the activation issue you mentioned but some one wanted to get aiprob file from Google Drive.  Was that you? 

Link to comment
Share on other sites

  • 3 weeks later...

After countless tests i was finally able to reliably reproduce this behaviour.

This behaviour happens when a melee/close range unit is in close proximity to xenonaut units from which they know have full/a lot of remianing TU to reactionfire. The way a custom AI reacts in this case is to "reserve" TUs AKA standing still all the time until the situation changes.

1. The AI will not go in if it knows xenonaut units have a lot of remaining TU, but will stay as close as it can and out of sight until a chance arises.

2. The lower the remianing Tu of the xenonauts the higher the motivation of the alien to rush in. If no reaction fire can be triggered custom alien units act like usual ( killing and stuff ).

3. The reaper code AKA MeleeVehicles or vanilla races seem to offset this behaviour indeed, and can "activate" custom race units without MeleeVehicles once they get into a proper range. This is due to how the game calculates "groups" to strategically position themself but doesnt actually change anything other than pulling custom race units into a group

4. This behaviour is due to the reserving TU code line once an alien is in a certain proximity to xenonaut units. With a proper AI this can be offset. GJ specifically offset this behaviour with the aggressive Reaper code line, to maximise the Zombify ability.

 

So all in all, it is as we said. This kind of behaviour origins from the reserving TU code line, and was specifically offset by GJ with the Reaper aggressivness overwriting code for melee units. The same result can be achieved with careful AI coding and is nothing static, but originates from the fact the AI was made for ranged weapon units in the first place, close range weapon units needed a correction to stay active in close range.

Ofcourse other variables like weapon damage, acc, etc ... influence the result as well, but were irrelevant for this test. If you give a unit a weapon with only 1 damage it will never shoot ofcourse, but in a reasonable damage and accuracy range, in which above tests were performed, you can achieve reasonable AI behaviour.

Edited by Charon
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...