[MOD] Auto Trader (v1.1 Dec 15 2015)

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

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

User avatar
YorrickVander
Posts: 2705
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander » Fri, 10. Jan 14, 00:10

Starting on fresh game with new version worked fine. Maybe some clash with the upgrade caused the menu issue.
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.

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

Post by euclid » Fri, 10. Jan 14, 00:54

Glad you got it sorted because I've tested your issue even with an "old" saved game and could not find any problem. However, if odd things like that happen then there is always the option to restart the auto trader:
  • 1# Wait until he sold the wares of the current trade.
    2# Add him to your squad.
    3# Hail the pilot and select "Resume autotrade".
    4# Remove him from your squad.
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

fiby
Posts: 98
Joined: Mon, 29. Jan 07, 00:22
x4

Post by fiby » Fri, 10. Jan 14, 13:33

Euclid, Would you consider to implement an option to either let the trade ships trade via docking & and unloading and your current method that will by pass it.

Only reason I ask though I totally love your script, I do miss seeing the function the dev have put in this game to make it more immersive/realistic.

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

Post by euclid » Fri, 10. Jan 14, 15:39

That's a tricky one fiby ;-)

I've intentionally bypassed the game scripts that require the freighters to assume a docking position before the station and/or the freighters launch cargo lifters to transport the wares.

As I've explained earlier already this "vanilla" method often leads to long waiting queues because either the docking positions are all occupied or obstructed.

I've observed one of my freighters moving about for more than 1 hour near the station he suppose to deliver wares because he struggled to find the docking position. During that time the docking position is "reserved" meaning that other freighters have to queue. If these delays take too long then freighters in the queue may lose their trade reservations and are left with wares they cannot sell as planned.

There is also an issue with cargo lifters. They require "room" to launch and to dock in order to transport the wares. If the launch area is obstructed then the launch will be delayed. Similar with the station's drone docking port.

In addition to the above some stations/freighters lack of cargo lifters which (again) leads to rather long delays or even to a complete hold of the trade.

However, I'm confident that these issues are addressed in a future update and if these problems are solved they I might rewrite the corresponding parts of the code. An alternative is to add a part to the load/unload wares code that shows cargo lifters moving between the freighter and the station. But then again, how often you are really going to watch them? ;-)

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

zxzlf
Posts: 9
Joined: Wed, 8. Jan 14, 15:29

Post by zxzlf » Fri, 10. Jan 14, 16:27

It has some problems in my game,I can't find the selection "Start sectortrader" in the menu

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

Post by euclid » Sat, 11. Jan 14, 02:48

zxzlf wrote:It has some problems in my game,I can't find the selection "Start sectortrader" in the menu
You need a Titurel or a Scaldis and the ship must not be in your squad. If this is what you have then please let me know what other mods you have installed. If you do not have any other mods then please mail your zipped saved game to me.

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

zxzlf
Posts: 9
Joined: Wed, 8. Jan 14, 15:29

Post by zxzlf » Sun, 12. Jan 14, 03:53

I have just send you a email with my savefile.
My game language isn't English,will this be the problem?

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

Post by euclid » Sun, 12. Jan 14, 04:19

zxzlf wrote:I have just send you a email with my savefile.
My game language isn't English,will this be the problem?
Thanks for the save_010. I loaded it fine, removed the Scaldis from the squad, hailed it and selected the Pilot and got the sector trader option. So I'm not sure why you don't see it. Please try again as I did: remove him from your squad, then hail the ship and talk to the pilot. I doubt that it is a problem of language.

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

zxzlf
Posts: 9
Joined: Wed, 8. Jan 14, 15:29

Post by zxzlf » Sun, 12. Jan 14, 04:56

euclid wrote:
zxzlf wrote:I have just send you a email with my savefile.
My game language isn't English,will this be the problem?
Thanks for the save_010. I loaded it fine, removed the Scaldis from the squad, hailed it and selected the Pilot and got the sector trader option. So I'm not sure why you don't see it. Please try again as I did: remove him from your squad, then hail the ship and talk to the pilot. I doubt that it is a problem of language.

Cheers Euclid
Indeed it's the problem of language.
I reinstall the game in English and load the save,the choice appears in the menu.
Also it appears when I delete the lines
"<do_if value="@event.object.ship">
<do_if value="(event.object.owner == faction.player) and (event.object.type == entitytype.commander) and (event.object.ship.knownname=='Titurel' or event.object.ship.knownname=='Scaldis')">"
and load the save in my original language game.

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

Post by UniTrader » Sun, 12. Jan 14, 05:35

zxzlf wrote: Indeed it's the problem of language.
I reinstall the game in English and load the save,the choice appears in the menu.
Also it appears when I delete the lines
"<do_if value="@event.object.ship">
<do_if value="(event.object.owner == faction.player) and (event.object.type == entitytype.commander) and (event.object.ship.knownname=='Titurel' or event.object.ship.knownname=='Scaldis')">"
and load the save in my original language game.
OMG. euclid, better change that quickly into something like
event.object.ship.macro == macro.units_size_xl_cargo_hauler_2_macro (check for Ship type/macro titurel)
and
event.object.ship.macro == macro.units_size_xl_cargo_hauler_3_macro (check for ship type/macro Scaldis)
or, even better, add an actual ceck if the Ship can carry all Ware Types before someone notices.

because your approach wont work on languages where these ships are called even slightly diffrent or when someone renamed his Ships via Savegame-edit ^^

(and regarding your last answer to me: i will look into your Script when i finished mine ^^ but because the function is almost the Same i will do it only after i released the first Version because i dont want anyone to think i copied ^^)
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 ;)

zxzlf
Posts: 9
Joined: Wed, 8. Jan 14, 15:29

Post by zxzlf » Sun, 12. Jan 14, 06:11

I think checking the storage of ships maybe more useful for that I have made a mod to change the capacity of some storages.

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

Post by euclid » Sun, 12. Jan 14, 12:02

UniTrader wrote:...... i will look into your Script when i finished mine ^^ but because the function is almost the Same i will do it only after i released the first Version because i dont want anyone to think i copied ^^)
OMG UniTrader you better delete that quickly before someone thinks you are not trustworthy :p

I would never accuse you of copying anything and, of cause, I believe your claim that you have not yet looked into the code :D


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

User avatar
YorrickVander
Posts: 2705
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander » Sun, 12. Jan 14, 15:19

because your approach wont work on languages where these ships are called even slightly diffrent or when someone renamed his Ships via Savegame-edit ^^
Hah - sometimes when someone points out something so simple I kick myself for not having seen it when I did exactly that save edit and it broke the mod. More coffee! -vibrates quietly away on caffine buzz-
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.

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

Post by euclid » Sun, 12. Jan 14, 18:18

Thanks guys :)

I've update uploaded - see OP for details.

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

aukai501
Posts: 80
Joined: Wed, 2. Oct 13, 12:52
x3ap

Post by aukai501 » Mon, 13. Jan 14, 23:17

Hi euclid

i have install this mod and totally love it, works fine for me,thanks you.

just like to ask is there way to put notification things into this mod? ( like star next to the name?) so that way we know its time to promote it to next level. or is there better to check it?


cheers :wink: :wink:

zxzlf
Posts: 9
Joined: Wed, 8. Jan 14, 15:29

Post by zxzlf » Tue, 14. Jan 14, 10:04

I find the fuelcells become less when time goes by.But the ship didn't buy fuelcells anymore.So will it costs a longer time for the ship to jump?
Thers is another question:what is Cts?

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

Post by UniTrader » Tue, 14. Jan 14, 12:00

from my understanding it will use fuel cells, if available (iirc nothing that could be avoided with scripts since the consumption is hardcoded) but there is an option to jump without enough fuel (that doesnt even cost more time; the additional time requirement is regulated via script only)
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 ;)

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

Post by euclid » Tue, 14. Jan 14, 13:27

@ aukai501: Glad you like it. Once the sector trader has reached level 2 he will send your one message that cluster trading is available. After that he will just send you his status after each trade run. This status message also show his level so you know that a promotion is possible. Same for the cluster trader once he reached level 3. If you are still uncertain then just hail the pilot. If he can be promoted you should see either "Start Cluster/Galaxy trader" or you see "Show profit" which provides also infor on his current level.

@ zxzlf: Auto trader do not need fuel to jump but if they have fuel then it is used to free up cargo space. And Cts stands for Cents. All money commands refer to cents rather than to credits: 100 cents = 1 credit. You can see that also in "Trade offers": many of the unit prices are floats like 312,12 meaning 312 credits and 12 cents.

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

User avatar
YorrickVander
Posts: 2705
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander » Tue, 14. Jan 14, 13:28

It's actually trivial to avoid the spool up time and use of jump cells.

From move.jump.xml

Code: Select all

<param name="skipcharge" default="false" comment="skip the jump drive charge time (only to be used in special cases e.g. plot missions)"/>
    <param name="ignorefuel" default="false" comment="ignore jump fuel requirements (only to be used in special cases e.g. plot missions)"/>
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 » Tue, 14. Jan 14, 15:33

i didnt mean the params for the move.jump, but the actual Jump command - iirc it will always use fuel, if available, but you can tell it to jump even if there is not enough fuel (in that case the amount available is consumed - so if there aew 22 fuel cells 22 are used, if there are none none are used) - i cuolndt look myself yet to be absolutely sure, but i am pretty sure it internally works that way
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 ;)

Post Reply

Return to “X Rebirth - Scripts and Modding”