Bug Reports / (SOLVED) - SetBrightness is flat out broken

Author
Message
Bolt Action Gaming
GameGuru Tool Maker
10
Years of Service
User Offline
Joined: 24th Oct 2013
Location: Harrisburg, PA (USA)
Posted: 24th Oct 2017 17:11
I use this for my weather system and spent about an hour last night trying to trace down a weird 'washing out' of color I was discovering in my latest edition after I added some upcoming features (specifically a time keeping system/global time clock for NPCs etc). Eventually I traced it to my use of SetBrightness for lightning.

Currently I find the system runs best between Brightness 30 and 40. It gives a much better, less washed out color. Anyways I kept finding my settings in the range of 50 or 60. After some checking..

SetBrightness(.1) sets the brightness to 60%.
SetBrightness(.05) sets the brightness to 55%.
SetBrightness(.000000001) sets the brightness to 50%.

Any values above 1 go stratospheric.

The math is obviously wrong on the receiving function in GG for this and should be checked.
Bolt Action Gaming
GameGuru Tool Maker
10
Years of Service
User Offline
Joined: 24th Oct 2013
Location: Harrisburg, PA (USA)
Posted: 26th Oct 2017 02:28
Per Lee, I have my answer;

I have added some additional guidance to setting these raw values:

function SetBrightness(v)
-- range of -0.5(0%) to 0.5(100%)
SendMessageF("setbrightness",v)
end
function SetContrast(v)
-- range of 0(0%) to 3.33(100%)
SendMessageF("setcontrast",v)
end


So basically to get a value of ~30% (like I wanted) for this I had to use SetBrightness(-.2).

So this was only a 'bug' in the form of lack of documentation.
Happy hunting all! (Please lock the thread).
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 26th Oct 2017 17:03 Edited at: 26th Oct 2017 17:10
Quote: "Per Lee, I have my answer;

I have added some additional guidance to setting these raw values:

function SetBrightness(v)
-- range of -0.5(0%) to 0.5(100%)
SendMessageF("setbrightness",v)
end
function SetContrast(v)
-- range of 0(0%) to 3.33(100%)
SendMessageF("setcontrast",v)
end"


in that case you can convert the functions to more usable numbers like this (allows 0~100 in your call so you can set the value as a % of the slider, i.e. SetBrightness(10) will automatically convert to 10% of the slider's value)
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Login to post a reply

Server time is: 2024-04-19 14:23:18
Your offset time is: 2024-04-19 14:23:18