wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Resources > Code Resources > Systems
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 05-16-2009, 05:40 PM   #1
Opossum
User
 
Opossum's Avatar
 
Join Date: Mar 2008
Posts: 205

Submissions (4)

Opossum will become famous soon enough (59)Opossum will become famous soon enough (59)

Default AmbienceTester

NOTE: You have been redirected in order for our attachments to be made available to you. This will only last two minutes; these measures where taken to avoid hotlinking and bandwidth theft.
To avoid these restrictions Log in or Register

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: jpg AmbienceTester.jpg (23.6 KB, 1198 views)
Attached Files
File Type: w3x AmbienceTester.w3x (35.1 KB, 262 views)

Last edited by Opossum : 07-06-2009 at 07:03 PM.
Opossum is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 05-16-2009, 06:17 PM   #2
Feroc1ty
User
 
Join Date: Nov 2006
Posts: 304

Feroc1ty is on a distinguished road (14)

Default

Looks awesome!
Feroc1ty is offline   Reply With Quote
Old 05-16-2009, 06:33 PM   #3
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

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.
__________________
Rising_Dusk is offline   Reply With Quote
Old 05-16-2009, 06:42 PM   #4
Opossum
User
 
Opossum's Avatar
 
Join Date: Mar 2008
Posts: 205

Submissions (4)

Opossum will become famous soon enough (59)Opossum will become famous soon enough (59)

Default

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.
Opossum is offline   Reply With Quote
Old 05-16-2009, 07:02 PM   #5
Avenger
User
 
Join Date: Apr 2009
Posts: 37

Avenger has little to show at this moment (0)

Default

so in other words, it isnt a system to be used in a live games, its basically a tool

Last edited by Avenger : 05-16-2009 at 07:02 PM.
Avenger is offline   Reply With Quote
Old 05-16-2009, 07:28 PM   #6
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

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
__________________
Rising_Dusk is offline   Reply With Quote
Old 05-16-2009, 07:48 PM   #7
Opossum
User
 
Opossum's Avatar
 
Join Date: Mar 2008
Posts: 205

Submissions (4)

Opossum will become famous soon enough (59)Opossum will become famous soon enough (59)

Default

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!
Opossum is offline   Reply With Quote
Old 05-16-2009, 09:46 PM   #8
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

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?)
__________________

Last edited by Rising_Dusk : 05-16-2009 at 09:50 PM.
Rising_Dusk is offline   Reply With Quote
Old 05-16-2009, 10:17 PM   #9
Opossum
User
 
Opossum's Avatar
 
Join Date: Mar 2008
Posts: 205

Submissions (4)

Opossum will become famous soon enough (59)Opossum will become famous soon enough (59)

Default

Alright I changed the name and removed the public prefix. Gonna fix OppiCam now.
Opossum is offline   Reply With Quote
Old 06-15-2009, 12:52 PM   #10
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,177

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

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.
__________________

Last edited by Anitarf : 06-15-2009 at 01:24 PM.
Anitarf is offline   Reply With Quote
Old 06-15-2009, 02:28 PM   #11
Opossum
User
 
Opossum's Avatar
 
Join Date: Mar 2008
Posts: 205

Submissions (4)

Opossum will become famous soon enough (59)Opossum will become famous soon enough (59)

Default

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.
Opossum is offline   Reply With Quote
Old 07-17-2010, 10:16 AM   #12
Element of Water
User
 
Element of Water's Avatar
 
Join Date: Mar 2009
Posts: 147

Submissions (2)

Element of Water is on a distinguished road (18)

Default

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?
Element of Water is offline   Reply With Quote
Old 07-18-2010, 04:24 PM   #13
Opossum
User
 
Opossum's Avatar
 
Join Date: Mar 2008
Posts: 205

Submissions (4)

Opossum will become famous soon enough (59)Opossum will become famous soon enough (59)

Default

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.
__________________

Newest version: 2.0 Alpha 006c
Opossum is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 01:43 AM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2017, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services