Fangames > Programming Questions

help sheepy flocked up

(1/1)

Sheepness:
im making a fangame atm and i suddenly decided that i wanted to change the tileset of one of my stages, but since that tileset was already used for the previous stage, i can't just edit the Backgrounds file... so i made a new tileset as a separate file and tried to replace all the tiles that way, but it turns on i can't do that without doing it one by one... is there any way i can replace the tileset for a certain room without doing it manually? my levels are all like 15 screens long...

Starz0r:
If it is the same tileset template (4 tiles), can't you just copy paste over the original asset? The changes would take place immediately, you don't really give us a lot of info to help you with.

Sheepness:
i used the same tileset in multiple rooms, so if i did that it would replace the tiles in those rooms too, which i don't want D:

patrickgh3:
There's no way to do this in the editor as far as I know. But you can do it manually by editing the room XML files, which is pretty straightforward.

This is the basic process, assuming you're using studio. You'll need a non-Notepad text editor such as Notepad++ or Sublime Text if you don't have one already. Open the .room.gmx file in the rooms folder that you want to change. Use the "find and replace" feature to replace the name of your old background with the new one, e.g. bgCoolTiles -> bgCoolerTiles. You can scroll down to all the <tile> elements to verify that all the the bgName properties were changed. Save the file and tab back to GM. Click yes to the "want to reload the file?" dialog if it appears. If you don't have that preference enabled, reopen the project. The room should now be changed. Yay!

If you're not using studio (grrrrrrr), get Gmk-splitter, and you can decompose your project file, find-and-replace in the room file, and recompose it. The XML will be formatted differently but find-and-replace still works just fine. Be sure to save a backup before using Gmk-splitter just in case.

Knowing that you can edit various resource files manually can really come in handy sometimes.

Sheepness:
HOLLY SH**P it worked... wow, that solved everything :PogChamp: ... omg thanks man
[insert PAT'S BALLS HAVE ARRIVED copypasta]

Navigation

[0] Message Index

Go to full version