Drone Support

The place to discuss scripting and game modifications for X Rebirth.

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

Goliathmk2
Posts: 146
Joined: Tue, 3. Jun 14, 17:58
x4

Drone Support

Post by Goliathmk2 »

Would anyone know where I can find the scripts that determine how many combat drones are deployed and what targets they go after?

I have a couple of unarmed carriers filled with drones and they aren't doing anything other than what appears to be dancing.

I have made sure the drones do deploy but they are deployed in such small numbers it's pitiful.

I've been slugging my way through the game files for a couple hours and I want sleep so if anyone is able to help me with this i'd appreciate it.
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

aiscripts\fight.attack.object.capital.xml for capital ships.

Stations, hm, it appears that stations don't launch drones.

edit: posted some code here that modifies cicero111's BetterTurrets to launch lots and lots of drones (28 to 300 for carriers depending on defence officer combinedskill), but it runs extremely slow when they do, and I crashed my game once when I had 4 Arawns each with ~200 combat drones in one battle. Was awesome.
User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13489
Joined: Sun, 15. Feb 04, 20:12
x4

Post by euclid »

w.evans wrote: ......
Stations, hm, it appears that stations don't launch drones.
......
Check fight.attack.object.station.xml which is called from fight.station.player.xml and the latter is the standard script running on the station's DO.

Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

@euclid, I did.

Code: Select all

<!--TODO: Launch Drones-->
and no instances of

Code: Select all

<launch_drone ... />
in fight.attack.object.station.xml

Wouldn't be too hard to adapt the drone launch routine from fight.attack.object.capital.xml
Rubini
Posts: 452
Joined: Mon, 7. May 07, 05:17
xr

Post by Rubini »

w.evans wrote:aiscripts\fight.attack.object.capital.xml for capital ships.

Stations, hm, it appears that stations don't launch drones.

edit: posted some code here that modifies cicero111's BetterTurrets to launch lots and lots of drones (28 to 300 for carriers depending on defence officer combinedskill), but it runs extremely slow when they do, and I crashed my game once when I had 4 Arawns each with ~200 combat drones in one battle. Was awesome.
And if that amount is bringing a ctd, why didn´t we use a bit less drones? say 28-100 for example? Or this suggested amount is already on the game now?
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Rubini wrote:And if that amount is bringing a ctd, why didn´t we use a bit less drones? say 28-100 for example? Or this suggested amount is already on the game now?
Because watching 800 drones assault a target from four different directions is cool! (Set it to 300 because the Arawn can carry 300 drones. Thought it would make a good ceiling.) I'm actually still running with those changes. Just tweaked the range at which they launch back to cicero111's defaults.

Code: Select all

        <do_if value="$dronetargets.count">
          <do_if value="player.age" min="$lastdronelaunch + 60s">
            <set_value name="$lastdronelaunch" exact="player.age"/>
            <launch_drone name="$drone" object="this.ship" exact="5" group="unitcategory.defence"/>
            <do_if value="$drone">
              <start_script object="$drone.pilot" name="'fight.attack.object.drone.leader'">
                <param name="target" value="$dronetargets.random" />
                <param name="additionaltargets" value="$dronetargets" />
                <param name="checkrelation" value="$checkrelation" />
              </start_script>
            </do_if>
          </do_if>
        </do_if>
Vanilla capships launch groups of 5 drones every 60 seconds. I don't see a limit, but the low rate probably means that it won't get to launch all that many drones before the battle ends.
Goliathmk2
Posts: 146
Joined: Tue, 3. Jun 14, 17:58
x4

Post by Goliathmk2 »

Thanks evans now how would I go about adding L and XL ships to the fight.attack.object.drone.leader.xml target list? Particularly Overrum drone leaders and Overrun followers.

I get the feeling this will require a whole new script just for that purpose,
fight.attack.object.drone.bomber.leader and fight.attack.object.drone.bomber.follower

But still thanks for the info.

Return to “X Rebirth - Scripts and Modding”