On today's episode, the story of a grenade. First i'll start with the good news, the effects for the rifle are 100% complete, i'm not showing them today but they're done, and, the effects for the grenade are let's say 95% done. With that said, today i'm trying something different, instead of just telling you of the wacky problems i have when modding i figured i could show you a glimpse of them, so, basically this grenade is giving me a headache.
As you can see in the video there are two clips here, one inside the Xcom2 Editor, and one in-game, in the editor view you can see how the grenade's explosion is supposed to look, a purple energy magical whatever prism rotates out of the grenade, stops in place as black flame builds inside it, then it bursts and the black fire leaks out spilling everywhere almost like a liquid. Pretty fancy, maybe even too fancy.
In-game however we have quite a strange phenomenon, the initial stages of the explosion appear sideways, and the later stages where the fire spills out appears properly. Suffice to say, this makes no sense, you see, there is an option on the grenade's projectile that says something along the lines of "align death effect with surface" or something like that, so at first i thought that was the issue, that the game was trying to align the explosion with the surface, but for whatever reason it wasn't doing it right and thus it acts as if the surface is sideways, this doesn't explain why part of the effect works properly and other parts don't but that was my first guess.
Well, unsurprisingly checking or unchecking that box doesn't change anything. Then i thought i could trick the game by changing when the effect plays, see the fire that spills out at the end is made out of multiple emitters within the particle effect, and those emitters in particular activate on a delay, they go off 1.8 seconds after the start of the effect, so i thought maybe i can just apply a longer delay on the rest of the explosion and make it look neat later, well that didn't work either.
After those failed attempts i have been tinkering with numerous other solutions, at one point i figured that maybe it was the ability itself, at the start i was just using the standard "throw grenade" ability, and it was giving me some weird red screens, usually red screens just say meaningless stuff but i figured maybe there was some "baggage" with the way the grenade ability works that it was causing the issues, so i replaced the ability entirely and again that didn't change anything.
Now, i still have a couple of other things i can try, number 1 is that maybe if the problem is how the effect is being played, maybe i can use perk content packages to make sure the effect always plays in the way i want it to play, the problem is that perk content packages can cause problems, are a pain to set up, and i don't know if it would be worth the effort, in general i try to not use perk content packages unless i'm left with no other choice. Another possible solution is just to outright make the effect play "wrong" in the editor, make it explode sideways, so in-game it actually explodes upwards properly, but this is a very dumb solution that i'd like to avoid if possible, and some other random ideas that are crossing my mind at the moment.
I also had yet another strange issue today, when working on this i have to exit and enter the editor multiple times, and twice it gave me some error about steam networking or something, but when i got back in, i noticed a couple of strange issues, for starters the materials i was using for the grenade's particle effect were broken, and i had to go into them and fix them. The colors within the cascade editor(what you use to make particle effects) had changed, the grid turned from blue to green, and the color of the emitters in the UI changed from grey to greenish, my guess is that it was caused by the Steam cloud which i guess i should disable now for the editor.
In any case even after trying to change the colors back to what they were the editor keeps changing them, and to make matters even more strange, it changes them to different colors every time, so maybe my SDK is haunted now, at this point i decided to live with the urine green UI elements.
And just in-case something was breaking i did back up the mod, so worst case scenario all the work up to the grenade is saved.
Anyway, that's the story for the day just wanted to let you know and post a progress report because i'm pretty happy with how the particle effect for the grenade turned out, took a long time to make and i really don't want to throw it away or replace it with a more generic explosion, so i want to try and make it work and that might end up taking more time.
So with that said, i hope that you too like how the grenade is turning out, and i'll be seeing you again hopefully soon with better news, stay tuned for more my dudes.