Shiptrader definition

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

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

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

Shiptrader definition

Post by aftokinito » Sun, 2. Dec 18, 17:12

Where is the definition for shiptrader?
Specifically, which xml file defines what the shiptrader sells on npc warfs/shipyards?

EDIT: Just as I was typing this I managed to succeed in creating my own fully functional player shipyard. I would still like to be able to customise which ships the trader sells since right now it's only Argon ships.

JJJJ222
Posts: 32
Joined: Tue, 8. Dec 15, 01:00
x4

Re: Shiptrader definition

Post by JJJJ222 » Tue, 4. Dec 18, 04:02

Can you please do a Shipyard module for each faction for player
Just curious :D

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

Re: Shiptrader definition

Post by aftokinito » Tue, 4. Dec 18, 04:29

I tried making my own buildmodule macro but surprise, it does not work.

<builder>
<macro ref="A VALID MACRO WHATEVER" />
</builder>
<equip>
<macro ref="A VALID MACRO WHATEVER" />
</equip>

if I do

<builder classes="ship_xl">
<macro ref="A VALID MACRO WHATEVER" />
</builder>
<equip classes="ship_xl">
<macro ref="A VALID MACRO WHATEVER" />
</equip>

it does exactly the same as the default generic buildmodule.

Please some dev weight in and help.

JJJJ222
Posts: 32
Joined: Tue, 8. Dec 15, 01:00
x4

Re: Shiptrader definition

Post by JJJJ222 » Tue, 4. Dec 18, 04:32

How about using existing modules
Just curious :D

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

Re: Shiptrader definition

Post by aftokinito » Tue, 4. Dec 18, 04:38

There is only one that every race uses, buildmodule_gen_ships_xl_macro for XL ships but you get gist.
My problem is that the game uses the class of the ship to determine what the buildmodule can build but I cannot find anywhere how it determines which macros it can actually build, because it obviously doesn't list ALL the size_xl ships.

JJJJ222
Posts: 32
Joined: Tue, 8. Dec 15, 01:00
x4

Re: Shiptrader definition

Post by JJJJ222 » Tue, 4. Dec 18, 05:00

Maybe is will help here is a blueprint list viewtopic.php?f=181&t=403460
Just curious :D

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

Re: Shiptrader definition

Post by aftokinito » Tue, 4. Dec 18, 05:04

That has absolutely nothing to do with this thread.

JJJJ222
Posts: 32
Joined: Tue, 8. Dec 15, 01:00
x4

Re: Shiptrader definition

Post by JJJJ222 » Tue, 4. Dec 18, 05:05

sorry Trying to help
Just curious :D

JJJJ222
Posts: 32
Joined: Tue, 8. Dec 15, 01:00
x4

Re: Shiptrader definition

Post by JJJJ222 » Tue, 4. Dec 18, 05:32

are you look for stuff like this units_size_m_liquid_transporter_macro.xml.sig
Just curious :D

JJJJ222
Posts: 32
Joined: Tue, 8. Dec 15, 01:00
x4

Re: Shiptrader definition

Post by JJJJ222 » Tue, 4. Dec 18, 05:36

It is under \assets\legacy\units or \assets\units
Just curious :D

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

Re: Shiptrader definition

Post by aftokinito » Tue, 4. Dec 18, 05:40

What are you even trying. Again, this has nothing to do with the thread.
This is something only Egosoft can answer, I've already gone through ALL the game files and explained my findings.

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

Re: Shiptrader definition

Post by aftokinito » Tue, 4. Dec 18, 05:57

Just stop, you are not understanding the objective of this thread and are just posting random stuff and linking to piracy material (you are not allowed to redistribute the files of the game).

Chair5768
Posts: 32
Joined: Sun, 15. Jan 06, 07:43
x3

Re: Shiptrader definition

Post by Chair5768 » Tue, 4. Dec 18, 10:38

Ship trade lists are auto generated based on the class and faction of the ship. Shipyards build L/XL, Wharfs build S/M. Teladi stations build Teladi ships, etc. The ownership of ship is declared in the 'libraries\wares.xml' file.

example:
Spoiler
Show
<ware id="ship_par_s_scout_01_a" name="{20101,30102}" description="{20101,30112}" group="ships_paranid" transport="ship" volume="1" tags="ship">
<price min="82297" average="96820" max="111343" />
<production time="6" amount="1" method="default" name="{20206,101}">
<primary>
<ware ware="energycells" amount="34" />
<ware ware="hullparts" amount="74" />
</primary>
</production>
<component ref="ship_par_s_scout_01_a_macro" amount="1" />
<restriction licence="generaluseship" />
<owner faction="alliance" />
<owner faction="paranid" />
</ware>
The ship can be built in Alliance and Paranid wharfs.

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

Re: Shiptrader definition

Post by aftokinito » Tue, 4. Dec 18, 15:54

Actually, if the ware has no license it will be available at every buildmodule of that size, so it's not as trivial as you make it look.
Factions like Xenon, for example don't seem to have licenses yet their wares DO use licenses to restrict their ships to their own buildmodules.

I would love to hear a dev weight on this.

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 11577
Joined: Sun, 15. Feb 04, 21:12
x4

Re: Shiptrader definition

Post by euclid » Tue, 4. Dec 18, 16:53

@JJJJ222: I've removed your post with the link to uploaded gamefiles. Consider this as an official warning.

Please (and that for all) do not upload the game or parts of it anywhere.

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

Post Reply

Return to “X4: Foundations - Scripts and Modding”