Results 1 to 6 of 6

Thread: Square Particles on Battle Map

  1. #1
    Callistonian's Avatar Ducenarius
    Join Date
    May 2018
    Location
    somewhere in the continental US
    Posts
    944

    Default Square Particles on Battle Map

    The Curse of the Square Particles has afflicted my mod once again. This time, the smoke effects on Barad-dur have turned into squares.

    Spoiler Alert, click show to read: 




    The cause of this bug remains elusive. I recently fixed the trebuchet/catapult and ballista smoke trail effects (which had failed randomly again for probably the third time) by replacing whatever .tga they had in descr_arrow_trail_effects with Oil_particle_2.tga as per Gigantus' tutorial. Eventually, all my particles will be Oil_particle_2 at this rate. I can only guess that these projectile effects somehow broke the smoke effects on the Barad-dur battle map as I haven't touched any of the other effects files or the models_effects folder.

    Does anyone know how to edit particle effects on battle maps? I checked IWTE but don't see anything obvious. I suppose I will need to throw Oil_particle_2 at the problem again but I don't know where the particle textures for battle maps are specified.

    Beyond that, does anyone know definitively what causes the curse of the square particle effects? Why changing the .tga used for an effect in descr_arrow_trail_effects might cause effects on random battle maps to fail? I would like to know once and for all how to avoid this bug because this game of whack-a-mole with Oil_particle_2 is getting a bit old.

  2. #2
    Callistonian's Avatar Ducenarius
    Join Date
    May 2018
    Location
    somewhere in the continental US
    Posts
    944

    Default Re: Square Particles on Battle Map

    I'm bumping this thread because the Curse has recently afflicted yet another set of particles in my mod. This time it has beset the torch fire particles which are used for soldiers holding torches in night battles, settlements with streetlamps, and, apparently, burning bodies (struck by flaming projectiles). The file which controls these effects, descr_torch_fire.txt, is not included in my mod and hence has never been touched. That is to say, the vanilla file is being used.

    I've already found this thread, which does not have a solution, and this thread which does have a solution for CA's cursed square particles that shipped with the vanilla game. Unfortunately, changing various broken particle effects to use Oil_particle_2.tga is the only particle-related change I've made in the entire history of my mod and so I feel it must be perpetuating this game of whack-a-mole.

    I would really, really like to know what's causing these seemingly random particle failures. If you have any information at all, please let me know.

  3. #3
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Square Particles on Battle Map

    I am having a theory - following up on my 'square projectile' tutorial I opened the relevant files to have a look what might be the reason of the 'blockiness'. Underneath a pic of those three graphics mentioned. the first two are the culprits, the third one is the replacement. If you look closer you will see that the first two have alpha applied to the actual texture whereas the third one is solid.



    cloud_sprite3 and cloud_sprite4 used for the soldier torch (effect soldier_torch_smoke and soldier_torch_fiery_smoke) appear to have the same odd alpha whereas #flame_wheel (soldier_torch_fire) appears to be fine

    Last edited by Gigantus; August 11, 2020 at 11:38 PM.










  4. #4
    Callistonian's Avatar Ducenarius
    Join Date
    May 2018
    Location
    somewhere in the continental US
    Posts
    944

    Default Re: Square Particles on Battle Map

    Since posting this thread, I've figured out how to change the particle effect types in almost all of the effects text files (as well as which effects are used by battle maps). What will happen is I'll find some square effect, I'll go into the file that controls it and change it to use some other effect that I know works. Then I'll notice (usually several months later) that some other effect which was working before is now squared. I still don't know how changing which .tga file is used in one of the effects files somehow changes the .tga for some other effect type controlled in some other file.

    The torch .tga file does work correctly. You can see this in vanilla M2 and any other mod. What was happening my mod is that it was using a completely different effect type for the torch fire (used by soldiers and streetlamps) as well as the burning bodies. This seems to be the problem in general - the effect types are being swapped around. I'm fairly confident that the .tga files aren't the problem, or at least, they aren't the only problem.

    What I did to fix the torches (controlled in descr_torch_fire.txt) was delete some effect types in descr_campfires_brasiers.txt which had been added in the parent mod. This had two effects: 1) the torches and burning bodies now reverted to using their correct effect types, and 2) the catapult projectile fire and smoke were now using the wrong effect types. A new mole had popped up! To fix this, I looked in descr_arrow_trail_effects which controls the flaming catapult projectile effects. I noticed that our effect type was near the top of the file whereas it's near the middle in the vanilla file. So I moved the effect type to where it shows up in vanilla and voila, fixed it!

    So, we know definitively that the order of effect types in the effects text files does impact which effects are used in-game. I have yet to figure out exactly how the order needs to be set up. We still don't know if there's a hard coded limit on the number of effect types, deleting those types in descr_campfires_brasiers may have simply changed the order so as to fix the problem with the torches.

  5. #5
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Square Particles on Battle Map

    Then I guess you are back to what was noted in the other thread: the apparent hard coded number of effects, either the graphic file count or the effects in general. Something to that effect (pun intended )










  6. #6
    Callistonian's Avatar Ducenarius
    Join Date
    May 2018
    Location
    somewhere in the continental US
    Posts
    944

    Default Re: Square Particles on Battle Map

    Bumping this thread because, like clockwork, I've found another instance of this bug after another six month interval and there still hasn't been any progress towards finding a definitive solution.

    My assumption that there is some sort of hard coded order to the effects types seems to be incorrect. If it were true that the game was comparing text entries against a hard coded list, we would expect the effects to be messed up in game when we move the effect types around in the text files, but we don't see this. I tried removing entire effect sets before and after my test set, but the test set was unaffected - still used the correct effects for everything. It is certain that any effects called in an effect_set must be defined before the effect_set or they will not be used, but they don't start using the wrong textures and etc. so that's clearly not the cause of the bug. In fact, I have not been able to intentionally induce the bug.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •