• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Can't Directly Open Map In World Editor

Status
Not open for further replies.
Level 6
Joined
Nov 24, 2012
Messages
218
Okay I have this problem where I double click a map, world editor opens an empty map. I have to then proceed to open my desired map using ctrl+o. It's no big deal, but after doing this thousands of times it's starting to get annoying. Anyone know why this is happening?

EDIT: RESOLVED, thank you Hashjie! To anyone else with this minor issue, I'm sure there are lots of you xD...! Fix is here: Hashjie's Magic

Also after doing the magic, you might have to right click a random custom map, and "open with" browse for NewGen WE.
 
Last edited:
Level 14
Joined
Apr 20, 2009
Messages
1,543
I got the same issue I belive its your warcraft 3. Since I got a crack I don't complain about such an small bug

It's not your warcraft 3, I think it has to do something with the new version of JNGP.
This started to happen to me too when I downloaded the new JNGP.
And I do have a valid copy of warcraft 3.

Personally, I don't think it's such a big deal. Is one more mouse click really that annoying?
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Hmm, now that I come to think of it I've seen this problem before with other applications... I'll try to find a microsoft kb for windows 7 that describes this problem more thoroughly.

EDIT: Here is someone with a similar question: http://superuser.com/questions/2614...-opens-the-associated-application-but-not-the

As explained in the link it might be useful to check out file type association options on this issue and see if %1 is present in the path so that file paths are included into the application on opening.

gordoco said:
Check the file type association in Folder Options. In the Advanced dialog you should be able to edit the Open action for a particular file type to see what command is being run. It should be something like "C:\full\path\to\program.exe" "%1". Make sure the %1 is present, which is a placeholder for the file path. Make sure the quotes are present around "%1" so that file paths with embedded spaces will work.

If you still have access to the XP machine where it's working, check the file association there as an example of what it should look like on 7.

EDIT 2: Couldn't find a microsoft kb, their search engine is becoming less user friendly every day -,-...
If I type in for example: can't open file.
It shows me nothing similar but stupid articles on how to improve your performance, what 64 bit is etc.
But nothing really relevant to the topic at all xD (Don't mind me, just hating on their "new" website)
 
Last edited:
Level 14
Joined
Apr 20, 2009
Messages
1,543
But that's the thing, mine doesn't create a new map at opening, it's just a black screen with nothing in there. Same counts for the triggers, it's empty it doesn't have a map header either :/...

If I want to have a new map after opening I have to go to file either ways.
I'm not sure about others but this is how I am experiencing it. :S

And personally I think it's got something to do with a bug in Windows 7 for opening the application instead of the actual file. I've had this before with photoshop and vlc too.
I think it got something to do with what I found in my earlier post.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
You can in preferences in the editor disable the option of creating a new map every time you open or start the editor. It might fix the directly opening the map issue.
Unfortunately, it won't. I've got the same issue and disabled that option as soon as possible.
I've always disabled that option, even though I usually end up creating a new map anyway. I like to press CTRL + N myself the entire time :D

Anyway, Hashjie's link seemed viable, but I didn't even find where I should write the path o_O (it's not in "Folder Options" as far as I could see :p).
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
I'll have a quick look once I get home it would be cool if this could get solved for a lot of people :)

Perhaps a comment on how to solve it in the JNGP thread
(or in general as it seems to also happen in the regular world editor?)
which in that case a sticky would be useful.
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Apparently this is a bug in windows 7 and windows vista so far that I know of.
windows XP doesn't have this issue.


Also: I found the registry key to alter, when I get home I'll give the full path to check if it works.


EDIT: okay so I did a lot of tests and it all seems to fail :(
First off, the registry key is under: Computer/HKEY_CLASSES_ROOT/Applications/NewGen WE.exe/shell/open/command
There should be a key that shows the path to your NewGen WE with at the end "%1".

Now for the regular world editor I couldn't find any keys.
This is what troubles me, since when NewGen is opened, the process turns into worldedit121.exe
So I thought I'd add the key myself (apparently this didn't seem to work).

I'm also having trouble associating the file type with my normal world editor since it seems that it gets overridden by JNGP... (same problem as TKF, I guess that is inevitable)

Then I started looking inside wehack.lua inside my JNGP folder. It seems to set some registry keys like this:

Code:
if disable then
    	grim.setregstring("HKEY_CLASSES_ROOT\\WorldEdit."..filetype.."\\shell\\open\\command\\","","\""..warpath.."\\World Editor.exe\" -loadfile \"%L\"")
    else
    	grim.setregstring("HKEY_CLASSES_ROOT\\WorldEdit."..filetype.."\\shell\\open\\command\\","",wepath.." -loadfile \"%L\"")
    end

I tried changing the %L to %1 but it didn't seem to make any change either :(
Then I thought: let's see what is over at that registry key: nothing! There was no registry key at all??
So I'm thinking it has got to do something with the registry values being placed under a different key (just searched through the entire registry for the word WorldEdit, doesn't seem to be there except for standard WE options).
This or wehack.lua points to keys that only seem to exist in windows XP. (I think this might be the problem really...)
(and if so this could mean that it's also the reason for the regular world editor not to work since JNGP simply points to that key).
If someone could check with a windows XP machine if there is anything under HKEY_CLASSES_ROOT\WorldEdit I'd really appreciate it.

A screenshot could really help. Preferrably one that shows what is inside HKEY_CLASSES_ROOT\WorldEdit\shell\open\command

If there is something in there I'm going to create a registry file that fixes this issue by simply double clicking it.
 
Last edited:
Level 14
Joined
Apr 20, 2009
Messages
1,543
I only have a Worldedit-folder in HKEY_CURRENT_USER, not in CLASSES_ROOT.
I don't know if changing the reference to that would do any good, though.

Where exactly? I think that's the key for saving prefferenced options inside your world editor. It's got nothing to do with integrated shells on the windows open command.
We really need a windows XP machine in here :D
A shame TKF is offline... (if anyone could export the key with its values it would even be easier for us. Then I won't even need to create the regkey file...)
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Odd indeed :vw_wtf:
I hope someone can show us a beacon of light...
(I'm too lazy to install windows xp on my vm)
 

TKF

TKF

Level 19
Joined
Nov 29, 2006
Messages
1,266
Well in XP it looks like this

HKEY_CLASSES_ROOT\Applications\World Editor.exe\shell\open\command


There's one entry there

(Default) - REG_SZ - E:\Games\Warcraft III\World Editor.exe -loadfile "%1"



I don't know why I don't experience the bug. It still works for me.
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Well in XP it looks like this

HKEY_CLASSES_ROOT\Applications\World Editor.exe\shell\open\command


There's one entry there

(Default) - REG_SZ - E:\Games\Warcraft III\World Editor.exe -loadfile "%1"



I don't know why I don't experience the bug. It still works for me.

I mean in the HKEY_CLASSES_ROOT\WorldEdit\

is there any WorldEdit folder in the root?

I've already tried adding

HKEY_CLASSES_ROOT\Applications\World Editor.exe\shell\open\command
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
One more question:

is E:\Games\Warcraft III\World Editor.exe -loadfile in quotes? or without quotes?


so is it:

E:\Games\Warcraft III\World Editor.exe -loadfile "%1"

or

"E:\Games\Warcraft III\World Editor.exe -loadfile" "%1"

?

I'm doing my last test by making it the exact same as yours, mine didn't have the -loadfile... I hope this'll work...
Also, do you have any other worldedit121.exe or worldedit.exe folders in there? any Newgen WE.exe folders?
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
It's not about creating new maps at start, it's about opening them whenever you double click them directly into JNGP.
For a lot of people it seems that whenever you double click your map on for example your desktop, it doesn't open it directly in JNGP or the standard world editor.
It just starts the editor without any map inside... and you'll have to use the file -> open or ctrl+O in order to open it.
I think its due to a registry key not being there for windows 7 and vista. I think it gets removed at some point but I'm still not sure by what.


It's not really that big of a deal but if it could be fixed that would be nice right?
(dammit, still couldn't get it fixed even though I added the registry key, tried a lot of things so far... -,-)

If its that much trouble to get it working for something so easy to workaround I'll probably stop trying so hard >.>
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
It load w3m map just fine, problem is w3x map file ^_^

oh really? I didn't even test it with w3m maps yet 0.o...

Ok you got my attention, will check it...

yay :D 4 hands can do more then 2



EDIT: found it! :D
Got it to work :)
(you gave me a pretty solid idea to find the problem... Since it was only w3x files causing the problem I simply searched my registry for w3x and found a folder which had a shell/open/command map that contained a value without -loadfile)

For anyone having trouble loading maps: open this rar, double click the .reg file, click yes and now you should be abled to open them.

EDIT2: oops, I forgot that this is only for those who have their JNGP inside: F:\Downloads\jassnewgenpack5d... you should probably change that.
To change it simply open the .reg with a text editor like notepad and change the path to your JNGP folder instead. Should be fairly simple...
 

Attachments

  • double click me.rar
    323 bytes · Views: 912
Level 14
Joined
Apr 20, 2009
Messages
1,543
Odd, for me it does work when I use -loadfile

And yeah I realised that, that's why I made the EDIT2
There is no relative path for it though since anyone can put their JNGP at a different spot on their HD/SSD...

EDIT: I could make the drive path relative but you'll never know if their JNGP is in their download folder...
I guess that manually changing the path would be best for those who want to have this fixed.
 
Level 6
Joined
Nov 24, 2012
Messages
218
oh really? I didn't even test it with w3m maps yet 0.o...



yay :D 4 hands can do more then 2



EDIT: found it! :D
Got it to work :)
(you gave me a pretty solid idea to find the problem... Since it was only w3x files causing the problem I simply searched my registry for w3x and found a folder which had a shell/open/command map that contained a value without -loadfile)

For anyone having trouble loading maps: open this rar, double click the .reg file, click yes and now you should be abled to open them.

EDIT2: oops, I forgot that this is only for those who have their JNGP inside: F:\Downloads\jassnewgenpack5d... you should probably change that.
To change it simply open the .reg with a text editor like notepad and change the path to your JNGP folder instead. Should be fairly simple...

Worked for me after playing with paths a bit! :)
Mines ended up being:
@="C:\\Downloads\\jassnewgenpack5d\\NewGen WE.exe -loadfile \"%1\""

To anyone where it doesn't work, make sure you right click a map, and go to "open with" and then browse to find NewGen WE after doing the above thing!
Thanks so much haha! Now the editor plays the opening sound effect! It used to be silent. Ooh and my map icons all changed from brown to blue :D. +rep!
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Worked for me after playing with paths a bit! :)
Mines ended up being:
@="C:\\Downloads\\jassnewgenpack5d\\NewGen WE.exe -loadfile \"%1\""

To anyone where it doesn't work, make sure you right click a map, and go to "open with" and then browse to find NewGen WE after doing the above thing!
Thanks so much haha! Now the editor plays the opening sound effect! It used to be silent. Ooh and my map icons all changed from brown to blue :D. +rep!

Yes, you do need to set the file association for w3x to your editor. I forgot to mention that.

Thanks for the feedback, I hope more people will find this as useful as you and me :)
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
thank you, Hashjie. now i can open a map directly without opening the .exe file :)

can this thing also be done using normal world editor ?



my editor still didn't play the opening sound though. but that doesn't matter i think.

Yes, I suppose for people who don't have JNGP that this registry key should be to the path of their original World Editor.exe instead of NewGen.exe.
The -loadfile needs to be the same and the " %1" should also be there in that case.

I think that should make it work for people who use the regular world editor.
(can't test it since I'm for some reason not allowed to set the file association to the regular world editor)

You could also create this registry key inside HKEY_CLASSES_ROOT\w3x_auto_file\shell\open\command yourself if you go into the registry editor by typing regedit in your windows start panel. Make sure you create this folder structure with keys.
(use this at your own risk, if you change the wrong keys or do something wrong inside your registry, this can have severe consequences.)

To do it correctly simply create new keys in order to create the folder hierarchy and create key values in order to set the path. (You can change the standard key value for the key command). A key is the folder, a key value is what is stored inside that folder. The registry basically stores values that are used by applications to remember specific options and preferences you've set for the application. This also counts for windows operations such as opening files, setting icons for your application shortcuts, setting a background for your windows logon etc.

About the opening sound: it's an option inside JNGP that allows you to disable sounds for the editor. I'm not sure why HesitationSnow's sound changed since it got nothing to do with this registry key fix I made :/. I don't know why it happened and I am unabled to test it out since it doesn't happen to me...

If HesitationSnow wants to have no sounds again he should simply change his JNGP options.
 
Last edited:
Level 14
Joined
Apr 20, 2009
Messages
1,543
Thanks ap0 :)

Doesn't FileType Manager simply change another registry key to the icon path you want it to be?

I'll take a look at it again when I get home so that this can be implemented into the registry key aswell :)

I was thinking about creating 2 registry keys:

1 for the standard world editor
1 for JNGP users

this way I also want to register the Open With application and the icon of which is used to open it with.
(Or just the standard w3x blue map icon)

Would be nice if all you'd have to do is change the path to make everything work instead of only fixing the opening of the map.
 
Last edited:
Level 14
Joined
Apr 20, 2009
Messages
1,543
To really make it efficient something has to be changed inside wehack.lua to alter that registry key.

This way it doesn't matter where your JNGP is located, it would automatically work. Currently I feel a bit too lazy to do it, sorry guys :/
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Oddly, the thread was on the first page...

Sorry for this late respond I've been absent for a really long time and see no one has answered your question yet.

When you right click the .reg file you can edit it with perhaps a text editor like notepad.
It'll show you some lines of text, one of which contains a path towards your Newgen WE.exe

More specifically:
Code:
F:\\Downloads\\jassnewgenpack5d\\NewGen WE.exe

Change this to the right path and when double clicking a w3x file it'll start and open your map in Newgen WE.

I might take a look at this thread at a later time to improve it. Right now I'm still too occupied with other concerns.
 
Status
Not open for further replies.
Top