Page 10 of 13

Re: Custom Hangars

Posted: Tue Jul 07, 2020 6:46 pm
by JeremyaFr
WIP

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

I've added a "ShuttlePositionZ" setting.
To set the shuttle z position, set "ShuttlePositionZ = value". value is an integer. The default value is 0.

EDIT: link removed

Re: Custom Hangars

Posted: Tue Jul 07, 2020 7:16 pm
by ual002
JeremyaFr wrote:
Tue Jul 07, 2020 6:46 pm
WIP

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

I've added a "ShuttlePositionZ" setting.
To set the shuttle z position, set "ShuttlePositionZ = value". value is an integer. The default value is 0.


xwa_hook_hangars_WIP.zip
Fan freaking tastic. That solves several hangar issues. Especially for inverted ones. If the droids can also be positioned, that would also be helpful.

Re: Custom Hangars

Posted: Wed Jul 08, 2020 3:08 pm
by JeremyaFr
WIP

Hello,
I've added a "DroidsPositionsZ" setting to difine the z position of the droids.

To set the droids z position, set "DroidsPositionZ = value". value is an integer. The default value is 0.

EDIT: link removed

Re: Custom Hangars

Posted: Wed Jul 08, 2020 3:27 pm
by ual002
Well hot damn. I have a LOT of hangar maps to review now.


EDIT: Actually, quick question, does your hangar map editor reflect the positional changes to the shuttle and droids now?

Re: Custom Hangars

Posted: Wed Jul 08, 2020 6:44 pm
by JeremyaFr
ual002 wrote:
Wed Jul 08, 2020 3:27 pm
Actually, quick question, does your hangar map editor reflect the positional changes to the shuttle and droids now?
No

Re: Custom Hangars

Posted: Wed Jul 08, 2020 10:28 pm
by ual002
Looks like there are new options in the ini. Some of the new ones seem self explanatory. Others do not. Requesting some clarification.

LoadShuttle = 1 (Understood)
ShuttleModelIndex = 52 (Understood)
ShuttleMarkings = 3 (Understood)
ShuttlePositionZ = -1735 (Understood) ******
ShuttleAnimation = Bottom (Understood)
ShuttleAnimationStraightLine = 0 (Not sure I understand how this works.)
LoadDroids = 1 (Understood)
DroidsPositionZ = -1735 (Understood)
HangarRoofCranePositionY = 786 (Understood)
HangarRoofCranePositionZ = -282 (Understood)
IsHangarFloorInverted = 0 (Understood)
PlayerAnimationElevation = 0 (What does this affect?)

Here was my plan for making an inverted VSD2 hangar. Player TIE at the rack, droids on the floor. Since the hangar is small, use a Stormtrooper transport as the hangar shuttle on the floor below the player. While trying to get the shuttle height right I noticed that making the hangar inverted also makes the shuttle launch inverted. And I also don't know what PlayerAnimationElevation = 0 does. The readme says "To set the elevation delta of the player craft animation" I'm not sure what that means.

Considering how small the VSD hangar is, without "ShuttlePositionY =", or "ShuttlePositionX =" or even "HangarRoofCranePositionX =" options, shuttle launches may need to be restricted to larger calamari and ISD hangars.

Re: Custom Hangars

Posted: Thu Jul 09, 2020 2:00 pm
by JeremyaFr
Hello,

The ShuttleAnimationStraightLine setting set the shuttle straight line animation length. It's the distance the shuttle moves along the Y axis before moving the the right, the top or the bottom.
The PlayerAnimationElevation setting set the elevation delta of the player craft animation. It's the distance the player craft moves along the Z axis before going forward.

Do you want a IsShuttleFloorInverted setting?

Re: Custom Hangars

Posted: Thu Jul 09, 2020 2:11 pm
by ual002
JeremyaFr wrote:
Thu Jul 09, 2020 2:00 pm
Do you want a IsShuttleFloorInverted setting?
Yes.

Roger that all makes sense. The inverted floor setting would be perfect for the ISDs, however unless we can adjust the X and Y of the starting point of the shuttle as well, (for the VSD hangar) it will be clipping through he wall.

Re: Custom Hangars

Posted: Thu Jul 16, 2020 1:16 pm
by JeremyaFr
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

Re: Custom Hangars

Posted: Thu Jul 16, 2020 3:02 pm
by ual002
Perfect thank you.

Re: Custom Hangars

Posted: Sat Jul 18, 2020 1:57 pm
by JeremyaFr
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

Re: Custom Hangars

Posted: Sat Jul 18, 2020 4:42 pm
by ual002
My only other nagging request would be for a Shuttle X and y position setting.

Re: Custom Hangars

Posted: Sat Jul 18, 2020 8:04 pm
by JeremyaFr
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

Re: Custom Hangars

Posted: Sun Jul 19, 2020 1:12 pm
by JeremyaFr
UPDATE

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

Re: Custom Hangars

Posted: Thu Jul 23, 2020 4:22 pm
by JeremyaFr
UPDATE

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

Re: Custom Hangars

Posted: Sun Jul 26, 2020 7:41 pm
by ual002
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.

Re: Custom Hangars

Posted: Sun Jul 26, 2020 8:15 pm
by JeremyaFr
Hello,
It seems doable to add a PlayerOffsetZ setting.

Re: Custom Hangars

Posted: Mon Jul 27, 2020 5:30 am
by Driftwood
Would probably be sensible to add x and y coordinates if it's not too much trouble at that point?

Re: Custom Hangars

Posted: Mon Jul 27, 2020 5:01 pm
by JeremyaFr
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

Re: Custom Hangars

Posted: Mon Jul 27, 2020 7:24 pm
by ual002
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?

Re: Custom Hangars

Posted: Wed Jul 29, 2020 4:33 pm
by JeremyaFr
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

Re: Custom Hangars

Posted: Wed Jul 29, 2020 6:02 pm
by ual002
Downloading for testing now. You are a god sir.

Image

Re: Custom Hangars

Posted: Wed Jul 29, 2020 6:13 pm
by ual002
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]

Re: Custom Hangars

Posted: Wed Jul 29, 2020 6:20 pm
by JeremyaFr
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].

Re: Custom Hangars

Posted: Wed Jul 29, 2020 8:58 pm
by ual002
I'm an idiot, I read that completely differently. Thanks.