CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.29k stars 4.13k forks source link

tileset looks_like: further enhancements #24758

Open mlangsdorf opened 6 years ago

mlangsdorf commented 6 years ago

the implementation of looks_like in #24747 is adequate, but people have been asking for further improvements. I would like to get the basic implementation into the player base as quickly as possible, so I'm not going to make those changes in 24747. But they're good suggestions, so I'm going to track them here.

Assign to me, please.

mlangsdorf commented 6 years ago

Artifacts are items. They'll be able to get a looks_like field. but all a looks_like field does is tell the tileset loader that if a tileset doesn't have a tile for an object, it should use the tile for the looks_like object, if any. It doesn't create dummy objects or require tilesets to have a tile for an object or anything like that. It if very simple if a tileset doesn't have tile A, but does have tile B, use B for A if A looks_like B. Looking at the artifact code, it looks like it would pretty easy to give most artifact shapes a looks_like field that you could reasonably expect more tilesets to have. 5 weapons, 5 tools, 7 armors, 16 natural shapes. But even if a scaled_sphere has "looks_like": "grenade", if the tileset doesn't have a grenade or a looks_like chain from grenade that resolves into a tile, you're still going to see an ASCII symbol.

mlangsdorf commented 6 years ago

Looked into doing this, and I was wrong: artifacts aren't items. They're like items, but subtly different.

The key problem in this case is that it doesn't look like artifacts get passed to the tileset loader at all, or at least not in a recognizable form. It's easy, if tedious, for me to add a bunch of "looks_like" to the relevant artifact generation tables. It will take more work to add support for them in the tileset loader.