[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: Scripting / Modding Moderators, Moderators for English X Forum

Post Reply
alex2069
Posts: 204
Joined: Thu, 22. Dec 05, 22: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: 1996
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: 62
Joined: Wed, 2. Nov 05, 14:42
x3tc

Post by Hyppe » Sun, 25. Dec 11, 23: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, 12:41
xr

Post by texallbwt » Sun, 15. Jan 12, 05: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: 149
Joined: Fri, 20. Jan 12, 06:13
x3tc

Post by dblade » Sat, 21. Jan 12, 18: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: 93
Joined: Sun, 24. Dec 06, 14: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: 1996
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: 3197
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: 1996
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: 149
Joined: Fri, 20. Jan 12, 06: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: 967
Joined: Tue, 9. Jan 07, 21: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: 204
Joined: Thu, 22. Dec 05, 22: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: 149
Joined: Fri, 20. Jan 12, 06: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: 204
Joined: Thu, 22. Dec 05, 22: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: 43
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.

Post Reply

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