[SCRIPT] Player Workshops V2.0 [28.07.2009]

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

pelador
Posts: 1399
Joined: Wed, 6. Nov 02, 20:31
x3tc

[SCRIPT] Player Workshops V2.0 [28.07.2009]

Post by pelador » Wed, 22. Apr 09, 16:18

Player Workshops

[ external image ]


Download as ZIP here: [ external image ]

Extract into X3TC games directory.


As Cycrow plugin: [ external image ]

You will require Cycrows Plugin Manager for the spk file.

-----------------------------------------------------------------------------------

Mirrors:

ZIP: [ external image ]

SPK: [ external image ]

-------------------------------------------------------------------------------------

Overview:

Player workshops allows a new trading command option with any player owned equipment dock, trading station, Hub and PHQ that allows you to apply maximum upgrades (Engine Tuning, Rudder Optimisation and Cargo bay extension) to ships. It also allows the downloading of software and additional equipment. (Note only applies vanilla tech).

The player still has to pay for the services like the other races and represents the equivalent cost in resources required to provide the details. This money is taken directly from the players account.

When a ship is docked in one of the above applicable stations a new ship trade command "Workshop" becomes available. The menus provided are fairly straight forward.

Clicking on an upgrade will install the maximum upgrade value at appropriate price based on current tunings/upgrades. In the case of a ship having a maximum cargo upgrade value greater than a 1000 units it will allow increments of up to a 1000 to be installed in one go. The equipment/software sub-menu allows you to install the individual equipment or at the bottom install all available options for that ship.

Price in both cases are indicated next to the items.

A new automatic equipping mode is applied in V2.0. After configuring the class packages in the configuration menu and selecting wether tunings and cargo are upgraded, the dock will automatically equip the ship based on class and settings. It does this every 25 seconds by checking the dock ships and is not triggered at actual docking time.

Regardless of what you set in the class packages and settings for tunnings it will try to install everything missing based on your settings. However if it cant install or afford a certain piece of equipment or tunings it will ignore it and move onto the next item. It does tunings first, then cargo then equipment upgrades. Both black market settings and take monies from the dock first applies to the auto process as before.

Note that the starting and stopping of the auto process is specific to each dock and therefore you have to start it running using the ship command, similarly to stop it for a specific dock.

NOTE: You have to run the configuration menu from the hotkey to initialise and set up the workshop:

Alternatively if you have the Community Plugin Configuration installed it will load the menu for use within it. This reduces the need to define a hotkey just for the Workshop configuration menu. (Note: optional I check in set-up wether its installed)

-------------------------------------------------------------------------------------

Configuration:

There is a user configuration menu provided that allows the player to set-up which items of equipment become available away from the suggested defaults of "common software". This can be accessed by a user definable hotkey. This needs to be run even if wanting to just use default settings.

The configuration menu will also allow you to access the "packages" sub-menu. Here you can specify up to 10 user definable lists of bulk packages in order to install quickly packages to different types of ships in the trade menu. The configuration is independant of the main inclusion list so you can freely specify which sets of equipment/software to include without encumberance to the main include list. Packages can only be installed if all of the items in the list can be installed to the ship using the workshop.

The menu also asks wether you want funds to be taken from the station account as a priority first to the players monies. Default is no or taken directly from the player account.

This set-up menu also allows you to specify wether on the equipment/software menu if you have an item installed to remove it from a ship at half price. Default is set to no.

This set-up will also allow you to specify wether the command can be used on ships. Such that player workshops can be used on M1 and TL Carriers. However the command will only function for the ship and it's docked ships if the carrier is in space and not docked at a station.

The config menu will also allow you to increase the base value of equipment/software if you prefer to add price as an extra balancer to their availabilty, this is optional. This is known as "black market" pricing (thanks to user draffutt for the concept) and you can add between 1 and 400 % increase to the value. So if you want to double the price you would make the black market value 100% to give a total of 200%. Note however the removal of equipment (if set for use) still removes at half average price and ignores black market settings, this is to avoid a potential free cash generator.

The configuration menu can be used to set auto configuration packages by class and wether to apply max tunings and cargo upgrades automatically.

It also allows the removal of the hotkey and variables used for uninstall. (Remember to save the game after use, before removing the software).

The menu also allows you to quickly move back to suggested defaults if you prefer them.

-------------------------------------------------------------------------------------

This was set-up as a scripted interface rather than adding wares so that it can be easily adapted to various docks without the need to introduce wares on them. Thus making installation/uninstall easier aswell as more compatible with other mod uses. It also means a top-up script or pseudo production process is not required to maintain capacities, which may have interfered with Hub, PHQ or other mod dock usage with regards to ware volumes.

-------------------------------------------------------------------------------------

Text file: 9550
Trade Command: 33

Scripts:

setup.plugin.player.workshop
plugin.pelador.player.dock.chk
plugin.pelador.player.workshop
plugin.pelador.workshop.cfg
plugin.pelador.workshop.ref
plugin.pelador.workshop.auto
plugin.pelador.workshop.auto.equip

-------------------------------------------------------------------------------------
As Governed by Community rules:

This script is free to use as long as you say thankyou in your topic .
Last edited by pelador on Tue, 28. Jul 09, 18:14, edited 17 times in total.

pelador
Posts: 1399
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by pelador » Wed, 22. Apr 09, 16:19

Version History

V1.0 22.04.2009 beta
V1.1 22.04.2009 Correction to include boost extension.
V1.2 22.04.2009 Bug fix for transport ability with equipment
V1.3 23.04.2009 Now includes Ore Collector and optional choice to have workshops on carriers (M1s and TLs)
V1.4 26.04.2009 User definable packages now included.
V1.5 26.04.2009 Bugfix correction. Removal of setup menu on game load.
V1.6 27.04.2009 Added optional Black Market settings.
V1.7 06.05.2009 Added optional choice for monies to be taken from stations as priority and add Community Plugin configuration useage.
V1.8 11.05.2009 Bugfix correction. Cargo upgrades for ship > 1000 units.
V2.0 28.07.2009 Added Auto equipping process
Last edited by pelador on Tue, 28. Jul 09, 18:15, edited 9 times in total.

Aquitaine
Posts: 274
Joined: Tue, 9. Dec 03, 19:51
x4

Post by Aquitaine » Wed, 22. Apr 09, 16:35

Wonderful! I was just about to post about this to see if anyone had done anything like it. :)

pelador
Posts: 1399
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by pelador » Wed, 22. Apr 09, 16:48

V1.1 Upgrade

Correction to include "Boost Extension", 1000 apologies for forgetting it. :oops:

For anyone who quickly grabbed V1.0 simply set the options to use defaults on the config menu, this will reset the variables for use. Then re-adjust them how you like. Sorry.

pelador
Posts: 1399
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by pelador » Wed, 22. Apr 09, 17:21

V1.2 Bug fix:

Ensures correct transport class for upgrades.

Simply update software. No user changes required.

I'm having a bad afternoon. Glad its beta. No excuses really, apologies.

User avatar
ezra-r
Posts: 3420
Joined: Fri, 14. Oct 05, 21:04
x4

Post by ezra-r » Wed, 22. Apr 09, 17:25

sounds like a great idea, ill give it a try ;)

pelador
Posts: 1399
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by pelador » Wed, 22. Apr 09, 17:30

Yeah, sorry for the couple of minor hiccups, things I forget to add whilst alpha testing.

A case of "more haste less speed".

It should be relatively stable otherwise, honest :wink:

Logain Abler
Posts: 2255
Joined: Mon, 31. Oct 05, 08:44
x4

Post by Logain Abler » Wed, 22. Apr 09, 17:46

Great script, works a treat :)

On my "must have loaded" list.

LA

pelador
Posts: 1399
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by pelador » Wed, 22. Apr 09, 17:58

V1.2 Minor edit, to ensure transport class abilities for bulk update process.

I have to apologise again, I got myself in such a tizzy having forgot the above that I was rushing to correct details.

Please consider it part of the beta exercise. I'm going to find a dark corner and stand there with a cone shaped hat with a "D" on it.

pelador
Posts: 1399
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by pelador » Thu, 23. Apr 09, 07:48

V1.3 Upgrade available

Ore collector now included.

Optional choice in config menu to allow workshops to be available from carriers: M1s and TLs. Default to no. This command only becomes available when the carrier is in space and not docked.

With this new version you will need to restore defaults in the config menu and then re-apply your changes.

SilverStar95
Posts: 18
Joined: Sat, 25. Oct 08, 02:47
x3tc

Post by SilverStar95 » Thu, 23. Apr 09, 08:00

I'll watch this one until it seems to reach a stable state. And perhaps until you set up some way of detecting custom wares/upgrades to be included, as well. :)

pelador
Posts: 1399
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by pelador » Thu, 23. Apr 09, 08:17

SilverStar95 wrote:I'll watch this one until it seems to reach a stable state. And perhaps until you set up some way of detecting custom wares/upgrades to be included, as well. :)
The only problem with that is the wares themselves are hardcoded as to which are identified as upgrades. Its not something I beleive you can change in TwareT definitions. So as much as I can identify those using scripting techniques that are equipment, not all tech may be equipment dependant on the mod.

However where other developments are using wares I could potentially include them as they see fit, if there is a way to recognise if their particular development is installed. This means they will have to be using standard vanilla custom entries for their use (possibly EMP if I can limit the particular entry values to specific id's). Otherwise I will have to download every mod and merge them to be able to recognise them, and in the case of some mods end up with a huge list of unwanted wares on the list which wouldnt be user freindly.

Also, and perhaps more importantly, given that various developers may have positioned the sale of their custom tech as a balancing factor or race orientation for flavourfull additions, I dont want to simply usurp their design choices by simply including them. It has to be in collaboration.

Kakarot
Posts: 69
Joined: Wed, 26. Mar 03, 06:13
x3

Post by Kakarot » Thu, 23. Apr 09, 16:41

just what i wanted for my Eq dock :)

Thank you.

Tipp-Ex
Posts: 165
Joined: Wed, 28. Jan 09, 12:23
x3tc

Post by Tipp-Ex » Fri, 24. Apr 09, 13:51

I'll second that! Always thought it was odd player owned eq docks weren't half as useful as NPC ones. Good job and thanks :thumb_up:
Blackadder - what begins with 'come here' and ends with 'ouch'?

Baldrick - I dunno.

Blackadder - come here....

Troubleshooter11
Posts: 723
Joined: Sat, 8. Nov 08, 02:51
x4

Post by Troubleshooter11 » Fri, 24. Apr 09, 18:53

Sweet! Just what i needed. Nice job :D

Sticks
Posts: 216
Joined: Thu, 29. Nov 07, 15:35
x4

Post by Sticks » Fri, 24. Apr 09, 19:14

Well done, i like it 8)

pelador
Posts: 1399
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by pelador » Sun, 26. Apr 09, 04:26

Thanks for the feedback.

V1.4 Upgrade now available. Includes user definable packages. Details in main first post.

I have also reconfigured the scripts to make new equipment entries more readily appliable in the future. This means that although you will need to access the menu's again this time to restore default values to then re-set. It is with the hopefull expectation that future additions to the equipment/software lists will not require user intervention other than adding new items. Though I think I have vanilla covered.

draffutt
Posts: 4292
Joined: Wed, 21. Feb 07, 17:46
x4

Post by draffutt » Sun, 26. Apr 09, 06:46

question

only scripts loaded on first run is cycrows cheats and this

started a new game

if allow workships to...... or allow equipment/software..... if either or, or both are set to yes or remove stored values..... is selected, your starting ship is stripped of everything. is this intended?

small request

i noticed on when loading from a save game that specialized equipment costs the same no matter what your faction rating is. I.E. docking computer.

so could you simulate a black market? I.E. if one is no longer friendly with the paranid it now costs double or triple to get a docking computer.

awesome script.
None of us is as smart as all of us. ~Ken Blanchard

TC player bug fixes
Reunion player bug fixes

pelador
Posts: 1399
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by pelador » Sun, 26. Apr 09, 12:57

draffutt wrote:question

only scripts loaded on first run is cycrows cheats and this

started a new game

if allow workships to...... or allow equipment/software..... if either or, or both are set to yes or remove stored values..... is selected, your starting ship is stripped of everything. is this intended?

small request

i noticed on when loading from a save game that specialized equipment costs the same no matter what your faction rating is. I.E. docking computer.

so could you simulate a black market? I.E. if one is no longer friendly with the paranid it now costs double or triple to get a docking computer.

awesome script.
Stripped of everything?

There isnt any bulk update process in the scripts to remove all equipment/software, and only one item at a time should be stripped if applied in the menu when chosen if you have set the ability to remove items from ships. Are you miss-interpreting the need to use the configuration menu to redefine values? With this update the values in the workshop menu wont appear and the list will be blank until you have loaded and reconfigured defaults using the configuration menu, accessed via hotkey. Thereafter the workshop will use the configured values. But the ships themselves will still have their equipment/software.

Also as mentioned above I have reconfigured the scripts to hopefully remove the need to reconfigure each time a new future update occurs.

-------------------------------------------------------------------------------------


The faction ratings are used for the standard processes when buying items from stations that are hardcoded into the interface. They have specific notoreity settings to apply based on owner race. As the workshops are based on player infrastructure and you are 100% freindly with yourself the inclusion of equipment/software is pretty black and white if you have set a particular item to be included. And are then based on average price settings.

For me to be able to represent different "black market" values at higher cost I would need to have a whole new set of rules to emulate how these should behave and would have to dynamically check the topography of the X-Verse to be fully functional.

The easiest thing for me to include as an upgrade would be for me to allow players to decide which items they consider "black-market" as a playstyle choice and then apply a black market % increase adjustment to price. This would give more flavour than just yes or no inclusion. Let me know if this would be wanted.

draffutt
Posts: 4292
Joined: Wed, 21. Feb 07, 17:46
x4

Post by draffutt » Sun, 26. Apr 09, 16:47

pelador wrote:stripped of everything?
here is a pic to show you better what i am talking about:
[ external image ]

as you can see my ship has no shields when a new game is run for the first time and your menu pops up. it appears your script interferes with what god is doing on first setting up. as i said when i set "allow equipment/software to be removed/sold:" to yes and hit the X in the corner my ship had no equipment of any kind installed when your menu went away. i tried the same thing with "allow workshop...." and i also tried the "(remove...." just to see what would happen. (i'm good at breaking things and testing everything out. :wink: ). but if i changed anything else above those 3 options then all default equipment seems to install after the menu closes. so maybe put a slight delay in the menu popping up so god can finish setting up the game first?

The faction ratings are used for the standard processes when buying items from stations that are hardcoded into the interface. They have specific notoreity settings to apply based on owner race. As the workshops are based on player infrastructure and you are 100% freindly with yourself the inclusion of equipment/software is pretty black and white if you have set a particular item to be included. And are then based on average price settings.

For me to be able to represent different "black market" values at higher cost I would need to have a whole new set of rules to emulate how these should behave and would have to dynamically check the topography of the X-Verse to be fully functional.

The easiest thing for me to include as an upgrade would be for me to allow players to decide which items they consider "black-market" as a playstyle choice and then apply a black market % increase adjustment to price. This would give more flavour than just yes or no inclusion. Let me know if this would be wanted.
which ever way is easiest for you. i was just a little suprised when i loaded up an old save game and docked at my EQ to find i could buy docking computers even thou my faction with the paranid is something like over -4000 and the blackmarket came to mind. :wink: i'd still use your script either way.
None of us is as smart as all of us. ~Ken Blanchard

TC player bug fixes
Reunion player bug fixes

Post Reply

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