Help finding turret files

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Darlandra
Posts: 48
Joined: Wed, 22. Oct 08, 02:51
x4

Help finding turret files

Post by Darlandra » Sun, 2. Dec 18, 04:52

So I have been digging through the xml's, and I've found the files that put the models together, those that control the weapon effects, and those that control the ship's decisions on what to fight, but I have not found the xml in particular the is the brain behind the moment by moment action of a turret. Has anyone ever modded such before? Is there a possibility that that is hard coded into the game?
If anyone else wants to try and find that file then please do, because I think a major need right now is to fix turrets so they ACTUALLY WORK instead of blindly shooting into empty space instead of targets.

Any help finding it would be great if it's accessible.

aftokinito
Posts: 229
Joined: Sun, 30. Mar 08, 17:29
x4

Re: Help finding turret files

Post by aftokinito » Sun, 2. Dec 18, 04:54

Should be under aiscripts, probably some of the fight.attack ones.

Darlandra
Posts: 48
Joined: Wed, 22. Oct 08, 02:51
x4

Re: Help finding turret files

Post by Darlandra » Sun, 2. Dec 18, 05:19

I went through them, focusing on the capital, medium, and large, and I couldnt find anything behind the logic behind how turrets work, only how they chose their targets. What ever file holds it would be having a lot of math and such to create aiming points and I've yet to find that in any of them.

Its already obvious what's happening/not happening.
They are NOT using predicted points to aim at, but being passed a ships current position and firing, but THAT is only updating once every second or two, no where NEAR often enough for something requiring updates 5-10x a second.

aftokinito
Posts: 229
Joined: Sun, 30. Mar 08, 17:29
x4

Re: Help finding turret files

Post by aftokinito » Sun, 2. Dec 18, 07:24

Those files control the targeting selection for AI ships while in combat. The math is handled in engine afaik, all you do is describe in the xmls some rules to tweak that.
I'm not sure about X4 but based on past experiences with Ego's game, I'd dare to say each turret might have its own AI and just uses one of those scripts.

Darlandra
Posts: 48
Joined: Wed, 22. Oct 08, 02:51
x4

Re: Help finding turret files

Post by Darlandra » Sun, 2. Dec 18, 11:46

It's interesting as I go through these files how many TODOs are left. The game is literally unfinished, at least in terms of intended gameplay that was left out. There are even whole blocks of code left commented out.

Riccardoman
Posts: 155
Joined: Thu, 9. Nov 17, 18:57
x4

Re: Help finding turret files

Post by Riccardoman » Sun, 2. Dec 18, 12:45

Yep, and AI pathing is one of those other unfinished features

Return to “X4: Foundations - Scripts and Modding”