1) i can't figure out how to get it to return only ships/stations/etc that would show up on the sector map - its returning all of them regardless of weather you could see em or not - will be fixed when i figure out how to get it to work (i can do a scan range thing, but it'll only be based on the playerships scan range...and only works when undocked)
2) slight problems when there is a ship with the same type name as another ship, the first ship is the only one returned (this is with the shiptype option) - will be fixed in near future
lib.zip v1
Replacement Collect Argument
edit: the replacement collect argument limits the range of selectedable items to scanner range of the playership or the ship reference passed in the new argument $This - this definatly works with station...its currently set that if $This is not in the sector defined by $sector that it will unlimit the scan range
the replacement also colors all owned green all friendly blue neutral yellow and foe red
apparently $This is never withing scanrange of itself so $This has had its reference added at the top of all ship and/or station lists
well, I've managed to create a menu lib that will allow a scripter to ask a player for an argument using the MD Incoming Question Handler, it also requires BOF Numeric Entry, you will need the one that works with the MD Incoming Question Handler
currently it should be able to handle most of the available arguments that can be called at the begining of a script (it wont handle strings, but it will handle numbers and darn near everything else...list below)
The paramaters that need to be passed to "lib.mjalowe.collectargument" are:
Code: Select all
$datatoget -> this is a string that tells it what argument you are going to use
$sector -> this should be a sector or ship reference, most arguments use sector only one uses ship
$Author -> this is the text you want the Author of the MD Incoming Question Handler to be - recommned to by the argument type e.g. "Var/Ship"
$Title -> same as above but the title - should be the description you desire e.g. "Please Select The Desired Ship Type"
Code: Select all
sector -> will only show sectors the player knows about
object -> should show all objects in a sector that the player knows about
station -> should show all known stations of a sector
ship -> should show all known ships of a sector
playerownedstation -> should show all known stations of a sector owned by the player
playerownedship -> should show all known ships of a sector owned by the player
shiporstation ->
playerownedshiporstation ->
homebase -> not sure if i got this working the way it should, should return all known ships and stations in sector that can be docked at
playerownedhomebase -> same as above but player owned
stationorcarriertodockat -> same as homebase but should only be Carriers and Docks
warpgate -> will show the 4 standard gates of a sector if available (known or not)
jumpdrivegate -> currently identical to warpgate
asteroid -> should show all known asteroids of a sector
ware -> should show a list of ALL wares sorted by Maintype and Subtype
wareinsector -> should show a list of all flying wares in a sector that the player knows about - there is a good possibility this one won't work right
shiptype -> same as ware, but for ships
stationtype -> same as above but for stations (factories and docks i believe)
stationserial -> should show alpha beta gamme etc.. - might show readtexts instead, no clue why
objectclass -> should show a list of ALL object classes
waretransportclass ->
relation ->
race ->
wareofship -> needs the sector value to be a ship reference, will show a list of all wares onboard a ship - this one might have problems not sure though
posnumber -> these two are why BOF Numeric Entry is Needed
negnumber -> this one enters as a positive and mulitplies by -1
position 0 -> text of the selection
position 1 -> data of the selection (for example a ship refrence or ware type)
here is an example script:
Code: Select all
sector :
$Author = "Sector"
$Title = "Sector"
$sector = [THIS] -> call script "lib.mjalowe.collectargument" : data to get="sector", sector or ship reference=null, Author=$Author, Title=$Title,
$sector = $sector [ 1 ]
skip if $sector != "Back"
goto label endofscript
ship :
$Author = "Ship"
$Title = "Ship"
$ship = [THIS] -> call script "lib.mjalowe.collectargument" : data to get="ship", sector or ship reference=$sector, Author=$Author, Title=$Title,
$ship = $ship [ 1 ]
skip if $ship != "Back"
goto label sector
ware :
$Author = "ware"
$Title = "ware"
$ware = [THIS] -> call script "lib.mjalowe.collectargument" : data to get="ware", sector or ship reference=null, Author=$Author, Title=$Title,
$ware = $ware [ 1 ]
skip if $ware != "Back"
goto label ship
num :
$Author = "num"
$Title = "num"
$number = [THIS] -> call script "lib.mjalowe.collectargument" : data to get="posnumber", sector or ship reference=null, Author=$Author, Title=$Title,
$number = $number [ 1 ]
skip if $num != "Back"
goto label ware
= [THIS] -> call script "a.a.a.add.ware.cheat" : ship=$ship, ware=$ware, number=$number,
endofscript :
return null
note: the selection menu from the script has a back button and where appropriate a next button, it displays two columns of up to 15 buttons each, and if you press back at the first list it will return "Back" in both slots of the returned array (it handles the cancel in the BOF Numeric Entry the same)
here is a pic with a ship listing:
[ external image ]
edit: also note that in the pic im using my font so the text wont look the same...its basically unformated