Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old October 27, 2019, 21:11   #1
Bill Peterson
Apprentice
 
Join Date: Jul 2007
Location: Flyover country
Posts: 97
Bill Peterson is on a distinguished road
Send a message via AIM to Bill Peterson
Updated Gervais Tiles

I have a new .bmp and .prf files updated to include images for the 4.2.0 changes. Unfortunately, the package is too big to attach to a message. Any suggestions?
Bill Peterson is offline   Reply With Quote
Old October 27, 2019, 21:19   #2
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,860
Donated: $60
Nick will become famous soon enough
I've PM'd you an answer
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old October 28, 2019, 09:39   #3
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,672
PowerWyrm is on a distinguished road
Updated Gervais? From which tileset did you start? The regular one? Because there is an UT32 version much more complete. Looking forward to your changes, since in a near future I'm going to rework the monster list for PWMAngband and I'll have to do the same work.
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old October 28, 2019, 19:34   #4
Bill Peterson
Apprentice
 
Join Date: Jul 2007
Location: Flyover country
Posts: 97
Bill Peterson is on a distinguished road
Send a message via AIM to Bill Peterson
Quote:
Originally Posted by PowerWyrm View Post
Updated Gervais? From which tileset did you start? The regular one? Because there is an UT32 version much more complete. Looking forward to your changes, since in a near future I'm going to rework the monster list for PWMAngband and I'll have to do the same work.
I started with the file that's distributed with Angband 4.2.0. I thought about changing to Tangaria’s tileset but was concerned about variants that may want to copy things from Vanilla. So I ended up copying about 16 of Tangaria’s tiles and modifying the graf-dvg.prf and xtra-dvg.prf files. Unused images in the Vanilla tileset covered some of the additions.

After wasting too much time trying to work with Photoshop I ended up writing a couple of Python programs, one to break the tileset into individual tile images and one to rebuild the tileset. I'd be glad to post them if anyone is interested.
Bill Peterson is offline   Reply With Quote
Old October 28, 2019, 23:07   #5
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,936
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by Bill Peterson View Post
After wasting too much time trying to work with Photoshop I ended up writing a couple of Python programs, one to break the tileset into individual tile images and one to rebuild the tileset. I'd be glad to post them if anyone is interested.
Yes please!
__________________
takkaria whispers something about options. -more-
takkaria is offline   Reply With Quote
Old October 29, 2019, 04:25   #6
Bill Peterson
Apprentice
 
Join Date: Jul 2007
Location: Flyover country
Posts: 97
Bill Peterson is on a distinguished road
Send a message via AIM to Bill Peterson
Quote:
Originally Posted by takkaria View Post
Yes please!
Since they're so small I'll just quote them here rather than attaching files
Here's the code for splitting a tileset into individual images
Code:
'''
Created on Oct 23, 2019

@author: William Peterson

Created for Python 3.7 and Pillow 6.2
but should work with Python > 3.0 and a compatible version of Pillow


'''

from PIL import Image

tiles = Image.open('32x32.png')
print(tiles.mode,tiles.size)

for i in range(0x80, 0x100):
    for j in range(0x80, 0x9e):
        part = tiles.crop(((i-0x80)*32, (j-0x80)*32, (i-0x7f)*32, (j-0x7f)*32))

        part.save('{}-{}.png'.format(hex(j),hex(i)))
and here's the code for reassembling the file
Code:
'''
Created on Oct 24, 2019

@author: William Peterson


Created for Python 3.7 and Pillow 6.2
but should work with Python > 3.0 and a compatible version of Pillow


'''
from PIL import Image

whole = Image.new('RGBA',(4096,960))

for i in range(0x80, 0x100):
    for j in range(0x80, 0x9e):
        tile = Image.open('{}-{}.png'.format(hex(j),hex(i)))
         
        whole.paste(tile, ((i-0x80)*32, (j-0x80)*32, (i-0x7f)*32, (j-0x7f)*32))

print (whole.size)
whole.save('32x32test.png')
These should work for any rectangular tileset composed of square tiles, you just have to change the indexes. Since I was working with Angband .prf files I did all the indexing in hex, with the upper left corner being 0x80:0x80. Let me know if you have any questions.
Bill Peterson is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Gervais Tiles Bill Peterson Sil 22 January 31, 2014 19:25
New race + David Gervais tiles? Zambaku Vanilla 1 June 10, 2011 09:35
Cloak-Bug with Gervais Tiles Mondkalb Development 0 April 24, 2009 09:19
Problem with David Gervais Tiles JoyrexJ9 Vanilla 8 April 11, 2009 16:39
getting David Gervais' 32x32 tiles to work agentshags Vanilla 13 December 3, 2007 18:30


All times are GMT +1. The time now is 17:47.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.