ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Sat Dec 14, 2019 9:48 am

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Sat Jul 20, 2019 8:47 pm 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1724
Location: A shallow water area south of Bree
It's a long-standing complaint: a pack of wretching dropping Corrosive Vapor effects on your head all at once or a couple fire drakes breathing at you can leave your immediate vicinity piled under multiple layers of lingering effect displays, making it nearly impossible to see yourself or nearby NPCs.

Now, I figured that the handling for would be buried somewhere deep in the rendering code beyond the reach of my addon fu, but some source diving suggested that the Map:addEffect() method was a potential inroad. See, unless a talent specifies otherwise, any effect it leaves behind is displayed at the very highest "z-depth", on top of everything else. A few effects like Mucus manually specify a z-depth of 6 to put it under the player (never could find what z-depth actors are drawn on, but since map z-depth ranges from 0 to 19, I'm guessing 10). So I figured if I could sneak in ahead of the engine and insert a z-depth of, say, 7 for effects that don't specify their own, that should put all effects below actors.

The result is my new Effects Under Actors addon. I can't confirm that I've found every place a z-depth needs to be set for it not to default to the top layer, but I've tested it on wildfire archmages' Burning Wake and it appears to do what it's supposed to do, as depicted in the following screengrab I set up for the Steam page image:
Attachment:
blastwave-test.jpg
blastwave-test.jpg [ 172.45 KiB | Viewed 867 times ]

If there are effects that aren't getting caught, here is a good place to report it as a bug.

[Thinking ahead, this addon might or might not be suitable for inclusion in ZOmnibus or Zomnibus Lite, but it would probably need a game option to turn it on/off if we did.]

[Technical notes:]
Code:
Superload:
  mod.class.MapEffects:
    Map:addEffect() [to change the z-depth of effect particles]

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Last edited by Zizzo on Sun Jul 21, 2019 1:49 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sat Jul 20, 2019 9:04 pm 
Offline
Graphical God

Joined: Wed Jan 05, 2011 8:05 am
Posts: 415
Location: Snowscape
Great work as always, Zizzo (and I won't get tired of saying that)! :) Maybe a further useful addition to it will be an option to display just one layer of effects when there are multiple ones overlapping on a certain tile? Don't know how hard that would be, but the said wretchlings can wreck havoc on older systems when you meet a pack or three. :)

_________________
~ [ RexOrcorum, a.k.a "rexo": Official Visual Magus, Addon Beautifier, Achiever, Knight of the 561 Trees, Dark Interfacer ] ~
darkgod wrote:
~ [ DarkGod whips rexorcorum with Suslik (& many others as well) ] ~


Top
 Profile  
 
PostPosted: Sun Jul 21, 2019 2:05 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1724
Location: A shallow water area south of Bree
rexorcorum wrote:
Great work as always, Zizzo (and I won't get tired of saying that)! :)

*blush* [bows]

rexorcorum wrote:
Maybe a further useful addition to it will be an option to display just one layer of effects when there are multiple ones overlapping on a certain tile? Don't know how hard that would be, but the said wretchlings can wreck havoc on older systems when you meet a pack or three. :)

Definitely can't do that in this addon; it operates at the effect level rather than the tile level. [sound F/X: source diving] I think I'd have to completely overload Map:displayEffects() and have it keep track of which effects it had drawn in which tiles. Actually, when you say "multiple ones overlapping", do you mean multiple instances of the same effect (as per the aforementioned wretchings), or multiple different effects? My Oozemancer, for instance, frequently has Mucus on top of Nourishing Moss, and I don't think I'd want one to conceal the other. (In fact, now that I think of it, I'd have to make sure there's a way to recognize effects from the same talent cast by different actors as the "same" effect…)

At any rate, if it happens, it'll almost certainly be in a separate addon. Give me some time to investigate.

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
PostPosted: Sun Jul 21, 2019 7:06 am 
Offline
Graphical God

Joined: Wed Jan 05, 2011 8:05 am
Posts: 415
Location: Snowscape
Yeah, I mean multiple acid clouds from wretchling packs and such, that is - multiple instances of the same effect. I will be the last one to suggest removing the display of different effects, hehe (as usually I am the one putting them in in the first place).

_________________
~ [ RexOrcorum, a.k.a "rexo": Official Visual Magus, Addon Beautifier, Achiever, Knight of the 561 Trees, Dark Interfacer ] ~
darkgod wrote:
~ [ DarkGod whips rexorcorum with Suslik (& many others as well) ] ~


Top
 Profile  
 
PostPosted: Mon Jul 22, 2019 1:10 pm 
Offline
Sher'Tul Godslayer

Joined: Tue Jun 18, 2013 10:46 pm
Posts: 2402
Location: Ambush!
This is amazing and totally belongs in zOmnibus.

You're awesome, Zizzo.

_________________
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.


Top
 Profile  
 
PostPosted: Thu Jul 25, 2019 3:52 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1724
Location: A shallow water area south of Bree
Zizzo wrote:
[sound F/X: source diving] I think I'd have to completely overload Map:displayEffects() and have it keep track of which effects it had drawn in which tiles.

[sound F/X: source diving] Hmm, now that I look at it, the computationally expensive ones like Corrosive Vapour use particles, which aren't managed in :displayEffects(). Basically, :addEffect() drops an individual particle emitter on each affected grid, and then :processEffects() removes them when the effect expires or moves. Hence the slowdown with overlapping effects, since you have multiple particle emitters running on each overlapping grid.

What this means, I think, is that I might be able to get away with hijacking Map:particleEmitter() and Map:removeParticleEmitter() to do a sort of "reference counting" — have only one vapour particle on a given grid, but keep track of how many are "supposed" to be there, so that removing it the right number of times will make it actually go away. That would probably be doable via superloading, which means I wouldn't have to break it out into a separate addon after all. Will probably need game options to control all these behaviors, though…

So for now, give me a little time to put something together and test it.


Doctornull wrote:
This is amazing and totally belongs in zOmnibus.

*blush* [bows] Yeah, in my internal list of addons and how suitable they're likely to be for inclusion in ZOmnibus and/or ZOmnibus Lite (whenever the next merge sweep ends up happening), this one is currently in the "probably good, but would maybe need a game option to turn it off" category.

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
PostPosted: Mon Jul 29, 2019 12:20 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1724
Location: A shallow water area south of Bree
And after some testing (including a couple run-ins with wretchlings), I'm confident enough that everything is functioning properly to push out v2. The new functionality is controlled by the aptly-named new game option "UI | "Flatten" overlapping effects" (disabled by default, so be sure to turn it on if you're interested). While we're adding options, we also add an option "UI | Display effects under actors" to control the original addon function; with those options in place, I'm more comfortable about picking it up in the next ZOmnibus sweep.

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
PostPosted: Mon Jul 29, 2019 6:22 am 
Online
Perspiring Physicist

Joined: Sun Sep 09, 2012 7:43 am
Posts: 5966
Okay, you next impossible task is to have 1 in 10 particles display over the Actors. :wink:

(I'm actually serious. If you can find a way to make that work, it should look good and not obscure everything. However I suspect 'impossible' may be accurate...)

_________________
My feedback meter decays into coding. Give me feedback and I make mods.


Top
 Profile  
 
PostPosted: Wed Jul 31, 2019 3:36 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1724
Location: A shallow water area south of Bree
HousePet wrote:
Okay, you next impossible task is to have 1 in 10 particles display over the Actors. :wink:

(I'm actually serious. If you can find a way to make that work, it should look good and not obscure everything. However I suspect 'impossible' may be accurate...)

…? I'm not entirely sure how that would even work. It's not like I could put 10% of a particle emitter at a different z-depth, and if you've got ten particle emitters on the same grid, you've probably got bigger problems.

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
PostPosted: Thu Oct 24, 2019 11:50 pm 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1724
Location: A shallow water area south of Bree
v2a is basically a compatibility release for the merge into ZOmnibus/Lite v16. I don't think it should be possible to have both enabled at once anymore, but just in case, we don't add our game options twice. :wink:

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group