[MOD/WIP] FireFX Mod (XR Battlestar-like hull fires)

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

Angsaar
Posts: 151
Joined: Thu, 7. Mar 19, 14:03
x4

[MOD/WIP] FireFX Mod (XR Battlestar-like hull fires)

Post by Angsaar »

Hi all!

edit: v0.2 Alpha out now: https://www.nexusmods.com/x4foundations/mods/307


WARNING!! MIGHT DEGRADE BATTLE PERFORMANCE!!!

This mod restores and slightly tweaks X Rebirth's fire and smoke effects attached to surface elements such as Engines, Shields, and Turrets


This mod was inspired by snackynak's XRrebirth - Texture and effects expansion for X Rebirth Ships!
https://www.nexusmods.com/x4foundations/mods/251

Kudos to Shuul for much of the coding under the hood!
https://www.nexusmods.com/x4foundations/mods/305



Both highly recommended, along with:

sco1981's a ship mod 7.1 - https://www.nexusmods.com/x4foundations/mods/156
Thanks to sco1981 for tips on X4's inner workings


Mysterial's Faction War/Economy Enhancer v3.1 - viewtopic.php?f=181&t=413122#p4836091

and/or

BlackRain's Foundation of Conquest and War V. 3.1Alpha - viewtopic.php?f=181&t=403357#p4761574


Should be treated as Alpha until X4's heavy patching is finished.

Effect quality still a WIP, will vary with future releases. Current state of the effects is something like:

https://i.imgur.com/KZ8K74N.jpg



BSG & XR glory

https://cdn-static.denofgeek.com/sites/ ... k=1Ga7YC7h

https://staticdelivery.nexusmods.com/mo ... 260197.jpg



{Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked - Terre}
Last edited by Angsaar on Wed, 27. Mar 19, 18:00, edited 7 times in total.
sco1981
Posts: 282
Joined: Fri, 14. Sep 18, 14:47
x4

Re: [INFO/HELP] Surface Element Fire FX (Battlestar-like hull flames)

Post by sco1981 »

Angsaar wrote: Wed, 13. Mar 19, 21:32 Hi all!

Does anyone know if the XR persistent flame effects are part of the 'sefx_' effect group or something else (like 'dmgfx_' or 'explosion_' groups)? Damage effects seem to be a common factor on old Storage Modules, Surface Elements and Weapon Systems macros (but aren't used in most of the new), and 'sefx_damage_(s/m/l)_high_fire01' effects assets seem to be among legacy effects not packed into from X4, but I'm not sure these are the right ones (got no software to visualize the assets).

Thanks!

ps: how a turret macro effect section looks in XR:

<effects>
<explosion ref="explosion_turret_l" />
<sefx_damage_low ref="sefx_damage_l_low" />
<sefx_damage_medium ref="sefx_damage_l_medium" />
<sefx_damage_high ref="sefx_damage_l_high" />
<sefx_shield ref="sefx_shield_l_01" />
</effects>


edit: BSG & XR glory

https://cdn-static.denofgeek.com/sites/ ... k=1Ga7YC7h

https://staticdelivery.nexusmods.com/mo ... 260197.jpg
I will include some damage effects in my next mod for my XL turret and XL weapon. But the fire effect looks half cut and a bit ugly. On the other hand, it looks decent combined with the black and white smoke.
But i couldn't get the Shield FX effect to run.
And yes, you will find the effects in the sefx effects group.

https://staticdelivery.nexusmods.com/mo ... 33785.jpeg
https://staticdelivery.nexusmods.com/mo ... 41728.jpeg


{Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked - Terre}
Angsaar
Posts: 151
Joined: Thu, 7. Mar 19, 14:03
x4

Re: [INFO/HELP] Surface Element Fire FX (Battlestar-like hull flames)

Post by Angsaar »

sco1981 wrote: Thu, 14. Mar 19, 19:45
I will include some damage effects in my next mod for my XL turret and XL weapon. But the fire effect looks half cut and a bit ugly. On the other hand, it looks decent combined with the black and white smoke.
But i couldn't get the Shield FX effect to run.
And yes, you will find the effects in the sefx effects group.
Excellent, thank you for clarifying that!! Your mods are majestic, thank you for those also, I'm looking forward to your next releases!

I'm thinking the animations might need some tweaking to account for any differences in lighting intensity and model dimensions between XR and X4, if you know what element corresponds to the flame animation my guess is it can be re-scaled in the effect .xml's <size> section for each 'anim_bridge_' (if I understood it's workings)
Angsaar
Posts: 151
Joined: Thu, 7. Mar 19, 14:03
x4

Re: [INFO/HELP] Surface Element Fire FX (Battlestar-like hull flames)

Post by Angsaar »

Wooo, it works!! Thank you!

Does need a few tweaks, possibly XL's might need a new entry with reworked dimensions/offsets.

https://i.imgur.com/XE3RZPC.jpg



{Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked - Terre}
sco1981
Posts: 282
Joined: Fri, 14. Sep 18, 14:47
x4

Re: [INFO/HELP] Surface Element Fire FX (Battlestar-like hull flames)

Post by sco1981 »

Do you plan to create a mod and add the effects to all X4 turrets?
This would be awesome! I liked the XR damage effects a lot. :)
If you get the sefx_shield animation to run, this would great too! :D
Angsaar
Posts: 151
Joined: Thu, 7. Mar 19, 14:03
x4

Re: [INFO/HELP] Surface Element Fire FX (Battlestar-like hull flames)

Post by Angsaar »

sco1981 wrote: Fri, 15. Mar 19, 19:20 Do you plan to create a mod and add the effects to all X4 turrets?
This would be awesome! I liked the XR damage effects a lot. :)
If you get the sefx_shield animation to run, this would great too! :D
That's kind of the idea, unless anyone better skilled beats me to it :P

I've done the L and XL shields for now, but some things are still off: the effect starts much lower than the module itself so ships with gaps below the module like the Miner Crane (I think it was) have smoke coming out of empty space :?

I've also played around with the Teladi L engines, but while the XR engine explosion looks great the smoke rises at a 90° angle that looks truly like alien physics at work.

edit: X4's Defaults.xml has a '<shieldedsurface ref="shield_surface_impact" />' in an entry's <effects> section, let's try messing around with something like it! heheh
sco1981
Posts: 282
Joined: Fri, 14. Sep 18, 14:47
x4

Re: [INFO/HELP] Surface Element Fire FX (Battlestar-like hull flames)

Post by sco1981 »

Angsaar wrote: Fri, 15. Mar 19, 20:38
That's kind of the idea, unless anyone better skilled beats me to it :P

I've done the L and XL shields for now, but some things are still off: the effect starts much lower than the module itself so ships with gaps below the module like the Miner Crane (I think it was) have smoke coming out of empty space :?

I've also played around with the Teladi L engines, but while the XR engine explosion looks great the smoke rises at a 90° angle that looks truly like alien physics at work.
Don't know anyone. :P

Did you have the shield effects for the weapons or for the shields done? I meant the effect, if you shoot on a weapon and it is shielded, then a "shield-effect" appears in XR.
Do you have a picture of the gap? Maybe smaller effects have other alignments.
If the animation has a component with XMF files, then you can rotate the smoke-part in the XML file.
Angsaar
Posts: 151
Joined: Thu, 7. Mar 19, 14:03
x4

Re: [INFO/HELP] Surface Element Fire FX (Battlestar-like hull flames)

Post by Angsaar »

sco1981 wrote: Fri, 15. Mar 19, 20:57 Did you have the shield effects for the weapons or for the shields done? I meant the effect, if you shoot on a weapon and it is shielded, then a "shield-effect" appears in XR.
Do you have a picture of the gap? Maybe smaller effects have other alignments.
If the animation has a component with XMF files, then you can rotate the smoke-part in the XML file.
The sefx_ shield effect unfortunately doesn't want to appear, I'll try digging into other places it's assets might need to be declared or something like that.

Most of the time I have no idea what I'm doing, so assume anything I'm talking about might be complete BS. But hey, there's smoke at least!! :mrgreen:

Shieldless Crane
https://i.imgur.com/vhrliJx.jpg

edit: Smoke starting from below the shield wreck:
https://i.imgur.com/woATMlU.jpg

edit: Tried a smaller fx, does fit a lot better!


{Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked - Terre}
sco1981
Posts: 282
Joined: Fri, 14. Sep 18, 14:47
x4

Re: [INFO/HELP] Surface Element Fire FX (Battlestar-like hull flames)

Post by sco1981 »

Looks good :thumb_up:
Did you change the colour of the smoke?
Angsaar
Posts: 151
Joined: Thu, 7. Mar 19, 14:03
x4

Re: [INFO/HELP] Surface Element Fire FX (Battlestar-like hull flames)

Post by Angsaar »

All has been left at vanilla values for now, at the moment I'm trying to find out why I'm only getting the smoke and not the red flames, I might have forgotten to add something to the libraries. Or could they be part of the old damaged models instead of the effects? :?
sco1981
Posts: 282
Joined: Fri, 14. Sep 18, 14:47
x4

Re: [INFO/HELP] Surface Element Fire FX (Battlestar-like hull flames)

Post by sco1981 »

Angsaar wrote: Sat, 16. Mar 19, 17:31 All has been left at vanilla values for now, at the moment I'm trying to find out why I'm only getting the smoke and not the red flames, I might have forgotten to add something to the libraries. Or could they be part of the old damaged models instead of the effects? :?
No, but the flames have macro and component files, did you copy these and similar files to your mod?
sefx_damage_l_high_fire01
sefx_damage_l_high_fire01_macro
sefx_damage_l_high_fire01_data
Angsaar
Posts: 151
Joined: Thu, 7. Mar 19, 14:03
x4

Re: [INFO/HELP] Surface Element Fire FX (Battlestar-like hull flames)

Post by Angsaar »

edit4: cleaning the unnecessary

edit3: Yep, silly me forgot to tell each the effect xml it should look at the mod folder :P It works, with stretched flames, but hey it has flames now!!

edit5: I need more coffee. :)
sco1981
Posts: 282
Joined: Fri, 14. Sep 18, 14:47
x4

Re: [INFO/HELP] Surface Element Fire FX (Battlestar-like hull flames)

Post by sco1981 »

Angsaar wrote: Sat, 16. Mar 19, 18:45 edit4: cleaning the unnecessary

edit3: Yep, silly me forgot to tell each the effect xml it should look at the mod folder :P It works, with stretched flames, but hey it has flames now!!

edit5: I need more coffee. :)
Edit9: very good! :) Next is the shield effect? :P
Angsaar
Posts: 151
Joined: Thu, 7. Mar 19, 14:03
x4

Re: [INFO/HELP] Surface Element Fire FX (Battlestar-like hull flames)

Post by Angsaar »

sco1981 wrote: Sat, 16. Mar 19, 19:33 Edit9: very good! :) Next is the shield effect? :P
I hope so! :D

I think there are a few issues with the fire textures, some have a number of pixels "missing" (transparency where I doubt there should be any), I'll see what happens if trade them with the ones from XR.

edit: Almost there on the fires, I reverted the shader handling fires back to the legacy shader, with legacy material and now looks pretty decent! Will check if the shield effect can be restored in a similar way.
Angsaar
Posts: 151
Joined: Thu, 7. Mar 19, 14:03
x4

Re: [INFO/HELP] Surface Element Fire FX (Battlestar-like hull flames)

Post by Angsaar »

https://i.imgur.com/KZ8K74N.jpg


{Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked - Terre}
sco1981
Posts: 282
Joined: Fri, 14. Sep 18, 14:47
x4

Re: [INFO/HELP] Surface Element Fire FX (Battlestar-like hull flames)

Post by sco1981 »

Looks awesome, how did you revert back to the legacy shader?
Angsaar
Posts: 151
Joined: Thu, 7. Mar 19, 14:03
x4

Re: [INFO/HELP] Surface Element Fire FX (Battlestar-like hull flames)

Post by Angsaar »

sco1981 wrote: Sun, 17. Mar 19, 00:12 Looks awesome, how did you revert back to the legacy shader?
I traced the texture used by the effect to an entry in 'libraries\material_library.xml', where I found out many of the settings and textures for various effects and materials are declared.

I switched pretty much everything in the Fire01 entry to what XR has, with some small tweaks to point to the legacy folder in X4 (the original textures are still there) but it still needs a little tweaking, the effect fades if you move too far. When you move back the effect starts from scratch.

Here's how it looks now:

<material name="fire01" shader="XU_effects_layered_unlit2.fx" blendmode="ADDITIVE" preview="none" priority="1">
<properties>
<!--property type="Float" name="angle_fade" value="100.0" /-->
<property type="BitMap" name="diffuse_map" value="assets\legacy\fx\textures\fire01"></property>
<property type="Float" name="diffuseStr" value="10.0"></property>
<property type="BitMap" name="diffuse2_map" value="assets\legacy\fx\textures\fire01"></property>
<property type="Float" name="diffuse2Str" value="10.0"></property>
<property type="BitMap" name="alpha_map" value="assets\legacy\fx\textures\firemask_a"></property>
<property type="Float" name="alphaStr" value="1.0"></property>
<property type="BitMap" name="alpha2_map" value="assets\legacy\fx\textures\firemask_b"></property>
<property type="Float" name="alpha2Str" value="1.0"></property>
<property type="Float" name="lightStr" value="1.0"></property>
<property type="Float" name="normalStr" value="1.0"></property>
<property type="Float" name="base_brightness_shift" value="1.0"></property>
<property type="Float" name="base_contrast_shift" value="1.0"></property>
<property type="Float" name="base_saturation_shift" value="1.0"></property>
<property type="Float" name="base_hue_shift" value="0.0"></property>
<property type="Float" name="angle_fade_speed" value="1.6"></property>
<property type="Float" name="angle_fade_offset" value="0.4"></property>
<property type="Float" name="camera_fade_range" value="1"></property>
<property type="Float" name="camera_fade_speed" value="3.0"></property>
</properties>
</material>

Original X4 fade ranges for the new shader, could be wonky with the old:

<property type="Float" name="camera_fade_range_near_start" value="0.1" />
<property type="Float" name="camera_fade_range_near_end" value="5.0" />
<property type="Float" name="camera_fade_range_far_start" value="10000.0" />
<property type="Float" name="camera_fade_range_far_end" value="20000.0" />
User avatar
Shuulo
Posts: 1633
Joined: Mon, 14. Apr 08, 17:03
x4

Re: [INFO/MOD] Surface Element Fire FX (Battlestar-like hull fires)

Post by Shuulo »

Do you plan to release it to public?
Angsaar
Posts: 151
Joined: Thu, 7. Mar 19, 14:03
x4

Re: [INFO/MOD] Surface Element Fire FX (Battlestar-like hull fires)

Post by Angsaar »

Shuulo wrote: Sun, 17. Mar 19, 20:06 Do you plan to release it to public?
I do, might take a few days tho, I'll be out of town for two days or so. And I'm rather slow on updating things
Misunderstood Wookie
Posts: 377
Joined: Mon, 15. Mar 04, 08:07
x4

Re: [INFO/MOD] Surface Element Fire FX (Battlestar-like hull fires)

Post by Misunderstood Wookie »

Here I was ready to jump on the wagon of "how do fires in space make sense" then I left my argument at the door when I saw how properly shaded fires in the above images looks sooo damn nice and a good visual guide to damage done to a ship without even looking at the ship stats.
*modified*
*X3 LiteCube User*
MOD GemFX Real Space Shaders
MOD Variety and Rebalance Overhaul Icon Pack
I lost my Hans and should not be flying Solo.
Image

Return to “X4: Foundations - Scripts and Modding”