hyiltiz Posted October 15, 2017 Share Posted October 15, 2017 How to implement a `widget` or `screen` that visualizes sanity aura with a color transparency? For example, for a given map location, calculate the sanity aura of that location by looking around within some radius objects that has sanity aura, and calculate the aura at that spot, and convert that into transparency ratio (alpha number), than overlay a color (say purple) on that spot? Should be possible to do in DS and DST without host and client only. Seems like an interesting idea. Link to comment https://forums.kleientertainment.com/forums/topic/83024-sanity-aura-overlay-visualization/ Share on other sites More sharing options...
w00tyd00d Posted October 15, 2017 Share Posted October 15, 2017 Hmm, it's an interesting idea. I'm unfortunately inept when it comes to adding anything visually to the game, but on a code level I would think it'd just be easier to identify what level of sanity aura they have and then tie the "aura ring" size to that. There is no physical aura to base it off of since the game only calculates how close you are to a particular object in order to determine your sanity gain/drain, but if you know what type/how potent their sanity aura is you can just assign them a "ring" based on that. There's 10 different aura levels, 5 for sanity and 5 for insanity, so you'd just have to make 5 different sized circles and then color code them as you wish. Maybe someone with better knowledge of adding assets to the game will be of more help as far as how to execute that tho :\ Link to comment https://forums.kleientertainment.com/forums/topic/83024-sanity-aura-overlay-visualization/#findComment-964016 Share on other sites More sharing options...
hyiltiz Posted October 15, 2017 Author Share Posted October 15, 2017 No definitely not by rings. I also want to be able to see the stacked aura. Aura of a single monster/objects are quite easy to remember and keep track of without a feature like that. Link to comment https://forums.kleientertainment.com/forums/topic/83024-sanity-aura-overlay-visualization/#findComment-964051 Share on other sites More sharing options...
w00tyd00d Posted October 16, 2017 Share Posted October 16, 2017 Well I was only saying rings as an example, but the point I was trying to make is that there is no "stacked aura" to see. There is no physical thing in the game world you can change its opacity to in order to see what sanity aura something has. All the game does is detect whether or not you're within a certain radius of a particular object, if you are, do a fraction of the aura depending on how close you really are. As far as actually being able to see the aura, you're going to have to implement your own visual aid. The reason I suggested doing it based on their potency of aura is because you know there's only 5 levels you need to track, each having their own static range and levels. If you can determine the distance needed for all 5 of those levels, you have yourself a measurement for your visual aid. Link to comment https://forums.kleientertainment.com/forums/topic/83024-sanity-aura-overlay-visualization/#findComment-964193 Share on other sites More sharing options...
hyiltiz Posted October 30, 2017 Author Share Posted October 30, 2017 Oh, another widget. Link to comment https://forums.kleientertainment.com/forums/topic/83024-sanity-aura-overlay-visualization/#findComment-968511 Share on other sites More sharing options...
CarlZalph Posted October 31, 2017 Share Posted October 31, 2017 On 10/16/2017 at 9:26 AM, w00tyd00d said: Well I was only saying rings as an example, but the point I was trying to make is that there is no "stacked aura" to see. There is no physical thing in the game world you can change its opacity to in order to see what sanity aura something has. All the game does is detect whether or not you're within a certain radius of a particular object, if you are, do a fraction of the aura depending on how close you really are. As far as actually being able to see the aura, you're going to have to implement your own visual aid. The reason I suggested doing it based on their potency of aura is because you know there's only 5 levels you need to track, each having their own static range and levels. If you can determine the distance needed for all 5 of those levels, you have yourself a measurement for your visual aid. The sanity's ratescale is just for use on the sanity icon itself. Otherwise it's a function based on the distance from the player to the source given via: (someentity).components.sanityaura:GetAura((theplayer)) / math.max(1, (theplayer):GetDistanceSqToInst((someentity))) Or in simpler terms: (negative sanity rate per second) / (distance between the player and entity squared or 1.0- whichever is higher) This leads to a gradient of sanity loss of up to 10 in-game units before it actually stops, but more strongly near the object than not, with a plateau at or less than 1 unit away. As for the OP to do this with a mod, the mod will need to know the actual aura values from each which as far as I know aren't networked to the client, just the delta sanity ticks. So you'd need to create a client table of all the values for every prefab or have the server network them, then create some gradient image on each entity that has it projected to the ground based on the intensity of each- it's not linearly as powerful so in the image make it exponentially darker the further it goes out and then you can linearly increase the intensity of the image. For making your own infographics on the sanity ranges and such, you may just write a simple script on the server to iterate over points that you want in a grid fashion, polling for all entities within 10 units and check if they have the sanity aura component and get its sum value, and then printing out the value. Then using these points plot it out using some spreadsheet program or 3D plotter to get some representation of it. Link to comment https://forums.kleientertainment.com/forums/topic/83024-sanity-aura-overlay-visualization/#findComment-969023 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now