[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
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13292
Joined: Sun, 15. Feb 04, 20:12
x4

Post by euclid » Tue, 7. Jan 14, 03:42

Thanks all and sorry for the money loss. I've uploaded a fixed version. See OP and readme.txt 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

toepick
Posts: 103
Joined: Wed, 29. Feb 12, 16:57
x4

Post by toepick » Tue, 7. Jan 14, 04:57

thanks for update! I had turned off the Yorrick fix but after a couple hours noticed my account slowly going down.. lol

have update now, will try with both and see how that works for a few hours.

it does seem like the economy really takes a dive when you turn off Yorricks extension; its a good thing the NPC's don't care if they loose money :D

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

Post by YorrickVander » Tue, 7. Jan 14, 14:34

With the same trade errors appearing without my mod running and the money loss solved you're probably safe to reinstall EconomyThing.
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.

Lc4Hunter
Posts: 2170
Joined: Sun, 2. Apr 06, 16:15
x4

Post by Lc4Hunter » Tue, 7. Jan 14, 15:44

Will test this today, too.
Maybe the game will make some more fun with that...

Thanks for your work :-)

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

Post by UniTrader » Tue, 7. Jan 14, 15:57

just curious (i wont look in your script until i released my Version ;) ): do you restrict the Command according to Ship Type or Wares compatibility (would it work with my Rahanas Hybrid M? it can also carry all 4 Cargo Types, similiar to the Scaldis ^^)
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: 13292
Joined: Sun, 15. Feb 04, 20:12
x4

Post by euclid » Tue, 7. Jan 14, 18:23

UniTrader wrote:just curious (i wont look in your script until i released my Version ;) ): do you restrict the Command according to Ship Type or Wares compatibility (would it work with my Rahanas Hybrid M? it can also carry all 4 Cargo Types, similiar to the Scaldis ^^)
Just download and look into the MD file - it won't bite :p

To my best knowledge there are only 4 ships with universal storage: a mass traffic ship_xs, the CV, the Scaldis and the Titurel. Since we don't want the first two to do the auto trading the MD condition is restricted to the last two. So, no wares compatibility check (although this is done in the xml script when searching for trades).

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: 2701
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander » Wed, 8. Jan 14, 00:43

Obscure thing to watch out for - I renamed my trade ship with the XRebirthEditorC and totally lost the commands for the trade ship -facepalm- Don't do it kids!
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.

toepick
Posts: 103
Joined: Wed, 29. Feb 12, 16:57
x4

Post by toepick » Wed, 8. Jan 14, 01:18

had that happen as well..reverted to a save I made just prior.. but got to thinking..

if you added them all to your squad, than saved, renamed the ships to whatever.. THAN started the autotrader if that would work.. just haven't tried it yet. Having trouble getting a few items to finish up my cell recharge factory.

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

Post by euclid » Wed, 8. Jan 14, 22:36

Update2 version uploaded - please 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

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

Post by YorrickVander » Thu, 9. Jan 14, 00:53

I've updated to update 2, and my chap is level 2, but I don't have an option to change him to cluster trader. I had a quick look in script and that seems like it should still be the case. There's no error log to indicate a problem.
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.

User avatar
YorrickVander
Posts: 2701
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: 13292
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: 13292
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: 13292
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: 13292
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 ;)

Post Reply

Return to “X Rebirth - Scripts and Modding”