1 (edited by catpaw 2008-05-02 23:58:33)

Topic: Script to workaorund big tilesets...

The following gimp script-fu will workaround the teewars editor taking pixels from your images:

(define (catpaw-magic img drawable)
  (gimp-undo-push-group-start img)

  (define b -1)
  (set! b (+ b 64))
    (while (< b 1024)
      (gimp-rect-select img b 0 1024 1024 REPLACE FALSE 0)
      (gimp-edit-cut drawable)
      (let ((selfloat (car (gimp-edit-paste drawable FALSE))))
       (gimp-layer-set-offsets selfloat (+ b 1) 0)
       (gimp-floating-sel-anchor selfloat)
      )
      (gimp-rect-select img (+ b 1) 0 1 1024 REPLACE FALSE 0)
      (gimp-edit-copy drawable)
      (let ((selfloat (car (gimp-edit-paste drawable FALSE))))
       (gimp-layer-set-offsets selfloat b 0)
       (gimp-floating-sel-anchor selfloat)
      )
      (set! b (+ b 64))
  )
  (set! b -1)
  (set! b (+ b 64))
    (while (< b 1024)
      (gimp-rect-select img 0 b 1024 1024 REPLACE FALSE 0)
      (gimp-edit-cut drawable)
      (let ((selfloat (car (gimp-edit-paste drawable FALSE))))
       (gimp-layer-set-offsets selfloat 0 (+ b 1))
       (gimp-floating-sel-anchor selfloat)
      )
      (gimp-rect-select img 0 (+ b 1) 1024 1 REPLACE FALSE 0)
      (gimp-edit-copy drawable)
      (let ((selfloat (car (gimp-edit-paste drawable FALSE))))
       (gimp-layer-set-offsets selfloat 0 b)
       (gimp-floating-sel-anchor selfloat)
      )
      (set! b (+ b 64))
  )
  (gimp-undo-push-group-end img)
  (gimp-displays-flush))

(script-fu-register "catpaw-magic"
                    "Catpaw Magic"
                    "Bla 64"
                    "Catpaw"
                    "Catpaw"
                    "2008-05-02"
                    "RGB*, GRAY*"
                    SF-IMAGE "Image" 0
                    SF-DRAWABLE "Layer" 0)
(script-fu-menu-register "catpaw-magic"
                         "<Image>/Filters/Distorts")

On unix systems put this in your "~/.gimp-2.4/scripts" folder, windows I don't know.

It will add the script "catpaw-magic" into Filters->Distorts->"Catpaw Magic" execute it, and it will add a blank line every 64 pixels, so when the teewars editor cuts it away, you are again where you started.

Oh yes, the image needs exact to be 1024x1024 in size. Will not guarantee for any workings and non-crashes on other image sizes!

2

Re: Script to workaorund big tilesets...

nice nice wink

Remember me? Questions? Just leave a message, I will respond within 72 hrs!

3 (edited by shmafoozius 2008-05-02 23:25:04)

Re: Script to workaorund big tilesets...

Uh... so we have to use 63x63 tiles in 1024x1024 to get it working in Teeworlds? (I'm using Photoshop, so the script's of no use for me).
This SOOOOO needs bo be fixed.

bam: WARNING:'src/game/server/gamemodes/mod.cpp' comes from the future

4

Re: Script to workaorund big tilesets...

shmafoozius wrote:

(I'm using Photoshop, so the script's of no use for me).

Gimp is a free download, so the "no-use", is just a "i don't want to" smile Gimp is *really* free in contrast the  photoshop 90% of people use is pirated...

5

Re: Script to workaorund big tilesets...

I just fixed the script a little, while the grid made a perfect reassembly in the tile view, the game yet reassembles differently in the ingame view? Well right now it still isn't perfect, and you get missing lines, but after the script applied it at least betters the situation quite somewhat...