• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Question about selection in fog (+rep to all helpers)

Status
Not open for further replies.

Sverkerman

Hosted Project: BoW
Level 17
Joined
Feb 28, 2010
Messages
1,325
Is there any way to make a unit selectable in fog of war? I am creating a amnesia looking map where I need doors to be openable even tho it is dark. The darkness is basically fog of war. As it is now, in order to interract/select a unit that helps me track a mouse click which will open the door if the player has the required item/items I need to create a visibility for that player where the unit which will track the click is located. The problem with this is that it kind of gives you the feeling that there is a light source located over there.


Any help is rewarded with +rep of course :)

Thx!
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Is there any way to make a unit selectable in fog of war? I am creating a amnesia looking map where I need doors to be openable even tho it is dark. The darkness is basically fog of war. As it is now, in order to interract/select a unit that helps me track a mouse click which will open the door if the player has the required item/items I need to create a visibility for that player where the unit which will track the click is located. The problem with this is that it kind of gives you the feeling that there is a light source located over there.


Any help is rewarded with +rep of course :)

Thx!

Don't you mean something like this?:

  • Custom script: call SetDayNightModels("","")
This will set the day and night models to be nothing, causing everything to be black. Yet makes it possible to select units and see terrain + doodads. Just test it out and you'll see. Put it in initialization.
 

Sverkerman

Hosted Project: BoW
Level 17
Joined
Feb 28, 2010
Messages
1,325
What do I do with the "","" part?
EDIT: Is that null?
EDIT2: Wow! This looks amazing! Makes everything much darker!
EDIT3: Okay, with this I still need visibility in order to select units, however I can create a visibility where doors and interractables are without it looking retarded anymore. I noticed that one of the candles in the interior made for a perfect light source. Is there any way to create this kind of effect with code and/or is there any model which I could use? The use I would have for this would mainly be the flashlight which the game will have.
EDIT4: picture
b8mgr9.png

EDIT5: I either need a model of just the specific particle that makes the light source effect so I can attach one of those to the unit which you are controlling ingame or I need some kind of code to create the effect of the particle effect in a area around the unit that you are controlling.

-Anyone up for making me a model of just that particle?
-Anyone that knows any code like this?

Credits will be added in the game of your name and +rep will be recieved from both me and DBXo for helping our project if any of you decides to help out!
 
Last edited:
Level 14
Joined
Apr 20, 2009
Messages
1,543
The native looks like this:

JASS:
native SetDayNightModels takes string terrainDNCFile, string unitDNCFile returns nothing

So it takes 2 empty strings. Which is: ("","")

This native would work for the entire map, so you'll have to base your judgement on that. You might also want to try an alternative.
I have to go for now but I'll be back later on.
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Is it possible to make that code affect only the terrain in a area around the unit?

Yes it is possible and I have seen this before but I can't recall correctly. I think I saw it in a thread on wc3c...
I'll try to find it but last time it took me quite some time to find the thread since it was a really old one. :S

I'll try to search for terms like terrainDNCFiles. I think that was the model which contained the day and night model for the entire terrain.
I think the unitDNCFile was the file that made a light source around units. I can't recall correctly. If it is then you might be abled to alter the unitDNCFile.


If there is anyone who could elaborate on this subject it would be highly appreciated :goblin_good_job:

I would like to know too. I'll try to search for a solution in the meanwhile.

EDIT: here is a thread discussing the matter: http://www.wc3c.net/showthread.php?t=98815
but it's not the same thread as the one I saw before. That one was a tutorial on how to do it. I'll try to find it.

EDIT2: hmm this might be usefull: http://warcraft.ingame.de/maps/mappedia/Jass:SetDayNightModels
Open some of these up with a MPQ browser, export it and import it in your map. Look at how the model looks like.
You can also edit them with Magos before importing.

EDIT3: What if you did this?
JASS:
call SetDayNightModels("Environment\\​DNC\\​DNCLordaeron\\​DNCLordaeronTerrain\\​DNCLordaeronTerrain.mdl", "")

EDIT4: Wait, you want to have an area around the unit that is black right :S?? I don't really get why you would want to do this but okay xD
For the light sources, I guess you are using the Ultimate Terraining Map? There are quite some light sources in there that can be usefull when using this method...
 
Last edited:

Sverkerman

Hosted Project: BoW
Level 17
Joined
Feb 28, 2010
Messages
1,325
The best way to do this would be to use a custom model that makes other models around it appear brighter. This model should be invisible but give the same effect as the candle in my picture.

Also to answer your EDIT4: I am creating a first person horror game with a very good friend of mine. The first person engine is done and works extremely well. Now what we need is a way for realistic lightning to work with it. There are 3 things which affects lightning:
1: Everything is always as dark as black, this is applied in the whole map and this is what the standard lightning is.
2: There are light sources spread out trough the whole game. This can be Candles, Laterns, etc.
3: You obtain your own light source early in the game. This light source drains Battery or Oil (not decided yet) which can be found on various locations troughout the game. While this light source is being active your vision will be improved greatly.

I've come to the conclussion that I need the model which makes the candle have that "glowing" effect on the surrounding doodads. This would be the best way to solve my problem. I will start my search for a modeller to take the light source particle and form it into a invisible realistic light source which I will then apply to the map.

Thanks for all of your help Hashjie. here, have some +rep and a spot in the credits register of our upcoming horror game!

EDIT1: If you would kindly assist my search?
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
The best way to do this would be to use a custom model that makes other models around it appear brighter. This model should be invisible but give the same effect as the candle in my picture.

Also to answer your EDIT4: I am creating a first person horror game with a very good friend of mine. The first person engine is done and works extremely well. Now what we need is a way for realistic lightning to work with it. There are 3 things which affects lightning:
1: Everything is always as dark as black, this is applied in the whole map and this is what the standard lightning is.
2: There are light sources spread out trough the whole game. This can be Candles, Laterns, etc.
3: You obtain your own light source early in the game. This light source drains Battery or Oil (not decided yet) which can be found on various locations troughout the game. While this light source is being active your vision will be improved greatly.

I've come to the conclussion that I need the model which makes the candle have that "glowing" effect on the surrounding doodads. This would be the best way to solve my problem. I will start my search for a modeller to take the light source particle and form it into a invisible realistic light source which I will then apply to the map.

Thanks for all of your help Hashjie. here, have some +rep and a spot in the credits register of our upcoming horror game!

EDIT1: If you would kindly assist my search?

You could request it here:
http://www.hiveworkshop.com/forums/requests-341/model-workshop-198122/
Or here:
http://www.hiveworkshop.com/forums/requests-341/doodad-creators-206304/

I can also create models but I'm not that famillair with light sources.
I'll try to help you with your search but for now I'm going to a party ;)

PM me when you need to and I'll gladly help out.
 

Sverkerman

Hosted Project: BoW
Level 17
Joined
Feb 28, 2010
Messages
1,325
Requested it over here http://www.hiveworkshop.com/forums/requests-341/very-simple-model-request-rep-all-helpers-212647/

Model workshop and Doodad creators are both a bit too inactive and already has a lot of other requests. I rather personally contact someone I seem fit for the job or try my luck at the request thread.

If you want to help out even further from here Hashjie you could request it from people you know :)

Also, when the progress thread of the project is up, would you like me to notify you trough a PM?
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Requested it over here http://www.hiveworkshop.com/forums/requests-341/very-simple-model-request-rep-all-helpers-212647/

Model workshop and Doodad creators are both a bit too inactive and already has a lot of other requests. I rather personally contact someone I seem fit for the job or try my luck at the request thread.

If you want to help out even further from here Hashjie you could request it from people you know :)

Also, when the progress thread of the project is up, would you like me to notify you trough a PM?

Well the thing is, I also got my own map to worry about. A map that I've almost completed creating alone...
And ofcourse trying to help people out on the world editor helper forum, plus I've got a strict deadline for my uncles website.
I also have school exams to learn and on top of that I'm learning for my drivers license.
I'm kind of a busy man atm >.<

Time is my enemy...

I would very much indeed like a notification though!
 
Status
Not open for further replies.
Top