Page 8 of 11

Re: Editing S-Foils

Posted: Mon Sep 23, 2019 7:25 pm
by JeremyaFr
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.

Re: Editing S-Foils

Posted: Mon Sep 23, 2019 7:31 pm
by JeremyaFr
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.

Re: Editing S-Foils

Posted: Tue Sep 24, 2019 12:16 pm
by JeremyaFr
WIP

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

Re: Editing S-Foils

Posted: Tue Sep 24, 2019 8:31 pm
by JeremyaFr
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.

Re: Editing S-Foils

Posted: Tue Sep 24, 2019 8:50 pm
by Rebelyell
Sweet! Great work!

Re: Editing S-Foils

Posted: Tue Sep 24, 2019 8:52 pm
by Darksaber
Works ok thanks :)

Re: Editing S-Foils

Posted: Wed Sep 25, 2019 5:20 am
by Vince T
Tested it on the VSD and it works great! Thanks Jeremy!

Re: Editing S-Foils

Posted: Fri Sep 27, 2019 7:11 pm
by JeremyaFr
UPDATE

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

Re: Editing S-Foils

Posted: Fri Sep 27, 2019 7:24 pm
by Darksaber
Brilliant :)

Re: Editing S-Foils

Posted: Mon Nov 04, 2019 6:29 pm
by MamiyaOtaru
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

Re: Editing S-Foils

Posted: Sat Jan 04, 2020 2:27 am
by Bman
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!

Re: Editing S-Foils

Posted: Sat Jan 04, 2020 8:32 am
by Darksaber
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

Re: Editing S-Foils

Posted: Sat Jan 04, 2020 3:34 pm
by Bman
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.

Re: Editing S-Foils

Posted: Sun Jan 05, 2020 3:00 pm
by Darksaber
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

Re: Editing S-Foils

Posted: Mon Jan 06, 2020 8:55 pm
by Vince T
Got a problem here. ...
WIth the latest release the NPC Sfoils no longer close in hyperspace. Could you take a look?

Re: Editing S-Foils

Posted: Mon Jan 06, 2020 9:30 pm
by JeremyaFr
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.

Re: Editing S-Foils

Posted: Mon Jan 06, 2020 9:33 pm
by Vince T
This is weird. I didn't change anything in the ini file and it did work before :kopfwand:

Re: Editing S-Foils

Posted: Mon Jan 06, 2020 9:48 pm
by JeremyaFr
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?

Re: Editing S-Foils

Posted: Mon Jan 06, 2020 10:50 pm
by Vince T
Hm, I had set it to 1 already ... I wonder if the rotary gun turrets might be interferring here?

Re: Editing S-Foils

Posted: Sun Jan 19, 2020 3:38 pm
by Rookie_One1
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)

Re: Editing S-Foils

Posted: Sun Jan 19, 2020 5:13 pm
by JeremyaFr
Thanks for the bug report.
Good catch.

I've fixed it.
Please redownload the hook.

Re: Editing S-Foils

Posted: Sun Jan 19, 2020 8:57 pm
by Rookie_One1
Thanks Jeremy! That was quick!

Re: Editing S-Foils

Posted: Mon Mar 16, 2020 3:04 pm
by JeremyaFr
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.

Re: Editing S-Foils

Posted: Mon Mar 16, 2020 8:04 pm
by St@rkiller
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")

Re: Editing S-Foils

Posted: Sun Apr 05, 2020 1:46 pm
by JeremyaFr
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.