[SCR] OK Traders v1.7.1 (04-12-14)
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
I've uploaded version 1.1.0:
1.1.0
- Change the OK trade command ID from 42 to 48 to resolve a conflict. Note that following upgrade from 1.0.0 existing OK traders will temporarily show "Unknown command!" until their current action completes and the scripts restart.
- Automatically enable autojump and set min jumps to 0 when starting the OK trade command.
- Detect danger and return to homebase. Display subtitle messages when a trader detects danger.
- Reroute to new destination if current trade mission is invalidated, for example if destination ware price becomes unacceptable with respect to homebase selling price
- Buy wares without first returning to homebase if ship has sufficient jump energy to get there and home again, or if the ship isn't jump capable
- Add a minimum stock level percentage trade threshold with default of 10% (sell when above 10% stock, buy when below 90% stock).
- Improve displyed command action details
- Fix amount of ware on order calculation to include amount in cargobay
1.1.0
- Change the OK trade command ID from 42 to 48 to resolve a conflict. Note that following upgrade from 1.0.0 existing OK traders will temporarily show "Unknown command!" until their current action completes and the scripts restart.
- Automatically enable autojump and set min jumps to 0 when starting the OK trade command.
- Detect danger and return to homebase. Display subtitle messages when a trader detects danger.
- Reroute to new destination if current trade mission is invalidated, for example if destination ware price becomes unacceptable with respect to homebase selling price
- Buy wares without first returning to homebase if ship has sufficient jump energy to get there and home again, or if the ship isn't jump capable
- Add a minimum stock level percentage trade threshold with default of 10% (sell when above 10% stock, buy when below 90% stock).
- Improve displyed command action details
- Fix amount of ware on order calculation to include amount in cargobay
- DrBullwinkle
- Posts: 5715
- Joined: Sat, 17. Dec 11, 01:44
This script is a breath of fresh air, Shimrod.
I have been using OK Traders for a few days to replace CAG for a complex, and they do the job nicely. Much easier to understand and set up than CAG; just turn them on, follow the easy menu, and start them up.
Nice.
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
One thing I noticed: After I start an OK Trader, his orders are no longer visible. If I return to his settings menu, the defaults automatically populate rather than his current orders. It would be nice to be able to see his current orders so that I can check, then cancel, to make sure that I set it correctly.
I have been using OK Traders for a few days to replace CAG for a complex, and they do the job nicely. Much easier to understand and set up than CAG; just turn them on, follow the easy menu, and start them up.
Nice.
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
One thing I noticed: After I start an OK Trader, his orders are no longer visible. If I return to his settings menu, the defaults automatically populate rather than his current orders. It would be nice to be able to see his current orders so that I can check, then cancel, to make sure that I set it correctly.
Last edited by DrBullwinkle on Mon, 20. May 13, 10:43, edited 1 time in total.
Peace through superior firepower
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software 2 (DCS2) | Ship Tricks: Mini-Guides (with Video)
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software 2 (DCS2) | Ship Tricks: Mini-Guides (with Video)
Sure, if the command is already running on a ship, it'd be straightforward enough to populate the menu selections from the ware entry list already stored in the trader's local variable.
It's quite difficult to test new features and regression test the old ones in this script as they're pretty situational. Unlike Smart for example where I can simply spawn an enemy of the right type for it to shoot, or a quite easily set up a fleet vs fleet battle to monitor. I've had traders flying around with 500 engine tunings on SETA, and to test enemy avoidance I moved the ship into the heart of a Xenon sector and started the command.
However nothing beats real usage so I plan to continue my XTC game with 1.1.0 loaded for a while before working on feature enhancements to help flush out potential problems, though if I do fix any bugs I'll try to roll out patch releases quickly. At the same time if you notice anything weird do let me know about it.
It's quite difficult to test new features and regression test the old ones in this script as they're pretty situational. Unlike Smart for example where I can simply spawn an enemy of the right type for it to shoot, or a quite easily set up a fleet vs fleet battle to monitor. I've had traders flying around with 500 engine tunings on SETA, and to test enemy avoidance I moved the ship into the heart of a Xenon sector and started the command.
However nothing beats real usage so I plan to continue my XTC game with 1.1.0 loaded for a while before working on feature enhancements to help flush out potential problems, though if I do fix any bugs I'll try to roll out patch releases quickly. At the same time if you notice anything weird do let me know about it.
-
- Posts: 57
- Joined: Sun, 29. Jul 12, 00:19
I LOVE this script, I am kinda new at the game and CAG had me about to throw it out the window. This script saved the whole deal It's a lot more newb friendly.
I wonder how hard it is to make a script to have ships automatically equip themselves from stations, instead of having to look at every single sector looking for guns, shields etc..
I've been using Mistrals and Mistal SF's but finding the 25MJ shields and PRG's is hard in Boron space - usually need 5 for a Mistral and 4 for a SF. Most of the time there's only 3-4 on a station if I'm lucky.
I wonder how hard it is to make a script to have ships automatically equip themselves from stations, instead of having to look at every single sector looking for guns, shields etc..
I've been using Mistrals and Mistal SF's but finding the 25MJ shields and PRG's is hard in Boron space - usually need 5 for a Mistral and 4 for a SF. Most of the time there's only 3-4 on a station if I'm lucky.
- DrBullwinkle
- Posts: 5715
- Joined: Sat, 17. Dec 11, 01:44
Player Workshops or Yalamandis ShipyardRevolution Rising wrote:I wonder how hard it is to make a script to have ships automatically equip themselves from stations, instead of having to look at every single sector looking for guns, shields etc..
Peace through superior firepower
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software 2 (DCS2) | Ship Tricks: Mini-Guides (with Video)
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software 2 (DCS2) | Ship Tricks: Mini-Guides (with Video)
-
- Posts: 57
- Joined: Sun, 29. Jul 12, 00:19
- DrBullwinkle
- Posts: 5715
- Joined: Sat, 17. Dec 11, 01:44
As you discovered, Marine Repairs and Training is a big help.
There is no general-purpose auto-repair, although many scripts include auto-repair of some sort. Off the top of my head, that includes:
.
PS: We should probably move this Q&A elsewhere, and let Shimrod have his thread back!
There is no general-purpose auto-repair, although many scripts include auto-repair of some sort. Off the top of my head, that includes:
- Mobile Mining Mk2
- MK3 Improvement
- Anarkis Defense System
- Most of Lucike's scripts, including CODEA, EST, and Prospector.
- Vanilla Sector and Universe Traders
.
PS: We should probably move this Q&A elsewhere, and let Shimrod have his thread back!
Peace through superior firepower
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software 2 (DCS2) | Ship Tricks: Mini-Guides (with Video)
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software 2 (DCS2) | Ship Tricks: Mini-Guides (with Video)
-
- Posts: 57
- Joined: Sun, 29. Jul 12, 00:19
Thanks for the info.DrBullwinkle wrote: PS: We should probably move this Q&A elsewhere, and let Shimrod have his thread back!
Yeah I realised that after my last post (sorry Shimrod), the reason I put it here however was the OK Traders were getting damaged (about 1 per day real time) so figured he might include some form of it
Thanks for the Post Vayde too good info.
Repairs and equipping (shields, tunings, jumpdrive) are certainly something I'd consider in future though it's not an immediate priority.
Note that in 1.1.0 the trader will detect incoming hostiles within its max scan range and move to homebase, so assuming it has a jumpdrive, energy and not already in home sector, it should jump away before taking any damage.
So far in my game I've not had any casualties, and the warning subtitle message displays the sector name so I know which sector to blacklist or clean out if it recurs.
Note that in 1.1.0 the trader will detect incoming hostiles within its max scan range and move to homebase, so assuming it has a jumpdrive, energy and not already in home sector, it should jump away before taking any damage.
So far in my game I've not had any casualties, and the warning subtitle message displays the sector name so I know which sector to blacklist or clean out if it recurs.
-
- Posts: 393
- Joined: Fri, 5. Mar 04, 19:47
I've uploaded a new version. The main feature is they can now operate as free traders. The free trader balance of profit or loss since the command was started is displayed in the menu. Note that when it buys its first wares/energy it will start out in the red.
There is no micromanagement involved. To make a free trader, start the command on a ship without a homebase. To make a station trader, assign a homebase then start the command.
1.2.0
- OK Trade can now be enabled on ships without homebases. They act as free traders and roam the galaxy in search of profit.
- When a ship is already running the command, the trade menu will display the ships's current settings or profit/loss so far in the case of a free trader.
Edit: Thought I'd found a problem...
Update: It turned out the homebase just had no money , everything is ok!
There is no micromanagement involved. To make a free trader, start the command on a ship without a homebase. To make a station trader, assign a homebase then start the command.
1.2.0
- OK Trade can now be enabled on ships without homebases. They act as free traders and roam the galaxy in search of profit.
- When a ship is already running the command, the trade menu will display the ships's current settings or profit/loss so far in the case of a free trader.
Edit: Thought I'd found a problem...
Update: It turned out the homebase just had no money , everything is ok!
Last edited by Shimrod on Sun, 2. Jun 13, 17:28, edited 4 times in total.
-
- Posts: 173
- Joined: Fri, 17. Jun 05, 06:35
The script's sanity check should terminate the command if a homebase is assigned to a free trader, or a homebase is cleared on a homebased trader. If the ship is performing a blocking action though it might not immediately realize this.
There is no common code between OK Traders and CAG/UT, so they'll also react differently to threats and changing trading conditions. I haven't made a side by side feature comparison, no doubt CAG/UT have more options.
The goal with OK Traders is for it to work without any micromanagement, levelling, training, and perform at their best right out of the box. I don't use UT and CAG for these reasons.Thanks for the great mod! Maybe a silly question but here it is anyway: what makes an non-homebased OK Trader a better choice than a classic sector trader or a universe trader?
There is no common code between OK Traders and CAG/UT, so they'll also react differently to threats and changing trading conditions. I haven't made a side by side feature comparison, no doubt CAG/UT have more options.
Last edited by Shimrod on Sun, 2. Jun 13, 17:22, edited 1 time in total.
Shimrod wrote:The script's sanity check should terminate the command if a homebase is assigned to a free trader, or a homebase is cleared on a homebased trader. If the ship is performing a blocking action though it might not immediately realize this.
On AP I'm finding the 'buy x units of y' command isn't working for homebased traders when they buy ore, for no apparent reason. I'm experimenting with using the 'buy x units of y to a max. price of z cr' cmd as an alternative, as this is used in !trade.getware. Hopefully will cure it... Nope, didn't cure it.
Edit: I was just being an eejot. The homebase had no money!
so it is working now?Thanks for the great mod! Maybe a silly question but here it is anyway: what makes an non-homebased OK Trader a better choice than a classic sector trader or a universe trader?
The goal with OK Traders is for it to work without any micromanagement, levelling, training, and perform at their best right out of the box. I don't use UT and CAG for these reasons.
There is no common code between OK Traders and CAG/UT, so they'll also react differently to threats and changing trading conditions. I haven't made a side by side feature comparison, no doubt CAG/UT have more options.
Split say NEED MORE FIREPOWER!!
- DrBullwinkle
- Posts: 5715
- Joined: Sat, 17. Dec 11, 01:44
Nice. Thank you.Shimrod wrote:- When a ship is already running the command, the trade menu will display the ships's current settings or profit/loss so far in the case of a free trader.
- Minor note: When I updated my v1.1 OK Traders to v1.2, their previous "No Trade" orders changed to "Sell". However, after I reset them, their orders seem to "stick".
Peace through superior firepower
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software 2 (DCS2) | Ship Tricks: Mini-Guides (with Video)
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software 2 (DCS2) | Ship Tricks: Mini-Guides (with Video)