Save-Point
Help on an old problem. - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Games Development (https://www.save-point.org/forum-4.html)
+--- Forum: Code Support (https://www.save-point.org/forum-20.html)
+--- Thread: Help on an old problem. (/thread-3105.html)



Help on an old problem. - Yin - 12-02-2010

Can someone tell me how Ejlol did this???
http://save-point.org/showthread.php?tid=2905

I'm having the same problem again and don't know which event it is.


RE: Help on an old problem. - deValdr - 12-02-2010

Some events on the map is using a tile-graphic that no longer exists according to his post. See trough all your events and be sure that all have valid graphics.


RE: Help on an old problem. - Yin - 12-02-2010

I know... But there's SO many events if I just had a list printed out with his debugging thingie, it would be so much easier to find.


RE: Help on an old problem. - Hsia_Nu - 12-06-2010

what i would recommend before you go any further in development. keep a spreadsheet of all your maps and what graphic assests are being used. i wouldnt reference all events in the spreadsheet just ones that use graphical assets.


RE: Help on an old problem. - EJlol - 12-06-2010

dunno how I did, problably scripted something :P
Edit:
This might help you:
Code:
class ResourceChecker
  def checkMap(filename)
    @map = load_data(filename)
    for key in @map.events.keys
      event = @map.events[key]
      for page in event.pages
        if !FileTest.exist?('Graphics/Characters/' + page.graphic.character_name + '.png')
          # might be RTP
          begin
            bitmap = RPG::Cache.character(page.graphic.character_name, 0)
          rescue
            id = event.id.to_s
            x = event.x.to_s
            y = event.y.to_s
            pageid = event.pages.index(page).to_s
            filename = page.graphic.character_name
            p 'ID: ' + id,'X: ' + x,'Y: ' + y,'Page: ' + pageid,'Filename: ' + filename
          end
        end
      end
    end
    RPG::Cache.clear
  end
end

rs = ResourceChecker.new
rs.checkMap('Data/Map001.rxdata')

Edit 2: actually the script doesnt work at all. (it thinks everything doesnt exist :/)
edit 3: fixed.


RE: Help on an old problem. - Yin - 12-07-2010

Thanks, the problem was already fixed, but I didn't put resolved. But this still helps since I'll probably be dealing with this same problem again since I'm cutting a lot of tilesets.