Are there any examples of a simple planetary trader?
Page 1 of 1

Author:  Grey Gamer [ Fri Jun 17, 2022 12:31 pm ]
Post subject:  Are there any examples of a simple planetary trader?

I found a game with one active player, although he quit after a week or two. Terra doesn't generate colonists quickly, so my world building was limited, but I have invaded 2 planets an old player left behind so far and one alien planet.

Now I have several maxed out planets. I have a bubble with at least 150 maxed ports and warping my planet around and negotiating planetary trade this many times is super monotonous.

This definitely calls for a script, but I don't have any idea how many years it has been since I wrote one.

Will someone kindly point me in the right direction? :)

I started looking at script packs, but nothing looked relevant.

Thank you very much! :)

Author:  Adept [ Sat Jun 18, 2022 9:20 pm ]
Post subject:  Re: Are there any examples of a simple planetary trader?

Zedbot has an outstanding script for this: Z-Pdriver

Author:  Grey Gamer [ Sat Jun 18, 2022 10:27 pm ]
Post subject:  Re: Are there any examples of a simple planetary trader?

Thanks! I had installed TWX Proxy, although it turned out to be just 2.03. I was going through the scripts and trying to figure out how to get started (again; I wrote a planetary trader years ago!) when I saw your response.

I downloaded the Mega Installer from the MicroBlaster home page, figured out that the listening port is what SWATH uses, and then for some reason many SWATH options went grey, so I stared at them and scratched my head for a while.

When I tell Proxy to load Z-Pdriver it says "Script load error: File is not a compiled TWX script."


It's a .CTS, not a .TS!

Author:  Adept [ Sun Jun 19, 2022 3:34 pm ]
Post subject:  Re: Are there any examples of a simple planetary trader?

I am not sure why yours would be doing that? I just tested it and the script is loading.

Also, I had forgot to add that you will need to run z-sectorlister to generate a list of ports (e.g., output to portlist.txt, by distance, and select yes to update figged sectors, and set SBB for port exists, and then set your minimum quanities for each item) for the pdriver to use and will want to set pdriver to run in auto mode--starting it from the planet's citadel.

Also, in SWATH along the top bar (at the light bulb icon) you will only want to have proxy mode and parse incoming text pressed in, help mode should be inactive.

Author:  Adept [ Sun Jun 19, 2022 3:35 pm ]
Post subject:  Re: Are there any examples of a simple planetary trader?

Also there is a LS script Plan9: viewtopic.php?p=248344#p248344 that runs with MomBot

Details for it:

Author:  Grey Gamer [ Sun Jun 19, 2022 8:43 pm ]
Post subject:  Re: Are there any examples of a simple planetary trader?

I also needed to run Z-SectorLister.cts.

It sure it plotting many courses!

I was trying to figure it out on my own, but neither
waitfor "Planet command"
setTextLineTrigger 3 :Sub_Trade "Planet command"

did anything.

It looks like it is zero-turn mapping.

Why doesn't it use the CIM data?

There are 10,000 sectors and I have explored all but a couple.
There aren't usable ports in the remainder! :)

It finished ZTMing, tried to warp to sectors all over the galaxy, not in my 150+ sector bubble with 150+ ports, finally found a few with fighters, warped a couple of times, didn't port, landed on the wrong planet, and then tried to call on _ck_planet_nego.cts, but there isn't a leading underscore, so I made a copy.

It just went through all of the sectors in the galaxy in numerical order until it found one with a fighter, and warped there.

I told it to only trade with upgraded ports, but it went to a port that isn't upgraded.

Huh. I turned off haggling in SWATH, not trading altogether, so that came back to haunt me. I swear that I then turned it off, but somehow I didn't, and then the script aborted warning me that I hadn't turned off SWATH's haggling.

It didn't catch it the first time!

It ZTMed again.

I wish that it just pulled the list of my deployed fighters and then tried warping to those planets.

It keeps entering the citadel, turning on the computer, turning off the computer without doing anything, exiting the citadel without doing anything, and displaying the planet again, as well as pulling up my ship information and turning ANSI on and off.

Since it is going to all sectors in numerical order, I wish that it showed how many times it ported.

It displays the starting and current credits.
I wish that it showed my current profit.

It should have been much faster if it pulled up the list of deployed fighters and checked those ports, then didn't enter and exit the citadel, open and close the computer, change ANSI settings, and pull up ship information again and again.

It took 2.5 hours, but it made 790M.

I'll allow it! :D

Author:  Grey Gamer [ Wed Jun 22, 2022 4:24 pm ]
Post subject:  Re: Are there any examples of a simple planetary trader?

I ran z-pdriver again the next day and it didn't tell me to run z-sectorlister. I manually made a list of ports, told it to use that list, and I told it to upgrade ports this time and it did, but it also only sold about half us much product as the day before, actually spending about 200M more than it made.

I tried again today and not only did it tell me to run z-sectorlister, but it ZTMed again.

Then quit without trading.

I tried it again and it ZTMed and quit without trading.

I started looking into that LS script, but I kept thinking that I should be able to make mine work. I based it on 1_Trade.ts, but didn't get anywhere, and pulled up 1_Ports.ts, and started taking pieces from that.
Right now I have what I call a semi-automatic planetary trader, which is all that I really wanted, at least for now.

I can't just run it and hop in the bathtub! :D

Everybody knows that semi-automatic means 700-900 rounds per minute, and is exactly the same thing as full-automatic.
Of course, I am not fully-automatic, so I vastly slowed down everything.
This bolt-action user looked up the nearest port, entered it into the game, and my script took care of the rest.
I haven't figured out how to use Elder Prophet's haggler yet, so I am using SWATH's negotiator. There are too many variables to really compare anything, but I made 790M in 2.5 hours 2 days ago with Z-pdriver and 789M in 20-30 minutes today with Grey Gamer's Super Awesome Semi-Automatic Planetary Traderâ„¢.

Okay, my boastful and imaginative mind called it 0_ptrader.

I would like to work out a route, save that as a file, and feed that into my script, so that it can go fully automatic. but it would be better if it read my list of ports into an array, found the nearest, and deleted each one after use.
I used to be able to do the first one.
I would need to figure out the second one.

This seems to work great, except that occasionally it will send my planet number twice, so instead of trading 32,760 of each product it sells 5 or 10.

I don't know what is going on there.

It fails when SWATH fails and the port says it isn't interested. My script sends it some number. I don't know if it is the amount of product it wants to sell, some bid, or what. I tried to account for that and it didn't work.

The script doesn't tell this to the port, the port isn't interested. It sends it to the game and the game tries to navigate to that sector.

I think that I sold millions each of organics and equipment and SWATH only failed to sell 5 times. I went to the rest of the SSS ports, almost 30, and ran my script again.

Maybe I should write a traveling buydown script so I can keep trying, but I would need to troubleshoot that.

It took me 7 hours to buy down everything, but I don't have any idea how much of that was the game waiting on me.

I realized that I had enough fighters, so I invaded the last planet left behind by Z and then warped it to the same sector as my last minimally-colonized planet.

There were so many excess colonists on the planet that I just captured that there wasn't enough room on the planet I created without reducing production.

I pulled up a list of bubbles and was about to look for sectors still missing ports in the second bubble, but this game only gives us 8 hours a day, and wasting 7 hours buying down stock to test out my script was a waste of time.

It seems that the ports had already regenerated and it looked like there were dozens of ports in the second bubble that didn't have fighters.

I guess that I need to avoid the entrance and run a gridder.

Then if I can get z-pdriver to work it will upgrade them.

The worst part of running out of time is that I have at least 2 full planets, so they won't be producing anything until I can sell their product.

Anyway, my script. Please feel free to make suggestions, like why the Transwarp check that came directly from 1_Trade doesn't work or how to handle the port not being interested.

# check if we can run it from here
cutText CURRENTLINE $location 1 14

if ($location <> "Planet command")
        clientMessage "This script must be run from the surface of a planet"

logging off

# show script banner
echo "**" ANSI_3 "     --" ANSI_11 "===| " ANSI_15 "Grey Gamer's Super Awesome Semi-Automatic Planetary Traderâ„¢! :D" ANSI_11 " |===" ANSI_3 "--**" ANSI_7
echo ANSI_7 "By reading this line you agree to pay Grey Gamer one billion bars of gold-pressed latinum."
echo "The Jem'Hadar are rapidly approaching your location."
echo "**" ANSI_15 "For your own safety, please wear a mask, seatbelt, eye protection, and don't run my script!*"

# Set trigger to stop script if disconnected
setEventTrigger 0 :End "Connection lost"

# get the planet number
send "d"
setTextLineTrigger 1 :GetPlanetNumber "Planet #"
#setTextLineTrigger 2 :HasTwarp "TransWarp power"
setVar $line CURRENTLINE
stripText $line "#"
getWord $line $planetNumber 2

# away we go!

killTrigger 1
killTrigger 2
killTrigger 3
#  if ($twarp = 1)
    send "cp"
    waitfor "Planetary TransWarp Drive Engaged!"
    send "qq"
send "pn" $planetNumber "*"
    waitfor "-----"
    setTextLineTrigger 1 :selectHoldsSell "We are buying up to"
    setTextTrigger 2 :done "Command [TL="
    setTextTrigger 3 :Load "We're not interested."
#  else
#    echo "*" "You need planetary transwarp you nerf herder!" "*" $twarp "*"
#  halt
  killTrigger 1
  setTextLineTrigger 1 :selectHoldsSell "We are buying up to"
  send "*"

send "l" $planetNumber "*"
killTrigger 1
killTrigger 2
setTextTrigger 1 :sub_Trade "Planet #"

setVar $twarp 1
killTrigger 1
#killTrigger 2


Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group