Implementing "Detect Life" Spell Effect
Posted: Thu Aug 11, 2022 5:26 am
I'm currently working on a new mod that aims to add dozens of new spell effects to Daggerfall, as well as probably update/improve some of the vanilla effects as well while I'm at it.
So probably a bit stupidly, I've decided to make the first effect I work on potentially be moderately difficult. That being I want to essentially overhaul the entire current list of vanilla "Detect" spell effects and variants, as well as add some more where appropriate to that list.
Here is the current (basically empty) Github Repo for anyone interested: https://github.com/magicono43/DFU-Mod_G ... -of-Spells
However, the difference here being instead of adding a mostly useless and uninteresting marker to the compass, the spell will instead (if all works out at least) work similar to how the "Detect Life" effect does in ES: Oblivion. That being in real-time while the effect is active you actually see a wall ignoring effect centered on the detected object that shows some distinct visual effect around the object, that hopefully also gives some shape to it to give a better idea what the object is even through walls.
Here are some examples from modded Oblivion for those that don't know what I'm referring to:
So yeah, it's probably not the most mind-blowing or complex effect. But in terms of implementing into Unity there are a few road-blocks of "challenge" for me currently. First one being what method would make the most sense for this sort of thing, initially I was thinking something Unity calls a "Particle System" which is a surprisingly robust feature that the Unity Editor has built in basically that allows for some pretty complex behaviors to be done in terms of emitting particles.
But after playing around with it for a few hours (had a surprising amount of fun just screwing around with it.) I found that for many of the sprites, especially the mobile ones that I had no clue how I would get these particles to make any sort of outline, or even stay within a defined border inside the current state of the sprite basically.
So I started reading more stuff about "Shaders" which are a pretty universal, vague, and confusing (to me at least) thing that I have not screwed around with yet, that apparently are used for alot of things, including making outlines around sprites or something, but I have not played around with this idea enough yet to say or not if it's the most logical approach to take.
Now besides all of that with how to make the effect look some way. The other issue I'm not sure about also is how to actually tell the game/effect that the player should be able to see these particular "effects" through collidable objects/walls. This one I'm sure I can find a tutorial online about it, but I figure I may as well bring it up here as well.
But yeah, just wanted to post this to see if anyone has experience with this sort of thing, I'm still very new to actually using the Unity Editor and it's various tools, I've basically exclusively been a script monkey when it comes to my DFU modding "career" so far, lol. It's clearly a very powerful thing, but also equally as confusing when dove into head-first (maybe not as bad as Blender at least.) So thanks for any help that somebody may or may not be able to provide, it will be much appreciated if it comes!
So probably a bit stupidly, I've decided to make the first effect I work on potentially be moderately difficult. That being I want to essentially overhaul the entire current list of vanilla "Detect" spell effects and variants, as well as add some more where appropriate to that list.
Here is the current (basically empty) Github Repo for anyone interested: https://github.com/magicono43/DFU-Mod_G ... -of-Spells
However, the difference here being instead of adding a mostly useless and uninteresting marker to the compass, the spell will instead (if all works out at least) work similar to how the "Detect Life" effect does in ES: Oblivion. That being in real-time while the effect is active you actually see a wall ignoring effect centered on the detected object that shows some distinct visual effect around the object, that hopefully also gives some shape to it to give a better idea what the object is even through walls.
Here are some examples from modded Oblivion for those that don't know what I'm referring to:
So yeah, it's probably not the most mind-blowing or complex effect. But in terms of implementing into Unity there are a few road-blocks of "challenge" for me currently. First one being what method would make the most sense for this sort of thing, initially I was thinking something Unity calls a "Particle System" which is a surprisingly robust feature that the Unity Editor has built in basically that allows for some pretty complex behaviors to be done in terms of emitting particles.
But after playing around with it for a few hours (had a surprising amount of fun just screwing around with it.) I found that for many of the sprites, especially the mobile ones that I had no clue how I would get these particles to make any sort of outline, or even stay within a defined border inside the current state of the sprite basically.
So I started reading more stuff about "Shaders" which are a pretty universal, vague, and confusing (to me at least) thing that I have not screwed around with yet, that apparently are used for alot of things, including making outlines around sprites or something, but I have not played around with this idea enough yet to say or not if it's the most logical approach to take.
Now besides all of that with how to make the effect look some way. The other issue I'm not sure about also is how to actually tell the game/effect that the player should be able to see these particular "effects" through collidable objects/walls. This one I'm sure I can find a tutorial online about it, but I figure I may as well bring it up here as well.
But yeah, just wanted to post this to see if anyone has experience with this sort of thing, I'm still very new to actually using the Unity Editor and it's various tools, I've basically exclusively been a script monkey when it comes to my DFU modding "career" so far, lol. It's clearly a very powerful thing, but also equally as confusing when dove into head-first (maybe not as bad as Blender at least.) So thanks for any help that somebody may or may not be able to provide, it will be much appreciated if it comes!