[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

toepick
Posts: 70
Joined: Wed, 29. Feb 12, 17:57

Post by toepick » Tue, 7. Jan 14, 00:16

Thanks for the replies :)

Sometimes I like to dock on the ships and let them take me around with them.. watching the busy little bees work is kinda neat and adds a little realism (even if you have to wait in line).. with that said; I can certainly understand not using the code esp if it adds more overhead and bogs things down.

So yeah, really enjoying this and can't wait to see it work with some of the other up coming mods. Been using yours Yorrick, makes for a very busy universe and so far haven't had to wait at all for any capitals to be built. Deliveries run like MAD lol.

User avatar
YorrickVander
Posts: 2672
Joined: Tue, 29. Oct 13, 22:59

Post by YorrickVander » Tue, 7. Jan 14, 00:55

Yeah it's a terribly basic hack but it does make things go ;) Testing to see if it's that that's causing the errors with Auto Trader atm. Hopefully not but a few hours running will see.
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: 9997
Joined: Sun, 15. Feb 04, 21:12

Post by euclid » Tue, 7. Jan 14, 01:31

@hannahb: That's a nice idea and I'll consider it in a future update. Thanks for your input :-)


@YorrickVander: I've spotted a little flaw: if you board a ship, dock and talk to the marine officer to send him back to the Skunk you get the option "Start sectortrader (yes, it was a Titurel). So I've added the condition 'even.object.type == entitytype.commander'.
And thanks to your debug log I've discovered why the initial cue spams the error 'event.object.ship unknown': some of your faction members do not have a ship, for example if you hire someone. So I've added a main condition '<do_if value="@event.object.ship>'.
So big thanks for reporting this :-)

@toepick: Heheheh - yes, I was wondering who is the first to find out :D It's nice to dock at the autotrader and let him carry you around ;-)



Cheers Euclid
Last edited by euclid on Tue, 7. Jan 14, 19:17, edited 1 time in total.
"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: 2672
Joined: Tue, 29. Oct 13, 22:59

Post by YorrickVander » Tue, 7. Jan 14, 03:04

* suspected mod clash vindicated! *

I saw trades working at a loss before disabling my mod and restarting on a clean trader so I think my hack to ignore profit is kicking in there as the trade appeared to have worked correctly (ie no 0cr bug). The money had been over 10 mill, and was showing after last observed trade at 7 mill with 0 cargo.

oh and btw :

[General] ======================================
[=ERROR=] Error in AI script autotrade on entity 0x97B7: Property lookup failed: this.ship.cargo.list.{1}
* Expression: $Cargo.count gt 0 and this.ship.cargo.list.{1} != ware.fuelcells
[General] ======================================

from scaldis built in PMC shipyard delivered sans fuel.

EDIT : to double check the trades, buy, sell + profit, maybe a debug output line until trading fixed up to we can do a quick lookup for 0cr trades and other nasties? There was some question of this in beta forum but that was most likely due to older game version.
Last edited by YorrickVander on Tue, 7. Jan 14, 13:12, edited 2 times in total.
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.

User avatar
YorrickVander
Posts: 2672
Joined: Tue, 29. Oct 13, 22:59

Post by YorrickVander » Tue, 7. Jan 14, 04:05

Possibly I posted too soon :( Was just about to shut down the game and goto bed and checked the error log again 1 hour on :

https://docs.google.com/file/d/0BzGfezj ... gybnM/edit

More of the same I'm afriad. A lot of the errors. This is from a new freeplay game start with only auto trader and your player jump mods installed and exe restarted for clean log file. The first hour-ish showed only 2 errors from auto trader as posted above, then *headshot* after 2nd hour.

EDIT : oh and the fast start script that just opens the map and starts me with 50 mill to save time when testing. This runs once only at new game start so I believe that it isn;t the guilty party.
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: 9997
Joined: Sun, 15. Feb 04, 21:12

Post by euclid » Tue, 7. Jan 14, 04: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: 70
Joined: Wed, 29. Feb 12, 17:57

Post by toepick » Tue, 7. Jan 14, 05: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: 2672
Joined: Tue, 29. Oct 13, 22:59

Post by YorrickVander » Tue, 7. Jan 14, 15: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.

User avatar
Lc4Hunter
Posts: 1863
Joined: Sun, 2. Apr 06, 16:15

Post by Lc4Hunter » Tue, 7. Jan 14, 16: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: 13817
Joined: Sun, 20. Nov 05, 23:45

Post by UniTrader » Tue, 7. Jan 14, 16: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: 9997
Joined: Sun, 15. Feb 04, 21:12

Post by euclid » Tue, 7. Jan 14, 19: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: 2672
Joined: Tue, 29. Oct 13, 22:59

Post by YorrickVander » Wed, 8. Jan 14, 01: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: 70
Joined: Wed, 29. Feb 12, 17:57

Post by toepick » Wed, 8. Jan 14, 02: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: 9997
Joined: Sun, 15. Feb 04, 21:12

Post by euclid » Wed, 8. Jan 14, 23: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: 2672
Joined: Tue, 29. Oct 13, 22:59

Post by YorrickVander » Thu, 9. Jan 14, 01: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.

Post Reply

Return to “X Rebirth - Scripts and Modding”