Changing the name of a map?

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

krille
Newcomer
Posts: 17
Joined: May 28th, 2008, 1:56 am

Changing the name of a map?

Post by krille »

Hello!

I'm trying to change the name of a map. I have two problems:

First the minor one: In function config, If I change the line:

Code: Select all

call SetMapName("TRIGSTR_175")
into:

Code: Select all

call SetMapName("New Map Name")
TFT crashes. I have to change the entry in war3map.wts instead. Any reason why? I haven't had any issues with SetMapName before?


Next I want to change the name of the map as it appears in the list of maps to choose from (ie when hosting). The problem is, I don't find any JASS for this. Instead the only "solution" I've found it to HEX EDIT the game name. But it limits me to a maximum of as many characters as the original map name is. Ie if the original is "Map" I can't rename it into anything longer than three characters. I want to expand the map name, but I haven't figured out how. This is my major problem and where I need your help! (Simply inserting bytes won't work as then you won't be able to play the map as WC3 thinks it is corrupted. And yes, I have removed the Attributes file.)

Thanks!

~ Kris
krille
Newcomer
Posts: 17
Joined: May 28th, 2008, 1:56 am

Re: Changing the name of a map?

Post by krille »

For (1) it seems any changes in war3map.j causes TFT to crash. It seems to be some kind of new and fancy protection. And we're trying to address this in this thread.

For (2), look at the attached picture. Would it work to simply move the red part a few steps to the right? That is, would inserting X (say ten) spaces (0x20 bytes) in front of the red part and then removing X (say ten) 0x00 bytes to the right of the byte in blue work?

I tried doing this and it seemed to work, but I'd rather avoid any hidden bugs caused by this. Is this the proper way of doing it? Or rather, what is the proper way of doing it?
You do not have the required permissions to view the files attached to this post.
Bushido

Re: Changing the name of a map?

Post by Bushido »

do not double post -.- there's an edit button...
krille
Newcomer
Posts: 17
Joined: May 28th, 2008, 1:56 am

Re: Changing the name of a map?

Post by krille »

King-Bushido wrote:do not double post -.- there's an edit button...
Sorry. but I thought the new post wouldn't come to anyone's attention since they'd probably read the thread already (since I posted it yesterday).

Anyway, you as a moderator know anything about this? (The topic I mean.)
Bushido

Re: Changing the name of a map?

Post by Bushido »

not much..
but may i ask , why u want to change the mapname?
also , it's not a wonder why it's crashing..u are changing the map name only..u have to change the whole game too..
krille
Newcomer
Posts: 17
Joined: May 28th, 2008, 1:56 am

Re: Changing the name of a map?

Post by krille »

King-Bushido wrote:not much..
(1) but may i ask , why u want to change the mapname?
(2) also , it's not a wonder why it's crashing..u are changing the map name only..u have to change the whole game too..
(1) I've worked out a bug fix for the map (which the creator has missed for four revisions, so I'm fed up with relying on him). And I need to be able to differentiate between the fixed version and the original (filename-only is impratical and SetMapName-only is a very dirty fix, you don't want two different versions of a map appear the same in the map list).

The bug fix is trigger-only. I have no interest in changing anything else than the map name, war3map.wts and war3map.j at this point.

I think my solutions for the map name should work. I just don't know for sure as I haven't been able to find complete information about the header of w3x files. I know simply extending it won't work, however, as it's fixed at 500 bytes (iirc) and I've already tried that (and that corrupts the map).

(2) And no, it's not the only change. But that change alone breaks the map (the SetMapName call). In fact any change to the war3map.j makes TFT crash. That's why I think it's some weird sort of map protection. Changing "war3map.wts" does not crash the map however. Weird. And yeah, as it stands, my bug fix is only theoretical as I can't get the map to run (since any changes to war3map.j breaks it).


edit: Also, could you please elaborate on this "it's not a wonder why it's crashing..u are changing the map name only..u have to change the whole game too.."?

Thanks!
User avatar
weirdone2
Forum Staff
Posts: 926
Joined: June 3rd, 2007, 8:03 pm

Re: Changing the name of a map?

Post by weirdone2 »

Some maps have incorporated a name check so you'll just have to find something that is checking the map name and disable it before you try changing the name.
krille
Newcomer
Posts: 17
Joined: May 28th, 2008, 1:56 am

Re: Changing the name of a map?

Post by krille »

weirdone2 wrote:Some maps have incorporated a name check so you'll just have to find something that is checking the map name and disable it before you try changing the name.
Number is already "solved" (see my second post in this thread).

Number two was and still is the major issue.
User avatar
weirdone2
Forum Staff
Posts: 926
Joined: June 3rd, 2007, 8:03 pm

Re: Changing the name of a map?

Post by weirdone2 »

Oops my bad, anyhow it seems you found a way that works? I myself haven't had the need to change a map name so I don't have anything to tell you their, I can tell you to try testing out with a hex compare by just makeing new map saving then saveas with a diff name and see whats changed.
krille
Newcomer
Posts: 17
Joined: May 28th, 2008, 1:56 am

Re: Changing the name of a map?

Post by krille »

weirdone2 wrote:Oops my bad, anyhow it seems you found a way that works? I myself haven't had the need to change a map name so I don't have anything to tell you their, I can tell you to try testing out with a hex compare by just makeing new map saving then saveas with a diff name and see whats changed.
Well, I ended up doing as I suggested in the second post. Seems to work fine. So far so good anyway. My only problem with it is that I really don't know what those bytes I'm moving actually mean. (I'm quite positive the 0x00 is just a normal \00 indicating the end of a string, just as in C++. But the rest? They seem to be different from map to map.)