Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Graphic Tileset Modders Suggestion  (Read 1092 times)

Kothyxaan

  • Bay Watcher
    • View Profile
Graphic Tileset Modders Suggestion
« on: August 01, 2018, 12:21:24 pm »

Hello Peeps,

Not sure if this will work but...
I have been using a lazynewbie pack and when I install a new graphics pack it will overwrite many raws (even some raws that are no different from the base game files, I mean most of the changes should just the graphic tile selection of the creatures in the creature files).
Then I saw in Taffers Dwarf Fortress Revised mod that he uses the c_variation_default file to make changes to creatures, replacing tags and adding tags, this led me to think, wouldn't it be simpler for graphic/tile set modders when modding the creature raws to just use that instead (if it is possible to off course). This would be far less work for them and make their graphic tilesets far more mod friendly.

For example in the c_variation_default have something like:

[CREATURE_VARIATION:DWARF]
   [CV_CONVERT_TAG]
      [CVCT_TARGET:CREATURE_TILE:1]
      [CVCT_REPLACEMENT:CREATURE_TILE:2]

Is that even possible?
I have only basic modding knowledge, so it may not be. I hope I made sense.

« Last Edit: August 01, 2018, 12:25:53 pm by Kothyxaan »
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Graphic Tileset Modders Suggestion
« Reply #1 on: August 01, 2018, 03:59:26 pm »

You'd still need to apply that to "every" creature, it's not like setting one up make it magically "work" for a creature.

if anything you'd have better luck using [CV_REMOVE_TAG:CREATURE_TILE] then following with [CV_ADD_TAG:CREATURE_TILE:2]

you can even pass in arguments so it could be  [CV_ADD_TAG:CREATURE_TILE:!ARG1] then all you have to do is call a [APPLY_CREATURE_VARIATION:CHANGE_CREATURE_TILE:'s']

However all that work to add one extra step when you can create a simple script that just does a find and replace would be much faster than making a creature variation to make the changes that you still have to add
Logged

Kothyxaan

  • Bay Watcher
    • View Profile
Re: Graphic Tileset Modders Suggestion
« Reply #2 on: August 02, 2018, 04:34:25 am »

So the modders of graphic tiles use a script to change the raws to suit the new tiles?
If that is so, then why not include that script instead of the raws to make the graphic tiles more mod friendly.
^Request to graphic tile modders

You see I made changes to several of the raw files (my own little tweaks) but if I change graphic sets, I need to compare  all the raws that I changed with the raws that came with the graphic sets and then change each tile so that it matches the graphic set.

The c_variation_default would be one file and wouldn't invalidate mods, but yeh, a script would work too.
^Request to graphic tile modders

Cheers for the reply.
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Graphic Tileset Modders Suggestion
« Reply #3 on: August 02, 2018, 01:58:31 pm »

Once upon a time I had a app I made called slapped graphics and it basically had tile/graphic mappings picking something like Phoebus or iron hand would run through everything flipping tile and graphic values. But it was made with c# and dont think it worked for other OS's like Mac and Linux so probably a power shell script or python may work better for a simple find and replace. However there are now creature tiles plant tiles and grass tiles that need converted now.

If anything its a simple fix just takes time to make and it'd get crazy with. Every graphic modder making their own replacement script not only that but it'd be for vanilla only in most cases

So might look weird for other modders that wish to bundle graphics into their mods.

Although your suggestion is still valid. We just don't have "modding" standards or best practices let alone reliable shareable libraries/frameworks
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Graphic Tileset Modders Suggestion
« Reply #4 on: August 02, 2018, 02:00:54 pm »

I dont think its really important, except for vermin, because creatures use sprites anyway (from raw/graphics) instead of their tile numbers. Those are only seen on the corpses.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Graphic Tileset Modders Suggestion
« Reply #5 on: August 02, 2018, 02:11:52 pm »

Yeah some graphics and or mods. May say everything that is humanoid use tile 15 as corpses and 27 for soldier corpses. And another one for general corpses and then as you mentioned vermin but all of these are still creature tiles. I've been planning a tile updator for my own new mod but will see if it is viable for sharing ie not too custom
Logged

Kothyxaan

  • Bay Watcher
    • View Profile
Re: Graphic Tileset Modders Suggestion
« Reply #6 on: August 03, 2018, 12:32:21 pm »

Thanks for the replies, food for thought :)
Logged

TomiTapio

  • Bay Watcher
  • OldGenesis since 2012
    • View Profile
    • My Flickr animal photos
Re: Graphic Tileset Modders Suggestion
« Reply #7 on: August 11, 2018, 06:15:28 am »

Juggling ascii,ironhand,phoebus tilesets in OldGenesis,
there is every plant and tree whose parts and leaves and fruits are commanded in the raws, not the graphics folder.
I could not use creature_variation tag replacements for tree leaves.
Logged
==OldGenesis mod== by Deon & TomiTapio. Five wood classes, four leather classes. Nine enemy civs. So much fine-tuning.
47.05e release: http://dffd.bay12games.com/who.php?id=1538
OldGenesis screenshots: https://twitter.com/hashtag/OldGenesis?src=hashtag_click&f=image
My Finnish language file: http://dffd.bay12games.com/file.php?id=14884

DragonDePlatino

  • Bay Watcher
  • [HABIT:COLLECT_WEALTH]
    • View Profile
Re: Graphic Tileset Modders Suggestion
« Reply #8 on: August 11, 2018, 09:55:43 am »

I agree! Allowing graphics packs to specify raw patches instead of entire raw files would make things easier for both players and modders. Modders could spend less time writing less error-prone raws while users could have a quicker overview of the changes. In fact, I just completed a small program that does this.



DFPatch takes a list of patch files like these and applies them to the Dwarf Fortress raws. You can specify a list of macros in defines.txt so you can replace tiles and color ids with more human-readable variables. It has some limitations (you cannot add or remove tags) but it's feature-rich enough to do the basic patching needed for graphics sets. It can even copy over non-raw files. Basically, it's just one-click installation for graphics sets.

In addition, it's easy to adapt for other graphics sets. It's just a single executable with some text files so you can modify what it patches or prints in the console. It was done in pure C89 with only the standard library so it should be as portable as possible for Mac/Linux. Sorry for the shameless plug but this seems to be exactly what you were looking for!! When it's ready for release I'll be throwing it up on GitHub and dropping a binary on the forums.

Kothyxaan

  • Bay Watcher
    • View Profile
Re: Graphic Tileset Modders Suggestion
« Reply #9 on: August 12, 2018, 07:02:43 am »

Ooooh shiney!
Nice work.
That program should make life easier for everyone who messes with graphics packs :)
Logged