ID:2184747
 
(See the best response by ForwardslashN.)
So I have map that has TONS of turfs that need to be objects. I changed them in the code & began changing them individual in the map instance editor. After an hour of trying to change them I was only 1/3 down the list, Thinking there had to be an easier way. I open the map in Notepad and easily replace the /turf/land_objects into /obj/land_objects. Afterwards everything compiled correctly I was able to open and view the map cleanly, but when I run the game I get this ".BYOND Error: corrupt map data in world file failed".


Is there an easy, simple way to change a group of types from turf to objs in the map editor cause I seem to have to do this occasionally and its can be a tedious process.
Best response
You can ctrl+H to batch replace whatever you like within DM, specifically paths. Is this what you are trying to do?
I have tons of /turf/land_objects/1-500 on the map. I changed the code to /obj/land_objects/1-500. I can't load map cause I need to change all of those map objects in the Map Editor to /obj/land_objects.
I've had the map crash on me when loaded through DM because of the changes I've made elsewhere, but I never ran into corrupted map files while running the game. I'm sure Lummox will know how to resolve the issue.
I hope you backed things up before you did that look for/replace. ForwardslashN's method is how I usually take care of changing lots of things in a short period of time. I'd suggest you try and accomplish this via that method. But yeah, if you still have your OG map and it's intact you could always try the long way.

That being: revert back to your working map source, goto /turf/land_objects in your DM file and change it to /obj/land_objects and then on compile you'll get your usual "this shit isn't here" error. And that's your queue to hop over to your map file and just manually change the turfs to obj's.

Although seeing that you have 500 objects, that's probably going to be really time consuming.(I think that's what you were talking about in the first place)

Editing things directly in notepad I believe is a no-no, so don't do that. I'm going in circles here but ultimately I believe ForwardslashN's suggestion would be best. To do it correctly, you'll need to both your turf/land_objects and obj/land_objects intact. Although in the future I'd highly suggest you don't clutter your object tree and instead adopt the same style of map building Ter13 uses: http://www.byond.com/ forum/?post=1620724&hl=sunday%20snippet&hla=Ter13

I find that this method allows me to build maps faster as I can clearly see more map objects at a time. I believe it is less cpu intensive as well.
I didn't make this map, a friend spent a lot of time working on it. I just want to know a simple way of changing a group of turfs into objects in the map editor, cause this isn't the first time I've done something like this. If there isn't one I will make it a request a feature for it. And I don't see why changing the objects in notepad wouldn't work. It clearly works fine and allows me to enter the map and all the objects are as I want it. The only problem is I get a corrupt map error at runtime.
I'm thinking it probably works correctly but is creating too many pops which is what is giving the runtime error or something.
FYI: I wasn't trying to be critical, but instead showing how I handle map objects. Once I started making them like this, I couldn't go back! haha.

Anyway, did the search for/replace method crop any results? I don't think I read a response from you pertaining to that method.
Unforunately you can't search & replace in this screen.
You can though on the actual map editor. As Forward mentioned, CTRL+H while on the map editor will bring up a find path/replace.

You just need to have BOTH a turf/land_objects and /obj/land_objects in place so you can access your map and then do the switch.
Just open the map in Notepad and Find/Replace the path in question, tada.
@FlameGuardian That's basically the samething as individually replacing it in the Error Box.
@Nadrew That's exactly what I did and that's what giving me this error. "BYOND Error: corrupt map data in world file failed"
Sounds like you did it wrong then, hope you made a backup.
Also, keep in mind if the turf you replaced exists in massive numbers you could be hitting memory and allocation limitations. 10,000 objects use massively more resources than 10,000 turfs.
I did make backups, and I can easily change it back.
All I did was replace /turf/land_objects with /obj/land_objects.

It opens and displays correctly in Dream Maker but it just doesn't load correctly in game.
Yeah, sounds like you're hitting some limits.
Yeah that may be the problem.
Heres a copy of the mapfile before changing the /turf/land_objects into /obj/land_objects. if you want to have a look to see if I may be hitting a limitation.
https://www.dropbox.com/s/vdh9st47vstwda1/Map.txt?dl=0
Page: 1 2