Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Location Problem in ScmDraft
Location Problem in ScmDraft
Jul 5 2009, 6:53 am
By: r00k  

Jul 5 2009, 6:53 am r00k Post #1



One not existing Location appeared in my new map.
The name is a String of my Mission objectives.
When i delete the String, it takes the next String of my Misson Objectives and names the location with this name.
When i click on the name of the location nothing happens, so i cant delete it, cause it does not exist, only the name shows up.
Anyone ever had this and knows how to remove it.
Till now nothing bad happened, but i donīt have a good feeling about this thing being there.

edit: Additional Info: The Mission Objectives are extremly large, I think about 100 Strings, and 25 Triggers, maybe it has something to do with that.

The Problem !!!

The Solution ???


Post has been edited 2 time(s), last time on Jul 5 2009, 10:04 am by r00k.



None.

Jul 5 2009, 9:13 am JaFF Post #2



It's a string glitch caused by the editor. They can sometimes cause nasty problems. I suggest you load a backup that does not have this bug and work from there. Also, you might want to wait for other responses in this topic; maybe someone will suggest something wiser.



None.

Jul 5 2009, 3:55 pm rockz Post #3

ᴄʜᴇᴇsᴇ ɪᴛ!

change the string pointer in the scenario.chk to a blank string or open up ube and unrecycle strings.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Jul 5 2009, 6:07 pm r00k Post #4



I tried to use Uberation, but it did nothing. The Not existing location still exists. A Paradoxon.
Quote from rockz
change the string pointer in the scenario.chk to a blank string...
Can you explain how i do this ?
Unfortunatly I donīt know what the scenario.chk file is, or where it is located. How can i open it.
How can i change the string pointer to a blank string ? Questions over Questions...
I would really appreciate some help, cause i didnīt listen to Jaff and worked on an old Version.
The whole day... edit: and i dont stop...

Post has been edited 1 time(s), last time on Jul 5 2009, 6:18 pm by r00k.



None.

Jul 5 2009, 6:52 pm rockz Post #5

ᴄʜᴇᴇsᴇ ɪᴛ!

I'm not entirely sure how to do it as I've never done it before, but here's how:
Quote from wiki
"MRGN" Section
Note: This section is required for all game types, all versions.
This section contains all the locations that the map uses. In a scenario that is not Brood War, this section contains 64 locations. In a Brood War map, this section will expand to contain 255 locations. This section can be a size of 0 in melee.

Each location gets one of the following location entries. The 'Anywhere' location, is ALWAYS location 64.

* 4 byte long: Starting X coordinate of location (32 pt grid)
* 4 byte long: Starting Y coordinate of location (32 pt grid)
* 4 byte long: Ending X coordinate of location (32 pt grid)
* 4 byte long: Ending Y coordinate of location (32 pt grid)
* 2 byte integer: String number of the name of this location
* 2 bytes: Location elevation flags. If an elevation is disabled in the location, it's bit will be on (1)
o Bit 0 - Low elevation
o Bit 1 - Medium elevation
o Bit 2 - High elevation
o Bit 3 - Low air
o Bit 4 - Medium air
o Bit 5 - High air
o Bit 6-15 - Unused
I doubt you have ever opened up a map in a hex editor, so here's what you need to do. Open the map in some .mpq editor and extract scenario.chk. Open up scenario.chk in any hex editor and search for "MRGN". You'll come up to that section and the first location will be "location 0". Count to the next 16 bytes, and note that these are the four corners of the location. The next 2 bytes are the string reference. Set this number to the next unoccupied string. If you don't know what that is, then just change it to something you know you don't care about. The strings are listed in order (0 based) in the string editor in SCMDraft.

However, after re-reading your first post, I don't think this is the answer. Can you post the map so I can see exactly what the problem is?

If you just want the location to be deleted, select it in the tree and press delete.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Jul 5 2009, 11:13 pm r00k Post #6



When i first saw this, i thought you were making fun of me:
Quote from hex editor
0X064BA0 43 6F 75 6E 74 65 72 20 33 00 07 4D 65 72 63 68 ____Counter 3.Merch
0X064BB0 61 6E 74 3A 0D 0A 19 48 65 6C 6C 6F 20 74 68 65____ant:...Hello the
0X064BC0 72 65 2E 20 41 6E 79 74 68 69 6E 67 20 73 70 65 ____re. Anything sp
0X064BD0 63 69 61 6C 20 3F 00 4D 52 47 4E EC 13 00 00 00____cial?.MRGNî....
After i read this Article {scenario.chk}, downloaded the Mpq-Thing and a HexEditor things got a little better, but i still couldnīt fix it.

What i found out:
  • when i delete every location in the map the Paradoxon is still there and i cant delete it. (not in the map and not in the tree)
  • When i make 254 Locations my Anywhere Location is gone, i canīt create anymore Locations and the Paradoxon is still alive.
  • When i delete the String of the Paradoxon, it takes the next String after this one.
  • When i delete every Trigger in the Mission Objectives starting with the one with the Paradoxon Name in it, the location is gone. Yay !!!

What i know now:
So i know now that it is only connected to the Mission Objective Triggers, and does not affect the "normal" Triggers, which is good, but not perfect.
As i said before, i made a really nice Intro and i donīt wanna do that again, if i donīt have too.

What i suppose:
It somehow happened, that the Mission Objectives Section wrote Information into the Locations Section, or the other way around, which would make more sense, cause when i delete all Locations or set all entries in the Hex Editor to 0 the Paradoxon is still there, but when i delete the Information in the Mission Objectives Section, the Paradoxon is gone. Is there Maybe a unknown Map Limit of Mission Objective Strings/ Triggers, which no one reached before cause no on makes crazy Intros like i do ??? :-)

What i can do:
There are two ways to go now:
  • I delete all Mission Objective Triggers and hope that someone tells me a way to copy paste them in again, if not i rewrite them. :-(
  • I search till Saint Neverlands Day in the scenario.chk, delete everything suspicious and hope it works. :-(

As i am pretty sure i am going with one, cause i know what i am doing there, again the Question:
Does anyone know of a bugfree possibility to copy paste the Mission Objectives from one Map into another ?

thx rockz "the wise man"




None.

Jul 6 2009, 12:16 am rockz Post #7

ᴄʜᴇᴇsᴇ ɪᴛ!


This is what I wanted you to look at. Notice the highlighted cells. There's MRGN right after a whole bunch of strings (location 127 etc) and then there's 4 bytes of nothing particular. Then, there's the first 4 bytes, which is the X start value (0), the next 4 bytes which is the Y start value (8), and the ending values (104 and 120 respectively). Then, there's one more set of 4 bytes, the first two are the string reference. For this location (location 0), it's string 08 00. If we then count the string number in SCMDraft, we see exactly what it is. Apparently it's 1 based though. The next location starts right after this one (E8, 58, C8 01, 00 01 coincides with the boundaries of location 1, and it references string 09).

So this location uses string #8. If I wanted to, I could go back and check the strings which are conveniently right before this section, but it shows the same stuff, in a much harder to read format.

Now, what I want you to do is delete the paradoxon location or give it a new string so you can delete it. Each location will take up 20 bytes, so find your Paradoxon location and make MULTIPLE backups. To start editing the map afterwards, stick it back into a copy of the mpq.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Jul 6 2009, 10:42 am r00k Post #8



Good Morning.
Here is what i did in Hex Editor, to get rid of it, and learn a little how things work.
i just changed the Picture, this is not an actual screenshot

I put "0" into every Value from the beginning(MRGN) to the End (SPRP)of the Location Section.
Now i thought i deleted every Location, and set all it strings to 0 which is no String i guess.
After i did that, all of my 100 Locations were gone, in the Tree and on the Map, except the Paradoxon.
Which was still visible in the Tree. Thats why i call it a Paradoxon, cause it is not really a Location, it just shows up in the Location tree, although it doesnīt fall under the Location section.
this is a screenshot

However, when i delete all the Strings after the Name of the Paradoxon, it is gone, no matter if i donīt change a single Value in the Location Section.
So the Problem is ONLY the String, the Location has no Values (for,x,y start;x,y end;string) and does not exist in the Location Section. Weird huh ?
But remember, when i just delete the String of the Paradoxon in SCmDraft, it takes the Name of the next String, as long as this String is part of the Mission Objectives.
So i wonder if there is maybe some Value in the Strings Section (maybe the mission objectives section), which points to ( i dunno how to say this) the Location Names/Tree/... ???
What i mean is from Strings to Location, and not from Location to Strings, which you explained, and isnīt the Problem, because if i have "0" everywhere there is nothing left to point too, right ?

Unfortunatly as i am not a native Speaker, i am not sure if i understood this correctly:
Quote from wiki
"STR " Section
Note: Required for Melee game type OK
This section contains all the strings in the map. OK
Note: This section can contain more then 1024 strings and will work in Starcraft OK

* 2 byte integer: Number of strings in the section OK
* (# of strings) 2 byte integers: 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it). huh???
* Strings: After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character. OK
I used Trigger Duplicator to find out the String Number of the Paradoxon: It is 194.

Where is it, and do you think it will help if i change it.
Thats it so far. I will keep on working on the map and hope for the best...

to rockz:
I thought about posting the map again, and i will not do that, but i can pm it to you if you want to have a look on it again, and think you can fix it.



None.

Jul 7 2009, 3:02 am rockz Post #9

ᴄʜᴇᴇsᴇ ɪᴛ!

Alright, I got the map, but r00k doesn't want me to post, so I wont.

The problem isn't bad or anything, just annoying. There is one fake location which is only found in the location bar of scmdraft, and always refers to string 257. If there is no string 257, it doesn't exist. I have no idea how on earth to fix this problem, as I can't find it in the scenario.chk as a location, nor can I find it by just searching for "01 01" which is 257 in hex. I'm afraid the only way to find the problem is to take apart the entire map section by section, which I don't particularly want to do. Apparently this has happened to kaias, and it is of little concern.

After looking into it a bit further, I've found that it's also on another map I have, which leads me to believe that if you have 257 strings in scmdraft, you will get this "paradoxon" or fake location which has the name of whatever your 257th string is. Any other editor doesn't see this (or at least that I can tell).



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[04:59 am]
zsnakezz -- >:)
[04:59 am]
zsnakezz -- :)
[04:58 am]
zsnakezz -- somebody gets it
[04:58 am]
zsnakezz -- and its not all just numbers in my file screen
[04:57 am]
zsnakezz -- thank you for your comment though, good to know some people out there tried my map out
[04:57 am]
zsnakezz -- just kidding
[04:57 am]
zsnakezz -- ultra you have any thought or notes on undead invasion?
[2024-5-31. : 2:36 pm]
Wing Zero -- Bop em
[2024-5-31. : 2:36 pm]
Wing Zero -- Mods
[2024-5-29. : 9:40 pm]
Ultraviolet -- :wob:
Please log in to shout.


Members Online: Ultraviolet, Roy, Zycorax