Cockpit POV profiles

A Forum dedicated to the Suggestion, Creation and Editing of XWA Dynamic Link Library Files

Moderator: JeremyaFr

Post Reply

Cockpit POV profiles

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Nov 27, 2021 2:48 pm

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

User avatar
Vince T
Fleet Admiral (Administrator)
Posts: 14045
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Sat Nov 27, 2021 3:00 pm

Awesome, Jeremy! You're a genious!
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

User avatar
Ace Antilles
Admiral (Moderator)
Posts: 7824
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Sat Nov 27, 2021 8:52 pm

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
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Sun Nov 28, 2021 5:45 am

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]
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Nov 28, 2021 8:37 am

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.

Post Reply