script question

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

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

Bondalf
Posts: 4
Joined: Mon, 12. Apr 10, 20:32

script question

Post by Bondalf »

Hello,

i would like to remove all AI ships in a game. Is it an easy way to do it ?

Thanks a lot !
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

from the currently unreleased X Fleet Fest Mod:

libraries/jobs.xml:
<?xml version="1.0" encoding="utf-8"?>
<diff><replace sel="/jobs"><jobs/></replace></diff>
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
Bondalf
Posts: 4
Joined: Mon, 12. Apr 10, 20:32

Post by Bondalf »

Hello UniTrader

In fact i would like to remove all AI ships at the start of a game, but want that during the game, AI ships are spawned normally.

I would like something similar as a starting universe exploration, nothing has been discovered by no faction.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

with that change no ships will spawn at the beginning of the game and existing ships should de-spawn over time ;)

if you want to have finer control over the jobs you can add a startactive="false" attribute to each of them and control when they should be activated via md-script (or possibly also ai-script, but these are not really suited for this purpose)

activating all jobs shortly after gamestart (or destroying all ships at this moment) will btw not really serve your purpose since at such a degree of underpopulation the jobs are prettty quick at spawning.. its a matter of about half an hour to an hour to reach regular population levels with that....
you need to activate more and more jobs over time to reach something like you want.. and probably need to split some of them for finer control how many ships exist
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
Bondalf
Posts: 4
Joined: Mon, 12. Apr 10, 20:32

Post by Bondalf »

UniTrader,

Thanks a lot ! i think i understood !

Thanks again, will try your solution (and it is a quick one and easy one for a beginner in x rebirth Scripting)

Return to “X Rebirth - Scripts and Modding”