BBS Plugin : Player HQ Blueprint Offers 1.1 17/1/08

The place to discuss scripting and game modifications for X³: Reunion.

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

Rate The Script

5/5
29
67%
4/5
8
19%
3/5
0
No votes
2/5
3
7%
1/5
3
7%
 
Total votes: 43

User avatar
LV
Sith Lord
Posts: 8255
Joined: Wed, 6. Nov 02, 20:31
x3tc

BBS Plugin : Player HQ Blueprint Offers 1.1 17/1/08

Post by LV »

Plugin Details
______________
BBS Offers to sell ship blueprints to your HQ.


Date - 17/1/08
Version 1.1
Author - LV
Compatibility - Should work with all mods and scripts Needs the new 2.5 patch
__________________

Packaged with Cycrows Plugin Manager

____________
[ external image ]

HQBP Offers Single Download

______________________-

Description

This one's been sitting in wait for quite a while as the 2.5 patch added blueprint script commands to the SE.

This plugin offers players the chance to buy ship blueprints for their HQ from NPC stations.

Prices are the average price of ships and in most cases you may need to pay over the odds slightly.

Once installed the engine will scan for a player HQ and if it finds one you will see the following message.

_________________________
CLICK ALL PICS TO ENLARGE
_________________________

[ external image ]

Plugin Conditions

Players who's Trade or Fight ranks are too low will only see the following message.

[ external image ]

Until your ranks are deemed "Acceptable" you will not recieve any offers.

____
Once your ranks are high enough when docked at NPC stations you will be offered to choose from different ship classes

[ external image ]

Once you have decided to choose your class you will then be hailed, if the shipclass is available it will be offered to your for the specified credits and if that ship is not available you will be offered an alternative ship which your HQ does not have the blueprints for.

[ external image ]

If you do not have enough cash then the deal is terminated.

[ external image ]

If you have enough money

[ external image ]


__________________
Once the transaction is complete the blueprints are added to your HQ.

You should also keep your eye on Pirate bases as they may offer ship blueprints for ships normally not available.

If your HQ blueprint list is full or no class of ship can be found you will be offered the blueprints for either a Fighter Drone or Adv Spacesuit by default.

___________________________

Remove BluePrints From HQ Hotkey


[ external image ]

On installation a new hotkey "Remove Blueprints" will be added to your controls. When you target any ship which your HQ has blueprints for and run the hotkey you will be hailed asking if you want to remove the BP. If you confirm the ship will be removed from your blueprints list in your HQ.

V 1.1 Updates

I've added into the custom menu a command so you may add non vanilla ships to the offers, Just choose the new ships you want adding via that option and they will be offered (periodically) via the Bigships or Custom option on the BBS message.


________________

LV

_____

Uninstall

[ external image ]
[ external image ]

Just turn the Add blueprints option in your AL Plugin Interface to Off from On
[ external image ]
[ external image ]

once the "Remove Blueprints" hotkey dissapears from your list of hotkeys you can remove the script files usings Cycrows Installer.


____

Trouble Shooting

Q: I don't see any offers
A: Either you have not installed the script correctly or you don't have a HQ.




Commands

Page : 8825
<t id="727">A_LV_ADDNEWSHIP_BLUEPRINTS</t>


____________________________


[ external image ] All my plugins in one pack with the choice of which to install!
Full Imperial Script Pack All my scripts in one pack with install option for each plugin.

[ external image ]
[ external image ]

__________-
Last edited by LV on Thu, 17. Jan 08, 20:36, edited 1 time in total.
LV's TC Scripts
Readme's For All My Scripts


I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced

si tacuisses, philosophus mansisses
User avatar
Malakie
Posts: 1061
Joined: Tue, 13. Apr 04, 23:08
x4

Post by Malakie »



Awesome, awesome!
Take it light.....

Malakie

----------------------------------------------------
User avatar
Malakie
Posts: 1061
Joined: Tue, 13. Apr 04, 23:08
x4

argh..

Post by Malakie »

LV,

found a prob...

Just docked and got the first Blueprints offer. However it tells me my rank must be 'Acceptable' or above.

Down below it shows my ranks as: Trade Rank: Excellent and Fight Rank: Acceptable.

Then a button that says I will be back.. Thus I am Acceptable at least but cannot buy the blueprints offered.
Take it light.....

Malakie

----------------------------------------------------
User avatar
X2-Eliah
Posts: 4369
Joined: Thu, 12. Oct 06, 16:30
x4

Post by X2-Eliah »

Looks good.

Typical Question(s):

1) Will ships from non-egosoft mods be offered (such as DDRS/XTM/XFP) ?

2) Will non-stock ships added by Cycrow's Ship Installer utility & available at SYs be offered?

3) Do the races only offer their own ships, or, say Paranids could give out an LX (Xenon ship) too?

4) Do the pirate offers have a small chance of swindlin' one and taking the money, but giving a crappy M5 instead of an M3+ blueprint, for instance?
(Some people like to give disadvantages with their scripts too, so just for curiosity..)
User avatar
LV
Sith Lord
Posts: 8255
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by LV »

X2-Eliah wrote:Looks good.

Typical Question(s):

1) Will ships from non-egosoft mods be offered (such as DDRS/XTM/XFP) ?

2) Will non-stock ships added by Cycrow's Ship Installer utility & available at SYs be offered?

3) Do the races only offer their own ships, or, say Paranids could give out an LX (Xenon ship) too?

4) Do the pirate offers have a small chance of swindlin' one and taking the money, but giving a crappy M5 instead of an M3+ blueprint, for instance?
(Some people like to give disadvantages with their scripts too, so just for curiosity..)
1. Maybe, the script scans for random ships so it may pick them up

2. Only if they are in sector, I suppose further down the line i could also scan shipyards

3. It leans towards their own ships

4. Nah just low chance of classified offers at the moment.

I wanted to make sure everything worked ok first as they are new SE commands and they didn't work when they were first implemented in the beta patches ;) Hence the fact their isn't too much eye candy in there yet.

Ideas are welcome


Malakie wrote:LV,

found a prob...

.
that's because the checks are wrong for the display text :oops: won't take long to fix for info $trank > 30000 OR $frank > 30000 are the current limits but i can lower if many peeps are below those as it is still 1.0 and i do have a tendency to assume most peeps have highish rankings and combat skills.
LV's TC Scripts
Readme's For All My Scripts


I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced

si tacuisses, philosophus mansisses
User avatar
Malakie
Posts: 1061
Joined: Tue, 13. Apr 04, 23:08
x4

Post by Malakie »

LV wrote:
X2-Eliah wrote:Looks good.

Typical Question(s):

1) Will ships from non-egosoft mods be offered (such as DDRS/XTM/XFP) ?

2) Will non-stock ships added by Cycrow's Ship Installer utility & available at SYs be offered?

3) Do the races only offer their own ships, or, say Paranids could give out an LX (Xenon ship) too?

4) Do the pirate offers have a small chance of swindlin' one and taking the money, but giving a crappy M5 instead of an M3+ blueprint, for instance?
(Some people like to give disadvantages with their scripts too, so just for curiosity..)
1. Maybe, the script scans for random ships so it may pick them up

2. Only if they are in sector, I suppose further down the line i could also scan shipyards

3. It leans towards their own ships

4. Nah just low chance of classified offers at the moment.

I wanted to make sure everything worked ok first as they are new SE commands and they didn't work when they were first implemented in the beta patches ;) Hence the fact their isn't too much eye candy in there yet.

Ideas are welcome


Malakie wrote:LV,

found a prob...

.
that's because the checks are wrong for the display text :oops: won't take long to fix for info $trank > 30000 OR $frank > 30000 are the current limits but i can lower if many peeps are below those as it is still 1.0 and i do have a tendency to assume most peeps have highish rankings and combat skills.

I started to see that.. I noticed is suddenly started giving me the blue prints so then I figured it just had to get organized! :-)
Take it light.....

Malakie

----------------------------------------------------
eladan
Posts: 7168
Joined: Sat, 7. Jan 06, 16:01
x4

Post by eladan »

LV wrote:I wanted to make sure everything worked ok first as they are new SE commands and they didn't work when they were first implemented in the beta patches ;) Hence the fact their isn't too much eye candy in there yet.
<click> Ah - I wondered how you got this out so damn quick! 8)

Makes sense if you knew what was coming. (I should have guessed you might beta test. :roll:)
User avatar
defiant1
Posts: 1141
Joined: Sun, 7. May 06, 03:53
x4

Post by defiant1 »

Sorry LV I had to give it a 2/5 because its not giveing me any thing but argon ships (yea i know im in an argon sector) but i got alot of XSP ships and its not giveing me any of thoes and if i read one of the first posts correctly it should atleast give me blueprints for ships reguardless...could you maby fix this? other then that its a great thing to have...
Teladi Next Minute Shipping®
User avatar
LV
Sith Lord
Posts: 8255
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by LV »

The code invoved for checking if player a has another non standard ship in his game doesn't just appear when someone wants it too, it takes bloody ages to write in and I havn't even started it yet.

The script will not make hard to get ships easy to get though, I may just as well have a download all ships instantly into HQ button in the cheats stickie for that.

Players won't be spoon fed they will have to persevere
LV's TC Scripts
Readme's For All My Scripts


I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced

si tacuisses, philosophus mansisses
User avatar
defiant1
Posts: 1141
Joined: Sun, 7. May 06, 03:53
x4

Post by defiant1 »

gee no need to tear my head off for reporting it...i like how its done but with it would look into all star ship yards for standered and non standered ships alike...rareity i dont care for what it gives ill take...(just as long as i can play the bloody game and kill thoes pesky Kha'ak and pirates...muwhahahahahaha...now pardon as i go take over a xenon sector by force...
Teladi Next Minute Shipping®
User avatar
LV
Sith Lord
Posts: 8255
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by LV »

I was not "biting" your head off trust me ;)

If i sounded a tad curt my apologies it was not intended.

Let me explain, this is a BBS script, the vast majority of the checks are done inbetween you docking and the BBS text loading up. I've already spent many hours streamling what can be checked for in a station and what I can do inbetween docking, otherwise you would be looking at a blank BBS sceen when docking for a few seconds as BBS scripts like waits as much as setup ones do ;).

now as you said "it would look into all star ship yards for standered and non standered ships alike" maybe it's my current bout of manflu, maybe i'm just having a blonde moment but I have no idea of how to check this without writing a standard library script where it would cross-ref the stock vanilla ships and see if it was in that list, I can't pre-define any non vanilla ships for obvious reasons.

We then get back into loops and checks to see if player already has those blueprints and to recheck if yes, thankfully this can be done outside the docking part of the code but it is v time consuming as it would also need balancing so that it didn't just serve up all the good ships at once.

My rough estimate for this would be at least 5 hrs scripting and testing time and the missus wouldn't be too happy about that atm as i've been wiped out with flu since christmas day as she will soon die if she can't shop in the sales ;)



Does that explain better? :)
LV's TC Scripts
Readme's For All My Scripts


I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced

si tacuisses, philosophus mansisses
User avatar
LV
Sith Lord
Posts: 8255
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by LV »

Houston we have a problem.

I installed a few tie fighters to split shipyards but when scanning through I can't check their objectclass like normal as it returns Readtext 3006 or something along those lines.

Any idea's peeps?
MJALowe
Posts: 461
Joined: Fri, 5. Jan 07, 06:27
x3

Post by MJALowe »

try something other than a tie - sounds like the tie needs to be ripped out and the identifiers re-written/assigned (one isn't supposed to assign custom ship classes)

you could try my Tie Sentinel - its total unbalanced and you might want to put it through the ship creator before installing, dont remember the price or shipyards
User avatar
LV
Sith Lord
Posts: 8255
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by LV »

it would be irrelevant what model i used, it returned the RT for all wares on the station inc stations and vanilla ships.

Normally when i patch into shipyards i use the "Can sell ware" check as I already know the ship i'm checking against, you can't do it this way with non vanilla ships.
User avatar
X2-Eliah
Posts: 4369
Joined: Thu, 12. Oct 06, 16:30
x4

Post by X2-Eliah »

All this is well n good, but perhaps on-line scanning is not the best way?

Why not, say, create a custom command (or hotkey command) that checks for all available ships in all in-game shipyards, once, and saves that data in a certain form the BBS scrip can lookup..

Thus it would be one-time lag, not all the time when docking.

On the other hand i'm no scripter, so I do not know if this is better or worse ;)
User avatar
LV
Sith Lord
Posts: 8255
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by LV »

wouldn't work, the problem is checking a shipyard for ships, i can only use objectclass as the ware type code for the new ships are unknown for as they would not exist in other peoples games because they are modded in.

When checking the shipyard you cant tell the SE to find a ship for sale as stations and ships are just wares in this context, searching for a shipclass or shiptype is only possible with docked ships.

The only method i know of is the objectclass command which should if finding an argon nova return it as M3 but it does not as it returns it as Readtext so there is no way to know if the item in the shipyard is a station or a ship and if it is vanilla or not.
B-O'F
Posts: 724
Joined: Sat, 21. Feb 04, 02:15
x3tc

Post by B-O'F »

Hi LV,

You could loop through all the waretype = 7 (ships), get their name, and build an array from this. Trouble is that there are about 220 named types of ship in the basic game, and it would need checking every start to allow for any added ships. Not impossible - but the overhead in checking each shipyard for each ship name would be "interesting"....

Boron - Ol Fh'art
Public Service announcement

Growing old is not a disease - it is a delayed symptom of birth trauma.
eladan
Posts: 7168
Joined: Sat, 7. Jan 06, 16:01
x4

Post by eladan »

@LV - I'd suggest it's because the array you're getting from the shipyard is a list of wares, not objects. Getting the object class of a ware is not likely to give you anything useful (as in, it doesn't make sense, so you're getting the readtexts.) Try creating an object from the ware, and getting the class of that.
lordmoore
Posts: 9
Joined: Sun, 25. Nov 07, 17:10
x3ap

Post by lordmoore »

humm...

Ok, I got the first message indicating this was installed correctly but I am not being offered any blueprints. :(

I've checked 8+ stations so far and nothing.
User avatar
MightyTiger
Posts: 166
Joined: Sat, 22. Feb 03, 12:09
x3ap

Post by MightyTiger »

I've read interest all the comments about getting a list of ships together. I've pretty much done this already with a 'similar' project I'm attempting at the moment if you're interested.

I've put the script files here.
Forgive the naming conventions, I'm new to X3 scripting. :oops:
However if you run plugin.mt.shiparray it will give you a series of global variables to work with.
Each array is the numerical ware subtype for each ship, maintype is 7.

array.mt.avail.ships = A full list of ships that are currently available in the game, either flying or buyable at shipyards.
global.mt.M1 = The above list filtered for M1 class.

All the other classes are also sorted, just change the 'M1' part. It does exclude ships such as Arrow or Hyperion that are only available through plot missions but hey, you may not want to offer these anyway.
From start to finish took less than 10 seconds on my rig and has been tested with Vanilla and XTM.
You should be able to use these with

Code: Select all

<RetVar> = get ware from maintype <Var/Number> and subtype <Var/Number>
and in turn use this for blueprint and ship checks.
Any comments / amendments / optimisations will be greatly recieved as I still a newbie at this scripting lark.
I don't apologise for anything! I'm sorry, but thats the way I am.

Return to “X³: Reunion - Scripts and Modding”