Hi,
This is my first time posting here. I'm an experienced programmer (non-game stuff) just getting into the Civ4 SDK, and have been working a mod of my own, mostly just experimenting and stuff to get a handle on things in the SDK.
One of the things I have been trying to do is to add another yield type to the game. Everything has gone smoothly except I haven't been able to figure out how to properly call the setChar function on my new CvYieldInfo object. To be clear, the "char" is used by the UI code to display the icon for each yield based on the GameFont.tga file (i.e. the slice of bread, hammer, and coin for the standard three yields).
I want to set the char for my yield the same way the base three yields have it set--to stick with convention--but can't figure out where it is done. It doesn't come from the XML file, where I thought it logically would have been. Looking at the code, it's obvious they are set via the setChar member function. It's not hard coded since there are no SDK calls to setChar, so I assume it is set somewhere in the python code. However, file searches have come up with nothing.
Does anyone know where setChar is called from for the food, production, and commerce yields? Should I just ignore it and modify the XML schema for my mod to have the char come from the XML files? Any help is appreciated, and I look forward to using the great resources that are here to come up with some cool things in Civ4.
Thanks.
This is my first time posting here. I'm an experienced programmer (non-game stuff) just getting into the Civ4 SDK, and have been working a mod of my own, mostly just experimenting and stuff to get a handle on things in the SDK.
One of the things I have been trying to do is to add another yield type to the game. Everything has gone smoothly except I haven't been able to figure out how to properly call the setChar function on my new CvYieldInfo object. To be clear, the "char" is used by the UI code to display the icon for each yield based on the GameFont.tga file (i.e. the slice of bread, hammer, and coin for the standard three yields).
I want to set the char for my yield the same way the base three yields have it set--to stick with convention--but can't figure out where it is done. It doesn't come from the XML file, where I thought it logically would have been. Looking at the code, it's obvious they are set via the setChar member function. It's not hard coded since there are no SDK calls to setChar, so I assume it is set somewhere in the python code. However, file searches have come up with nothing.
Does anyone know where setChar is called from for the food, production, and commerce yields? Should I just ignore it and modify the XML schema for my mod to have the char come from the XML files? Any help is appreciated, and I look forward to using the great resources that are here to come up with some cool things in Civ4.
Thanks.