Oolite Bulletins

For information and discussion about Oolite.
It is currently Sun Nov 18, 2018 5:22 pm

All times are UTC




Post new topic  Reply to topic  [ 15 posts ] 
Author Message
PostPosted: Wed Jun 06, 2018 5:00 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Thu Jun 20, 2013 10:22 pm
Posts: 1186
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" :-)


Top
   
PostPosted: Thu Jun 07, 2018 7:56 am 
Online
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral

Joined: Wed Feb 28, 2007 7:54 am
Posts: 5289
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?


Top
   
PostPosted: Fri Jun 08, 2018 2:26 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Thu Jun 20, 2013 10:22 pm
Posts: 1186
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" :-)


Top
   
PostPosted: Fri Jun 08, 2018 11:34 pm 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 2210
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
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.

_________________
My OXP's
YouTube: Oolite Teaser Trailer


Top
   
PostPosted: Fri Jun 08, 2018 11:59 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Thu Jun 20, 2013 10:22 pm
Posts: 1186
Quote:
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" :-)


Top
   
PostPosted: Sat Jun 09, 2018 11:08 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Thu Jun 20, 2013 10:22 pm
Posts: 1186
In ShipEntity.h
Code:
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" :-)


Top
   
PostPosted: Sun Jun 10, 2018 8:43 am 
Online
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral

Joined: Wed Feb 28, 2007 7:54 am
Posts: 5289
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.


Top
   
PostPosted: Sun Jun 10, 2018 1:12 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Thu Jun 20, 2013 10:22 pm
Posts: 1186
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" :-)


Top
   
PostPosted: Sun Jun 10, 2018 9:20 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Thu Jun 20, 2013 10:22 pm
Posts: 1186
...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" :-)


Top
   
PostPosted: Tue Jun 12, 2018 10:12 pm 
Offline
---- E L I T E ----
---- E L I T E ----

Joined: Mon May 31, 2010 11:11 pm
Posts: 1985
I seem to recall mini-missiles that fit 3 to a pylon.
Probably in Armory OXP/OXZ?


Top
   
PostPosted: Wed Jun 13, 2018 12:16 am 
Offline
Deadly
Deadly
User avatar

Joined: Thu Mar 30, 2017 9:57 pm
Posts: 169
Quote:
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......


Top
   
PostPosted: Wed Jun 13, 2018 10:01 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Thu Jun 20, 2013 10:22 pm
Posts: 1186
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" :-)


Top
   
PostPosted: Sun Jun 17, 2018 11:13 am 
Offline
Deadly
Deadly
User avatar

Joined: Sat May 01, 2010 9:05 pm
Posts: 185
Location: Scotland
Quote:
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."


Top
   
PostPosted: Sun Jul 08, 2018 7:00 am 
Offline
---- E L I T E ----
---- E L I T E ----

Joined: Mon May 31, 2010 11:11 pm
Posts: 1985
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


Top
   
PostPosted: Fri Jul 13, 2018 10:49 am 
Offline
Deadly
Deadly
User avatar

Joined: Sat May 01, 2010 9:05 pm
Posts: 185
Location: Scotland
Quote:
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)?
Quote:
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."


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 15 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited