Author Topic: help sheepy flocked up  (Read 1296 times)

Sheepness

  • Wannabe
  • Posts: 23
  • @( • Y •)@ψ
  • OS:
  • Windows 8.1/Server 2012 Windows 8.1/Server 2012
  • Browser:
  • Chrome 49.0.2623.75 Chrome 49.0.2623.75
    • View Profile
    • Sheep Molestor
  • Playstyle: Keyboard
help sheepy flocked up
« on: March 07, 2016, 12:02:47 AM »
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...
\@(◕ Y ◕✿ )@/

Starz0r

  • Owner
  • The Kid
  • Administrator
  • Posts: 343
  • Hall Of Fame
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 50.0.2657.3 Chrome 50.0.2657.3
    • View Profile
  • Playstyle: Keyboard
Re: help sheepy flocked up
« Reply #1 on: March 07, 2016, 01:00:29 AM »
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

  • Wannabe
  • Posts: 23
  • @( • Y •)@ψ
  • OS:
  • Windows 8.1/Server 2012 Windows 8.1/Server 2012
  • Browser:
  • Chrome 49.0.2623.75 Chrome 49.0.2623.75
    • View Profile
    • Sheep Molestor
  • Playstyle: Keyboard
Re: help sheepy flocked up
« Reply #2 on: March 07, 2016, 01:13:33 AM »
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:
\@(◕ Y ◕✿ )@/

patrickgh3

  • Spike Dodger
  • Posts: 169
  • stay optimistic! :D
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Firefox 44.0 Firefox 44.0
    • View Profile
    • Github
  • Playstyle: Keyboard
Re: help sheepy flocked up
« Reply #3 on: March 07, 2016, 03:46:10 AM »
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

  • Wannabe
  • Posts: 23
  • @( • Y •)@ψ
  • OS:
  • Windows 8.1/Server 2012 Windows 8.1/Server 2012
  • Browser:
  • Chrome 49.0.2623.75 Chrome 49.0.2623.75
    • View Profile
    • Sheep Molestor
  • Playstyle: Keyboard
Re: help sheepy flocked up
« Reply #4 on: March 07, 2016, 06:12:17 AM »
HOLLY SH**P it worked... wow, that solved everything :PogChamp: ... omg thanks man
[insert PAT'S BALLS HAVE ARRIVED copypasta]
\@(◕ Y ◕✿ )@/