implementation of talk window
- Nystul
- Posts: 1501
- Joined: Mon Mar 23, 2015 8:31 am
Re: started implementation of talk window
yes static common indoor npcs
-
- Posts: 379
- Joined: Fri Oct 07, 2016 10:41 am
Re: started implementation of talk window
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.
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.
- Nystul
- Posts: 1501
- Joined: Mon Mar 23, 2015 8:31 am
Re: started implementation of talk window
Great thx, missed this file
- Nystul
- Posts: 1501
- Joined: Mon Mar 23, 2015 8:31 am
Re: started implementation of talk window
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
thanks for your help
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: started implementation of talk window
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...
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...
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: started implementation of talk window
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!
- Nystul
- Posts: 1501
- Joined: Mon Mar 23, 2015 8:31 am
Re: started implementation of talk window
Thanks for reporting. Have to look into this
- Nystul
- Posts: 1501
- Joined: Mon Mar 23, 2015 8:31 am
Re: started implementation of talk window
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
edit: this portrait shows index 32 in vanilla but should show index 447 - interesting even in vanilla
- Nystul
- Posts: 1501
- Joined: Mon Mar 23, 2015 8:31 am
Re: started implementation of talk window
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
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
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: started implementation of talk window
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.
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.