Remove Item Shadow

Level 13
Joined
Oct 8, 2012
Messages
498
Remove Item Shadow

All Items

Single Item

Read Me:

About this Method:

* Use this method if you want to hide absolutely all items' shadows in your map.
* It's best to use this method before you start modifying the Gameplay Constants.
* The testmap available below is made for the second method. This is too simple already.

Warning:

* This method is detrimental if you have already heavily modified the Gameplay Constants, because once you save and reopen your map, it completely resets all values to default.
There are some things you can do to avoid that, but I won't discuss it here since it's a completely different topic.

The requirements needed for this method:
  • Notepad, or any text editing software
  • Basic importing skills
Method A:

1.) Create .txt File:
* Open Notepad or any other text editing software. Save the empty note and name it war3mapMisc.
2.) Edit Text:
* Now edit it. Copy and paste the code below, and save it again.
Code:
[Misc]
ItemShadowFile=Null
* If you want to undo it, just follow this method again, except you put ItemShadowFile=Shadow instead.
Code:
[Misc]
ItemShadowFile=Shadow
3.) Import:
* After that just import that war3mapMisc.txt in your map. By then, its name in the Import Manager will be "war3mapImported\war3mapMisc.txt". Double-click to rename and erase the "war3mapImported\" part.
4.) Reload the Map:
* Save your map and close it. Then re-open that map. Put some items on the ground and press CTRL+F9 to test, it should be working by now.
5.) Delete Note:
* Delete the war3mapMisc.txt you just imported earlier. Its job is finished, you don't need it anymore.

* If you don't delete it, any modification in Gameplay Constants except ItemShadow will not apply, since that .txt will always overwrite those changes to default.
Done! Save the map!​

Read Me:

About this Method:

*
Use this method if you want to hide only a specific number of shadows.
* This method only works for trigger created items, so plan ahead.
* The test map is like an extension of this, I recommend you to download it for clarification.
* Works on units.

Warning:

* If you don't follow the steps carefully, you might experience the selection circle bug. Which causes selection circles of random units and items to be misplaced or not appear sometimes.

The requirements needed for this method:
  • Basic knowledge of GUI Triggering
Method B:

1.) Dummy Item:
* If your map already contains at least one item (on the ground, not carried), then skip this step.

* Put one Item inside the map (any type will do; i.e. Cheese, Boots of Speed), doesn't matter where you put it since you'll be hiding it for the rest of the game anyway.

* Open the Trigger Editor. In your
folder.gif
Map Initialization trigger, hide that item:
  • Events
    • Map initialization
    • Conditions
    • Actions
      • Item - Hide Cheese 0001 <gen>
2.) Destroy Image:
* Whenever you attempt to create a shadowless item, you must first destroy the last created image:
  • Image - Destroy (Last created image)
Why? I have no idea. What I only know (for now) is that, the 4th Step won't work unless you do this. If someone has a clue, please do tell.
3.) Create Item:
* Create the item you want but do not give it to a Hero/Unit yet. Just create it from point.
  • Item - Create Starfish at (Position of HERO)
4.) Make Image Invisible:
* After you create an item you'll need to make the last created image (destroyed earlier) invisible.
  • Image - Change the color of (Last created image) to (0.00%, 0.00%, 0.00%) with 100.00% transparency
Don't bother changing the color, doesn't work on shadows anyway.
It should look like this:
  • Image - Destroy (Last created image)
  • Item - Create Starfish at (Position of HERO)
  • Image - Change the color of (Last created image) to (0.00%, 0.00%, 0.00%) with 100.00% transparency
If you skipped the 1st Step because you have more than one item proceed to Step 5,
otherwise, you're done.


5th Step - Find the Dummy:
* Make sure you're able to create at least one shadowless item in-game (either by events or Map Initialization).

* Save and Test your map. Create a shadowless item (assuming you didn't on Initialization). Among the map's starting items, find the one that doesn't have a shadow.

* After finding, quit the game, open Trigger Editor in WE, and hide that item in
folder.gif
Map Initialization trigger, just like what I did on the 1st Step.
Now you're done for real!

 

Attachments

  • RemoveItemShadow.w3x
    20 KB · Views: 196
Last edited:

Deleted member 219079

D

Deleted member 219079

This is such a hack you've found out ^^
It even works with:
JASS:
    call DestroyImage(null)
    call CreateItem(u,x,y)
    call SetImageColor(null,0,0,0,0)
 
You can hide these shadows adding to war3mapMisc.txt this line:

JASS:
[Misc]
ItemShadowFile=Null
Default value is ItemShadowFile=Shadow

You can replace "Null" with any shadow. (See Shadows folder, path "ReplaceableTextures\Shadows\")


You can set the size/position if needed too:

JASS:
[Misc]
ItemShadowSize=120,120
ItemShadowOffset=50,50

If war3mapMisc.txt is not present in your map, you can create one.
This file appears when you modify the gameplay constants under Advanced/Gameplay Constants.
 
If you would like, you could just update the guide with Anvil's method, and leave the rest as a separate section for removing a specific item/unit's shadows. I doubt very many people know about the image trick--I've personally only used it once, but it was useful to know for the issue I was having.

Anyway, the tutorial is organized quite well, it would be a shame to have to graveyard it. :p
 
Level 13
Joined
Oct 8, 2012
Messages
498
Well the thing is, I think the all-method overshadowed the tutorial completely. Even I switched to using it. Misc method should be naturally the main and best way right, and should be put at the top.
And the method I introduced will be just an alternative. But having an alternative which is more of a pain and takes longer to set up, I don't see why it's useful now.

If I should rewrite it, it'll be like writing a tutorial that I didn't came up with, so I'm worried about that.

Edit: Updated.
 
Last edited:
The introduction's list looks a bit wild. Both methods are listed after each other between introduction list-elements, and even
the method's steps/description is also listed in same order. Use indentions or sub-lists, or something to point out the structure.

I think it's on a good way then. Could you provide a .txt file attachment to your tutorial as example?
 
Level 13
Joined
Oct 8, 2012
Messages
498
Ah. Delete the imported war3mapMisc.txt. I think it's only needed once after save and closing your map, then after reopening again, you can delete it.


If it doesn't work here's what you hafta do:
First, open Gameplay Constants and put a check on the Display Values As Raw Data.
checkbox-png.268192

checkbox2-png.268190

Notice that the names change.
Now, while it is checked. Find the RAW name that you want to modify.
Add it on the war3mapMisc.

Code:
[Misc]
ItemShadowSize=120,120
ItemShadowOffset=50,50
MaxHeroLevel=25

Then replace the one you imported before.
 
Level 11
Joined
Oct 12, 2016
Messages
752
Alright Imadori, the second thing worked.

This method is detrimental you you heavily modify the gameplay constants, since once you save it then reopen the map it completely resets all values to default.
You might want to add a warning about that, and append that second method (specifically, you'll need to copy raw data for all modified values).
 
Top