implementation of talk window

Discuss coding questions, pull requests, and implementation details.
Post Reply
User avatar
Nystul
Posts: 1501
Joined: Mon Mar 23, 2015 8:31 am

Re: started implementation of talk window

Post by Nystul »

yes static common indoor npcs ;)

R.D.
Posts: 379
Joined: Fri Oct 07, 2016 10:41 am

Re: started implementation of talk window

Post by R.D. »

Looks like the answer is in arena2/flats.cfg.

You'll find records like this

182 5 (In TEXTURE.182, the 5th flat is the orange jester)
jester
2
15
5
486 (the jester face is 486th in the TFAC0010.rci file)

So the work is to read this stuff from the file, if there isn't already something set up for it.

User avatar
Nystul
Posts: 1501
Joined: Mon Mar 23, 2015 8:31 am

Re: started implementation of talk window

Post by Nystul »

Great thx, missed this file

User avatar
Nystul
Posts: 1501
Joined: Mon Mar 23, 2015 8:31 am

Re: started implementation of talk window

Post by Nystul »

managed to write a FlatsFile class that reads in this data and it is used to derive the correct information now ;)
thanks for your help

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: started implementation of talk window

Post by Interkarma »

Nice one! Thank you for that R.D. :)

It's funny, I was already aware of FLATS.CFG and its use, but had completely forgotten about it by this juncture. Oh well, only human and all...

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: started implementation of talk window

Post by Interkarma »

I've been having a play with this now. Looking good, but might need to check gender of portrait. I noticed females show up with a male portrait, and the StaticNPC.NPCData is definitely female. Sorry if this is a known issue. :)
Spoiler!
vyctyna.jpg
vyctyna.jpg (87.83 KiB) Viewed 3266 times
vyctyna-talk.jpg
vyctyna-talk.jpg (115.33 KiB) Viewed 3266 times
vyctyna-data.JPG
vyctyna-data.JPG (142.85 KiB) Viewed 3266 times

User avatar
Nystul
Posts: 1501
Joined: Mon Mar 23, 2015 8:31 am

Re: started implementation of talk window

Post by Nystul »

Thanks for reporting. Have to look into this

User avatar
Nystul
Posts: 1501
Joined: Mon Mar 23, 2015 8:31 am

Re: started implementation of talk window

Post by Nystul »

i would need more cases of static npcs where a wrong gender portrait is selected. this one seems to be a very special case to me since in vanilla df it uses portrait index 32 which is from the "mobile npc face" range

edit: this portrait shows index 32 in vanilla but should show index 447 - interesting even in vanilla

User avatar
Nystul
Posts: 1501
Joined: Mon Mar 23, 2015 8:31 am

Re: started implementation of talk window

Post by Nystul »

that particular case likely arises from wrong dfunity data about static npc's factionID - the static npc data of the woman in the blue coat has faction id #499 which has only male flat (182,20) assigned to it (see FACTIONS.TXT) - the correct entry would be #526 just below which also has the female flat assigned (182, 28)

nevertheless i didn't extract values correclty for female flats - will fix this - but this particular flat has wrong factionID which we will have to fix also

even more confusing is this: the flat of the woman is 346,10 - the correct faction would resolve to 182,20 which is the same flat in a different archive...

even vanilla seems to be bugged heavily with people of wayrest/court of wayrest regarding portraits (except the special npcs) - almost all male flats use an old man's face (even the kid) on my system/df install and as mentioned above the female face index does not follow any rules as well

the easiest way to fix this would be to add an entry to FLATS.CFG for

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: started implementation of talk window

Post by Interkarma »

Yeah, definitely some issues here. Although technically not on my side, the flat's faction ID is just being read from game data like any other. I notice these Wayrest flats are mostly TEXTURE.346, which is not well-represented by FLATS.CFG. Classic is possibly doing some special handling here.

Agree that adding new face mappings to FLATS.CFG is easiest approach. But it would also be necessary to spin FLATS.CFG off into a new DFUnity format distributed with game data. Could use either JSON or the Table system I built for quests. These are both editable in text format and can supersede FLATS.CFG. There's probably going to be others like this one throughout the main castles.

Alternatively, and easier still, is just placing a replacement FLATS.CFG in Resources. This should override the user's instance of this file as my file proxy checks Resources first before loading from Arena2.

Post Reply