Editing S-Foils

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

Moderator: JeremyaFr

Post Reply

Re: Editing S-Foils

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

Post by JeremyaFr » Mon Sep 23, 2019 7:25 pm

WIP

- I've fixed the rotation angle.
- I've added a line to show the rotation axis.

- I've added a button to save the OPT file.
- The ini file is now saved.

EDIT: link removed

Before testing, I recommand to make a backup of the ini and/or txt files for the craft being tested.

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

Post by JeremyaFr » Mon Sep 23, 2019 7:31 pm

JeremyaFr wrote:
Sun Sep 15, 2019 12:17 pm
Darksaber wrote:
Sat Sep 14, 2019 6:48 pm
To be honest leaving the SFoilsAnimationSpeed at the default 1 and the speed at 1 wouldn't bother me, but GT asks if the animation could be slowed down, so is there any way to make the slowed down animation smoother?
Not currently. The game engine uses integers for the mesh rotation angle values. It is not possible to change that. When the values are converted to radians, they are multiplied by 0.0245436728. So 1 unit means 1.4°.
The rotation angle is dependent from the lenght of the "Look" vector. So I think the vector length can be used to slow down the rotation while still being smooth. I've not tested that.

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

Post by JeremyaFr » Tue Sep 24, 2019 12:16 pm

WIP

I've added a button to save the OPT file.

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

Post by JeremyaFr » Tue Sep 24, 2019 8:31 pm

WIP

The ini file is now saved.

On saving, the ini file is updated. If a txt file already exists, it will also be updated.

Rebelyell
Cadet 3rd Class
Posts: 28
Joined: Fri Jun 14, 2019 1:35 am

Post by Rebelyell » Tue Sep 24, 2019 8:50 pm

Sweet! Great work!

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Tue Sep 24, 2019 8:52 pm

Works ok thanks :)
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

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

Post by Vince T » Wed Sep 25, 2019 5:20 am

Tested it on the VSD and it works great! Thanks Jeremy!
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

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

Post by JeremyaFr » Fri Sep 27, 2019 7:11 pm

UPDATE

Hello,
I've added Xwa SFoils Editor to Xwa Opt Editor.

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Fri Sep 27, 2019 7:24 pm

Brilliant :)
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

MamiyaOtaru
Cadet 4th Class
Posts: 18
Joined: Mon Nov 04, 2019 4:17 am

Post by MamiyaOtaru » Mon Nov 04, 2019 6:29 pm

JeremyaFr wrote:
Sat Sep 21, 2019 8:13 pm
Driftwood wrote:
Thu Sep 19, 2019 9:38 pm
Related to this, would it be possible to create a tool that would allow you to import an opt into it, then using sliders, or a text based interface like your hangar editor assigned to whatever rotational axis that the S-foil / landing gear animations use, use it to rotate the meshes to a desired open/closed angle, then allow you to export the mesh rotation data into the relevant ship.ini file? This would really help with not having to go ingame to see if your animated meshes are rotating to the correct position several times.
Nice suggestion.
I am working on it.
Driftwood wrote:
Thu Sep 19, 2019 9:38 pm
Edit: I used the hook downloader to update all my hooks and I don't think the S-foils hook is updating since CTRL+L seems to do nothing. Also it seems dated as of 23JAN19.
The hook upload is fine. You can check the date here: https://github.com/JeremyAnsel/xwa_hook ... sfoils/zip
can I assume that for this to look right in game, I will need updated ship files? Using the files in that zip the sfoils work (aside from the guns staying in place) but there is no landing gear (presumable because of lack of FlightModels\[Model]SFoilsLandingGears.txt files). I'm eager to see sfoils and landing gear separate, but I can wait until someone makes those files

*FEW MINUTE$ LATER*

Or I can make them myself :) Copied the missing gun entries from xwing.ini to XWingSFoils.txt, and put the remainder into XWingSFoilsLandingGears.txt and they both work (separately). It was pretty easy to tell which was which since the wing/gun angles all match hah

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

Post by Bman » Sat Jan 04, 2020 2:27 am

Hi Jeremy, can you give an example of how the AssaultGunboat.ini file should look (syntax), specifically the LandingGears Hook ? Ctrl + L

[Pilot]
x, x,x,x, for rotating pilot head

[SFoils]
x, x,x,x, for the actual rotary wings

CloseSFoilsInHyperspace = 1
SFoilsAnimationSpeed = 1

[SFoilsLandingGears] = 0 or 1 ? Is this a section header or a normal syntax statement ? Can it be here too, or does it only go into an AssultGunBoatSFoilsLandingGears.txt .txt file ?
x,x,x,x for rotary landing gear meshes

Also what order should the above sections/statements be in?
Thanks!
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Sat Jan 04, 2020 8:32 am

this is my AssaultGunboat.ini

Code: Select all

;AssaultGunboat.ini

[Camera]
;Camera X,Y,Z
X = -300
Y = 500
Z = 70

FamX = -300
FamY = 500
FamZ = 70

[Pilot]
;mesh index, angle, speed, behavior
12, 32, 2, 2

[SFoils]
;mesh index, angle, closing speed, opening speed
4, 50, 2, 2
5, 50, 2, 2
6, 88, 2, 2
7, 88, 2, 2

CloseSFoilsInHyperspace = 0
SFoilsAnimationSpeed = 1

[SFoilsLandingGears]
;mesh index, angle, closing speed, opening speed
10, 128, 8, 8
11, 128, 8, 8

[Size]
ClosedSFoilsElevation = 55
ClosedSFoilsElevationInverted = 55

[Sound]
EngineSoundInterior = 5
EngineSoundFlyBy = 5

EngineSoundWash = 1

WeaponSoundBehavior = Empire

[WeaponColor]
WeaponColor = 0
WeaponColor282 = 0
WeaponColor283 = 0
WeaponColor284 = 2
WeaponColor285 = 2

WeaponImpactColor_3100 = 80C71585
WeaponImpactColor_3200 = 80FF0000
WeaponImpactColor_3300 = BF55FF00
WeaponImpactColor_3400 = 804A0080
WeaponImpactColor_3500 = BFFFE700

WeaponImpactColor282 = BF55FF00
WeaponImpactColor283 = BF55FF00
WeaponImpactColor284 = 80C71585
WeaponImpactColor285 = 80C71585

EnergyBarColorLaserHigh = FF00FF00
EnergyBarColorLaserLow = FF009E00
EnergyBarColorIonHigh = FFDB1893
EnergyBarColorIonLow = FF961065

WeaponLightColor282 = 0
WeaponLightColor283 = 0
WeaponLightColor284 = C71585
WeaponLightColor285 = C71585
To open or close s-foils, use the V key. To deploy or retract landing gears, use the Ctrl+L key. You can't open the other when one is open.

I suppose the [Headers] can be in any order, I like to do them alphabetical

[SFoilsLandingGears] is a section header, you now need both if your craft has Landing Gear, if not just use the [SFoils] header
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

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

Post by Bman » Sat Jan 04, 2020 3:34 pm

Thanks DS. That's perfect. I came up with similar configuration after I posted. The problem I was having was that the landing gears were rotating constantly on AI wingmen craft. I discovered that changing the mesh type from rotorarycommandsystem to rotarywing mesh works. So mesh type does matter in most cases. I have files I need to send you too pretty soon. Thanks mate.

EDIT: The EngineSoundWash = 1 statement you posted above, only applies to starships. I don't think it works for fighter craft.
Last edited by Bman on Wed Mar 18, 2020 3:25 am, edited 3 times in total.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Sun Jan 05, 2020 3:00 pm

You can actually leave Landing Gear mesh type as 1-MainHull on the opt, as long as it is set in the txt/ini file it should rotate
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

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

Post by Vince T » Mon Jan 06, 2020 8:55 pm

Got a problem here. ...
WIth the latest release the NPC Sfoils no longer close in hyperspace. Could you take a look?
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

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

Post by JeremyaFr » Mon Jan 06, 2020 9:30 pm

Hello,

I've checked the s-foils hook.
It seems that all is fine.

By default, the s-foils don't close when entering into hyperspace.
This feature has to be set on a per-craft basis by setting "CloseSFoilsInHyperspace = 1" in the [SFoils] section.

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

Post by Vince T » Mon Jan 06, 2020 9:33 pm

This is weird. I didn't change anything in the ini file and it did work before :kopfwand:
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

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

Post by JeremyaFr » Mon Jan 06, 2020 9:48 pm

In the WIP version of the hook, the default value for CloseSFoilsInHyperspace was 1. I have then modified it to 0 as a DTM request.
DTM wrote:
Tue Sep 10, 2019 5:55 pm
May I suggest to set the default value as "0" (if it's possible)?
Most of the crafts does not have s-foil, but have landing gears. This new feature should be restricted to X-Wing, B-Wing, U-Wing, VSD and few others...
Thanks!!!!
So without editing the ini files, in the WIP version the S-Foils automatically close by default, but in the stable release, since the default value is inverted, this feature has to be explicitly enabled for a specific craft.

Maybe I can add a global default value in a config file for the hook?

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

Post by Vince T » Mon Jan 06, 2020 10:50 pm

Hm, I had set it to 1 already ... I wonder if the rotary gun turrets might be interferring here?
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

User avatar
Rookie_One1
Rebel Alliance
Posts: 1656
Joined: Thu Feb 26, 2004 12:01 am

Post by Rookie_One1 » Sun Jan 19, 2020 3:38 pm

bug report time : the s-foil sound play at hyperspace when you have landing gears meshed activated in the in ini file (tested with the Y-Wing)
Rookie One, is that you?? - Ru Merleen, Rebel Spy at Imdaar Alpha
Current Holder of the Frying Pan of Death

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

Post by JeremyaFr » Sun Jan 19, 2020 5:13 pm

Thanks for the bug report.
Good catch.

I've fixed it.
Please redownload the hook.

User avatar
Rookie_One1
Rebel Alliance
Posts: 1656
Joined: Thu Feb 26, 2004 12:01 am

Post by Rookie_One1 » Sun Jan 19, 2020 8:57 pm

Thanks Jeremy! That was quick!
Rookie One, is that you?? - Ru Merleen, Rebel Spy at Imdaar Alpha
Current Holder of the Frying Pan of Death

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

Post by JeremyaFr » Mon Mar 16, 2020 3:04 pm

UPDATE
Hello,
i've updated the sfoils hook.

I've fixed a bug introduced in the last fix.

The bug was that the S-Foils don't automatically open at mission start. I've fixed it.

St@rkiller
Cadet 3rd Class
Posts: 39
Joined: Sun Mar 15, 2020 3:56 pm

Post by St@rkiller » Mon Mar 16, 2020 8:04 pm

JeremyaFr wrote:
Mon Mar 16, 2020 3:04 pm
UPDATE
Hello,
i've updated the sfoils hook.

I've fixed a bug introduced in the last fix.

The bug was that the S-Foils don't automatically open at mission start. I've fixed it.


Thanks a lot! This fixes my issue with the A-Wing (doesn't wants to fire because the "S-Foils are closed")

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

Post by JeremyaFr » Sun Apr 05, 2020 1:46 pm

UPDATE

Hello,
I've updated the sfoils hook.

You can now set the initial state of the s-foils and landing gears.

Suppose that the mission is "[MissionDir]\[Mission].tie".

To override the mission data, create a file named "[MissionDir]\[Mission].txt" or create a section named "[mission_tie]" in "[MissionDir]\[Mission].ini".
The format is a line per replacement.

To replace the flight group s-foils state, the format is: "fg", fg number, "close_SFoils", 1.
To replace the flight group landing gears state, the format is: "fg", fg number, "open_LandingGears", 1.

Post Reply