HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

AmbienceTester

05-16-2009, 05:40 PM#1
Opossum
AmbienceTester creates a multiboard per player enabling control over several ambience aspects of your map.
This script is mainly supposed to be a testing and debugging tool to figure out the perfect mix of sky model, weather effect, fog and water color for your terrain without having to save and test your map hundreds of time. In a nutshell it's a tool for perfectionist terrainers.

The implementation is pretty easy. Copy the script to your map and some time after (!) the map initialisation use
call EnableAmbienceTester(<player p>, <boolean show>).


A multiboard is shown to the given player who is then able to change the ambience aspects via arrow keys. All aspects are changed locally EXCEPT for the weather for various reasons so each player can have his own ambience setting.

If you're planning on keeping this script in the release version of your map make sure that your desired ambience settings are stored in the script's constants.

The attached demo map shows the script in action.

Expand JASS:

Requirements:
Attached Images
File type: jpgAmbienceTester.jpg (23.6 KB)
Attached Files
File type: w3xAmbienceTester.w3x (35.1 KB)
05-16-2009, 06:17 PM#2
Feroc1ty
Looks awesome!
05-16-2009, 06:33 PM#3
Rising_Dusk
Please post the code. I suspect by your naming for the functions that you're using public function prefixes, which sucks. I also don't think AtmoUtils really says a lot. Just call the thing AtmosphereTester or AtmosphereDebug or something, since that is the intended purpose.
05-16-2009, 06:42 PM#4
Opossum
The code's too long - exceeding character limit. That's why I attached it as a text file.
And yep I'm using public function prefixes but I don't really see what's wrong with it. Just a matter of taste I guess. It's just one single function anyway.

The name... well hmm. What about OppiAtmosphere? Hawr hawr. I'll think about it.
05-16-2009, 07:02 PM#5
Avenger
so in other words, it isnt a system to be used in a live games, its basically a tool
05-16-2009, 07:28 PM#6
Rising_Dusk
Quote:
Originally Posted by Opossum
The code's too long - exceeding character limit. That's why I attached it as a text file.
Jeez, and here I thought only Grim did that.
Quote:
Originally Posted by Opossum
And yep I'm using public function prefixes but I don't really see what's wrong with it. Just a matter of taste I guess. It's just one single function anyway.
Sorry, but we don't approve resources with function names that don't match as closely to standard function naming (for jass) procedures. Every reviewer is going to tell you to ditch the public prefixes.
Quote:
Originally Posted by Opossum
The name... well hmm. What about OppiAtmosphere? Hawr hawr. I'll think about it.
Depends if you want it as a script submission or not. It can't be a script if it's named after you, sorry. :p
05-16-2009, 07:48 PM#7
Opossum
Actually even the required (and approved!) library ArrowKeys by Anitarf uses public prefixes. I've been using them for OppiCam and no one has critisized that either.
I mean I don't mind removing the prefix but it's just pretty new to me that public functions aren't up to the standards here.

Considering the name I guess I'll just go for AmbienceTester or something like that though. But does that mean I'll have to rename OppiCam too? Say no to opossum hate!
05-16-2009, 09:46 PM#8
Rising_Dusk
Quote:
Originally Posted by Opossum
Actually even the required (and approved!) library ArrowKeys by Anitarf uses public prefixes. I've been using them for OppiCam and no one has critisized that either.
Ew, are you serious? I should f*cking hit Ani for doing that and Vex for approving it. That's obscene, if I had known that at the time I wouldn't have let it get approved. I might actually ask him to change it and just have the old functions in for backwards compatibility. I would refuse to use something that forced me to use function prefixes like that.

EDIT:
I just looked at ArrowKeys, and its usage is very different from this. Like, he has event responses and uses the keywords "up," "down," "left," "right," which due to their very generic form is okay to use the public prefix on. Just "up" would probably have collisions with other things in other parts of the maps using it. It doesn't seem to use public functions per se.
Quote:
Originally Posted by Opossum
I've been using them for OppiCam and no one has critisized that either.
Well, I haven't actually reviewed that system. I can't stress enough that if you do get any thorough reviewing of it outside of the grazing that you have already, that public functions are unwieldy in practice and you shouldn't use them.
Quote:
Originally Posted by Opossum
I mean I don't mind removing the prefix but it's just pretty new to me that public functions aren't up to the standards here.
It's not about the standards, that's really a matter of preference. It's like the difference between using an integer stack or an empty struct. Both work, but some reviewers may prefer one method over the other and tell you to change it. Let me just say that function prefixes is so not a big deal and if you absolutely refused to do it I wouldn't graveyard the resource over it. It's style, really, I just think it sucks and would never use a system that has them.
Quote:
Originally Posted by Opossum
Considering the name I guess I'll just go for AmbienceTester or something like that though. But does that mean I'll have to rename OppiCam too? Say no to opossum hate!
I considered OppiCam to be a system, so it doesn't bother me that it uses your name. It does too much at too high a level to really be a script. You'd never require OppiCam for another library and it isn't for testing, so it doesn't make sense as a script anyways. (Besides, didn't you label it a system?)
05-16-2009, 10:17 PM#9
Opossum
Alright I changed the name and removed the public prefix. Gonna fix OppiCam now.
06-15-2009, 12:52 PM#10
Anitarf
Quote:
Originally Posted by Rising_Dusk
Sorry, but we don't approve resources with function names that don't match as closely to standard function naming (for jass) procedures. Every reviewer is going to tell you to ditch the public prefixes.
I'm not.

Anyway, this is a useful tool (I guess I'll move it under systems), very neat implementation, the user interface is superb. Approved.

By the way, I think the charlimit for posts has been extended recently so you can try posting the code in the post now.
06-15-2009, 02:28 PM#11
Opossum
Yeehaw! Thanks!

Quote:
By the way, I think the charlimit for posts has been extended recently so you can try posting the code in the post now.
Sweet. Removed the txt-file.
07-17-2010, 10:16 AM#12
Element of Water
I know this is a bit late, but I was reading through your various reasons link, and I saw that you used GetWorldBounds() in a GetLocalPlayer() block -- could that be the cause of the desync, since it returns a new rect each call?
07-18-2010, 04:24 PM#13
Opossum
Quote:
Originally Posted by Element of Water
I know this is a bit late, but I was reading through your various reasons link, and I saw that you used GetWorldBounds() in a GetLocalPlayer() block -- could that be the cause of the desync, since it returns a new rect each call?
Nah. GetWorldBounds() doesn't create a handle whereas AddWeatherEffect() does.
You can't create weather effects locally BUT you can enable them locally - which would be totally fine if it weren't for that one-effect-rule I posted about in that thread.