scottcstoness
Chieftain
Patricius said:Thankyou very much in advance for your reply.
Patricius
I tried to send this as a message, but your inbox is full, and the info seems like it might belong on the main thread anyway, so I'm posting it here.
If I sounded abrupt or critical in the previous message, please accept my apologies -- I'd love to see this mod working completely with pictures for the actual great people and randomly generated names with the generic pictures once they run out.
I love the mod; I only downloaded it yesterday, but playing in Python to figure out how to avoid the Pink screen of death was fun, and it really adds to the flavour of the game when the great people pop ups happen -- seems so much more exciting. Great idea.
If the code I sent (modulo whatever mistakes I made) works, then the only outstanding issues with the Mod that I see are:
1. If someone adds names to their XML files (e.g. in CustomAssets), you won't have pictures, but their will be a unique name, so we'll get the Pink screen of death. It would be nice to detect that situation and show the generic pic, but I have no idea whatsoever how to go about doing that.
2. If someone adds a great person type, right now, you'll get a pink screen for all the names they put in the XML (unless they add pictures for each name). Once they run out of names, it will try to find the image "Great General"; if that is there, then it would show that. If we could detect whether there is a file with a certain name, then we could easily display:
A - The image for the named person if we have it.
B - A generic "Great Artist", "Great General", etc. if we have that.
C - A generic "Great Person" pic if there is no "Great General" in the directory.
I think that if that behaviour could be attained, then the mod would be "complete", in that it would do sensible things even if people added their own names or great person types in the XML, whether there were images in the directory for them or not. If someone is using this mod as part of their own mod, all they'd have to do is add the names to the XML files, and they'd get "Great Person" shots for their new type; by adding a "Great General" image, they'd get that image for their new type, and anyone for whom they'd add a specific individual image, they'd get that.
Unfortunately, all this requires being able to find out whether the necessary file exists before trying to load it into the interfaceScreen (or detecting that the load failed). Fortunately, if we can do that, then we should be able to get the behaviour I was talking about above, which would be very cool, and, I think, make this a very well behaved, very complete mod component.