Page 1 of 1

[WIP] Equipment Space OXP

Posted: Thu Mar 26, 2015 1:28 pm
by Ngalo
Some time ago, in a dicussion far, far away ...
cim wrote:
Add the concept of 'equipment space'. This is distinct from hold space. Some equipment items take up quite a lot of space - ECM, Energy Units, Shield Boosters, Galactic Hyperdrive. Each ship gets a particular allocation of equipment space. Old equipment OXPs would take up a default amount of space.
It appears enough people disliked this idea for it not to get implemented in Oolite 1.81. But enough people (including me) liked it that I thought it might be worth trying to do by OXP. As far as I know (and if I'm wrong please say so) nobody else has yet done this, with the possible exception of Zireael's somewhat different "Frontier Style Equipment" OXP.

Here is my take on the 'Equipment Space' concept.
Download version 0.4 from Elite Wiki if you're interested.
This is a WIP release lacking some features it should have. In particular, this OXP does not provide a way to remove equipment. I recommend installing Commander McLane's sell_equipment OXP for this purpose.

Version 0.4 is now available. This version basically just tweaks a few space allocations. If you've tried this OXP, please do provide feedback on whether you think these are OK.

From version 0.2 Large Cargo Bays are added to several core ships which couldn't previously fit them (including the ever-popular 3 TC extension for the Adder) as well as an "Extra Equipment Bay" option for some ships, converting cargo space to equipment racks. The two modifications are, of course, mutually incompatible; you can have lots of cargo or lots of equipment but not both.

Ships which are already over-equipped (as your Iron Ass probably will be) are allowed to keep everything they have, but there will be a notice saying something like '34 racks in use of 16 maximum' staring you in the face every time you look at the F5 screen.
Ships get the following equipment space allowances:
Adder: 16 equipment racks
Anaconda: 16
Asp Mk2: 29
Boa: 24
Boa Class Cruiser: 26
Cobra Mk3: 32
Cobra Mk1: 20
Fer-de-Lance: 34
Moray Star Boat: 19
Python: 16
OXP ships: 28 racks by default (may also apply to 1.77-era replacement shipsets); this can be changed by script_info (see ReadMe for details).
Some NPC-only core ship templates also get various allocations, just in case you fly something which like_ships one of these.
Equipment space requirements for each item are shown in the description on the F3 screen. OXP equipment takes up no space by default, but again you can use script_info to specify appropriate values for specific items.

I should probably mention that the Large Cargo Bay actually removes about half your equipment racks, so if your Cobra Mark 3 says it only has 16 racks available this is why.

This is only my first OXP so please feel free to tell me I'm doing it all wrong. In particular I will welcome any feedback on the numbers I've chosen for space allocation and usage.
_______________________________________________________________________________________________________________
Changelog:
0.4: -Increased Fer-de-Lance equipment allowance, reduced Boa Mk2, made Advanced Space Compass take up a rack
0.3: - Added "EquipmentSpace_scripted" and changed the Large Cargo Bay to use this.
- Changed 'shipyard.plist' to 'shipyard-overrides.plist' to hopefully correct
'start_choices' incompatibility.
- Increased Galactic Hyperdrive space requirement to 4 racks from 2.
- Reduced size of Extra Equipment Bay for the Boa and Boa Mk2 from 'XL' to 'L'.
- Reduced size of Extra Equipment Bay for the Anaconda from 16 racks to 14.
- Corrected instructions in ReadMe for equipment with custom condition scripts.
- Fixed a few bugs relating to equipment removal, damage and repairs, especially on
Oolite 1.81.

0.2: - Added support for "EquipmentSpace_for_EQ_WHATEVER" and "EquipmentSpace_conditional_equipment"
ship script_info keys.
- Added Large Cargo Bays to Adder, Asp, Cobra Mk1, Fer-de-Lance.
- Fixed an error in the instructions given above for adapting OXP equipment.
- Added Extra Equipment Bay options for some ships. Using "start_choices" or another
OXP which adds a cargo-bay extension to the Adder may prevent this feature working
correctly on that ship.

Re: [WIP] Equipment Space OXP

Posted: Thu Mar 26, 2015 3:32 pm
by Diziet Sma
A nice, ambitious project, Ngalo.. welcome to the Dark Side. Cookies are on the plate on the corner table. 8)

Re: [WIP] Equipment Space OXP

Posted: Sun Mar 29, 2015 2:59 pm
by Ngalo
Ambitious? I thought it would be a nice easy little OXP for a brand new Dark Side Apprentice. I mean, I'm leaving most of the work to other OXP authors by just giving them some script_info keys to allocate however much space they think appropriate. Anyone who has a ship or equipment OXP is encouraged to try this, by the way: I may change the numbers for core ships and equipment but I'm not planning on removing any of the script_info functionality I've already implemented. All the instructions are (I think) in the ReadMe.
Diziet Sma wrote:
Cookies are on the plate on the corner table.
Thanks. cim should get some cookies for this OXP too, for having the idea in the first place, helping me get my head around the 'sort_order' thing and putting up with a mistaken bug report.

Re: [WIP] Equipment Space OXP

Posted: Mon Mar 30, 2015 6:13 pm
by Redspear
Hi Ngalo. Nice idea, I look forward to checking this one out when I have some more time.

I started a related oxp last year that might be of interest...
https://bb.oolite.space/viewtopic.php?f= ... ship+class

Future plans for it included something similar to what you seem to be describing here.

Re: [WIP] Equipment Space OXP

Posted: Thu Apr 02, 2015 3:15 pm
by Ngalo
redspear wrote:
I started a related oxp last year that might be of interest...
viewtopic.php?f=4&t=16842&hilit=equipment+by+ship+class
I did come across Equipment By Ship Class a while ago and thought it looked interesting but never got around to actually using it, because I didn't really want to lose my Large Cargo Bay just for the sake of having a couple of reasonably good lasers.

Something I'm wondering about for future versions of this OXP is adding compatibility with some aspects of Equipment By Ship Class by adjusting the condition script and adding a couple more script_info keys along the lines of "EquipmentSpace_EBSC_Tech" and "EquipmentSpace_EBSC_Grade". The idea would be that the condition script checks whether another OXP (yours or a different one) is providing the "EQ_WHATEVER_TECH" and/or "EQ_WHATEVER_GRADE" equipment and only applies the restrictions on fitting equipment if they are available. This way, OXP equipment could specify requirements in script_info without being totally dependent on your OXP, so other OXP authors will (hopefully) be more likely to make their equipment compatible.

This way of providing of equipment restrictions by script_info which are simply ignored unless this OXP is present to support them is basically the design principle for Equipment Space OXP. It should be possible for any OXP ship or equipment item to be made compatible without creating a dependency.

Re: [WIP] Equipment Space OXP

Posted: Wed Apr 22, 2015 1:30 pm
by Redspear
Ngalo wrote:
I did come across Equipment By Ship Class a while ago and thought it looked interesting but never got around to actually using it, because I didn't really want to lose my Large Cargo Bay just for the sake of having a couple of reasonably good lasers.
Yeah, it seems you're not the only one as there were only a handful of downloads. My approach might be more appealing to those who start with a weaker ship than the MkIII, otherwise it can seem to just boil down to the choice that you, correctly, highlighted...
Ngalo wrote:
Something I'm wondering about for future versions of this OXP is adding compatibility with some aspects of Equipment By Ship Class by adjusting the condition script and adding a couple more script_info keys along the lines of "EquipmentSpace_EBSC_Tech" and "EquipmentSpace_EBSC_Grade". The idea would be that the condition script checks whether another OXP (yours or a different one) is providing the "EQ_WHATEVER_TECH" and/or "EQ_WHATEVER_GRADE" equipment and only applies the restrictions on fitting equipment if they are available. This way, OXP equipment could specify requirements in script_info without being totally dependent on your OXP, so other OXP authors will (hopefully) be more likely to make their equipment compatible.
Sounds good to me but as I said, so few downloads as to hardly be worth troubling yourself with were it purely on account of my oxp.

Still not tried yours out yet but looking forward to :)

Re: [WIP] Equipment Space OXP

Posted: Wed Apr 22, 2015 1:33 pm
by Redspear
Ah, it seems my last comment comes a little late :oops:

Thanks for adding the compatability. I for one appreciate it :D