|
|
 |
View previous topic :: View next topic |
 |
|
|
|
|
Author |
Message |
|
|
|
|
|
halo112358

Joined: 16 Feb 2006 Posts: 342 on topic Location: Berkeley, CA, USA

 |
Posted: Tue, 22. May 07, 03:37 Post subject: [SCRIPT] Autotrader Sector Lock 1.0 . . . . . . . . { UPDATED 2007/05/30 } |
|
|
Script: Autotrader Sector Lock 1.0
Author: halo
download: .zip / .spk
| Quote: |
The "Autotrader Sector Lock" command locks sectors so your autotraders (UT, Local Trader, Sector Trader) will not select stations in these sectors as buy or sell targets. The script uses the autotrader's built-in locking mechanism and is therefore compatible with all derivatives of the autotrader (gnasirator's UT improvements, satellite limited UT, local trader, etc..).
"Autotrader Sector Lock" will lock a sector perpetually, scanning occasionally for new stations, you must unlock the sector if you want your autotraders to use the sector again. |
What it does:
This script package allows you to blacklist sectors for your autotraders. The UT, sector trader, and local traders will not attempt to buy from or sell to stations in a blacklisted sector. This is something people have been asking for since X3 came out and there's always one sector in my games that's a UT deathtrap, so here's an implementation.
New Trade Commands:
Autotrader Sector Lock - locks a given sector, running this on a locked sector will unlock the sector.
Report Locked Sectors - sends an incoming message with a list of locked sectors.
Known Issues:
Stations that are already locked by UT's will not be handled by this script until the UT unlocks them, they will then be picked up within ~3 minutes of unlocking. This should catch the station before anyone else chooses to lock it. In rare cases you may see a station repeatedly locked by your autotraders, this will delay SectorLock's locking of this station.
Unlocking takes 2-5 minutes to completely unlock a sector. This is caused by the Universe Trader's locking system not by this script.
Works Best With:
gnasirator's mk3 improvement - 100% better function from the mk3.
----
t files/pages used:
| Code: |
7610 - Autotrader Sector Lock by halo
|
commands used:
| Code: |
<t id="416">COMMAND_TYPE_TRADE_16</t> Autotrader Sector Lock by halo
<t id="417">COMMAND_TYPE_TRADE_17</t> Report Locked Sectors by halo
|
_________________ *** modified ***

Last edited by halo112358 on Fri, 8. Jun 07, 22:08; edited 11 times in total |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
halo112358

Joined: 16 Feb 2006 Posts: 342 on topic Location: Berkeley, CA, USA

 |
Posted: Tue, 22. May 07, 03:38 Post subject: |
|
|
Here's what I'm interested in for this release:
Does the script function as expected?
Do you notice any performance hit while using this?
Do you like it?
Do you see any obvious errors?
Is the package complete?
Do sector unlocks happen fast enough for your tastes?
Code Review: Do you see anything stupid?
I wrote this because there's always one sector in my game that's a goddamn UT death trap. Usually there are 3-5 Kha'ak M1 or M2's in it and the stations have the best price in the universe. You can figure the rest out.
I'm going to stress that this is a beta. I've had to rewrite this thing about 3 times to get around the fact that you can't stop a global script by pid. I think I handled concurrency & locking correctly but I'd like for other people to stress test it in case there's something that I missed in my own testing.
_________________ *** modified ***

Last edited by halo112358 on Tue, 22. May 07, 12:08; edited 8 times in total |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
arcana75

Joined: 02 Dec 2003 Posts: 2156 on topic

|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
halo112358

Joined: 16 Feb 2006 Posts: 342 on topic Location: Berkeley, CA, USA

 |
Posted: Tue, 22. May 07, 05:21 Post subject: |
|
|
| arcana75 wrote: |
Otherwise, u know, I have never had problems with my traders and my stations. I understand there's a problem with PHQs and UTs but I never leave cash in my PHQ that's prolly why.
Might finally try this with my PHQ sector.  |
I didn't think of using this on your own sectors. I wrote it because of a Kha'ak invasion in Profit Center Alpha in my current game, my UT's kept trying to trade with the Drone Factory there and I'd lose them about half the time they tried to make a trade run.
During the early game there was nothing I could do about it, it was frustrating to lose ships to something that I knew about but couldn't change.
Now I just lock invaded sectors until I have an M2 
_________________ *** modified ***

Last edited by halo112358 on Tue, 22. May 07, 11:47; edited 1 time in total |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
arcana75

Joined: 02 Dec 2003 Posts: 2156 on topic

|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
halo112358

Joined: 16 Feb 2006 Posts: 342 on topic Location: Berkeley, CA, USA

|
Posted: Tue, 22. May 07, 06:06 Post subject: |
|
|
| arcana75 wrote: |
| Ah, so based on ur intention the script is more of a "Temporary No Fly Zone"? |
Yep, until the sector isn't dangerous any more. You turn it on, all of your UT's will avoid the sector. Later you turn it off and the sector is treated as normal.
| arcana75 wrote: |
| Thus depending on yr implementation it might not necessarily work that effectively as a autotrader restriction script? |
It's extremely effective at preventing UT's from trading in a locked sector, trust me
Here's how I use it:
Say you have a Kha'ak invasion in a sector, the Kha'ak ships will stay until you've destroyed them (unless the invasion is in a core sector, then the race military might kill them).
Until the Kha'ak have killed all of the stations in that sector you'll have an interesting problem: no traders will be able to navigate the sector and the stations will continue operating. The stations in this sector will have the best buy/sell prices in the universe and your UT's will be drawn to the sector like flies to honey....
In the early game there is nothing you can do about this, except lose ships or try to take on Kha'ak M1's in your M3. You could use the elephant trick to deal with them, but that's gaming the game in it's own way. So why not forbid your UT's from trading in this sector until you can clear it at your leisure?
_________________ *** modified ***
 |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Erilaz
 
Joined: 08 May 2006 Posts: 160 on topic Location: South Africa

|
Posted: Tue, 22. May 07, 14:12 Post subject: |
|
|
Great idea. I can think of a few pirate sectors I'd black list, which is in keeping with your original intention.
I must say tho, one of the first thtoughts that occurred to me when reading the description is that I'm also very interested in locking my PHQ sector so the UT's don't steal the Cr when I try to make a new ship. OR clog my PHQ docking ports cos they can't sell when the PHQ doesn't have cash and then don't go about their business, to boot.
I have a CAG on another factory in the same sector. Do you know if this will affect only the UT's and let the CAG's, Commodity Logistics, etc carry on?
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
arcana75

Joined: 02 Dec 2003 Posts: 2156 on topic

|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
jlehtone Moderator (Script&Mod)

 
Joined: 23 Apr 2005 Posts: 16160 on topic Location: GalNet BBS

|
Posted: Tue, 22. May 07, 14:26 Post subject: |
|
|
| Erilaz wrote: |
| Do you know if this will affect only the UT's and let the CAG's, Commodity Logistics, etc carry on? |
I do not think CAG/CLS/EST/??? has anything in common with the UT script. They probably do not touch any UT variables, ever (unless you give them that big stick called "Hammerhead").
Didn't moggy2 wrote a plugin for UT that locks a station, mainly for use with HQ? Naturally, it won't track GoD like this does.
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
halo112358

Joined: 16 Feb 2006 Posts: 342 on topic Location: Berkeley, CA, USA

|
Posted: Tue, 22. May 07, 22:16 Post subject: |
|
|
| jlehtone wrote: |
| Erilaz wrote: |
| Do you know if this will affect only the UT's and let the CAG's, Commodity Logistics, etc carry on? |
I do not think CAG/CLS/EST/??? has anything in common with the UT script. They probably do not touch any UT variables, ever (unless you give them that big stick called "Hammerhead").  |
I don't think this affects the CAG in any way. I'll look and see if I can find out how the CAG handles mutual exclusion on stations - if it's straightforward within the framework I have then I could add support for CAG/CLS.
| jlehtone wrote: |
| Didn't moggy2 wrote a plugin for UT that locks a station, mainly for use with HQ? Naturally, it won't track GoD like this does. |
Funny story about that script... It runs as a task on one of your own stations and locks one target station. Ever tried to find enough free station tasks to lock an entire sector when you don't have any of your own stations built yet? 
_________________ *** modified ***
 |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Gazz Moderator (Script&Mod)


Joined: 13 Jan 2006 Posts: 12153 on topic Location: Bavaria

|
Posted: Tue, 22. May 07, 22:20 Post subject: |
|
|
| halo112358 wrote: |
| I don't think this affects the CAG in any way. I'll look and see if I can find out how the CAG handles mutual exclusion on stations - if it's straightforward within the framework I have then I could add support for CAG/CLS. |
CAG use a station script on the last station slot that excludes this station for all CAG.
If you remotely start this script for AI stations, there's your exclusion.
_________________ My complete script download page. . . . . . Xai-Corp MSCI List is scripter's friend. I AM THE LAW!
Dogs and colour blindness explained: People with green eyes can't see dogs. |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Erilaz
 
Joined: 08 May 2006 Posts: 160 on topic Location: South Africa

|
Posted: Wed, 23. May 07, 14:05 Post subject: |
|
|
Thanks for the tip.
Will use this on those pirate sectors and I'll look for Moggy2's script for the PHQ.
PS: the CAGs etc already prevent themselves going to a sector where there's enemy activity, or is that only pirate activity, not really sure.
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
jlehtone Moderator (Script&Mod)

 
Joined: 23 Apr 2005 Posts: 16160 on topic Location: GalNet BBS

|
Posted: Wed, 23. May 07, 15:13 Post subject: |
|
|
CAG has many options:
* On ship, do not trade with any player station.
* On (player) station, no CAG allowed here (except my own).
* Satellites, only trade in sectors that have some.
* Foe, do not enter sectors owned by enemy race.
Cannot recall if "Trader Barrier" is checked from NPC station.
Actually, since the CAG generates a list of sectors first, overriding that to filter with a blacklist would work nicely, regardless of what stations are in the sector. But that would touch the script. Besides, CAG do behave, usually.
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
halo112358

Joined: 16 Feb 2006 Posts: 342 on topic Location: Berkeley, CA, USA

|
Posted: Thu, 24. May 07, 08:10 Post subject: |
|
|
Hmm. So, has anyone tried the script and liked it?
Usually I only get feedback if there are problems, so I guess I can assume that it's working alright for everyone 
_________________ *** modified ***
 |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
jlehtone Moderator (Script&Mod)

 
Joined: 23 Apr 2005 Posts: 16160 on topic Location: GalNet BBS

|
Posted: Thu, 24. May 07, 08:49 Post subject: |
|
|
Haven't. I have nothing to lock.
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
|
|
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
 |
|
|
|
|
|