Custom Hangars

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

Moderator: JeremyaFr

Post Reply

Re: Custom Hangars

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

Post by JeremyaFr » Thu Jul 16, 2020 1:16 pm

WIP

Hello,
I've added a "IsShuttleFloorInverted" setting.

To invert the hangar floor for the shuttle, set "IsShuttleFloorInverted = 1". When set to 0, the floor is below the player craft. When set to 1, the floor is above the player craft.

EDIT: link removed

User avatar
ual002
Lieutenant
XWAU Member
Posts: 825
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Thu Jul 16, 2020 3:02 pm

Perfect thank you.
Image Image Image Image Image

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

Post by JeremyaFr » Sat Jul 18, 2020 1:57 pm

WIP

Hello,
I've added a "IsDroidsFloorInverted" setting.

To invert the hangar floor for the droids, set "IsDroidsFloorInverted = 1". When set to 0, the floor is below the player craft. When set to 1, the floor is above the player craft.

EDIT: link removed

User avatar
ual002
Lieutenant
XWAU Member
Posts: 825
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Sat Jul 18, 2020 4:42 pm

My only other nagging request would be for a Shuttle X and y position setting.
Image Image Image Image Image

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

Post by JeremyaFr » Sat Jul 18, 2020 8:04 pm

WIP

Hello,
You can now define the x and y positions of the shuttle.

To set the shuttle x position, set "ShuttlePositionX = value". value is an integer. The default value is 1127.
To set the shuttle y position, set "ShuttlePositionY = value". value is an integer. The default value is 959.

EDIT: link removed

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

Post by JeremyaFr » Sun Jul 19, 2020 1:12 pm

UPDATE

Hello,
I've merged the changes from the WIP version into the stable version.

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

Post by JeremyaFr » Thu Jul 23, 2020 4:22 pm

UPDATE

Hello,
I've fixed a typo in the readme file and the config file.

User avatar
ual002
Lieutenant
XWAU Member
Posts: 825
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Sun Jul 26, 2020 7:41 pm

Ok. Idea time.

Problem: A single hangar opt can not support both a floor and rack launch. At the moment requires defining the floor height differently for each with an opt editor. A current example; we are working to have one VSD2 rack launch and the other VSD1, floor launch. But currently that is accomplished by making the VSDI hangar opt file different from the VSDII hangar opt file in that the "floor level" is different between the two, but otherwise everything else is the same, save for a few key capitolship.ini [HangarObjects] lines.

Solution: Improve the hangar hook to not require a different hangar opt for a rack launch vs floor launch. Add the functionality to move the player start height in the ini of the "capitolship.ini" so you don't need a different hangar opt [which at the moment requires defining the floor height differently for each with an opt editor]. That way the hangar map and all the objects in it can stay rooted and the user would only have to change 2 lines in the capitalship.ini to change the player start position to accommodate switching between floor and rack launches. And it might make a per mission change easier.

Implementation: If possible, a test function would need to be added to the hook_hangars to define an additional player start height offset in the [HangarObjects] section of a capitol ship's ini. Something like: "PlayerOffsetZ = +800". This would not affect the standard floor level set for most hangars but would set an offset for the player somewhere else, IE near a ceiling rack. Then, within each specific fighter ini capable of inverted launches, the [Size] section containing "ClosedSFoilsElevationInverted =" and "ClosedSFoilsElevation =" would continue to function as usual and fine tune the exact positioning.

TLDR:

I request a "PlayerOffsetZ =" function added to the [HangarObjects] of a capitolship.ini that does not affect the floor level, but only the player.
Image Image Image Image Image

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

Post by JeremyaFr » Sun Jul 26, 2020 8:15 pm

Hello,
It seems doable to add a PlayerOffsetZ setting.

User avatar
Driftwood

Admiral (Moderator)
Posts: 2094
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Mon Jul 27, 2020 5:30 am

Would probably be sensible to add x and y coordinates if it's not too much trouble at that point?

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

Post by JeremyaFr » Mon Jul 27, 2020 5:01 pm

WIP

Hello,
Here is a WIP version of the hangars hook.

I've added a PlayerOffsetZ setting.
To set the z position offset of the player craft, set "PlayerOffsetZ = value". value is an integer. The default value is 0.

EDIT: link removed

User avatar
ual002
Lieutenant
XWAU Member
Posts: 825
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Mon Jul 27, 2020 7:24 pm

Ok , perfect. Troubleshooting in progress. For my plan to work, The next step would be to make "IsHangarFloorInverted = 1" only affect the player craft. Possible rename to "PlayerLaunchInverted = 1". My apologies, I did not remember that "IsHangarFloorInverted = 1" did not affect only the player.

Trust me, where I'm going with this will make all hangar maps capable of floor and rack launch more sensible in the future.


EDIT: Actually, I think it would make more sense to separate the inverted floor effect on the player from the rest of the static objects by renaming "IsHangarFloorInverted = 1" to "StaticObjectFloorInverted = 1". And then creating a separate "PlayerLaunchInverted = 1" that only affects the players ship.

Looking to the future: I hope to build the hangar maps in such a way that in the future only one hangar map is needed, and if the player craft has a [Size] section containing "ClosedSFoilsElevationInverted =" in it's ini, then the mother ship will do an inverted rack launch, otherwise, if the player craft INI does not have that line in the ini, then the mothership will default to floor launch. In the case where a player ship can do both rack and floor launch, but the mother ship doesn't support it, it just does the floor launch. That way the user can experience all sorts of launch types in varying combinations in various motherships in a more sensible way.

What do you think?
Image Image Image Image Image

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

Post by JeremyaFr » Wed Jul 29, 2020 4:33 pm

WIP

Hello,
I've updated the WIP version.

I've addd a IsPlayerFloorInverted setting.
To invert the hangar floor for the player craft, set "IsPlayerFloorInverted = 1". When set to 0, the floor is below the player craft. When set to 1, the floor is above the player craft.

You can now customize the hangar based on the IFF of the arrival ship.
To load a file based on the IFF of the arrival craft, append the IFF index (starting at 0) to the file name.
This apply to HangarObjects, HangarCamera, FamHangarCamera, HangarMap, FamHangarMap.
For instance, if the IFF index is 1 and the file name is HangarObjects, then the name of the section in the ini file will be HangarObjects1. If HangarObjects1 doesn't exist then HangarObjects is used.

EDIT: link removed

User avatar
ual002
Lieutenant
XWAU Member
Posts: 825
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Wed Jul 29, 2020 6:02 pm

Downloading for testing now. You are a god sir.

Image
Image Image Image Image Image

User avatar
ual002
Lieutenant
XWAU Member
Posts: 825
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Wed Jul 29, 2020 6:13 pm

Ok, so If I want to have 2 separate Hangarmap sections for IFF in the ini, does it follow the same logic for HangarObjects? IE [HangarMap1] instead of [HangarObjects1]
Image Image Image Image Image

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

Post by JeremyaFr » Wed Jul 29, 2020 6:20 pm

ual002 wrote:
Wed Jul 29, 2020 6:13 pm
Ok, so If I want to have 2 separate Hangarmap sections for IFF in the ini, does it follow the same logic for HangarObjects? IE [HangarMap1] instead of [HangarObjects1]
Yes.
As indicated above, this apply to HangarObjects, HangarCamera, FamHangarCamera, HangarMap, FamHangarMap.
If IFF is 1, then you can have [HangarObjects1], [HangarCamera1], [FamHangarCamera1], [HangarMap1], [FamHangarMap1].

User avatar
ual002
Lieutenant
XWAU Member
Posts: 825
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Wed Jul 29, 2020 8:58 pm

I'm an idiot, I read that completely differently. Thanks.
Image Image Image Image Image

User avatar
ual002
Lieutenant
XWAU Member
Posts: 825
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Wed Jul 29, 2020 9:25 pm

So far so good with the Player only invert stuff. I'd say adding some indicators for the Shuttle, player and droids would be a nifty thing to add to the XWA Hangar Map Editor eventually. Basically have it read the stuff from the [HangarObjects] section. No rush there, that something for quality of life/ease of use for others later.

I'm gonna test the IFF stuff now on a Dreadnaught.
Image Image Image Image Image

User avatar
ual002
Lieutenant
XWAU Member
Posts: 825
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Fri Jul 31, 2020 3:24 am

Tests are going well, I have an IFF coded Nebulon B frigate I finished. It made me wonder if I could sub out the animated shuttle for a TIE fighter. I can, but its orientation in the hangar is a little wonky. I wonder if its possible to adjust the initial heading position of the animated shuttle while parked? Ideally I'd like to be able to specify any heading and make it turn to face the hangar exit, but I'd be happy with a straight forward heading and launch. I could replicate NPC floor and rack launch fighters this way.
Image Image Image Image Image

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

Post by JeremyaFr » Mon Aug 03, 2020 6:51 pm

WIP

Hello,
I've updated the WIP version.

I've added a ShuttleOrientation setting.
To set the shuttle orientation, set "ShuttleOrientation = value". value is an unsigned integer. The default value is 43136.

EDIT: link removed

User avatar
ual002
Lieutenant
XWAU Member
Posts: 825
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Mon Aug 03, 2020 8:23 pm

That's fantastic. I will experiment Immediately.
Image Image Image Image Image

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

Post by JeremyaFr » Wed Aug 05, 2020 7:46 pm

WIP

Hello,
I've updated the WIP version.

I've added PlayerOffsetX and PlayerOffsetY settings.

To set the x position offset of the player craft, set "PlayerOffsetX = value". value is an integer. The default value is 0.
To set the y position offset of the player craft, set "PlayerOffsetY = value". value is an integer. The default value is 0.
To set the z position offset of the player craft, set "PlayerOffsetZ = value". value is an integer. The default value is 0.

EDIT: link removed

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

Post by JeremyaFr » Thu Aug 06, 2020 4:28 pm

WIP

Hello,
I've updated the WIP version.

I've added a workaround for the shuttle sound effects in the hangar.

EDIT: link removed

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

Post by JeremyaFr » Fri Aug 07, 2020 12:42 pm

WIP

Hello,
I've updated the WIP version.

I've fixed the shuttle rotation.
If the orientation value is greater or equal to 32768 (or equal to 0), the rotation is clockwise, else it is anticlockwise.

EDIT: link removed

User avatar
ual002
Lieutenant
XWAU Member
Posts: 825
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Sat Aug 08, 2020 1:04 am

Shuttle turning works great.
Image Image Image Image Image

Post Reply