Page 1 of 1

Changing tiles once and for all.

PostPosted: Thursday, 13th September 2012, 10:38
by white_noise
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.

Re: Changing tiles once and for all.

PostPosted: Thursday, 13th September 2012, 11:52
by palin
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.

Re: Changing tiles once and for all.

PostPosted: Thursday, 13th September 2012, 12:22
by white_noise
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 %)

Re: Changing tiles once and for all.

PostPosted: Thursday, 13th September 2012, 13:01
by galehar
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?

Re: Changing tiles once and for all.

PostPosted: Thursday, 13th September 2012, 13:38
by white_noise
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.

Re: Changing tiles once and for all.

PostPosted: Thursday, 13th September 2012, 14:18
by galehar
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.

Re: Changing tiles once and for all.

PostPosted: Friday, 14th September 2012, 12:36
by white_noise
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?

Re: Changing tiles once and for all.

PostPosted: Friday, 14th September 2012, 13:08
by BlackSheep
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.

Re: Changing tiles once and for all.

PostPosted: Friday, 14th September 2012, 13:29
by white_noise
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?

Re: Changing tiles once and for all.

PostPosted: Friday, 14th September 2012, 13:54
by CommanderC
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.

Re: Changing tiles once and for all.

PostPosted: Friday, 14th September 2012, 15:00
by galehar
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

Re: Changing tiles once and for all.

PostPosted: Friday, 14th September 2012, 16:27
by white_noise
Thanks. Everything works fine now.

Re: Changing tiles once and for all.

PostPosted: Saturday, 15th September 2012, 14:59
by white_noise
Can I disable automatic outlining for some tiles?

Re: Changing tiles once and for all.

PostPosted: Saturday, 15th September 2012, 15:16
by edlothiol
Find where the tile is listed in the dc-*.txt files in rltiles/, then put "%rim 0" before and "%rim 1" after the line.