HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Editing Strings Directly? Problems...

01-03-2004, 08:28 PM#1
LightCC
Hello.

I'm trying to edit the strings file directly. If I extract this, edit it with notepad, and add it back to my map file, the WE thinks it is corrupted - this is even if I don't change anything in the file (just 'save' in Notepad).

If I do the same thing using W3M Map Utilities (v2.35), with the 'Edit/Edit Strings' button, even without changing anything (just 'save' then 'yes, apply'), something even more weird happens. WE will load the map, but any changes I make to the Map description will not 'stick' when saved and reloading the map, and any custom strings edited will be removed to empty (including unit names, fields like tooltip, etc.). The other weird thing that happens is that displaying a string to all players won't work (it gets changed to an empty string), but if the display is a concatenated string it *will* work. So, displaying "Hi" will turn it into an empty string when saved, but displaying "H" + "i" works fine...


Anyway, I found all this out after significant development on a map, so my questions are thus:

Q1. Is there a way to directly edit the WTS file without corrupting the maps? Any direct string editor that actually works?

Q2. Is there any way to 'fix' the map now that it won't allow me to add or change any custom strings?


Note: W3M Map Utils *does* correctly edit the Map description and loading screen strings if you use the 'Edit/Edit Map Information' button. Perhaps there are end-line errors or the length of each string is saved in another file?

Q3: Or should I just leave the strings file alone and always find/edit everything in the WE?


Note 2: I have tried all this both with and without UMSWE 4.0, no difference.
01-03-2004, 09:57 PM#2
Extrarius
Remove the (attributes) file from the w3m/w3x after you edit any file inside it (it store checksums and such to prevent tampering, so thats why the editor says it is corrupt. If you remove it, WE will create a new one with the correct info next time you save the map)
01-04-2004, 02:50 AM#3
LightCC
Ahhh... thank you very much. That explains that part of it.

I guess then I should be able to edit all the raw values directly now whether the editor will edit the strings or not. Thanks.

However, if anyone knows another way to fix the string corruption problem I'm having, please let me know. :ggani:
01-04-2004, 07:09 PM#4
Starcraftfreak
I don't know if that can be the problem, but make sure that you save it as UTF-8 (below filetype, you can select that in Notepad when you save a file).
01-04-2004, 10:34 PM#5
LightCC
Yep...

All is working now in terms of editing the strings directly and replacing them in the w3m file. Just deleting the (attributes) file fixed that - Notepad works fine.

Still have the corruption problem from using W3M Map Utilities string editor though.. Stay away from that one. I can duplicate the corruption consistantly just by applying from that editor.

I used the unit editor (2.1) to insert a bunch of new TRIGSTR values and got all my strings back the way I want them, but now the unit editor messed up a bunch of other stuff... I read a post somewhere that said it messes up some of the attributes. Still seeing if I can fix them all.

So, is there another way other than WE to edit the unit data? Like another full map editor that might not have the string problem? It would be worth it to me to use even if it is just to edit strings.



Also an update on the string corruption...

Using the unit editor, I discovered more about the string corruption. For example, I go into the object editor and edit the 'tooltip extended' field for a unit. I then save the map.

If I edit the w3u file with the unit editor and look in the tooltip extended field, I find that the WE tried to create a new TRIGSTR value at the end of the strings list (for example: TRIGSTR_298 if the last one in the file is 297), but when I look in the strings file, there is no 298. It's like the WE thinks it created the new string, but for some reason it didn't ever get into the wts file. The new string *does* show up in the WE, but just doesn't get saved.

It's something in the map that has caused this to happen. My versions 1.62 and less don't have this happen - everything after that does have it happen. Just again for the record, this corruption happens whenever I use the W3M Map Utilities 2.5 string editor and apply the changes into the map W3M file.

Any ideas?