From tanner at real-time.com Wed Jun 5 16:21:50 2019 From: tanner at real-time.com (Bob Tanner) Date: Wed, 5 Jun 2019 21:21:50 +0000 Subject: [crossfire] abil_burning_hands.arc face is spell/Cone/spell_burning_hands.base.111.png? Message-ID: Trying match a face to the abil_burning_hands.arc and I do not understand the logic. $ cat spell/Ability/abil_burning_hands.arc | grep -i face face spell_burning_hands.111 My python code looks for the face in spell/Ability/spell_burning_hands.111.png but it’s not there. Manually looking around I find the face in spell/Cone/spell_burning_hands.base.111.png Given I have spell/Ability/abil_burning_hands.arc and "face spell_burning_hands.111" how do I know to look in spell/Cone for spell_burning_hands.base.111.png? How does crossfire do this itself? Take the face and search the filesystem for a match? --- Bob Tanner > | Phone : 952-943-8700 http://www.real-time.com, Linux, macOS | Fax : 952-943-8500 Key fingerprint = F785 DDFC CF94 7CE8 AA87 3A9D 3895 26F1 0DDB E378 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mwedel at sonic.net Wed Jun 5 23:49:11 2019 From: mwedel at sonic.net (Mark Wedel) Date: Wed, 5 Jun 2019 21:49:11 -0700 Subject: [crossfire] abil_burning_hands.arc face is spell/Cone/spell_burning_hands.base.111.png? In-Reply-To: References: Message-ID: Face names are unique. The collect script goes through the arch directory, collecting all the .arc files, .face, etc. It then builds the lib/bmaps file - if you look there, you will notice that there is no path in it. That file basically provides a mapping of face name to face number. So if something uses foobar.111.png, the game looks to see what number it is. The client does not have the arch directory - rather, the server has a file with all the faces. When that file is generated, it just collects all the .png files into one file (for speed) - once again, the path information is not needed. So for your script, what would probably make sense is to parse the lib/bmaps.paths - that contains the full path names. I'm not quite sure how the editor does it. Also, it is not allowed to use the same face name for 2 different images - I'm not quite sure what will happen - I think collect may complain, but otherwise, it may depend on the order the directory tree is walked. On 06/05/2019 02:21 PM, Bob Tanner wrote: > Trying match a face to the abil_burning_hands.arc and I do not understand the > logic. > > $ cat spell/Ability/abil_burning_hands.arc | grep -i face > face spell_burning_hands.111 > > My python code looks for the face in spell/Ability/spell_burning_hands.111.png > but it’s not there. Manually looking around I find the face in > spell/Cone/spell_burning_hands.base.111.png > > Given I have spell/Ability/abil_burning_hands.arc and "face > spell_burning_hands.111" how do I know to look in spell/Cone for > spell_burning_hands.base.111.png? > > How does crossfire do this itself? > > Take the face and search the filesystem for a match? > > --- > Bob Tanner >           | > Phone : 952-943-8700 > http://www.real-time.com, Linux, macOS      | Fax   : 952-943-8500 > Key fingerprint = F785 DDFC CF94 7CE8 AA87 3A9D 3895 26F1 0DDB E378 > > > > _______________________________________________ > crossfire mailing list > crossfire at metalforge.org > http://mailman.metalforge.org/mailman/listinfo/crossfire >