Module howto: hints for a total newbie?

All development conversation and discussion takes place here

Moderator: Moderator

Message
Author
Altefcat
Wayist
Posts: 22
Joined: Thu Dec 09, 2010 9:38 am

Module howto: hints for a total newbie?

#1 Post by Altefcat »

Hello to all the ToME community,

First I'd like to say that I've discovered T4 some days ago, and I'm definitively hooked! I am used to play with graphical tiles since the old days of ZangBandTk, and I'd like to change ToME4 tiles to have David Gervais and Crawl tiles:
  • change existing tiles by new ones
  • add tiles to items or monsters that do not have it
  • change the player tile according to his equipment
Where should I look first to get used to modding ToME, is there a guide or something? I am a total newbie at this, so please be kind and speak slowly! :)

Zonk
Sher'Tul
Posts: 1067
Joined: Sat Mar 01, 2003 4:01 pm

Re: Module howto: hints for a total newbie?

#2 Post by Zonk »

http://te4.org/wiki/t4modules-module-howto-guides
should be useful.

As for what you're doing - it's quite easy, I'm doing something similar(but not quite): Adapting some Gervais and Crawl tiles for my module. I might even send you some if you don't want to extract them yourself using GIMP - in ToME, every tile is its own image file.
ToME online profile: http://te4.org/users/zonk
Addons (most likely obsolete): Wights, Trolls, Starting prodigy, Alternate save/resistance system

Altefcat
Wayist
Posts: 22
Joined: Thu Dec 09, 2010 9:38 am

Re: Module howto: hints for a total newbie?

#3 Post by Altefcat »

Thank you for your link; that's interesting, but I was more looking for a global presentation of how modules work, interact with the engine and the media data. For instance, if I want to customize the main ToME module, do I need to tweek the existing module, or can I build my own module and load it afterward?

I have found ref to png files in some lua files, such as game\modules\tome\data\general\npcs\ant.lua; so I guess all is hardcoded in the lua code. But I can't find where the player tile is set...

Is there a way to change the default font used? I have found some settings in C:\Documents and Settings\username\T-Engine\4.0\settings, maybe there?
As for what you're doing - it's quite easy, I'm doing something similar(but not quite): Adapting some Gervais and Crawl tiles for my module. I might even send you some if you don't want to extract them yourself using GIMP - in ToME, every tile is its own image file.
Are you removing the background of each tile so that it's transparent? I'm interested! Maybe we could coordinate our efforts and set some common repository?

Zonk
Sher'Tul
Posts: 1067
Joined: Sat Mar 01, 2003 4:01 pm

Re: Module howto: hints for a total newbie?

#4 Post by Zonk »

Altefcat wrote:Thank you for your link; that's interesting, but I was more looking for a global presentation of how modules work, interact with the engine and the media data. For instance, if I want to customize the main ToME module, do I need to tweek the existing module, or can I build my own module and load it afterward?
There are two example modules (in your /modules)folder.
They're basically the same, except one is realtime.
I have found ref to png files in some lua files, such as game\modules\tome\data\general\npcs\ant.lua; so I guess all is hardcoded in the lua code. But I can't find where the player tile is set...
You just set the the 'image'variable for the player(as you would with any other actor, such as objects or grids).
You can do that in descriptors.lua to start.
For example, putting 'image=player.png' in the copy field for the base descriptor would make the player use the 'player.png' tile in the /gfx/ folder
Is there a way to change the default font used? I have found some settings in C:\Documents and Settings\username\T-Engine\4.0\settings, maybe there?
Not sure about fonts.
Are you removing the background of each tile so that it's transparent? I'm interested! Maybe we could coordinate our efforts and set some common repository?
Yep. It's quite easy really.
I don't have much experience with repositories, but I'd be happy to help, and provide the tiles I've already extracted for some of which I made different versions as I think they'd fit 'better' in my module.
change the player tile according to his equipment
As for this - I love the way Crawl handles this, it's pretty fun(you can build your player tile in game), although probably hard to implement here(but certianly not impossible).
A compromise I considered was allowing the player to select ANY of many premade pics by using a menu.


Also: you might want to visit the chat channel, we talk about modding fairly often.
ToME online profile: http://te4.org/users/zonk
Addons (most likely obsolete): Wights, Trolls, Starting prodigy, Alternate save/resistance system

Altefcat
Wayist
Posts: 22
Joined: Thu Dec 09, 2010 9:38 am

Re: Module howto: hints for a total newbie?

#5 Post by Altefcat »

Thanks for your replies. I have made a little Python script to convert every DGervais tiles with a transparent background.

There are many choices among those tiles, but I'd like to tweak them to support Tome4 materials: iron, steel, dwarven steel, stralite, voratun. Are there colors already associated with these materials ?

You can find different tries that I made with two hand axes. What do you think?
Attachments
axe-steel.png
axe-steel.png (752 Bytes) Viewed 9797 times
axe-iron.png
axe-iron.png (811 Bytes) Viewed 9797 times
axe-dsteel.png
axe-dsteel.png (799 Bytes) Viewed 9797 times

Altefcat
Wayist
Posts: 22
Joined: Thu Dec 09, 2010 9:38 am

Re: Module howto: hints for a total newbie?

#6 Post by Altefcat »

the last ones...
Attachments
axe-voratun.png
axe-voratun.png (820 Bytes) Viewed 9796 times
axe-stralite.png
axe-stralite.png (799 Bytes) Viewed 9796 times

Altefcat
Wayist
Posts: 22
Joined: Thu Dec 09, 2010 9:38 am

Re: Module howto: hints for a total newbie?

#7 Post by Altefcat »

some tests with darker tones
Attachments
axe-test2.png
axe-test2.png (818 Bytes) Viewed 9796 times
axe-test.png
axe-test.png (799 Bytes) Viewed 9796 times

Altefcat
Wayist
Posts: 22
Joined: Thu Dec 09, 2010 9:38 am

Re: Module howto: hints for a total newbie?

#8 Post by Altefcat »

After some thinking I think I will go with this ones:
  • iron: rusted red
  • steel: base tile
  • dwarven steel: blueish from base tile
  • stralite: darken gray
  • voratun: darken blueish
Attachments
2haxes.png
2haxes.png (5.35 KiB) Viewed 9786 times

Altefcat
Wayist
Posts: 22
Joined: Thu Dec 09, 2010 9:38 am

Re: Module howto: hints for a total newbie?

#9 Post by Altefcat »

Finally I came with this:
  • iron: rusted red
  • steel: base tile
  • dwarven steel: darken gray
  • stralite: golden
  • voratun: blueish from base tile
In that way the tiles are more different one from another.

All the basic tiles for objects are done (around 165 tiles); I have started changing artifacts, but there are still a lot to do.

Here is a zip for those who want to have a look. The content of the zip file must be extracted to the game\modules\tome folder:

http://www.elderlore.com/wp-content/plu ... d.php?id=3

marchewka
Thalore
Posts: 156
Joined: Thu Dec 30, 2010 9:52 am

Re: Module howto: hints for a total newbie?

#10 Post by marchewka »

->

"Access denied
You are not authorized to access this page. "

How could I get access to this guide?

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Module howto: hints for a total newbie?

#11 Post by yufra »

Good catch marchewka, the wiki changed software and these pages don't seem to have made it. I'll try tracking down someone who knows about this stuff...
<DarkGod> lets say it's intended

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Module howto: hints for a total newbie?

#12 Post by darkgod »

Fixed the wiki page
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

marchewka
Thalore
Posts: 156
Joined: Thu Dec 30, 2010 9:52 am

Re: Module howto: hints for a total newbie?

#13 Post by marchewka »

Mmm, plenty of food, so yummy.

Now, before I even start with those guides, 2 quick questions:

- if i have a character started in a module, and then i made changes to the module, will the change be visible to the character, or do i need to make a new one?
- if i make changes to the TOME module, will it break compatibility with the online character profile?

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Module howto: hints for a total newbie?

#14 Post by yufra »

marchewka wrote: - if i have a character started in a module, and then i made changes to the module, will the change be visible to the character, or do i need to make a new one?
Should be fine, but you may get frustrated running down a bug that turns out to come from this. Better safe than sorry so create a new character if it isn't too much trouble.
- if i make changes to the TOME module, will it break compatibility with the online character profile?
Definitely.
<DarkGod> lets say it's intended

marchewka
Thalore
Posts: 156
Joined: Thu Dec 30, 2010 9:52 am

Re: Module howto: hints for a total newbie?

#15 Post by marchewka »

Also - for the purpose of debugging and stuff, is there some kind of a wiz-mode embedded?

Post Reply