Page 1 of 1

Help wanted!!! --> Custom Views ...

Posted: Mon Jun 23, 2008 9:33 am
by Lestradae
Hi to all nice people who would lend me a hand (metaphorically speaking, of course!)

(Anything else would be just plain weird)

Where was I? Ah, yeah [/rambling]

I am working on custom views for all playable ships in Realistic Shipyards 3.02, and yes, I read the wiki on the custom views, and now I have a few questions.

As I have to create custom views for around a hundred ships or so that didn`t have them when I merged or created them, I could use a template for small, medium, bigger and carrier ships so that the custom view doesn`t become a view into the engine room.

* If I understand the wiki description correctly, there is no problem for view_description, view_orientation and weapon_facing being exactly the same for all hundred ships, as there are no distance coordinates involved.

* Might not be the same with view_position, yes? Because those coordinates seem to indicate the distance from which the ship is viewed, too.

So, my two questions are:

1. Is my first assumption (*) up there correct as such or not?

2. If I take a "basic" view_position, is it enough to make the three coordinates bigger if I want more distance or is it more complicated (not really up to the quaternion stuff atm)?

3. Below is a (well working) example for custom views from Charlie`s Condor ship (a very big ship, big viewing distance I assume). Could I use this as a template and just make the view_position bigger or smaller, then, for bigger or smaller ships?

Code: Select all

            <key>custom_views</key>
                <array>
                        <dict>
                                <key>view_description</key>
                                <string>External View 1</string>
                                <key>view_position</key>
                                <string>0.0 -100.0 -1000.0</string>
                                <key>view_orientation</key>
                                <string>1.0 0.0 0.0 0.0</string>
                                <key>weapon_facing</key>
                                <string>FORWARD</string>
                        </dict>
                        <dict>
                                <key>view_description</key>
                                <string>External View 2</string>
                                <key>view_position</key>
                                <string>703.55 -100.0 -703.55</string>
                                <key>view_orientation</key>
                                <string>0.9239 0.0 0.3829 0.0</string>
                                <key>weapon_facing</key>
                                <string>FORWARD</string>
                        </dict>
                        <dict>
                                <key>view_description</key>
                                <string>External View 3</string>
                                <key>view_position</key>
                                <string>1000.0 -100.0 0.0</string>
                                <key>view_orientation</key>
                                <string>0.7071 0.0 0.7071 0.0</string>
                                <key>weapon_facing</key>
                                <string>FORWARD</string>
                        </dict>
                        <dict>
                                <key>view_description</key>
                                <string>External View 4</string>
                                <key>view_position</key>
                                <string>703.55 -100.0 703.55</string>
                                <key>view_orientation</key>
                                <string>0.3829 0.0 0.9239 0.0</string>
                                <key>weapon_facing</key>
                                <string>FORWARD</string>
                        </dict>
                        <dict>
                                <key>view_description</key>
                                <string>External View 5</string>
                                <key>view_position</key>
                                <string>0.0 -100.0 1000.0</string>
                                <key>view_orientation</key>
                                <string>0.0 0.0 1.0 0.0</string>
                                <key>weapon_facing</key>
                                <string>FORWARD</string>
                        </dict>
                        <dict>
                                <key>view_description</key>
                                <string>External View 6</string>
                                <key>view_position</key>
                                <string>-703.55 -100.0 703.55</string>
                                <key>view_orientation</key>
                                <string>0.3829 0.0 -0.9239 0.0</string>
                                <key>weapon_facing</key>
                                <string>FORWARD</string>
                        </dict>
                        <dict>
                                <key>view_description</key>
                                <string>External View 7</string>
                                <key>view_position</key>
                                <string>-1000.0 -100.0 0.0</string>
                                <key>view_orientation</key>
                                <string>0.7071 0.0 -0.7071 0.0</string>
                                <key>weapon_facing</key>
                                <string>FORWARD</string>
                        </dict>
                        <dict>
                                <key>view_description</key>
                                <string>External View 8</string>
                                <key>view_position</key>
                                <string>-703.55 -100.0 -703.55</string>
                                <key>view_orientation</key>
                                <string>0.9239 0.0 -0.3829 0.0</string>
                                <key>weapon_facing</key>
                                <string>FORWARD</string>
                        </dict>
                </array>
Answers to those questions would be very appreciated :D

Cheers

L

Posted: Mon Jun 23, 2008 7:47 pm
by Commander McLane
Just have a look into Oolite's shipdata.plist (version 1.71.2). In fact all the views of the built-in ships are following a template with four different sizes, if I recall correctly (I wrote that thing). <has a look> No, actually it's only three different sizes for the whole range of built-in ships.

The only thing you would have to change is the view_position. The rest always stays the same.

If you compare the existing positions, you will see how the values increase for bigger ships. So if the biggest in the existing set, the Anaconda, is too small for your purpose, just increase further. I would suggest you keep to the 50-meter-steps in the templates, so the next one would be playing with the values 250 and 176.78, the following one 300 and 212.13, and so on. I think by now you have found out the recipe: the smallest size is 100 and 70.71 (which is basically 1 and sqrt(2)/2), for bigger sizes just multipicate with 1.5, 2, 2.5, 3, 3.5, 4 etc. And increase the y-coordinate by 5 for each step.

The only thing that is a little trickier is the top- and bottom-views, because, depending how well-centered the ship is around the z-axis, you may have to take the view a few meters forward or backward. You will notice it only if you are actually using the views on this particular ship, so you will have to playtest them all.

And note that the default view_descriptions have changed since Charlie put out his OXPs. It's no longer the abstract "External View 1" etc., but the more speaking "Rear View". And of course the Top and Bottom view have been added.

...

Posted: Mon Jun 23, 2008 7:52 pm
by Lestradae
Thanks, will look into the four templates & calculate the size steps - the info is much appreciated!

L