Page 1 of 1

Cockpit POV profiles

Posted: Sat Nov 27, 2021 2:48 pm
by JeremyaFr
UPDATE

Hello,
I've updated the mission objects hook.

You can now define profiles for the cockpit POV.

To define the cockpit POV for a craft, you can either directly define the coordinates for the craft int the "CockpitPov" section, either define profiles and use them on a per-mission basis.

Suppose that the new craft is "FlightModels\[Model].opt".
To define the cockpit POV, set CockpitPovX, CockpitPovY and CockpitPovZ in a file named "FlightModels\[Model]CockpitPov.txt" or create a section named "[CockpitPov]" in "FlightModels\[Model].ini".
See "CorellianTransport2CockpitPov.txt"

To create a POV profile named "Profile1", create a file named "FlightModels\[Model]CockpitPov_Profile1.txt" or create a section named "CockpitPov_Profile1" in "FlightModels\[Model].ini".
The format is
CockpitPovX = integer
CockpitPovY = integer
CockpitPovZ = integer
See "CorellianTransport2CockpitPov_Default.txt"

Suppose that the new craft is "FlightModels\[Model].opt".
Suppose that the mission is "[MissionDir]\[Mission].tie".
To replace the cockpit POV profile, create a file named "[MissionDir]\[Mission]_Objects.txt" or create a section named "[Objects]" in "[MissionDir]\[Mission].ini".
The format is
FlightModels\[Model]_CockpitPovProfile = ProfileName
CockpitPovProfile = ProfileName
When "FlightModels\[Model]_CockpitPovProfile" doesn't exist, "CockpitPovProfile" is used. If "CockpitPovProfile" doesn't exist, "Default is used".
See "Objects.txt".

Cockpit POV position is read in this order:
- [Model]CockpitPov
- [Model]_CockpitPovProfile
- CockpitPovProfile
- Default profile

Re: Cockpit POV profiles

Posted: Sat Nov 27, 2021 3:00 pm
by Vince T
Awesome, Jeremy! You're a genious!

Re: Cockpit POV profiles

Posted: Sat Nov 27, 2021 8:52 pm
by Ace Antilles
I was doing some testing and seems to work fine :)
I thought I would add a couple of lines of instructions to clarify things for some (like me) :D

I'll use the MillenniumFalcon2.opt as an example.
So in the Flightmodels folder I opened MillenniumFalcon2.ini

In that you will see this section

Code: Select all

//DEFAULT POV FOR REFERENCE - Remove ; in Header to activate
[;CockpitPov]
CockpitPovX = 454
CockpitPovY = 352
CockpitPovZ = 62
The ; in the [;CockpitPov] means this section is disabled. Remove the ; if you want to change the opt to the CockpitPov and not the exe value.

So I want to add a new Cockpit POV Profile to say simulate sitting in a different place.
In this case I want to call the profile Mini. So I add this section.

[CockpitPov_Mini]
CockpitPovX = 354
CockpitPovY = 252
CockpitPovZ = 62

It must start "CockpitPov_" and you add your profile name on the end. So the INI code looks like this:

Code: Select all

//DEFAULT POV FOR REFERENCE - Remove ; in Header to activate
[;CockpitPov]
CockpitPovX = 454
CockpitPovY = 352
CockpitPovZ = 62

[CockpitPov_Mini]
CockpitPovX = 354
CockpitPovY = 252
CockpitPovZ = 62
Then I need to setup the mission. So I go to the Missions folder.
In this case I want to edit 1b7m3w.ini

In that I want to find or add a section called [Objects]
And then I add FlightModels\MillenniumFalcon2_CockpitPovProfile = Mini

FlightModels\MillenniumFalcon2 is the Opt name.
_CockpitPovProfile = Mini references the new Cockpit Profile.
So it all looks like this:

Code: Select all

[Objects]
FlightModels\MillenniumFalcon2_CockpitPovProfile = Mini
That's it! So you can add or change the names to your profiles in this way.
For more details see Jeremy's post above or Hooks_Readme.txt

Re: Cockpit POV profiles

Posted: Sun Nov 28, 2021 5:45 am
by Bman
Thanks, that's a helpful write up. "... The ; in the [;CockpitPov] means this section is disabled." Technically, wouldn't the semi-colon need to be the first character outside the left bracket ? i.e ;[CockpitPov]

Re: Cockpit POV profiles

Posted: Sun Nov 28, 2021 8:37 am
by JeremyaFr
Hello,
If the semi-colon is outside the bracket, the line will be a comment and the content of the section will be read as if it was part of the previous section.