[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
alex2069
Posts: 205
Joined: Thu, 22. Dec 05, 21:19
x3tc

Post by alex2069 » Tue, 18. Oct 11, 06:17

I've uploaded it again on FileFront (now called GameFront apparently):

UniversalBestBuysSells_251.spk
http://www.gamefront.com/files/20899745 ... ls_251.spk

UniversalBestBuysSells_251.zip
http://www.gamefront.com/files/20899746 ... ls_251.zip

I have no idea if this still works on the latest version or not, I just uploaded my latest version of the files (didn't remake/rebuild or anything) - I make an "agreement" with myself to not play games during Uni periods (or I get addicted and well... As I'm sure you can guess this adversly affects my grades... Quite significantely so, lol).
Thankfully the holiday period is approaching (<- Australian) so I can get back into it again.

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

Post by joelR » Tue, 18. Oct 11, 06:45

alex2069 wrote:I've uploaded it again on FileFront (now called GameFront apparently):

UniversalBestBuysSells_251.spk
http://www.gamefront.com/files/20899745 ... ls_251.spk

UniversalBestBuysSells_251.zip
http://www.gamefront.com/files/20899746 ... ls_251.zip

I have no idea if this still works on the latest version or not, I just uploaded my latest version of the files (didn't remake/rebuild or anything) - I make an "agreement" with myself to not play games during Uni periods (or I get addicted and well... As I'm sure you can guess this adversly affects my grades... Quite significantely so, lol).
Thankfully the holiday period is approaching (<- Australian) so I can get back into it again.
Hey, welcome back. Thanks for the update.

Hyppe
Posts: 63
Joined: Wed, 2. Nov 05, 13:42
x3tc

Post by Hyppe » Sun, 25. Dec 11, 22:55

This has been my long time favorite, just tried this script with AP, seems to work fine :)

texallbwt
Posts: 88
Joined: Tue, 21. Mar 06, 11:41
xr

Post by texallbwt » Sun, 15. Jan 12, 04:34

:)

I'm looking for a way to inject these fine files into X3AP while keeping the overall game
squeaky steam clean? ( keeping the unmodified game status )

tex.

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

Post by dblade » Sat, 21. Jan 12, 17:01

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.

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.

Post Reply

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