Page 1 of 1

Shipdata.plist questions (and some more Starfox ships)

Posted: Thu Jun 26, 2008 11:57 pm
by Moonlight Fox
Well now that I've made my first model in Wings3D and got some very basic textures on it, I'm turning my attention to configuring the thing.
So far I've sorted out the positions of things like the engine trails, laser firing position and cargo dumping position.
However there are still a few questions I have.

1) Is there a way to increase / decrease the shield strength? (aside from adding shield boosters)
Am I right in thinking that changing <key>max_energy</key> and <key>energy_recharge_rate</key> only has an effect after the shields have been depleted?

2) Most of the Starfox ships are too small to realistically carry even 1 ton of cargo, it is still possible to allow them to carry the lighter equipment such as platinum, gold etc?

3) As the craft are small, light fighters I gave them a higher than average pitch/yaw/roll values. This has resulted in the craft being a little twitchy which in turn can make it a little tricky to line up your cross hairs over your desired target. Is there a way to keep the turning values high but make it less twitchy?
Does messing with the <key>thrust</key> or <key>density</key> do anything to the manoeuvrability?If not.. what do they do?


4) Is there a way to mount two forward facing weapons? In the Starfox games you could upgrade your laser to a twin blaster which would simultaneously fire two lasers at your target.. it would be nice if I could do that in Oolite too!

5) Ca- ah, nevermind. Found the answer by re-reading the shipdata wiki entry.

Okay, enough text..time for some new images.

Image


Image



Front/bottom right: Arwing; main player ship from the Starfox games. Piloted by Fox McCould. Very nible, weak but rapid firing lasers, moderate shielding.
Front/bottom left: Arwing interceptor; From Starfox 2, piloted by either Fay or Miyu. high speed, strong, moderately firing lasers, weak shielding.
Middle left: Wolf O'Donnell, leader of Starwolf (they weren't very inventive with the names huh?) rival mercenary group. Ship model from Starfox 2
Middle right: The rest of the Starwolf team get to fly these one's.. there's no obvious difference aside from appearance.
Back/top: Arwing bomber, strong shielding, not so quick to turn around, model from Starfox 2. The craft in the game isn't a lot larger than the others, however I thought it would be a good idea to make something that's at least big enough to carry some cargo

Posted: Fri Jun 27, 2008 8:04 am
by Eric Walch
Moonlight Fox wrote:
2) Most of the Starfox ships are too small to realistically carry even 1 ton of cargo, it is still possible to allow them to carry the lighter equipment such as platinum, gold etc?
With the CARGO_CARRIED you could make it only carry one selected cargo type. I think it needs 1.71 to work proper. See shipData in the wiki.

Posted: Fri Jun 27, 2008 8:35 am
by Selezen
Damn you photobucket!!!

Bloody NHS has blocked access to photobucket! Me no can see the piccies!!

Khaaaaaaaaaaaaaaan!

Posted: Fri Jun 27, 2008 12:21 pm
by Moonlight Fox
Selezen wrote:
Damn you photobucket!!!

Bloody NHS has blocked access to photobucket! Me no can see the piccies!!

Khaaaaaaaaaaaaaaan!
Let's see if Sheezyart works any better.
http://www.sheezyart.com/view/1816824/
http://www.sheezyart.com/view/1816826/

...

Posted: Fri Jun 27, 2008 1:21 pm
by Lestradae
Hi Moonlight Fox!
Is there a way to increase / decrease the shield strength? (aside from adding shield boosters)
It depends whether you want to do this for an NPC or a player ship. NPC ships don`t have shields. Player ships can have shield boosters or naval (~military) shields. If a specific player ship can have a specific shield can be scripted via the shipyard.plist.
Am I right in thinking that changing <key>max_energy</key> and <key>energy_recharge_rate</key> only has an effect after the shields have been depleted?
For NPC ships, yes, as they have none. For player ships, you`re right with max energy (that determines the energy banks) but I think (could be wrong) that the energy_recharge_rate also affects the shields - but surely affects the energy banks, which is pretty relevant if this value is high (4.5+).
Is there a way to mount two forward facing weapons? In the Starfox games you could upgrade your laser to a twin blaster which would simultaneously fire two lasers at your target.. it would be nice if I could do that in Oolite too!
It`s not yet possible to do for a player ship but possible for NPC ships via a turret added to the front laser region. You can put a turret on a player ship, but it won`t do anything ... yet. Presumably, from Oolite 1.72 on, turrets will work on player ships - then you can, in principle, create your twin laser ship.
As the craft are small, light fighters I gave them a higher than average pitch/yaw/roll values. This has resulted in the craft being a little twitchy which in turn can make it a little tricky to line up your cross hairs over your desired target. Is there a way to keep the turning values high but make it less twitchy? Does messing with the <key>thrust</key> or <key>density</key> do anything to the manoeuvrability?If not.. what do they do?
I think a fast-pitch/roll makes a ship twitchy, but that is only realistic - turns fast, aiming more difficult. I don`t think there is a way of "slowing down" the roll towards an aim. But, could be wrong. Haven`t ever heard of it, yet.

The thrust key affects the acceleration/deceleration speed of ships. Low thurst, slowly getting faster. Doesn`t solve the crosshairs problem I guess.

I have no real idea what the key density does, but could be that that was one of Ahruman`s add-ons for definable material properties of ships, so if I`m not wrong, again no luck for your problem.

Hope that helped

L

Posted: Fri Jun 27, 2008 2:20 pm
by Cmdr. Maegil
Is there a way to mount two forward facing weapons?
It`s not yet possible to do for a player ship but possible for NPC ships via a turret added to the front laser region. You can put a turret on a player ship, but it won`t do anything ... yet. Presumably, from Oolite 1.72 on, turrets will work on player ships - then you can, in principle, create your twin laser ship.
Does that apply only to turrets or also to laser subentities (such as the Ratter or those damned holy-armoured monk gunships)?
If it does, there'd be a chance to have extra fixed lasers besides you normal one (or no normal, but only subentity lasers).

I had already suggested this to make the carriers' weaponry stronger - setting some 20 forward laser subentities so close that it appears to be firing one single but very wide beam - it'll heat up immediately, but even pulsing in overheat, 20 military lasers are enough to destroy most ships and can do a lot of damage to their fellow big ships.

IIRC, it didn't go ahead because when fitted with any forward laser, the AI would make the ship start spinning around trying to dogfight the nimble little fleas around instead of concentrating the main gun on flagships and leaving the little stuff for the turrets - but this was before JS, perhaps now someone (ha, ha) might make them be more discerning about main gun targets and aim firstly at other capital ships, then at those outside turret range, and revert to dogfight anything else only if the other options are unavailable.

Posted: Fri Jun 27, 2008 3:19 pm
by Moonlight Fox
NPC ships don't have shields
Ooh! I didn't know that!
I think I'll have to forbid the use of naval shields for my craft, even though they are military craft. Thing is, they're so small that the other craft have trouble hitting them!
For player ships, you`re right with max energy (that determines the energy banks)
I thought as much.
I've seen some craft with only 2 energy banks and i've also seen some with 7 of them, is this just a result of setting the max energy high/low or is there another command that changes the number of banks?


but I think (could be wrong) that the energy_recharge_rate also affects the shields
That would be handy, I guess I'll just try setting it really high and then really low to see if it makes a difference. I'm sure the local police will assist me with the right.... persuasion :twisted:

It`s not yet possible to do for a player ship but possible for NPC ships via a turret added to the front laser region.
That sounds promising! It seems the turrets need some special stuff (<key>setup_actions</key>) I couldn't find too much on the wiki..is there any information elsewhere regarding the use of turrets?

I don`t think there is a way of "slowing down" the roll towards an aim. But, could be wrong. Haven`t ever heard of it, yet.
There is a precision toggle.. but it only works for joysticks :(
Also it seems the latest version of oolite, a lot of people have been having problems with it.

Hope that helped
Yes! thank you!

Posted: Fri Jun 27, 2008 6:18 pm
by Captain Hesperus
The number of energy banks is determined by the max_energy key. Essentially, Oolite divides the max_energy by 256 and that's more or less how many energy banks you get.

Captain Hesperus

turrets

Posted: Fri Jun 27, 2008 7:03 pm
by Lestradae
That sounds promising! It seems the turrets need some special stuff (<key>setup_actions</key>) I couldn't find too much on the wiki..is there any information elsewhere regarding the use of turrets?
The following is the shipdata.plist code for "the" classical Oolite turret, the ballturret.

This turret is then integrated into main ship models via subentities. They have to be specified in the shipdata.plist of the ship that uses the turret, you should find something on the wiki about that, for the modelling stuff I am completely incompetent to say anything.

So, here`s the example ballturret:

Code: Select all

        <key>ballturret</key>
        <dict>
                <key>ai_type</key>
                <string>nullAI.plist</string>
                <key>model</key>
                <string>ballturret.dat</string>
                <key>name</key>
                <string>Ball Turret</string>
                <key>roles</key>
                <string>ballturret</string>
                <key>thrust</key>
                <real>1</real>
                <key>weapon_energy</key>
                <real>25</real>
                <key>laser_color</key>
                <string>magentaColor</string>
                <key>setup_actions</key>
                <array>
                        <string>initialiseTurret</string>
                </array>
        </dict>
... on a side note, the "ship very small" issue, is it intentional (did you want your ship to be so small)?
u
Because, if yo want it bigger, ask the people who can do models, they can be made bigger ...

8)

L

Re: turrets

Posted: Fri Jun 27, 2008 9:55 pm
by Moonlight Fox
Thank you very much for the code.. I'll give it a whirl!
Don't the turrets turn and fire in all directions?
If so, is there a way to force them to only be able to fire straight forwards?
Lestradae wrote:
... on a side note, the "ship very small" issue, is it intentional (did you want your ship to be so small)?
Because, if yo want it bigger, ask the people who can do models, they can be made bigger.

Yeah, they're single seat combat craft.. probably similar to a current combat aircraft.
When I made the model in Wings3D I didn't really pay any attention to the scale. My first craft ended coming out at 17.5 meters in length, I was going to correct it. However, after playing with it for a while I noticed other craft were struggling to hit me as it was.. so making it smaller would be rather silly.

Posted: Mon Jun 30, 2008 2:46 pm
by Commander McLane
Hi, Moonlight Fox,

the answers to most of your questions depend very much on whether you are aiming for a player ship or an NPC, because those two are handled differently in many aspects.
Moonlight Fox wrote:
1) Is there a way to increase / decrease the shield strength? (aside from adding shield boosters)
Am I right in thinking that changing <key>max_energy</key> and <key>energy_recharge_rate</key> only has an effect after the shields have been depleted?
As Lestradae mentioned, NPC's don't have shields. Or, in other words: For NPCs energy is shields. So increasing or decreasing the max_energy to a pleasing value is what you want to do. You should have an eye on the values for the built-in ships (so always have the built-in shipdata opened as well for comparison), in order to determine in which league you want the Starfox to play. I would suggest, given that it is a military ship, the values for the Vipers should give a good orientation.

Energy banks are just a visual translation of max_energy for player ships. The formula is max_energy modulo 64, so you divide by 64 and disregard everything behind the decimal dot. Second rule: the minimum of energy banks is 1. So:
  • max_energy 0-63 -> 1 energy bank
  • max_energy 64-127 -> 1 energy bank
  • max_energy 128-191 -> 2 energy banks
  • max_energy 192-255 -> 3 energy banks
  • and so on
The energy_recharge_rate gives the amount of energy that is restored per second. Again it is best to compare with some other ships, in order to determine a reasonable value. A general classification (done for the wiki-pages of ships) would be:
  • poor (0.0..2.4)
  • medium (2.5..3.4)
  • good (3.5..4.4)
  • excellent (4.5..infinity)
As far as player ships and shields are concerned: shield "energy" is the same for all ships. Technically shields add another 128 points on top of your energy, so it is like two more energy banks, which are drained, before the actual energy banks are drained. The shield booster adds another 128 points, and the military shield enhancement another 128. The recharge rate is the same for all ships: 2, with the military shield enhancement it increases to 3.

For more information on these matters I would recommend you to read this thread, especially this post, this post, and this post.
2) Most of the Starfox ships are too small to realistically carry even 1 ton of cargo, it is still possible to allow them to carry the lighter equipment such as platinum, gold etc?
Again, are we talking about player ships or NPCs here?

I don't know whether a player ship with 0 cargo space could buy the kilo- and gram-commodities. I would suggest you just try it out. Perhaps the whole F8-screen would be inaccessible? I don't know.

And the cargo NPCs spit out when killed can be defined in the shipdata.plist, with the CARGO_CARRIED mentioned by Eric.
3) As the craft are small, light fighters I gave them a higher than average pitch/yaw/roll values. This has resulted in the craft being a little twitchy which in turn can make it a little tricky to line up your cross hairs over your desired target. Is there a way to keep the turning values high but make it less twitchy?
No. "Twitchy" is just another word for "high".
Does messing with the <key>thrust</key> or <key>density</key> do anything to the manoeuvrability?If not.. what do they do?
As mentioned in the wiki, the key thrust sets the inertia of a ship. I find the explanation not clear myself, but this is what I think it means: on the one hand side thrust does determine how long you need to press "w" in order to reach your maximum speed (at least according to my experience; just change the value for your own ship and compare what happens). But it does also more, because it gives a ship inertia. Big inertia means that more force is needed to move an object. Small inertia means that only small force is neede to move the object. This means that if two objects collide, the one with the bigger inertia stays relatively fixed, while the one with the small inertia gets kicked away. But again, that's what I've thought out myself. I would love to be better enlightened by somebody who actually knows the code.

What is density? Never heard of that. <looks at shipdata.plist-documentation> Oh, yeah, there it is:
density

This real value is used to calculate a ships total mass. Default is 1.0 (Introduced in version 1.69?)
Well, I would guess it does what it says: calculating the ship's mass. I am not sure, however, what Oolite actually uses masses for.
4) Is there a way to mount two forward facing weapons? In the Starfox games you could upgrade your laser to a twin blaster which would simultaneously fire two lasers at your target.. it would be nice if I could do that in Oolite too!
Again it depends if we are talking about player ships or NPCs. For NPCs it is possible (see the ships from military.oxp and renegades.oxp).

For player ships: no (and this goes for all directions). No multiple weapons.

I would also be careful, as far as the workaround with turrets is concerned. Plasma turrets are capital ship weapons. The model has a considerable size (12.5 x 10 x 10 meters), so it might look misplaced on a ship that is not much bigger itself.

Posted: Mon Jun 30, 2008 3:17 pm
by Eric Walch
McLane wrote:
Well, I would guess it does what it says: calculating the ship's mass. I am not sure, however, what Oolite actually uses masses for.
The code tries to follow as close as possible real live physics.
- On collisions between two objects the mass is used.
- Nearby mass is a blocked for witchspace jumps.
- I assume mass is also used in combination with "thrust" to determine acceleration.

There is just one small bug in the internal mass calculation. --> it is correct for a plain entity, but for subentities it always uses density 1. So, when a ship has large subentities, changing density of the core has almost no influence on the density of the whole.

EDIT: Mass is not used in thrust, only with the first two items. e.g. collision damage is linear related to: others mass * (others velocity)^2. In real live we call this kinetic energy.

Posted: Mon Jun 30, 2008 3:24 pm
by Amen Brick
I suppose if you had the dat2objtex.py script that's lying around here somewhere you could import the ballturrets to wings and scale them down?

They fire along the z axis, iirc.

Posted: Mon Jun 30, 2008 3:38 pm
by Commander McLane
Amen Brick wrote:
I suppose if you had the dat2objtex.py script that's lying around here somewhere you could import the ballturrets to wings and scale them down?
While you certainly could do that, I don't think it would make sense. Think of all the technology that is needed to (a) produce the plasma, (b) self-aim the turret and (c) fire it with the needed velocity, you wouldn't come under a certain amount of space to put that technology in.

And as far as I've understood Moonlight Fox, he is concerned with what is realistic for a ship the size of his, and what is not.

My opinion: plasma turrets are not.

Posted: Mon Jun 30, 2008 3:40 pm
by Amen Brick
He doesn't have a miniaturization raygun? Eh? eh? :D