Pylons as Equipment Slots ?

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1339
Joined: Thu Jun 20, 2013 10:22 pm

Pylons as Equipment Slots ?

Post by Redspear » Wed Jun 06, 2018 5:00 pm

The wiki tells us that shipdata.plist equipment.plist has "requires_empty_pylon" = yes; as an equipment option.
Obviously this can be used for missiles and other expendable items but is there any reason why it couldn't be used for say, fuel scoops for example?

I'm imagining a non-expendable equipment item occupying a pylon slot (even when damaged) but I don't want to fire it or to have to prime it; in other words, a typical, persistent equipment item that also occupies a pylon.

Early testing on my part seems to reveal that unless it references a missile or similar from shipdata.plist then it is simply ignored.
Equipment.plist also appears to state that pylon items cannot be damaged, is this true?

Any help appreciated.

Edit:

I found is_external_store = true; but within the context of equipment.plist, all it seems to do is result in any relevant items that you might pay for somehow not making it onto your ship (...including the pylon rack).
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 5394
Joined: Wed Feb 28, 2007 7:54 am

Re: Pylons as Equipment Slots ?

Post by another_commander » Thu Jun 07, 2018 7:56 am

After a quick skim of the code (and without any testing, of course ;-)) it looks like items that are marked as missiles or mines cannot be damaged. It also looks like the key "is_external_store" in an equipment item's definition results in the item being marked as missile-or-mine. So in theory this should prevent it from being damaged. Not making it onto the ship altogether is kind of not intended; maybe there are other conditions at play that determine the installation unsuitability of that equipment?

User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1339
Joined: Thu Jun 20, 2013 10:22 pm

Re: Pylons as Equipment Slots ?

Post by Redspear » Fri Jun 08, 2018 2:26 pm

Thanks a_c.

Maybe I can create a 'missile' which provides the appropriate equipment item.
Would need to prevent it from launching however - and also from interfering with targeting options.

'Missile' is I believe a role in shipdata.plist; I expect that's for non-player use but If there were no shipdata.plist reference... Some experimentung to do.
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors

User avatar
phkb
Commodore
Commodore
Posts: 2355
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

Re: Pylons as Equipment Slots ?

Post by phkb » Fri Jun 08, 2018 11:34 pm

Another option would be a core code change to allow the missileCapacity to be read/write. Then you could just reduce the number of missile slots available. I might see how easy that is to accomplish.

User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1339
Joined: Thu Jun 20, 2013 10:22 pm

Re: Pylons as Equipment Slots ?

Post by Redspear » Fri Jun 08, 2018 11:59 pm

phkb wrote: Another option would be a core code change to allow the missileCapacity to be read/write
I'd love that :)

I can do it myself (or at least I think I can...) for my own source changes but would need a dev to do it to work for my oxps...
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors

User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1339
Joined: Thu Jun 20, 2013 10:22 pm

Re: Pylons as Equipment Slots ?

Post by Redspear » Sat Jun 09, 2018 11:08 pm

In ShipEntity.h

Code: Select all

unsigned				missiles;					// number of on-board missiles
unsigned				max_missiles;				// number of missile pylons
If 'unsigned' were changed to 'GLfloat', then that should do it... Shouldn't it?
I might be able to test it at some point tomorrow...
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 5394
Joined: Wed Feb 28, 2007 7:54 am

Re: Pylons as Equipment Slots ?

Post by another_commander » Sun Jun 10, 2018 8:43 am

Why should it? Apart from the fact that you may have to do changes in other places that expect missiles and max_missiles to be unsigned integer types, the concept of having something like e.g. 2.15996 missiles is meaningless.

User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1339
Joined: Thu Jun 20, 2013 10:22 pm

Re: Pylons as Equipment Slots ?

Post by Redspear » Sun Jun 10, 2018 1:12 pm

Further evidence that I have much to learn :-)...

Anyway, I think it might be 'missileCapacity' rather than 'max_missiles' that I'd need to turn from read to read/write...
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors

User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1339
Joined: Thu Jun 20, 2013 10:22 pm

Re: Pylons as Equipment Slots ?

Post by Redspear » Sun Jun 10, 2018 9:20 pm

...Thinking some more, none of this is necessary.

Whenever player.ship.missiles is less than player.ship.missileCapacity then allowAwardEquipment

As long as I count all instances of pylon equipment both added and removed then I now have pylon based equipment slots - and ones that can be damaged too; all without hitting the source.
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors

Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 1998
Joined: Mon May 31, 2010 11:11 pm

Re: Pylons as Equipment Slots ?

Post by Switeck » Tue Jun 12, 2018 10:12 pm

I seem to recall mini-missiles that fit 3 to a pylon.
Probably in Armory OXP/OXZ?

User avatar
Damocles Edge
Deadly
Deadly
Posts: 219
Joined: Thu Mar 30, 2017 9:57 pm

Re: Pylons as Equipment Slots ?

Post by Damocles Edge » Wed Jun 13, 2018 12:16 am

Switeck wrote:
Tue Jun 12, 2018 10:12 pm
I seem to recall mini-missiles that fit 3 to a pylon.
Probably in Armory OXP/OXZ?
It's part of missile rack oxp http://wiki.alioth.net/index.php/Missile_Rack_OXP

Which is now part of Armoury OXP as you rightly say
O.C.T.D (Oolite Crash Test Dummy) Hmm Hmm Hmm Hmm......

User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1339
Joined: Thu Jun 20, 2013 10:22 pm

Re: Pylons as Equipment Slots ?

Post by Redspear » Wed Jun 13, 2018 10:01 am

Thanks folks. I think the main issue for me is getting it to do the same with items that are not either missiles or mines (which pylons seem to treat differently...)

Amusingly, my current solution actually does have fractional values for the number of pylons (if not missiles etc.); that way, when multiplied by a set number I can achieve some interesting variation.

For example, ships with 0.66 pylons (effectively 0) can increase to 1, while those with 4 pylons can increase to 6. With addition (of a set number) the increase would be disproportionate whereas using integers alone the ship with no missiles could not benefit from a multiplier and would instead remain at 0 missiles.
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors

User avatar
RockDoctor
Deadly
Deadly
Posts: 243
Joined: Sat May 01, 2010 9:05 pm
Location: Scotland
Contact:

Re: Pylons as Equipment Slots ?

Post by RockDoctor » Sun Jun 17, 2018 11:13 am

another_commander wrote:
Sun Jun 10, 2018 8:43 am
Why should it? Apart from the fact that you may have to do changes in other places that expect missiles and max_missiles to be unsigned integer types, the concept of having something like e.g. 2.15996 missiles is meaningless.
Yeah - that red-flagged for me too. I grew up with bondage-and-discipline languages and very slapped wrists from the complier for mixing types outside some pretty tight constraints.
--
Shooting aliens for fun and ... well more fun.
"I'm just stepping out of the airlock for a breath of fresh vacuum. I may be gone some time."

Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 1998
Joined: Mon May 31, 2010 11:11 pm

Re: Pylons as Equipment Slots ?

Post by Switeck » Sun Jul 08, 2018 7:00 am

I am pushed to the brink of insanity precisely by Oolite's internal handling of hyperspace jump distances and time calculations because part of it is integer values and other parts are floating point.

It's hard to force something in Oolite to behave always as an integer if there's any chance of outside influence (ie: OXPs/OXZs).
Cargo Contract reputation (and probably reputation for passenger+parcel contracts as well) used to be an integer ...and that change is in the core game rather than an add-on.
A "standard" misjump used to be 50% of the distance, although even that was incorrect due to distances being divided into even 0.4 LY units.

It's possible (using OXPs/OXZs designed for that purpose) to do tiny percentage-based misjumps that never leave a 0.4 by 0.4 LY "box"...which have great effect on the resulting total jump times:
http://aegidian.org/bb/viewtopic.php?f= ... 81#p263285

User avatar
RockDoctor
Deadly
Deadly
Posts: 243
Joined: Sat May 01, 2010 9:05 pm
Location: Scotland
Contact:

Re: Pylons as Equipment Slots ?

Post by RockDoctor » Fri Jul 13, 2018 10:49 am

Switeck wrote:
Sun Jul 08, 2018 7:00 am
I am pushed to the brink of insanity precisely by Oolite's internal handling of hyperspace jump distances and time calculations because part of it is integer values and other parts are floating point.
How did Tom Lehrer put it? "Yeuchh" (Masochism Tango)?
Very yeuchh!
Was this stuff concocted to recreate the original game play, or ... well, I refer to the title of the song cited above, and wonder.
Back in the wonderful days of TSR mouse drivers in DOS high memory, there was allegedly a combination of M$ mouse driver and time-zone settings that would induce erratic mouse actions at certain phases of the Moon around Easter. This sounds like someone is deliberately harking back to those heady days.
--
Shooting aliens for fun and ... well more fun.
"I'm just stepping out of the airlock for a breath of fresh vacuum. I may be gone some time."

Post Reply