A.I. Ships with Explore command. Where do they go ??

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

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

flatbush71

A.I. Ships with Explore command. Where do they go ??

Post by flatbush71 »

I've noticed that every so often shipyards build these vessels and they apparently jump into oblivion. If this is the case and they are just a wares sinks to generate player wares sales / revenue, then I'd like to locate the code and stop it. On the other hand if these vessels are being used, wouldn't it be a good idea for players to know about it ??

This has been posted about before , but there has never been a correct or complete answer given.

If someone could enlighten me it would be greatly appreciated.
How about it DEVs ???
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: A.I. Ships with Explore command. Where do they go ??

Post by BlackRain »

flatbush71 wrote:I've noticed that every so often shipyards build these vessels and they apparently jump into oblivion. If this is the case and they are just a wares sinks to generate player wares sales / revenue, then I'd like to locate the code and stop it. On the other hand if these vessels are being used, wouldn't it be a good idea for players to know about it ??

This has been posted about before , but there has never been a correct or complete answer given.

If someone could enlighten me it would be greatly appreciated.
How about it DEVs ???
'

This has already been answered many times. Ships built at shipyards just jump away and disappear into oblivion, as you say. They are meant as a sink. I have already altered this in my mod CWIR. Some ships are used by the "jobs" system, but no one knows exactly how this works and I do not believe it happens often, just occasionally.
flatbush71

Post by flatbush71 »

First of all, let me apologize for any inconvenience.
I am very old. ( I have grown great-grand children ).

Also Thank You for your response.
So I should look under the "jobs" for the particular Ship Yard in question ??
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

Ah no. What Blackrain means is the ai spawning system which is referred to as 'jobs'. These keep the mass traffic, pirate, trader, patrol etc ships going; spawed in controlled numbers in correct areas with correct loadouts and cargos also allowing for respawns of destroyed npcs.

The behaviour of ships built as isk sinks appears to be defined in the .exe and so is out of reach of mere modders. You could modify the move.die.xml ai script but that would affect far more than the credit sink ships that get it assigned.
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

YorrickVander wrote:The behaviour of ships built as isk sinks appears to be defined in the .exe and so is out of reach of mere modders. You could modify the move.die.xml ai script but that would affect far more than the credit sink ships that get it assigned.
this is definietly wrong. Script to be executed upon build is definied in the trade.shipyard.xml - and thats where you should change the behavior. not botching around in the move.die to prevent this script doing its job of removing Ships cleanly from the Game.
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 ;)
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain »

He's not entirely wrong, just part of what he said is wrong. Should be specific my friend hehe :). He's right about certain things being defined in the exe and you are right about the shipyard script. I edited it in my cwir mod. You can define what script ships built will run after being completed at the shipyard.
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

I stand corrected :)
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
flatbush71

Post by flatbush71 »

Thank You for the information guys.
I've found the move.die in the " trade.shipyard.xml".

Now what I would like to do, if possible, is change this to one that will add the built ship back to one of the A.I. groups to be used normally.

The question is which xml to use. Any ideas ???
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain »

flatbush71 wrote:Thank You for the information guys.
I've found the move.die in the " trade.shipyard.xml".

Now what I would like to do, if possible, is change this to one that will add the built ship back to one of the A.I. groups to be used normally.

The question is which xml to use. Any ideas ???

What exactly do you mean by A.I. groups to be used normally? There is no way to just hand it over to the AI to use like the other ships it gets from jobs.

You would need to create a script of some kind which tells it what to do instead of just move.die.
flatbush71

Post by flatbush71 »

ok, I see.
So there is not a written script from somewhere else that can be used.
I was thinking it replaced or added to the number of ships as needed.

Well, I'll be happy just to shut it off and save the wares from being drained
off. I sure don't need the extra sales. I have way more orders now than can be manufactured and delivered.

Thanks again for your insight. !!
I'm slowly learning a little.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain »

flatbush71 wrote:ok, I see.
So there is not a written script from somewhere else that can be used.
I was thinking it replaced or added to the number of ships as needed.

Well, I'll be happy just to shut it off and save the wares from being drained
off. I sure don't need the extra sales. I have way more orders now than can be manufactured and delivered.

Thanks again for your insight. !!
I'm slowly learning a little.
You can't shut it off, it is hardcoded.
Rei Ayanami
Posts: 3354
Joined: Wed, 6. Nov 02, 20:31
x4

Post by Rei Ayanami »

In my opinion generating credit/resource sinks should not be by building trade ships and making them jump into oblivion.

Instead the shipyard, in the case of an overabundance of resources, should build military ships and send them to enemy sectors. At least that way they get removed in a meaningful and realistic way and at the same time provide us with big space battles.

Maybe for the next X-title, Egosoft? *nudge nudge*
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

BlackRain wrote:
flatbush71 wrote:ok, I see.
So there is not a written script from somewhere else that can be used.
I was thinking it replaced or added to the number of ships as needed.

Well, I'll be happy just to shut it off and save the wares from being drained
off. I sure don't need the extra sales. I have way more orders now than can be manufactured and delivered.

Thanks again for your insight. !!
I'm slowly learning a little.
You can't shut it off, it is hardcoded.
if you mean the procedure which builds Ships (and also selects which one) - thats also in the trade.shipyard.xml
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 ;)
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

flatbush71 wrote:Thank You for the information guys.
I've found the move.die in the " trade.shipyard.xml".

Now what I would like to do, if possible, is change this to one that will add the built ship back to one of the A.I. groups to be used normally.

The question is which xml to use. Any ideas ???
Hey flatbush71,

easiest way to explain this I think would be to show you. You could download the Conquest and War in Rebirth mod by BlackRain and Rubini and take a look at \CWIR\aiscripts\trade.shipyard.xml

This excellent piece of work takes ships built by shipyards, assigns them crews, and gives them assignments depending on ship type. The relevant section is under

Code: Select all

<do_if value="$pilot.exists">
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain »

UniTrader wrote:
BlackRain wrote:
flatbush71 wrote:ok, I see.
So there is not a written script from somewhere else that can be used.
I was thinking it replaced or added to the number of ships as needed.

Well, I'll be happy just to shut it off and save the wares from being drained
off. I sure don't need the extra sales. I have way more orders now than can be manufactured and delivered.

Thanks again for your insight. !!
I'm slowly learning a little.
You can't shut it off, it is hardcoded.
if you mean the procedure which builds Ships (and also selects which one) - thats also in the trade.shipyard.xml
I haven't looked at the full script in a while. I don't think you can just stop it from producing ships, though. I know that some elements of ship construction are hard coded. Also, small shipyards definitely have aspects of it hard coded.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

You can for big ships. The build order is given explicitly. If the manager doesn't give a build order the shipyard won't build ships.

Small shipyards on the other hand work like factories which produce into a storagebay (its exactly the same mechanism)the , but its also easy to prevent them building ships - just set the production module to hacked. But there is no point in this - the Ships in the storage are taken by the jobs if necessary, but if none of the required are present the job system will revert to spawning..


PS when talking about this I just got an idea how the big shipyards could be used integrated into the jobs system but it requires some preliminary tests:
=> can an existing ship be teleported into a ship cradle like its actually docked there?
=> can this ship be set to under construction with 0% (including creating the demand for all construction wares) ?
=> do the actors on board survive this? (secondary, but would make things easier)
=> is this ship still counted towards the job quota?

Currently I don't have time myself for this so if someone wants to experiment a bit I can give more details about this idea (although I think the points above are clear enough)
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 ;)
flatbush71

Post by flatbush71 »

Wow, that's some very impressive script writing !!!

Great job Black Rain.
And thank you W. Evans for the link, I was unable to find it before.

Now that I have some basic idea of how this works, permit me to ask a couple of questions if I may.

Over a long period of time will this create enough ships to help decrease the massive ship shortage I am presently suffering from ??

And, Black Rain would it be possible for the " trade.shipyard.xml " to be a standalone mod or is it dependent on other parts of the CWIR mod to function properly ?
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain »

flatbush71 wrote:Wow, that's some very impressive script writing !!!

Great job Black Rain.
And thank you W. Evans for the link, I was unable to find it before.

Now that I have some basic idea of how this works, permit me to ask a couple of questions if I may.

Over a long period of time will this create enough ships to help decrease the massive ship shortage I am presently suffering from ??

And, Black Rain would it be possible for the " trade.shipyard.xml " to be a standalone mod or is it dependent on other parts of the CWIR mod to function properly ?
The trade ships built will use vanilla scripts in my version of the trade.shipyard.xml, however, the military ships use my own custom script. So, it is not possible to separate them from my mod. I could separate it for the trade ships, but I see no reason to do this honestly.
flatbush71

Post by flatbush71 »

Ok , Thank You :)

Return to “X Rebirth - Scripts and Modding”