[SCRIPT] Player Friendly Shipyards (09/11/2006)

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

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

voxol
Posts: 429
Joined: Sun, 30. Oct 05, 14:42
x3

[SCRIPT] Player Friendly Shipyards (09/11/2006)

Post by voxol » Sat, 5. Aug 06, 07:11

Player Friendly Shipyards
By Voxol.

Introducing the Player Friendly Shipyard BBS plugin and beyond. With this script it is possible to fund a group of sacked shipyard employees to start up their own business. The shipyard they create has no notoriety limits to buy from, but must be supplied ships for study.

SPK: ---Download---


Version 2.0 now available as of 09/11/2006. Main changes are:

- Updated to use an AL plugin instead of global task.
- Added failsafe to remove issue of wares disappearing upon reloading a savegame. Specifically this will make the plugin compatible with the Xtended mod.


Readme follows:

Code: Select all

===========================================
Name:		Player Friendly Shipyards
Version:	V2.0
Author:		Voxol
Updated:	09/11/2006
===========================================


A recent shift in Argon space toward automation of ship building facilities have left many shipyard employees without work.  This displaced workforce has now grown so large that several groups have banded together, and are looking to build up their own shipyard business.  Many groups no longer care where the money and technology blueprints come from, and openly advertise throughout the galaxy for mysterious wealthy benefactors to aid in their move toward independence...


With this script a new BBS ad. will become available, "Sacked shipyard employees seek second chance".  If you accept, a new shipyard will be created in the same sector as your ship's homebase (so remember to set it before accepting the ad.).  This shipyard is always friendly to you and has no notoriety effects, so you can buy any ship it stocks.  However...

Initially the shipyard wares list will be empty.  The workers need to strip down and study ships and stations so they can reverse engineer the blueprints and add the ship/station to their stock list.  To do this:

(a) For ships: simply remotely send a ship over to the shipyard and you will get a message.  Accept the message and pay the R&D fee and the ship will be stripped and added to the stock list.  From then on you can buy that ship from the shipyard despite your notoriety with any race.

(b) For stations: again, quite simple; just load up a station kit from another shipyard into a TL and send it over to the friendly shipyard.  You will then get the message asking if you would like to give them the kit, along with an R&D fee.

The cost of reverse engineering is twice the cost of the ship/station when bought new.  Currently, the cost of the shipyard is set to twice the price of an Argon Equipment Dock. 


Some things to note:

- Any equipment or cargo is simply destroyed, so make sure you strip the ship before you send it (though if you send a carrier/TL with docked ships, it will give you an error rather than just destroy them).

- If you want the shipyard to be able to upgrade ships after buying them, it must be placed in a sector with a non-player Equipment Dock.  (NB: Depending on response to this script, I will make something similar for Equipment Docks so that this problem is alleviated somewhat).

- By default the AL plugin is set to ON.  If for some reason you do not want to be asked if you would like to reverse-engineer ships when they dock, you can simply switch off the AL plugin.



============================================

Change log:
2.0
- Changed to AL plugin.
- Added a failsafe ware list so issues with disappearing wares when reloading a savegame should be removed.  Specifically this now allows support for Xtended mod ships.
- One or two other minor fixes.

1.2
- Changed BBS priority to low when you already have a shipyard.

1.1
- Fixed bug that would cause timer script to be called every time you start a new game.

1.0
- Initial release.

============================================

Technical:

Text page:  8701

Enjoy!

Voxol.
Last edited by voxol on Thu, 9. Nov 06, 15:55, edited 5 times in total.

Joshua_Dahl
Posts: 448
Joined: Fri, 10. Mar 06, 03:00
x3

Post by Joshua_Dahl » Sat, 5. Aug 06, 07:25

Are the ships cheaper when bought? Since I am paying all the fees I should get a huge discount.

voxol
Posts: 429
Joined: Sun, 30. Oct 05, 14:42
x3

Post by voxol » Sat, 5. Aug 06, 07:29

Nope, standard price. The only advantage you get using this script is the notoriety effect. So you can go to war with everyone and still be able to build M1s...

Hmm, though a discount is a tempting idea, would add another dimension to the script. I'll start looking into it.

Joshua_Dahl
Posts: 448
Joined: Fri, 10. Mar 06, 03:00
x3

Post by Joshua_Dahl » Sat, 5. Aug 06, 07:35

There should definitly be a discount. How else would i get the ship in the first place for the blue print. I either need the heavy assault script or enough rep to buy it.

voxol
Posts: 429
Joined: Sun, 30. Oct 05, 14:42
x3

Post by voxol » Sat, 5. Aug 06, 07:42

Yup, its intentionally difficult/expensive since once you have the ability to build a ship it makes a game of domination much much easier. But I see what your saying, notoriety immunity isnt reward enough.

OK, I'll try and add a discount, sayyy set to 70% of original price? Whaddya think?

Joshua_Dahl
Posts: 448
Joined: Fri, 10. Mar 06, 03:00
x3

Post by Joshua_Dahl » Sat, 5. Aug 06, 07:44

That sounds good. That way you can eventually make up for the 200% cost of R&D, but it will take several purchases. I think this is how it should be.

Is there a building delay or is it like a regular shipyard where the ship is automatically restocked?

voxol
Posts: 429
Joined: Sun, 30. Oct 05, 14:42
x3

Post by voxol » Sat, 5. Aug 06, 07:47

Just like a regular shipyard, instant stocking. Gotta love the realism.

Joshua_Dahl
Posts: 448
Joined: Fri, 10. Mar 06, 03:00
x3

Post by Joshua_Dahl » Sat, 5. Aug 06, 07:52

It may not be realistic, but it saves me from alot of hassle. If I had to wait an hour after buying a centaut to get another, I would quickly get annoyed.

voxol
Posts: 429
Joined: Sun, 30. Oct 05, 14:42
x3

Post by voxol » Sat, 5. Aug 06, 17:53

Its not looking good for giving the player a discount. Or at least, it would take much much more work than a simple 'set price' script commnad.

I was already two minds as to whether there should be a discount, but now I find I *cant* do it, rather than *wont* do it, its annoying me, so I'll keep looking into it.

For now, this script works great as a late-game convenience (similar to EQs, very little reason for the player to own one, but extremely convenient to have around when you got the cash to burn).

You can have all your favourite ships/stations in one shipyard located close to your main forces and weapons fabs... saves a lot of hassle buying from race shipyards and having to ferry around getting upgrades.

fud
Posts: 9837
Joined: Wed, 25. Jan 06, 14:26
x3

Post by fud » Sat, 5. Aug 06, 18:49

In all honesty, there shouldn't be a discount. As you said, in the end it's a convenience for the player, as such, they should have to pay dearly for it.

B-O'F
Posts: 724
Joined: Sat, 21. Feb 04, 02:15
x3tc

Post by B-O'F » Sat, 5. Aug 06, 20:50

Hi voxol,

Remember that all ships have a minimum, average, and maximum price, so you could use the minimum price as the 'discount' price if you wanted to. Also, to make life interesting, Egosoft have swapped the min. and max. prices for the Colossus, Titan and Phoenix (waretype 7, subtypes 3, 4 and 40).

Boron - Ol Fh'art
Public Service announcement

Growing old is not a disease - it is a delayed symptom of birth trauma.

voxol
Posts: 429
Joined: Sun, 30. Oct 05, 14:42
x3

Post by voxol » Sat, 5. Aug 06, 22:50

B-O'F wrote:Remember that all ships have a minimum, average, and maximum price, so you could use the minimum price as the 'discount' price if you wanted to
Ah nice one. I had been getting some wierd prices when I had been messing around trying to discount, thats that mystery solved.
B-O'F wrote: Also, to make life interesting, Egosoft have swapped the min. and max. prices for the Colossus, Titan and Phoenix (waretype 7, subtypes 3, 4 and 40)
As much as I admire the framework egosoft have provided us to work with, their logic completely escapes me sometimes...

voxol
Posts: 429
Joined: Sun, 30. Oct 05, 14:42
x3

Post by voxol » Mon, 7. Aug 06, 18:08

Updated: Bug fixed that starts the timer going every time you load a game. Updated version will terminate all but one of the timer processes when you next start the game, and from then on will not start a new timer unless one hasnt already been started.

Erilaz
Posts: 161
Joined: Mon, 8. May 06, 13:49
x4

Post by Erilaz » Tue, 8. Aug 06, 15:02

Hi Voxol,

Nice one, used this script last night and it rocks. It's just what I always wanted; the fleet (incl. paint job) I always wanted at my fingertips. Definitely worth the price.

SY nicely placed, like the feel of the incomming messages, and "blueprints" work brilliantly.

Found an obscure bug for you: It just so happens that I had the SY "placed" in a sector with a Boron research station, and lo and behold, when I buy the ships there, I can immediately kit them out with Bofu, Cargo life support etc from the Research station... but not the EQ stuff. Short trip to the actual ED, so not really annoying (at least the new pilots can eat on the way).

Frequency of BBS has prolly been sorted already since the one I downloaded. Though, just in case you were still looking for suggestions, I'd say the it should be more backgroud, like say the frequency of Khaak sector download. Did enjoy being able to try it out almost immediately though :wink:.

Discounts won't be necessary, considering... I'd rather pay. Although in that dimension, ship price could be like 90%, which means as the mysterous shareholder you buy ten ships, get one free.

voxol
Posts: 429
Joined: Sun, 30. Oct 05, 14:42
x3

Post by voxol » Tue, 8. Aug 06, 15:54

@Erilaz: Thanks for the response! At least one person out there is using it and giving feedback!

The Boron research station thing is interesting, though there is no way around it that I can think of. Any SY will use the wares at an EQ in the same sector for the upgrades, and a Boron research station must just be a special case of an EQ. I.e. if there was a Boron shipyard there, you would be able to equip ships you buy from it with stuff from the research station, just like you can with the PFSY. I'll ponder over it, see if I can think of something, but any way around would be a dirty hack, I imagine (like spawning an EQ in the sector thats 1000s of miles away, so the PFSY can use that for upgrades, or something daft like that).

I havn't updated the frequency of the BBS as yet, will look into that ASAP.. have to go around getting afeel for the frequency of different BBS ads, find one with a frequency I want the PFSY to be similar to, then look in the script to see what its set as. A bit tedious (unless anyone can just tell me...?). I'd agree the khaak mission would be a good one to copy, but I wonder if I can access the script for that...

Cheers again for the feedback,

Voxol.

Erilaz
Posts: 161
Joined: Mon, 8. May 06, 13:49
x4

Post by Erilaz » Tue, 8. Aug 06, 17:34

It's a pleasure man. It's still new, but in conjunction with scripts like Fighter Base Commander etc., with this ability for a specific selection of ships... well, brilliant idea.

That's what I thought, since the research station uses the same model. Though, as you say, an ED 1000's o' ks out would be a na-sty one, esp. if I want to stock it with my products, which cuts down all sorts. Can do already, by commanding all docked ships at the PFSY to dock at EQ and fit them out.

If it's any help, the research station name comes up lower down the list on the sector map station listing than the ED.

No idea about where to find the various BBS scripts without, (I'd imagine... Still a bit new to this myself.):
Unpack original files (Double Shadow's X3Editor, script unpacker etc.), then it's a case of "find in all files in folder..." for a string remembered from the relevant BBS entry >> t ID >> script calling that t ID.

The one site I haven't been able to access is the X3Editor, script unpacker etc. site, othwise I'd be happy to help. Still a bit new to this myself. If I find anything I'll let you know, though I'm generally online one once a day for a short while.

Thanks again for an awesome script.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22201
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Tue, 8. Aug 06, 18:34

you cant sctually alter the frequency of the built in BBS stuff as they aren't controlled by scripts.

when doing BBS scripts, the frequency is from the "prio" event, which is a number between 0 and 100.

0 being never show, 100 is show frequencly, althou like most things in the game, it is random so it just makes it more chance of showing rather than a set frequency

Erilaz
Posts: 161
Joined: Mon, 8. May 06, 13:49
x4

Post by Erilaz » Thu, 10. Aug 06, 17:48

Good to know, thanks.

Sky.KS
Posts: 1
Joined: Wed, 27. Sep 06, 12:53

Post by Sky.KS » Wed, 27. Sep 06, 12:57

every time i load saved game product list is getting cleaned.

even i added there 10 ships before, after load saves list is empty.

version 1.2

User avatar
Sandalpocalypse
Posts: 4447
Joined: Tue, 2. Dec 03, 22:28
x4

Post by Sandalpocalypse » Wed, 27. Sep 06, 14:32

I like it. Balanced and interesting.

Although it brings to mind, the savings shipyards are making with automated tech certainly arn't being passed on to the consumer 8)

Post Reply

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