Editing S-Foils

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

Moderators: Darksaber, General_Trageton, Forceflow, DTM, JeremyaFr

Post Reply

Re: Editing S-Foils

User avatar
General_Trageton

Fleet Admiral (Administrator)
Posts: 12685
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by General_Trageton » Sun Apr 05, 2020 2:53 pm

I've got a silly idea, probably a bad one as well, but for the sake of it:

Would it be possible to "suppress" the option to enter the hangar if/when landing gear isn't out and/or S-Foils are in combat mode?

This would be more of an immersion/RPG thing and I'd probably get annoyed by it after crashing into the hangar for the third time, but still. Had it floating around my head.
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's Modding HQ | My Steam Workshop
Vince T's X-Wing HQ New VXHQ Website WIP

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

Post by JeremyaFr » Sun Apr 05, 2020 4:47 pm

Done.

EDIT: link removed

To require s-foils being closed before enter hangar, set the CloseSFoilsAndOpenLangingGearsBeforeEnterHangar setting.
When set to 0, normal behavior
When set to 1, s-foils must be closed and landing gears opened before enter hangar
See "hook_sfoils.cfg".

User avatar
General_Trageton

Fleet Admiral (Administrator)
Posts: 12685
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by General_Trageton » Sun Apr 05, 2020 5:16 pm

Seriously? You actually pulled that through?
You're crazy & awesome Jérémy! XD
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's Modding HQ | My Steam Workshop
Vince T's X-Wing HQ New VXHQ Website WIP

User avatar
keiranhalcyon7
Lieutenant JG
Posts: 524
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Sun Apr 05, 2020 7:42 pm

That reminds me of a bug - well, "difficulty" - I once saw. My mothership had flown into a position such that its hangar was very near the hyperspace departure point. Trying to enter the hangar, I was instead taken back to the (very hot) combat zone. Could landing gear state be used to resolve the ambiguity of which action spacebar will initiate?

User avatar
General_Trageton

Fleet Admiral (Administrator)
Posts: 12685
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by General_Trageton » Sun Apr 05, 2020 7:47 pm

Nice thought.
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's Modding HQ | My Steam Workshop
Vince T's X-Wing HQ New VXHQ Website WIP

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

Post by JeremyaFr » Sun Apr 05, 2020 8:30 pm

Done.

EDIT: link removed

Now when the landing gears are deployed, the player can't go in hyperspace.

User avatar
keiranhalcyon7
Lieutenant JG
Posts: 524
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Sun Apr 05, 2020 9:30 pm

Sweet!

User avatar
General_Trageton

Fleet Admiral (Administrator)
Posts: 12685
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by General_Trageton » Sun Apr 05, 2020 10:01 pm

Sweet Jeremy!

I can wait for the first ppl to yell "my hyperspace is bugged!" XD
Well There are no craft with the feature enabled, so I guess we're good :D
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's Modding HQ | My Steam Workshop
Vince T's X-Wing HQ New VXHQ Website WIP

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

Post by Bman » Mon Apr 06, 2020 2:04 am

Awesome! Thanks Jeremy. Another idea... is it possible to have a starship's (mothership)'s hangar doors or semi-transparent force field mesh open when the player and A.I. craft approach and then the mesh closes after "FG xxx has landed" message appears? :D Maybe one of the hangar hardpoints triggers that.
W-I-P: ISD-II, XQ-1 Platform1, (Imp) Escort Carrier, Misc, & TFTC.

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

Post by JeremyaFr » Mon Apr 06, 2020 11:59 am

It is not currently possible.

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

Post by JeremyaFr » Mon Apr 06, 2020 12:01 pm

UPDATE

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

I've added a config file to enable or disable the new features. They are disabled by default.

To require s-foils being closed before enter hangar, set the CloseSFoilsAndOpenLangingGearsBeforeEnterHangar setting.
When set to 0, normal behavior
When set to 1, s-foils must be closed and landing gears opened before enter hangar

To require landing gears being closed before enter hyperspace, set the CloseLangingGearsBeforeEnterHyperspace setting.
When set to 0, normal behavior
When set to 1, landing gears must be closed before enter hyperspace

User avatar
Trevor
Ensign
Posts: 301
Joined: Thu Dec 04, 2014 7:11 pm

Post by Trevor » Wed Apr 08, 2020 11:33 pm

Wow, yet more awsome stuff.

The hangar doors sound cool but I beleve only 1 instance has been seen onscreen and that was EpIII intro - Oh, theres an idea, stop cap ships from launching more ties if the hangar is disabled (or blast door closed in the event this feature does make its way in)

Trev

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

Post by Bman » Thu Apr 09, 2020 11:46 pm

Hi Jeremy, here's another approach. If the Mothership (Starship/Station etc.) is assigned to a starfighter FG's "Arrival By" and "Depart By" flag, we know their S-Foils are triggered when they are at an approximate distance from the mothership.opt, or the mothership's hangar hardpoint. What if that instance is hooked the opposite way too? If a hangar hardpoint or some trigger hardpoint is placed on a starfighter.opt file, then it triggers the MotherShip's mesh doors to open as long as the Mothership has a designated "SFoils" mesh index added to it's *.ini or .txt file? Maybe something clever along that line of thought . . .

@Trevor, well one way to do that now would be to make the Hangar Meshes destroy-able which is easy to do, and but they house the hangar hardpoints which guide the A.I. FG's and player craft "Hit SpaceBar to Enter Hangar". It it would require some creative thought as far as design, extra meshes as to what the "inside" hangar or rather the breached hull looks like after it has suffered damage and so forth. This would also consider some mission design thought too as to having a backup mothership or station that the player's craft and perhaps other FG's could fly home to when the mission is over. Not absolutely necessary but there's flexibility there.
Last edited by Bman on Fri Apr 10, 2020 11:46 pm, edited 1 time in total.
W-I-P: ISD-II, XQ-1 Platform1, (Imp) Escort Carrier, Misc, & TFTC.

User avatar
Driftwood
Lieutenant Commander
XWAU Member
Posts: 1952
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Fri Apr 10, 2020 2:20 pm

Assuming the hangar functions would work as anticipated if the hangar mesh was destroyed, then yes every ship that has deatroyable hangar mesh would need a damage model tucked in behind it or you'd be able to see through and fly into the model.

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

Post by Bman » Sat Apr 11, 2020 12:08 am

Yeah that's what I'm referring to more or less. Another issue... Is maybe the limits. We have a many to one relationship now, meaning different FG's and types of Starfighters have an arrival by or depart to flag set to a starship or two, or via hyperspace by default. But on the flip side how would the mothership's SFoils patch activate if you needed to assign more than one or two Starfighters FG's ? Perhaps by ship type or categories rather than just flight groups defined in the mission files. I think I'm going to test this now. Have a starship with an arrival by and/or a depart by flag to an xwing with a hold steady order in a test mission to see if I can make a given hullmesh move near the hangar when the xwing approaches. Will add hangar hardpoints to xwing. I don't think it's that simple but idea is there.
W-I-P: ISD-II, XQ-1 Platform1, (Imp) Escort Carrier, Misc, & TFTC.

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

Post by Bman » Sun Apr 12, 2020 6:23 am

Followup note. Confirmed, I tested multiple ways using GT's Trade Federation model--Invisbile Hand (IHand.opt) making the shieldgenerator meshes RotaryWing types, edited transformation vectors, and tested "arrival by" and "depart by" flags in AlliED and with a StarShipFlyHome order at 0% throttle. Also included an Xwing "fly home" order and added Outside and Inside Hangar hardpoints to the base Xwing.opt model with a random "hangar" type mesh. :roll: Adding [SFoils] header to the IHand.ini file for meshes 33 and 34 had no effect except for pre-post/Hyperspace triggering, something more appropriate say for the wings of GT's new VSD-I model. I thought the hangar hardpoints might work with any object category besides starfighters and light shuttle crafts. Was worth a try.
W-I-P: ISD-II, XQ-1 Platform1, (Imp) Escort Carrier, Misc, & TFTC.

Tony Knightcrawler
Commander
Posts: 2219
Joined: Sat Nov 29, 2003 12:01 am
Contact:

Post by Tony Knightcrawler » Mon Apr 13, 2020 4:17 am

Just wanna comment that JeremyaFr is everyone's hero. What a boss. And Darksaber, thanks for fixing my StarViper so it could be included in your Craft Pack several years ago. I did notice it then, but I didn't know what to say because I didn't really feel confident in it. I think the modeling on the StarViper is decent, but the textures are a little flat. And then there's the cockpit, with the "unsolvable" problem of there being a huge bar down the center of the pilot's view. Maybe one day I'll go back and try to fix these problems, improve the textures, add landing gear, etc.. I just got the idea that maybe the pilot's seat could be offset to one side in the cockpit.

User avatar
Ace Antilles
Captain
XWAU Member
Posts: 3519
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Mon Apr 20, 2020 2:28 pm

This is a cool idea and works well!
When I use the X-wing it says this ship doesn't have landing gear. Obviously as it's modded onto the ship.
Is there any ships in game right now that do have unique landing gear or is that something for the future?
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

User avatar
DarHan
Cadet 1st Class
Rebel Alliance
Posts: 205
Joined: Mon Dec 05, 2005 12:01 am
Contact:

Post by DarHan » Mon Apr 20, 2020 3:20 pm

@ Ace Antilles

I suppose it’ll be implemented in later updates to the ship set, but until then you can edit the ini files in the Flightmodels folder to make the landing gear work on the X-Wing, A-Wing, and Y-Wing.

-----

In XWing.ini:

Change

Code: Select all

[SFoils]
;mesh index, angle, opening speed, closing speed
1, 8, 1, 1
2, 12, 1, 1
3, 12, 1, 1
4, 8, 1, 1
10, 8, 1, 1
11, 12, 1, 1
12, 12, 1, 1
13, 8, 1, 1
14, 8, 1, 1
15, 12, 1, 1
16, 12, 1, 1
17, 8, 1, 1
35, 64, 2, 1
36, 64, 2, 1
37, 50, 2, 2
38, 12, 1, 1
39, 12, 1, 1
40, 12, 1, 1
to

Code: Select all

[SFoils]
;mesh index, angle, opening speed, closing speed
1, 8, 1, 1
2, 12, 1, 1
3, 12, 1, 1
4, 8, 1, 1
10, 8, 1, 1
11, 12, 1, 1
12, 12, 1, 1
13, 8, 1, 1
14, 8, 1, 1
15, 12, 1, 1
16, 12, 1, 1
17, 8, 1, 1
CloseSFoilsInHyperspace = 1

[SFoilsLandingGears]
35, 64, 2, 1
36, 64, 2, 1
37, 50, 2, 2
38, 12, 1, 1
39, 12, 1, 1
40, 12, 1, 1
-----

In YWing.ini and AWing.ini:

Change

Code: Select all

[SFoils]
to

Code: Select all

[SFoilsLandingGears]
Last edited by DarHan on Mon Apr 20, 2020 6:19 pm, edited 2 times in total.
“Red Four, nothing’s gone wrong yet.”
— Hobbie Klivian

User avatar
Trevor
Ensign
Posts: 301
Joined: Thu Dec 04, 2014 7:11 pm

Post by Trevor » Mon Apr 20, 2020 3:21 pm

Oh, you get that error too? I thought I fluffed something up when testing various hooks and settings

Trev

User avatar
BenKenobi
Cadet 2nd Class
Posts: 54
Joined: Wed Mar 18, 2020 12:30 pm

Post by BenKenobi » Mon Apr 20, 2020 5:08 pm

DarHan wrote:
Mon Apr 20, 2020 3:20 pm

In XWing.ini:

Change

...

to

Code: Select all

[SFoils]
;mesh index, angle, opening speed, closing speed
1, 8, 1, 1
2, 12, 1, 1
3, 12, 1, 1
4, 8, 1, 1
10, 8, 1, 1
11, 12, 1, 1
12, 12, 1, 1
13, 8, 1, 1
14, 8, 1, 1
15, 12, 1, 1
16, 12, 1, 1
17, 8, 1, 1
CloseSFoilsInHyperspace = 1

[SFoilsLandingGears]
35, 64, 2, 1
36, 64, 2, 1
37, 50, 2, 2
38, 12, 1, 1
39, 12, 1, 1
40, 12, 1, 1
-----
My Xwing.ini looks like this (in both my XWAUpgrade and DSUCP folder)

Code: Select all

[SFoils]
;mesh index, angle, opening speed, closing speed
1, 8, 1, 1
2, 12, 1, 1
3, 12, 1, 1
4, 8, 1, 1
10, 8, 1, 1
11, 12, 1, 1
12, 12, 1, 1
13, 8, 1, 1
14, 8, 1, 1
15, 12, 1, 1
16, 12, 1, 1
17, 8, 1, 1
35, 64, 2, 1
36, 64, 2, 1
37, 50, 2, 2
38, 12, 1, 1
39, 12, 1, 1
40, 12, 1, 1
So it look like the Landing Gear is already in there, but not uniquely identified, since it's missing the

Code: Select all

[SFoilsLandingGears]
header.

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

Post by JeremyaFr » Mon May 11, 2020 4:02 pm

UPDATE

Hello,
I've updated the s-foils hook.

I've fixed a bug where the player can fire lasers when the s-foils are closed.

Post Reply