Changing tiles once and for all.


Problems running or configuring the software, commands & options, compiling, different platforms, using the interface, documentation, etc.

User avatar

Spider Stomper

Posts: 246

Joined: Thursday, 19th July 2012, 11:07

Post Thursday, 13th September 2012, 10:38

Changing tiles once and for all.

Is there a way to apply alternative tiles to a game except manually changing the png-maps? Can I somehow force a game to use another png files for some tiles instead of default ones? Even thinking about changing everything manually for every new trunk, makes me sick. And some of the changes I prefer will never be officially added to a game.

Slime Squisher

Posts: 341

Joined: Wednesday, 14th September 2011, 10:10

Post Thursday, 13th September 2012, 11:52

Re: Changing tiles once and for all.

white_noise wrote:Is there a way to apply alternative tiles to a game except manually changing the png-maps? Can I somehow force a game to use another png files for some tiles instead of default ones? Even thinking about changing everything manually for every new trunk, makes me sick. And some of the changes I prefer will never be officially added to a game.


Are you on windows or on MacOSX or linux?
If you are on the latters, symlinking is a good idea.
My wins so far - FeBe, KoBe, DsCo, MDFi, DsBe
User avatar

Spider Stomper

Posts: 246

Joined: Thursday, 19th July 2012, 11:07

Post Thursday, 13th September 2012, 12:22

Re: Changing tiles once and for all.

Windows, I'm afraid.
I was thinking about a pile of one-tile png files with specified names. And a directory from which the game can pick it up.
I think I've read about something like this somewhere. Although it may be another game %)
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Thursday, 13th September 2012, 13:01

Re: Changing tiles once and for all.

I think the easiest way would be to commit them in a local branch and then compile and install the game from it. You could keep your branch up-to-date by merging trunk in it or rebasing it.
What are those changes that will never be officially added?
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...
User avatar

Spider Stomper

Posts: 246

Joined: Thursday, 19th July 2012, 11:07

Post Thursday, 13th September 2012, 13:38

Re: Changing tiles once and for all.

galehar wrote:I think the easiest way would be to commit them in a local branch and then compile and install the game from it. You could keep your branch up-to-date by merging trunk in it or rebasing it.

Where can I read more about it? Like some manual for dummies?

What are those changes that will never be officially added?

Scrolls, some icons, inventory backgrounds and indications, centaurs, quakkas, water etc. I do not saying that this tiles are definetely better. If the majority do not likes it (or indifferent) they certainly shouldn't be added to the game. But I would like to use it for my personal enjoyment.
Some of the changes from open issues may be added later. I understand that it takes time. But this isn't the main point here. I'd like to keep ALL my changes, even the ones that nobody else wants. But the more changes I made the harder to keep track of them. And swapping to another trunk seems impossible.
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Thursday, 13th September 2012, 14:18

Re: Changing tiles once and for all.

white_noise wrote:Where can I read more about it? Like some manual for dummies?

Start with crawl's INSTALL.txt. You need to be able to download the sources and compile. Next, check docs/develop/git/quickstart.txt for some basic git setup. You can also check the official git documentation, but it's pretty scary. And you only need to know a few commands. Just use it to learn more about the commands I mention below if you have any problem with them. Create you branch with git checkout -b my_tiles (or whichever branch name of your choice). Then, here is the workflow:

Add your tiles to the source. Edit the rltiles/dc-foo.txt files and possibly some source files (read tiles_creation.txt if you haven't already). Next, type git commit -a to commit your changes. Use "git add" first if you have added new files. If you want to submit them, type git format-patch -1. It will make a patch file extremely easy for us to commit.
To keep your branch up-to-date, type:
  Code:
git fetch origin master:master
git rebase master

The first command allows you to pull the latest changes to master without having to leave your branch. Basically, it's a shortcut to "git checkout master; git pull; git checkout my_tiles". The second command rebase your branch on top of trunk. It's a bit complicated to explain, but it has the advantage of keeping your changes on the top of the branch. If you have issues with it, use "git merge master" instead which might be a bit easier.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

For this message the author galehar has received thanks:
white_noise
User avatar

Spider Stomper

Posts: 246

Joined: Thursday, 19th July 2012, 11:07

Post Friday, 14th September 2012, 12:36

Re: Changing tiles once and for all.

It works. Kinda. But damn this thing is unfriendy.
I am commiting the changes and it asks me for message. How can I get out of there? All I can do is edit this message. "Enter" key do nothing outside of editing mode. And there is no commnd line either.

Also, should I git add EVERY changed file by name?

Ziggurat Zagger

Posts: 3163

Joined: Friday, 6th January 2012, 18:45

Post Friday, 14th September 2012, 13:08

Re: Changing tiles once and for all.

git add is for files that didn't exist already. If you're replacing a file, you don't need to add it, just commit the changes.

When you commit, it opens the default text editor, which in msysgit is vim. The interface is pretty obscure. Google "vim commands" for a guide.

For this message the author BlackSheep has received thanks:
white_noise
User avatar

Spider Stomper

Posts: 246

Joined: Thursday, 19th July 2012, 11:07

Post Friday, 14th September 2012, 13:29

Re: Changing tiles once and for all.

BlackSheep wrote:git add is for files that didn't exist already. If you're replacing a file, you don't need to add it, just commit the changes.

Are you sure?

Git doc says:
by using git add to incrementally "add" changes to the index before using the commit command (Note: even modified files must be "added");

But I won't believe it.

Also, let's say I want to compile tile version of Crawl into c:/games/crawl
The command should be: make TILES=y /c/games/crawl
Right?

Spider Stomper

Posts: 243

Joined: Sunday, 28th August 2011, 14:04

Post Friday, 14th September 2012, 13:54

Re: Changing tiles once and for all.

You can easily avoid running 'git add something.png' for each file. Run 'git commit -a', which automatically adds all the files that have been changed.

white_noise wrote:Also, let's say I want to compile tile version of Crawl into c:/games/crawl
The command should be: make TILES=y /c/games/crawl
Right?

I think it is: make install TILES=y prefix=/some/place.
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Friday, 14th September 2012, 15:00

Re: Changing tiles once and for all.

Putting a commit message is mandatory. The default text editor is vi. It is a great text editor but not very friendly. You can change it with "git config --global core.editor" but I'm not sure how well it work with a windowed editor or path with spaces and such. Or just learn the basic vi commands: i to enter insert mode, type your message then echap :x enter.
git commit -a will commit all changed files. Without -a, it will only commit files which were added with git add. git add is necessary when you add new files. You can use wildcards to it. git add -A will add all untracked files. Works well if you don't let any junk file in the working directory. Don't forget git status to see changed files, untracked files and staged files (the ones which will be committed).

white_noise wrote:The command should be: make TILES=y /c/games/crawlRight?

make install DESTDIR=/c/games/crawl TILES=y
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

For this message the author galehar has received thanks:
white_noise
User avatar

Spider Stomper

Posts: 246

Joined: Thursday, 19th July 2012, 11:07

Post Friday, 14th September 2012, 16:27

Re: Changing tiles once and for all.

Thanks. Everything works fine now.
User avatar

Spider Stomper

Posts: 246

Joined: Thursday, 19th July 2012, 11:07

Post Saturday, 15th September 2012, 14:59

Re: Changing tiles once and for all.

Can I disable automatic outlining for some tiles?

Dungeon Master

Posts: 125

Joined: Sunday, 8th May 2011, 21:54

Post Saturday, 15th September 2012, 15:16

Re: Changing tiles once and for all.

Find where the tile is listed in the dc-*.txt files in rltiles/, then put "%rim 0" before and "%rim 1" after the line.

For this message the author edlothiol has received thanks:
white_noise

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 37 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.