RetroWolf92 Posted May 24, 2021 I am using Ultimate Doom Builder and am curious if there is a plugin that automatically creates sector brightness falloff (that is, the brightness of the following sectors gets progressively darker). 0 Quote Share this post Link to post
RetroWolf92 Posted May 25, 2021 Weird, it seems like it's only messing the lighting up further. Like, the floor is the right gradient, but I can't achieve the same brightness on the ceiling or the walls. 0 Quote Share this post Link to post
Bauul Posted May 25, 2021 (edited) 31 minutes ago, RetroWolf92 said: Weird, it seems like it's only messing the lighting up further. Like, the floor is the right gradient, but I can't achieve the same brightness on the ceiling or the walls. What format are you using? UDMF can have independent brightness values for walls, floors, ceilings and the sector as a whole, so it could be you've got those set to specific values by accident. Alternatively, or if you're working in the vanilla Doom map format, it could be the fake-contrast: walls oriented parallel to the east-west axis are made darker, while walls parallel to the north-south axis are made brighter. Regarding the Brightness Gradient tool, IIRC it works by setting the lighting of each sector to an even distribution between the first sector selected and the last. When you select sectors in UDB you'll see they're labelled numerically (1, 2, 3... etc.). The gradient is calculated by comparing the sector labeled 1 to the sector with the highest number. Edited May 25, 2021 by Bauul 0 Quote Share this post Link to post
RetroWolf92 Posted May 25, 2021 I'm using UDMF and the brightness settings are confusing me, because 0 brightness on one wall looks darker or brighter than 0 brightness on another. 0 Quote Share this post Link to post
Bauul Posted May 25, 2021 (edited) 8 minutes ago, RetroWolf92 said: I'm using UDMF and the brightness settings are confusing me, because 0 brightness on one wall looks darker or brighter than 0 brightness on another. Wall brightness can be a little confusing to begin with in UDMF. By default, all walls will take their brightness from the basic sector brightness. If you want to, you can set specific wall brightnesses, but you don't have to. So generally I would leave it alone unless you specifically want to change the brightness of a wall independently. When you do, there are two options: Relative and Absolute (the latter is activated by clicking the associated button next to the Brightness option in the Sidedef menu). Relative brightness is the default, and means you are either adding or subtracting from the current sector brightness. So a wall brightness of "0" just means "whatever the sector brightness is". While a wall brightness of "10" means "10 brighter than the sector". If you hit the "Absolute" button, then the value becomes the literal value of the brightness: 0 is pitch black while 256 is full-bright. Finally, fake-contrast will add additional brightness or darkness to any walls that are at the affected angles. To turn that off, hit the "Even Lighting" button at the bottom of the Sidedef window. Edited May 25, 2021 by Bauul 1 Quote Share this post Link to post
RetroWolf92 Posted May 25, 2021 Seems like it's working properly now, thank both of you! One more question, though... I know how to set things like random chance or tier based luck through Decorate, example ":oh this monster will do this weaker attack but on rare occasion it will do an uber powerful one!", but I'm wondering if it's possible to do the same thing with map script? 0 Quote Share this post Link to post
RetroWolf92 Posted May 25, 2021 No, no wait... something's still up. I've taken screenshots here of what the brightness levels are supposed to look like compared to what they actually look like in game. 0 Quote Share this post Link to post
yakfak Posted May 25, 2021 a lot of the lighting values near zero are practically zero themselves, try starting with 48 as the minimum <3 1 Quote Share this post Link to post
Gez Posted May 25, 2021 Fun fact, the effect that turns lights off (as seen with the light switches in The Focus, for example) actually set the light level to 35. Not 0. 0 Quote Share this post Link to post
Bauul Posted May 25, 2021 13 hours ago, RetroWolf92 said: No, no wait... something's still up. I've taken screenshots here of what the brightness levels are supposed to look like compared to what they actually look like in game. I'm not entirely sure what you're trying to show here. What's wrong with the light values? They look like they're reflecting the editor shot quite accurately. Can you explain more specifically what you're trying to achieve? A couple of things to consider: 1) GZDoom has a few different lightmodes that change how much sectors fall to darkness at a distance. Have a play in the Display settings and find one you like the best. If you like you can then set it in the Mapinfo so everyone playing the map will experience the same lighting. 2) It looks like your brightness falls off very sharply - you can change this by picking between "linear", "sine-in" and "sine-out" next to the brightness gradient option when applying it. It looks like you're using one of the sines, when linear might suit you better. 0 Quote Share this post Link to post
RetroWolf92 Posted May 25, 2021 (edited) I should have clarified a few things early on: 1) I am using Linear falloff 2) I am running on Zandronum. And what I was trying to point out with the screenshot is that the lighting is perfectly even on the later halls, but this one has one out of place pitch black wall on the left side. Nothing I have tried has corrected this. Edited May 25, 2021 by RetroWolf92 0 Quote Share this post Link to post
Vermil Posted May 25, 2021 (edited) Possibly Doom's fake contrast? Edited May 25, 2021 by Vermil 0 Quote Share this post Link to post
RetroWolf92 Posted May 25, 2021 9 minutes ago, Vermil said: Possibly Doom's fake contrast? Negative, just tested. 0 Quote Share this post Link to post
Bauul Posted May 25, 2021 40 minutes ago, RetroWolf92 said: And what I was trying to point out with the screenshot is that the lighting is perfectly even on the later halls, but this one has one out of place pitch black wall on the left side. Nothing I have tried has corrected this. I'm looking through your screenshots and I'm afraid can't see any "pitch black walls on the left side". Every left-hand wall in your shots seems to match the sector brightness. Where specifically are you seeing this? 0 Quote Share this post Link to post
RetroWolf92 Posted May 25, 2021 19 minutes ago, Bauul said: I'm looking through your screenshots and I'm afraid can't see any "pitch black walls on the left side". Every left-hand wall in your shots seems to match the sector brightness. Where specifically are you seeing this? Look at the first screenshot at the top, it's admittedly a little hard to spot. But compared to the others, there's not even a hint of texture visible from the distance on the first screenshot. But there is on the others. 0 Quote Share this post Link to post
Albertoni Posted May 25, 2021 19 hours ago, RetroWolf92 said: I'm wondering if it's possible to do the same thing with map script? https://zdoom.org/wiki/Random if (Random(0,1)) is a 50% chance. Random(0,2) would make it a 66% chance. Random(0,3) would make it 75% and so on. Of course, you can get a lot more elaborate if needed. 0 Quote Share this post Link to post
RetroWolf92 Posted May 27, 2021 Fixed the hallway lighting issue, just set the actual wall brightness up and it looks fine. Another question, how do I go about adding to an integer value? I know you can set a global integer value to whatever number, but I specifically want a script to add +1 to it every time it is run. 0 Quote Share this post Link to post
smeghammer Posted May 27, 2021 (edited) generally, any language can increment. E.g. ACS: global int 1:x; script 100 ENTER{ x=1; } /* called on crossing a line or whatever, adds 1 to the current value of x */ script 1(void){ x++; } /* will log whatever the current value of x is */ script 2(void){ log(i:x); } Is this what you mean? Edited May 27, 2021 by smeghammer corrected ACS syntax 0 Quote Share this post Link to post
RetroWolf92 Posted May 27, 2021 1 hour ago, smeghammer said: generally, any language can increment. E.g. ACS: global int 1:x; script 100 ENTER{ x=1; } /* called on crossing a line or whatever, adds 1 to the current value of x */ script 1(void){ x++; } /* will log whatever the current value of x is */ script 2(void){ log(i:x); } Is this what you mean? More like I 'm trying to do is do program a script so I can do something akin to a puzzle script. Like, knock on this wall 4 times to do X. 0 Quote Share this post Link to post
smeghammer Posted May 28, 2021 (edited) 8 hours ago, RetroWolf92 said: More like I 'm trying to do is do program a script so I can do something akin to a puzzle script. Like, knock on this wall 4 times to do X. You didn't say why you wanted to increment... Each wall tap will increment your global as per the above. The tappy script should additionally test for value of x on each tap on the wall prior to incrementing. If the global var value is 4 then perform action x. You will likely need to check if action x is already performed too so as not to repeat it (unless it should repeat of course). Edited May 28, 2021 by smeghammer 0 Quote Share this post Link to post
smeghammer Posted May 28, 2021 (edited) here is a quick demo script showing a way to do this (to 3, not 4): global int 1:x; global bool 2:raised; script 100 ENTER{ x=1; raised = FALSE; } script 1 (int direction){ if(direction){ if(x<3){ x++; } } else{ if(x>0){ x--; } } log(i:x); if(x==3 &! raised){ log(s:"raising..."); raised = TRUE; Ceiling_RaiseByValue(1,12,64); } if(x==0 && raised){ log(s:"lowering..."); raised = FALSE; Ceiling_LowerByValue(1,12,64); } } I have two switches with SR action 80 calling script 1. One passes 1 (==TRUE) the other passes 0 (==FALSE). The repeated pressing of the switches will count up or down, and when the up or down limit is reached, the door is raised or lowered accordingly. There is also a flag to prevent the door lowering or raising further if it has already lowered or raised. Demo PK3 found here. Edited May 28, 2021 by smeghammer 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.