Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Shivan Hunter on January 29, 2024, 05:17:19 am
-
This one I'm pretty sure is an actual bug.
Using this test-str.tbm:
$BitmapX: Sunny01
#End
$Sun: ASun01
$SunGlow: ASun01Glow
$SunRGBI: 1.0 0.92 0.82 1.0
$Flare:
+FlareCount: 6
$FlareTexture1: TestSunFlare1
$FlareTexture2: TestSunFlare2
$FlareTexture3: TestSunFlare3
$FlareTexture4: TestSunFlare4
$FlareTexture5: TestSunFlare5
$FlareTexture6: TestSunFlare6
$FlareGlow1:
+FlareTexture: 1
+FlarePos: 0.2
+FlareScale: 1
$FlareGlow2:
+FlareTexture: 2
+FlarePos: 0.3
+FlareScale: 1
$FlareGlow3:
+FlareTexture: 3
+FlarePos: 0.4
+FlareScale: 1
$FlareGlow4:
+FlareTexture: 4
+FlarePos: 0.5
+FlareScale: 1
$FlareGlow5:
+FlareTexture: 5
+FlarePos: 0.6
+FlareScale: 1
$FlareGlow6:
+FlareTexture: 6
+FlarePos: 0.7
+FlareScale: 1
#End
It's my understanding that glow 4, at position 0.5, should appear in the middle of the screen. 5 and 6 should point away from the star, 1 2 3 should be closer to the star. And flare 1 should be visible.
What I get is this: https://i.imgur.com/DLlfVVU.png
Flare 5 in the middle, flare 1 not shown at all. Each lens flare seems to be using the properties (position and scale - the same does happen with scale, I found when I was banging my head against this) of the defined flare that precedes it. (Or each one is using the texture that follows it, and flare 6 isn't shown). Either way, blaaargh.
Smol test mod: https://mega.nz/file/kEVhTSzS#v65Xp8r_pGkue0UNWpHqqskDGNMW2Pip1Xpq9Yaxyk0
[EDIT] Gods bloody damn it. The indices you give to +FlareTexture: are ZERO-INDEXED. Both the table and the wiki are misleading on this (+FlareTexture: 0 refers to the texture defined in $FlareTexture1:) and the MVPs do it wrong.
:hopping: :hopping: :hopping: :hopping: :hopping: :hopping: :hopping:
-
Ah. Could you cross-post this to the FSU forum, and make the clarification on the wiki?
-
I tried, but I forgot my wiki login ages ago (I'm pretty sure I used to have one, or maybe I made some edits without an account at some point. I don't see a "Shivan Hunter" member on the wiki so maybe not).
Posted the FSU poast! :)
-
:yes:
I'll PM you about the wiki account.
-
Thanks :D Minor point of clarification: Does the value of +FlareCount: actually do anything? Game crashes if I leave it out, but lens flare effects from 1 to 10 are rendered even if +FlareCount: is 1 (Defining #11 crashes, counting backwards crashes, skipping ahead seems to get ignored).
https://wiki.hard-light.net/index.php/Stars.tbl#Stars
-
Hmm. Maybe it used to, but not any more. Now the parser just automatically counts the correct number, regardless of the value of +FlareCount:.