[Feature] AI solved for everyone

This forum is the ideal place for all discussion relating to X4. You will also find additional information from developers here.

Moderator: Moderators for English X Forum

furirkeeper
Posts: 195
Joined: Sun, 2. Dec 18, 10:32
x4

[Feature] AI solved for everyone

Post by furirkeeper »

I had an idea that could possibly solve the problem of AI behaivor once and for all without modding. It might be really simple to implement or it might not, but it would be awesome.

At present you can set a few behaivoral options for each ship, how to react in certain situations. Reading the forum it becomes clear that different people want different things.

So, consider this. In the behaivor tab of each ship you could have a drop down list with options. Egosoft could then predefine behaivors like "default", "agressive", "defensive" etc, which could control how much to boost, when to flee, when to dock at the carrier etc.
Besides this there could be an option to load behaivor from file. This would make it possible for all the modding geniuses to create their own behaivors that could be simply imported into your game, on a ship per ship basis. On top of this the specified or loaded behaivor script could be visible in a text window in the behaivor tab for each ship which could let the user tweak it however they want creating a custom behaivor.

This would make it possible to set behaivors for any type of ship and could for example be used to make carriers never boost, fighters never boost below half shield, fighters flee at a desired hull, fighters switching targets when more prioritised targets appear.

And finally egosoft would never see any post again related to stupid behaivor, they could then simply supply the scripting manual. All of this within an unmodified game!
Techedge
Posts: 171
Joined: Fri, 13. Mar 15, 12:32
x4

Re: [Feature] AI solved for everyone

Post by Techedge »

Nice idea but, for what I can understand about the way the games work (scripts, etc.), it should be not feasible without a thorough remake.

I think that modifying the behaviour the way you suggest would be only possible by scripting it from scratch and should not be possible to tweak it in real time by using ingame UI modifiers without completely reviweing the actual interface.

However, maybe the modders can shed some lights on this?
Kadatherion
Posts: 1021
Joined: Fri, 25. Nov 05, 16:05
x4

Re: [Feature] AI solved for everyone

Post by Kadatherion »

Yeeeeah, that's not how it works.

What you propose basically is just a few priority presets... for pretty much... everything!.

Think X3-AP and its customizable turret behaviours: you had a few preset choices (missile defense only, attack capitals, attack fighters, protect ship, et cetera). These presets were nothing else than differently prioritized single tasks that you could manually set up or exclude (attack all enemies, attack target, attack missiles, attack M7+ and so on): depending on what you set up and what not, and in which order, a certain behaviour "logic" was the result. So that, for instance, your slow broadside PPCs would only fire at capitals instead of wasting shots against nimble fighters; BUT, if you also gave them an attack all task at a lower priority, they could still try to attack fighters when no other kind of better target was available.

While what you propose is something like this (and, in a sense, still is in the game for turrets behaviour among other examples), you are talking about pretty much rewriting all the flight/combat scripts, separating them to make them modular (or at the very least expanding them MASSIVELY to include a lot of IF-THEN) to allow for building different behaviours and relative presets for the moltitude of tasks that the AI can be called to execute. Simply put, this means multiplying by many times the actual amount of work needed, both for actual writing these (many) scripts and maybe even worse for then testing and balancing them. All this, while Egosoft is still working at balancing and finding a sweet spot for the current, single "default behaviour". It's not realistically feasible, we are talking HUGE magnitudes here, and way out of the current scope of the devs.

What IS feasible, as it happened before and is happening now as well, are mods editing things such as the !fight scripts as well as other balance files to get new *standard* behaviours (like, for instance, the popular "less missile spam" scripts for X3) or wider combat rebalances, each one tackling the "issue" in their own way and view. Then the player can choose the mod with the philosophy and approach he deems closest to his liking. This is actually the real main advantage mods have over a vanilla game: the fact the modding community multiplies the possible workforce behind a certain mechanic, allowing them to explore non-default approaches the devs have no time for nor interest in.

The mods themselves are going to be that "modularity" you wish for. Naturally, this is going to take time, and in large part to get to its full potential it has to wait for the vanilla game to reach quite stable foundations. Can't really expect many huge efforts at rebalances and overhauls, when the vanilla game itself is still changing frequently and a lot from patch to patch.
furirkeeper
Posts: 195
Joined: Sun, 2. Dec 18, 10:32
x4

Re: [Feature] AI solved for everyone

Post by furirkeeper »

I know my idea is kind of ambitious. Of course, as all ideas, it is inspired by what other people have created. For example the ARMA3 editor lets you load behaivor scripts per unit. And naturally ARMA was built to support this from the beginning, I would guess. Also natural since that is an editor is that all scripts are loaded when the scenario is loaded. But I assume reloading a script at runtime should also be possible in theory.

I am not naive, so am not expecting this to happen overnight. But, could be something to consider in future iterations. For now I would expect some more behaivoral options would be very much feasible.
I myself would as already hinted like to be able to set a slider to determine how much a ship is allowed to use its booster. And another slider to set when that ship is to disengage from combat (and what it is to do instead, i.e. "flee" or "dock at", etc.). The micromanagement needed today in combat is irritating as you are basically forced to stay behind and control the fleet, I would like to participate in the fighting.
Tomonor
EGOSOFT
EGOSOFT
Posts: 1932
Joined: Wed, 12. Sep 07, 19:01
x4

Re: [Feature] AI solved for everyone

Post by Tomonor »

So you basically want a simplified script editor for the average player?
Image
Socratatus
Posts: 1626
Joined: Tue, 11. May 04, 15:34
x4

Re: [Feature] AI solved for everyone

Post by Socratatus »

AI solved for everyone...

I knew that couldn`t be true the moment I saw the title.
1. Please do more on NPC civilian/uniform variety, and bio customisations, Devs.
2. Stations need sirens/warnings when enemy is close in numbers or Station in danger of destruction (in Sandbox).
Yes, for immersion. Thankyou ahead of time. (Edit: This is actually happening!!!)

"No problem can withstand the assault of sustained thinking."
"Before acting 'out of the box', consider why the box was there in the first place."
furirkeeper
Posts: 195
Joined: Sun, 2. Dec 18, 10:32
x4

Re: [Feature] AI solved for everyone

Post by furirkeeper »

repatomonor wrote: Sun, 12. May 19, 12:21 So you basically want a simplified script editor for the average player?
Yes, and if you don't feel like script editing you can always import a script from someone who have made one.
Socratatus wrote: Sun, 12. May 19, 16:15 AI solved for everyone...

I knew that couldn`t be true the moment I saw the title.
Since I tagged it as a [Feature] and not a [Mod] I thought it would be obvious that I did not have the implementation ready, just an idea, like everybody else in this forum.
Tomonor
EGOSOFT
EGOSOFT
Posts: 1932
Joined: Wed, 12. Sep 07, 19:01
x4

Re: [Feature] AI solved for everyone

Post by Tomonor »

Question is, how complicated can you go with an interface that the average user understands?

I honestly don't think this could work out. We will eventually have to embrace the mods once the pro modders chime in as they usually do.
Image
SirNukes
Posts: 549
Joined: Sat, 31. Mar 07, 23:44
x4

Re: [Feature] AI solved for everyone

Post by SirNukes »

repatomonor wrote: Sun, 12. May 19, 22:04 Question is, how complicated can you go with an interface that the average user understands?
Dragon Age Origins and Final Fantasy 12 are a couple examples of simplified AI scripting in AAA titles. I personally loved both of their systems.

A lot of satisfying complexity can be realized with simple priority lists of condition-action-target statements. Imagine if the X3 turret scripts also worked on ships: capital ship escort M4s could be set to prioritize shooting down incoming missile barrages, while M3s prioritize hunting down nearby enemy fighters and M6s prioritize assisting against the capital ship's main target.

There are several problems with relying on mods: the script selection will be very limited (vanilla, combat overhaul A, or combat overhaul B), scripts often come bundled with a bunch of other stuff the player may not want, tuning those scripts to taste requires delving fully into the messy modding landscape, confusion on how to create and maintain multiple variations of a script, etc. The best case is that somebody takes the time to implement their own scripting engine with a user facing UI, like with X3 CLS, but that is a lot of work for an unpaid modder.
Kadatherion
Posts: 1021
Joined: Fri, 25. Nov 05, 16:05
x4

Re: [Feature] AI solved for everyone

Post by Kadatherion »

SirNukes wrote: Mon, 13. May 19, 00:16
A lot of satisfying complexity can be realized with simple priority lists of condition-action-target statements. Imagine if the X3 turret scripts also worked on ships: capital ship escort M4s could be set to prioritize shooting down incoming missile barrages, while M3s prioritize hunting down nearby enemy fighters and M6s prioritize assisting against the capital ship's main target.

There are several problems with relying on mods: the script selection will be very limited (vanilla, combat overhaul A, or combat overhaul B), scripts often come bundled with a bunch of other stuff the player may not want, tuning those scripts to taste requires delving fully into the messy modding landscape, confusion on how to create and maintain multiple variations of a script, etc. The best case is that somebody takes the time to implement their own scripting engine with a user facing UI, like with X3 CLS, but that is a lot of work for an unpaid modder.
That's the point though, that's why such things have been done only for very specific, individual mechanics such as turret behaviour, and why mods as well simply change everything up to their own liking and to a new compehensive, default behavioural approach instead. Because it would not be just a matter of having to do immensely more complex scripts, with hundreds of new variables, but the actual workload needed for testing and balancing the now next to infinite different possibilities would grow exponentially.

Turrets are a fairly isolated mechanic: you only have to take into consideration targeting priorities and, pherhaps, weapon stats and relative chances to hit if you wanted to go the big extra mile mixing the concept with what MARS Fire Control did in X3. But every single actual ship behaviour ties in much more variables that would affect efficiency. Just disabling boost alltogether (mods are already playing with this) changes the game immensely (for the better, imo, btw), making it customizable would be a playtest and balancing nightmare.

Closest thing to this - and probably lone example of such a thing - has been Litcube's for X3. It does feature a few ship types that inherently have target priorities (antimissile, mainly), but its fleet control system also lets you set up some simple targeting / task priorities for every ship class that is in the fleet. But we are talking very general, very simple, all going back to the base game orders, and yet it took many, many years (and probably the most skilled and dedicated modder this community has ever seen) to realize. It's also very unwieldly - it takes hours to set up a fleet logic - because the UI is what it is. In X4 the same issue applies, the UI really wouldn't help (and it's not going too change that much anymore, that ship has sailed).

Of course the concept would be cool, but it would virtually require a whole new game, built from scratch with such an approach in mind.

Return to “X4: Foundations”