[SCR] OK Traders v1.7.1 (04-12-14)
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
Shimrod
- Posts: 907
- Joined: Tue, 18. Feb 03, 01:43

The design I posted includes an Ignore mode which will sell and not retain lasers, that should be covered already.
I won't give a date as my spare time is limited, and the implementation pipeline is occupied with economy boosting and tethered traders, which will require an extended period of regression testing due to some supporting design changes.
I won't give a date as my spare time is limited, and the implementation pipeline is occupied with economy boosting and tethered traders, which will require an extended period of regression testing due to some supporting design changes.
-
littleliliput
- Posts: 11
- Joined: Thu, 24. Nov 11, 17:51

-
IAmSomeone
- Posts: 1
- Joined: Tue, 24. Jan 12, 22:07

-
Opy
- Posts: 5
- Joined: Fri, 29. Oct 10, 13:16

Not noticed it before installing this mod, but it may be just coincidence;
I use and old MS ForceFeedback 2 joystick and after Alt-Tabbing out and coming back into X3:TC/AB the throttle no longer works properly. Any throttle movement sets ingame throttle to zero.
*Edit - After uninstalling the mod (run uninstall in game, save game, close game, remove all associated files, start game and reload from save) I'm getting the same issue, so perhaps it is just coincidence that it happened after installing this mod.
I use and old MS ForceFeedback 2 joystick and after Alt-Tabbing out and coming back into X3:TC/AB the throttle no longer works properly. Any throttle movement sets ingame throttle to zero.
*Edit - After uninstalling the mod (run uninstall in game, save game, close game, remove all associated files, start game and reload from save) I'm getting the same issue, so perhaps it is just coincidence that it happened after installing this mod.
-
Shimrod
- Posts: 907
- Joined: Tue, 18. Feb 03, 01:43

Confirmed from looking at the code, I'll include a fix for next release.Traders will gladly go into blacklisted sectors to repair the ship they are flying.
Unlikely to be related to OK traders. The script just affects npc ship behaviour, won't touch the player ship unless the command is running on it. Seems more like a bug in the game itself, or with the driver. If reproducible on a vanilla install I'd raise it in the tech support section.Any throttle movement sets ingame throttle to zero
-
Vayde
- Posts: 850
- Joined: Fri, 6. Feb 04, 21:02

-
InFlamesForEver
- Posts: 2266
- Joined: Fri, 22. Jul 11, 13:42

I have a large amount of slowdown in my current game and am just wondering if it may be due to me having about 60 traders using this on the go free roaming. Could that cause a lot of slowdown? I'm just trying to find the culprit.
In Flames We Trust
Listening to Whitechapel soothes the soul!!
¹ ¤ ¹ But, the nuns are watching...
Listening to Whitechapel soothes the soul!!
XRM Trailer - XRM Installation Guide VideoSamuel Creshal wrote:Keyboards: What separates the men from the boys.
-
Shimrod
- Posts: 907
- Joined: Tue, 18. Feb 03, 01:43

I expect you'd start feeling it at 60 free traders yeah. You can easily confirm it by running the uninstall option from the menu, if lag goes away then there's the root cause.
I've done some performance optimization work in 1.4 that I hope will help with large numbers of free traders. The main optimization adds a lookup table for traders to check whether a particular trade route is already claimed, replacing a simple loop where each trader would scan every other trader running the script. This would get slower as number of traders increased. This triggers lots of times while at trader is determining the best ware to trade.
I've also reduced the frequency free traders test whether they can sell a ware they're en route to buy, and split out some core functions into an optimized library.
1.4 is code complete but still in testing.
I've done some performance optimization work in 1.4 that I hope will help with large numbers of free traders. The main optimization adds a lookup table for traders to check whether a particular trade route is already claimed, replacing a simple loop where each trader would scan every other trader running the script. This would get slower as number of traders increased. This triggers lots of times while at trader is determining the best ware to trade.
I've also reduced the frequency free traders test whether they can sell a ware they're en route to buy, and split out some core functions into an optimized library.
1.4 is code complete but still in testing.
-
InFlamesForEver
- Posts: 2266
- Joined: Fri, 22. Jul 11, 13:42

That sounds excellent 
I'll do some testing now but I'll wait to make a judgement on whether I should cut down the number of traders after 1.4 is released.
I'll do some testing now but I'll wait to make a judgement on whether I should cut down the number of traders after 1.4 is released.
In Flames We Trust
Listening to Whitechapel soothes the soul!!
¹ ¤ ¹ But, the nuns are watching...
Listening to Whitechapel soothes the soul!!
XRM Trailer - XRM Installation Guide VideoSamuel Creshal wrote:Keyboards: What separates the men from the boys.
-
Shimrod
- Posts: 907
- Joined: Tue, 18. Feb 03, 01:43

I've uploaded 1.4.0.
I made a further optimization to remove any wares with selling price lower than 5cr from the tradeable ware list. This excludes various trash wares like coloured crystals which are hard to generically remove and reduces amount of work performed when searching for a ware to trade. If anyone is running a mod where 1,2,3 or 4 credit wares need to be legitimately traded, do let me know...
1.4.0
- Add an economy boost mode for free traders, where they prioritize trading at stalled factories.
- Add free trader tether sector and tether range options to restrict free trader movement
- Have homebased traders observe dockware manager stock level limits configured on player docks.
- Traders now make use of docking computers when installed, and will buy a docking computer if they happen to dock at a place that sells one.
- Performance optimizations.
- Fix: repair shipyard selection was failing to respect blacklist
- Fix: homebased trader ware settings were not updated when wares were added/removed from the homebase tradeable ware list.
I made a further optimization to remove any wares with selling price lower than 5cr from the tradeable ware list. This excludes various trash wares like coloured crystals which are hard to generically remove and reduces amount of work performed when searching for a ware to trade. If anyone is running a mod where 1,2,3 or 4 credit wares need to be legitimately traded, do let me know...
1.4.0
- Add an economy boost mode for free traders, where they prioritize trading at stalled factories.
- Add free trader tether sector and tether range options to restrict free trader movement
- Have homebased traders observe dockware manager stock level limits configured on player docks.
- Traders now make use of docking computers when installed, and will buy a docking computer if they happen to dock at a place that sells one.
- Performance optimizations.
- Fix: repair shipyard selection was failing to respect blacklist
- Fix: homebased trader ware settings were not updated when wares were added/removed from the homebase tradeable ware list.
-
alt3rn1ty
- Posts: 3797
- Joined: Thu, 26. Jan 06, 19:45

Similar to the old Local Traders ?Shimrod wrote:- Add free trader tether sector and tether range options to restrict free trader movement
http://forum.egosoft.com/viewtopic.php?t=158869
If so, nice idea to include that ability.
-
Shimrod
- Posts: 907
- Joined: Tue, 18. Feb 03, 01:43

Yes, just like that, though credit for the idea goes to Fnord Lightbringer.
Setting a zero tether range will make it behave just like a sector trader.
Setting a zero tether range will make it behave just like a sector trader.
-
Shimrod
- Posts: 907
- Joined: Tue, 18. Feb 03, 01:43

Thanks
I think I'll let the dust settle on 1.4 for a while, play the game and flush out any bugs, before working on another feature release.
Future areas of enhancement might include:
- Equipping configuration
- Huge ship trading using fright drones
- Setting ships as homebases
- Special modes in addition to the eco boosting mode: collect flying wares, mining (maybe)
Future areas of enhancement might include:
- Equipping configuration
- Huge ship trading using fright drones
- Setting ships as homebases
- Special modes in addition to the eco boosting mode: collect flying wares, mining (maybe)
-
Vayde
- Posts: 850
- Joined: Fri, 6. Feb 04, 21:02

Hi Shimrod, Absolutely love tethered mode 
Couple of questions for you.
When starting a new free trader the first thing it does is head off for a jump drive.
When doing this does it check to see if the sector is known to the player?
Does it respect the Blacklist and avoid dangerous sectors when doing this?
Can any new release only include buying a jump drive if the player wants this?
Thanks
Vayde
Couple of questions for you.
When starting a new free trader the first thing it does is head off for a jump drive.
When doing this does it check to see if the sector is known to the player?
Does it respect the Blacklist and avoid dangerous sectors when doing this?
Can any new release only include buying a jump drive if the player wants this?
Thanks
Vayde
Still life in the old dog yet...
-
Krogort
- Posts: 176
- Joined: Sat, 3. Apr 04, 14:30

-
Shimrod
- Posts: 907
- Joined: Tue, 18. Feb 03, 01:43

Thanks guys. I hope the performance gain will be noticeable. I'll continue to look at this in subsequent releases.
@Vayde: It checks the destination sector is known and not blacklisted. However the move-pathing is performed by the stock script !move.movetostation, and I suspect this will travel through the shortest route to get there regardless of known status. It doesn't know about OK's blacklist either.
In vanilla AP I was unable to construct rationale for why a trader shouldn't buy a jumpdrive, and hence did not add a config option. 100k is quickly recovered with the massive boost to efficiency. Perhaps a tethered single sector trader wouldn't have use for one, but then the trader won't leave his sector to go and buy a jumpdrive so it's not a problem.
I can see how it would be a problem if your favourite mod makes them cost millions of credits or something, but my playtesting, at least since jumpdrive acquisition was added, has only included vanilla AP. Very early versions were developed under TC + XTC.
Equipping config will probably be the next major feature. Some design discussion about it begins at the following post, and yes it'll certainly be possible to configure - at least on a global basis - whether or not ships will buy jumpdrives.
http://forum.egosoft.com/viewtopic.php? ... 23#4087923
@Vayde: It checks the destination sector is known and not blacklisted. However the move-pathing is performed by the stock script !move.movetostation, and I suspect this will travel through the shortest route to get there regardless of known status. It doesn't know about OK's blacklist either.
In vanilla AP I was unable to construct rationale for why a trader shouldn't buy a jumpdrive, and hence did not add a config option. 100k is quickly recovered with the massive boost to efficiency. Perhaps a tethered single sector trader wouldn't have use for one, but then the trader won't leave his sector to go and buy a jumpdrive so it's not a problem.
I can see how it would be a problem if your favourite mod makes them cost millions of credits or something, but my playtesting, at least since jumpdrive acquisition was added, has only included vanilla AP. Very early versions were developed under TC + XTC.
Equipping config will probably be the next major feature. Some design discussion about it begins at the following post, and yes it'll certainly be possible to configure - at least on a global basis - whether or not ships will buy jumpdrives.
http://forum.egosoft.com/viewtopic.php? ... 23#4087923
-
hourheroyes
- Posts: 346
- Joined: Mon, 9. Apr 12, 05:14

-
Treelor
- Posts: 315
- Joined: Mon, 5. May 08, 01:25

-
Shimrod
- Posts: 907
- Joined: Tue, 18. Feb 03, 01:43

It's normal for trader balance to go negative to begin with. It starts off at zero and goes negative when the trader buys a jumpdrive, fuel and its first load of wares.
The price of the ship itself and existing equipment won't be deducted though. The balance just tracks trades the trader has made while running OK trade.
If the trader balance never climbs back up after it actually starts selling stuff that's definitely a problem. So yes allow the ships some time to recover their initial costs, but if it remains negative then do let me know. I'll keep an eye out.
The price of the ship itself and existing equipment won't be deducted though. The balance just tracks trades the trader has made while running OK trade.
If the trader balance never climbs back up after it actually starts selling stuff that's definitely a problem. So yes allow the ships some time to recover their initial costs, but if it remains negative then do let me know. I'll keep an eye out.
