[SCRIPT] [2012.04.02] Universal Best Buys/Sells Locator v2.51a

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
Alexology
Posts: 97
Joined: Sun, 24. Dec 06, 13:49
x3ap

Post by Alexology » Sat, 31. Mar 12, 05:17

Oh praise all the saints in heaven! (if you believe in that sort of thing) ((which I don't))

This is going to save so much time, installing now. Great job!

User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR » Sat, 31. Mar 12, 05:52

dblade wrote:alex2069 I made changes to your script files, adding isbb checks and or title args as needed, so as to maintain a different title on the menu screens (titles according to respective hotkey command launched: 'Universal Buy Locator' or 'Universal Sell Locator') so it is easier for me to confirm whether I was in buy or sell mode.

If you are interested in these changes let me know.

I am also going to remove the ship ID from the ship select screen (will makes it easier for me to identify ships) as well as look into converting the ship command to display a more human readable form ie None instead of COMMAND_NONE. I may also color the word None to green or something so that the idle ships stand out more from the rest.

It also won't hurt to try to limit the overall length of the command text so it doesn't run into another columns data.

These are probably trivial changes to you. I am new to scripting and as I really like your script decided to use it as a basis to learn a little bit.
Those are some pretty useful fixes. alex2069 isnt on anymore really. If he doesnt respond I would love a copy of the changes you made. You can PM me for an address.

Requiemfang
Posts: 3206
Joined: Thu, 16. Jul 09, 12:24
x4

Post by Requiemfang » Sat, 31. Mar 12, 06:44

joelR wrote:
dblade wrote:alex2069 I made changes to your script files, adding isbb checks and or title args as needed, so as to maintain a different title on the menu screens (titles according to respective hotkey command launched: 'Universal Buy Locator' or 'Universal Sell Locator') so it is easier for me to confirm whether I was in buy or sell mode.

If you are interested in these changes let me know.

I am also going to remove the ship ID from the ship select screen (will makes it easier for me to identify ships) as well as look into converting the ship command to display a more human readable form ie None instead of COMMAND_NONE. I may also color the word None to green or something so that the idle ships stand out more from the rest.

It also won't hurt to try to limit the overall length of the command text so it doesn't run into another columns data.

These are probably trivial changes to you. I am new to scripting and as I really like your script decided to use it as a basis to learn a little bit.
Those are some pretty useful fixes. alex2069 isnt on anymore really. If he doesnt respond I would love a copy of the changes you made. You can PM me for an address.
be nice if those changes could be released for everyone to use especially if its fixes.

User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR » Sat, 31. Mar 12, 07:18

Requiemfang wrote:be nice if those changes could be released for everyone to use especially if its fixes.
Even better. So long as credit is given I cant see how it would be an issue. There was a recent fix by draba that alex2069 uploaded. So it would probably be OK.

dblade
Posts: 151
Joined: Fri, 20. Jan 12, 05:13
x3tc

Post by dblade » Sat, 31. Mar 12, 21:36

It's all cosmetics and I only did like half of what I planned. The screenshot will show this: http://cloud.steampowered.com/ugc/59695 ... D8F91D418/

The rest of the 400+ hours was spent playing.

I sent alex2069 an email.

xTemon
Posts: 996
Joined: Tue, 9. Jan 07, 20:01
x3tc

Post by xTemon » Sat, 31. Mar 12, 21:45

Might be nice to have the Command slots changed to tid's so it doesn't show that Command line. I assume that possible through some minor changhes to the script. Not a big deal but it's the first thing that caught my attention in the screenshots.

Otherwise, super useful looking script. :)
:headbang: Microsoft

alex2069
Posts: 205
Joined: Thu, 22. Dec 05, 21:19
x3tc

Post by alex2069 » Sun, 1. Apr 12, 05:33

joelR wrote:Those are some pretty useful fixes. alex2069 isnt on anymore really. If he doesnt respond I would love a copy of the changes you made. You can PM me for an address.
Gah - I've been meaning to reply to this for some time now, and kept forgetting or putting it off (Uni/study takes priority :cry: lol). I don't always respond to board-notifications so much; usually put it off and plan to "do it later" lol, but emails grab my attention pretty quickly.
dblade wrote:alex2069 I made changes to your script files, adding isbb checks and or title args as needed, so as to maintain a different title on the menu screens (titles according to respective hotkey command launched: 'Universal Buy Locator' or 'Universal Sell Locator') so it is easier for me to confirm whether I was in buy or sell mode.

If you are interested in these changes let me know.

I am also going to remove the ship ID from the ship select screen (will makes it easier for me to identify ships) as well as look into converting the ship command to display a more human readable form ie None instead of COMMAND_NONE. I may also color the word None to green or something so that the idle ships stand out more from the rest.

It also won't hurt to try to limit the overall length of the command text so it doesn't run into another columns data.

These are probably trivial changes to you. I am new to scripting and as I really like your script decided to use it as a basis to learn a little bit.
So, the way I see it - we can put what you've done up now, or a little more polish and then put that up.
If possible, could you change the rest of the COMMAND_ fields to a nicer text - something I'd been planning to do for ages now (though as white still - very much like that Green for Idle highlighting).
Secondly, the ship IDs some people find useful (though primarily used in debugging, I did use them a bit during actual play as well) - depending on your scripting abilities, add in a switch to turn this on/off.
The former would be nice at least; the latter if you want to/can be bothered heh.
Feel free to not do it if you can't be bothered or something - I'm a bit of a perfectionist and like things done to completion, so please don't read this as a "you must do this" lol.

dblade
Posts: 151
Joined: Fri, 20. Jan 12, 05:13
x3tc

Post by dblade » Sun, 1. Apr 12, 06:57

If possible, could you change the rest of the COMMAND_ fields to a nicer text
All I did was use hardcoded text. The idea of hardcoding everything didn't seem right so I stopped there. I am not sure if there is some way of deriving the text id so as to pull the text using 'read text', sprintf, or something.

Secondly, the ship IDs some people find useful (though primarily used in debugging, I did use them a bit during actual play as well) - depending on your scripting abilities, add in a switch to turn this on/off.
I'm sure I could copy what you did, but I recall that the switches you've already created as having a default and they reverted each time you pulled up the mod. My vote would be that this defaulted to OFF be it ever implemented :)

Here's the thing, I'm not playing TC/AP right now and won't have time to do this any time soon. I've sent you my updates via email.

P.S. Thanks for creating this mod, it's one of the best.

alex2069
Posts: 205
Joined: Thu, 22. Dec 05, 21:19
x3tc

Post by alex2069 » Mon, 2. Apr 12, 09:58

Alrighty - update v2.51a has been added to first post, courtesy of dblade.
dblade wrote: All I did was use hardcoded text. The idea of hardcoding everything didn't seem right so I stopped there. I am not sure if there is some way of deriving the text id so as to pull the text using 'read text', sprintf, or something.
Ah, yea - definitely would want that using read-text stuff (the people that maintain the translated versions wouldn't be happy with me if it wasn't lol).
dblade wrote:I'm sure I could copy what you did, but I recall that the switches you've already created as having a default and they reverted each time you pulled up the mod. My vote would be that this defaulted to OFF be it ever implemented :)
Can't remember how I did it... Coming on a few years now lol.
Maybe I'll do that at some point, though I wouldn't hold my breath x.x.
As much as I really want to run through X3AP, and get back and update all my scripts, I really don't have the time... :( It's on my "todo" list for now.

TestUnknown
Posts: 56
Joined: Fri, 6. Apr 12, 01:40

Post by TestUnknown » Wed, 11. Apr 12, 07:05

I apologize before hand if someone already did this since I didn't read the entire 10 page post. And hopefully this will be useful to someone.

There comes a time when you have so many ships that it is impossible to find the ship you want to send. This small change to a2069.uniloc.station does 2 things
1) show only TL if ware interested is dock or factory
2) if best sell show only the ships with ware to sell

Replace

Code: Select all

$ships = get ship array: of race {Player} class/type={Moveable Ship 2134}
at around line 47 of a2069.uniloc.station with

Code: Select all

  * 5:DOCK
  * 6:FACTORY
  * 7:SHIP
  * 8:LASER
  * 9:SHIELD
  * 10:MISSILE
  * 11:ENERGY
  * 12:NATURAL
  * 13:BIO
  * 14:FOOD
  * 15:MINERALS
  * 16:TECH
  * 17:ASTEROID
  $ware.maintype = get maintype of ware $arg.ware
  if $ware.maintype <= 6 
    $ships = get ship array: of race {Player} class/type={TL 2032}
  else
    $ships = get ship array: of race {Player} class/type={Moveable Ship 2134}
    if not $arg.isbb 
      * Best sell
      if $ware.maintype >= 8 AND $ware.maintype <= 16 
        $ships.size = size of array $ships
        $shipswithware = array alloc: size=0
        $ships.i = 0 
        while $ships.i < $ships.size 
          $ship = $ships[$ships.i]
          * Ships with ware regardless whether it is equipped
          $ship.wareamount = $ship->get amount of ware $arg.ware in cargo bay
          if $ship.wareamount > 0 
            append $ship to array $shipswithware
          end
          inc $ships.i =
        end
        $ships = $shipswithware 
      end
    end
  end
You will also need to pass arg.isbb from a2069.uniloc.main to a2069.uniloc.station for this to work.

User avatar
BoomerM6
Posts: 134
Joined: Mon, 14. Aug 06, 21:41
x3tc

Post by BoomerM6 » Sun, 15. Apr 12, 01:05

Hi

Anyone tested the script in AP or know if it's work with it ?
I want to start a game when i buy and sell myself from the start and i need something like that to help me.

If anyone know if it's work with AP please tell me !
Thanks and have fun :)

alex2069
Posts: 205
Joined: Thu, 22. Dec 05, 21:19
x3tc

Post by alex2069 » Sun, 15. Apr 12, 02:24

My understanding is that it is working... (haven't tested it yet myself - on my TODO list: play games lol)
Hyppe wrote:This has been my long time favorite, just tried this script with AP, seems to work fine :)

Tyoi
Posts: 12
Joined: Thu, 29. Sep 11, 12:46
x3tc

Post by Tyoi » Sun, 15. Apr 12, 02:31

So i hotkeyed the buy and sell screens to the '7' and '8' number keys. I'm however not able to use those when docked to a station. Anyone have an idea how i use the screens when docked?
The cake is a lie!

TestUnknown
Posts: 56
Joined: Fri, 6. Apr 12, 01:40

Post by TestUnknown » Mon, 16. Apr 12, 03:49

BoomerM6 wrote:Hi

Anyone tested the script in AP or know if it's work with it ?
I want to start a game when i buy and sell myself from the start and i need something like that to help me.

If anyone know if it's work with AP please tell me !
Thanks and have fun :)
I can confirm it works in X3AP 2.0.

User avatar
BoomerM6
Posts: 134
Joined: Mon, 14. Aug 06, 21:41
x3tc

Post by BoomerM6 » Sun, 29. Apr 12, 06:02

Thanks for the reply to my question :)

I will try it !
I seriously need something like that when i want to start a new game and trade myself stuff.

I wish it will help me to find the station where i can sell my items !


Thanks.

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Sun, 29. Apr 12, 06:06

Tyoi wrote:how i use the screens when docked?
1) Press "Y" to select the player ship.

2) Shift-C for the Command Console

3) Press "3" For Trade Menu

4) Choose Best Buy or Best Sell (near the bottom).

The hotkeys are unnecessary.

Anrock
Posts: 4
Joined: Mon, 4. Jun 12, 18:05
x4

Post by Anrock » Mon, 4. Jun 12, 18:30

Is there a way to see best buys for all goods at one time, like in stantard buys locator, but for universe?
I mean, currently you select one type of good and receive sorted list like
Energy cells - some_station - some_sector - best price
Energy cells - some_other_station - some_other_sector - not so good price
and so on.
I want list like:
Energy cells - some_station - some_sector - best price
Meatsteaks - some_station - some_sector - best price
and so on, for every known good.
Or there is some built-in way to envoke standard locator from distant ship in distant sector and browse results?

User avatar
akeelah
Posts: 231
Joined: Fri, 14. Mar 08, 17:01
x3tc

Post by akeelah » Fri, 8. Jun 12, 16:39

Anrock wrote:Is there a way to see best buys for all goods at one time, like in stantard buys locator, but for universe?
I mean, currently you select one type of good and receive sorted list like
Energy cells - some_station - some_sector - best price
Energy cells - some_other_station - some_other_sector - not so good price
and so on.
I want list like:
Energy cells - some_station - some_sector - best price
Meatsteaks - some_station - some_sector - best price
and so on, for every known good.
No. Considering the number of wares and the number of stations buying or selling each one, that list would be unmanageable.
Anrock wrote:Or there is some built-in way to envoke standard locator from distant ship in distant sector and browse results
Yes, there are several ways.
  • If your personal ship has the Best Buys Locator (BBL) and/or Best Selling Price Locator (BSL) installed, you can choose one of your satellites in a remote sector (either from the Sector Map, or your Property List) and press 5 to summon the BSL or press 6 to summon the BBL for that sector.
  • You can choose any of your ships in a remote sector (either from the Sector Map, or your Property List) and press 5 to summon the BSL or press 6 to summon the BBL for that sector -- provided the remote ship has the BBL and/or BSL installed (in which case, it doesn't matter if BSL/BBL is installed on your personal ship).
Universal Cargo Transfer (UCarT) -- Unleash the power of your Transporter Device!

Vacuity
Posts: 62
Joined: Thu, 21. Sep 06, 12:44

Post by Vacuity » Thu, 5. Jul 12, 15:30

I am unable to download either of the SPKs, recieving 403 - Forbidden error message, while the zip download gives me an error inside Chrome, "net::ERR_FILE_NOT_FOUND". Would the OP consider offering a mirror download site, and/or could someone provide me with a private link to follow via PM?

Thankyou in advance for the assistance!

Brinnie
Posts: 800
Joined: Mon, 5. Jun 06, 08:26
x3tc

Post by Brinnie » Thu, 20. Sep 12, 00:09

This is an excellent script, I ve got so used to it being part of my game I don't think I could play X without it.

I would like to make a couple of suggestions:

1 - When invoking the script from a specific ship command command console, whether it is the player ship or a remote one, it would be speedier to not have to select the ship again from the subsequent menu after having chosen a station.
Choosing any ship after the item search is very useful , but it could still be done by starting the command via the shortcut.


2 - It would be nice if the player could add/remove Favourite Items to the main selection screen. Like another entry after:


Main
...
...
...
Shipwares
...
...
...
Ship Objiects
...
...
...
Misc Wares
...
...
...
Favourite Wares add - remove
...
...
...

It would make the selecting of the most traded wares more accessible.


I hope you don't mind me making the suggestions.

I do thank you for making the script, it has surely saved me countless hours in my tradings.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”