PPQ_Purple
Purple Cube (retired)
- Joined
- Oct 11, 2008
- Messages
- 5,764
Is there a XML tag in the base game that lets unit be built faster if you have a resource? In particular I am asking about unitinfos.xml
BonusProductionModifiersIs there a XML tag in the base game that lets unit be built faster if you have a resource? In particular I am asking about unitinfos.xml
Thanks.BonusProductionModifiers
Unintuitively there are two menus called "main menu" in the code. One can be modded by opening CvDLLButtonPopup.cpp and search for BUTTONPOPUP_MAIN_MENU. This is the ingame menu with world builder, save, retire and other stuff like that. The other one is the menu you get when you start the game and you click stuff like new game. This menu is in the exe and can't be modded.Where would I put my function, that makes a popup, for it to appear in the main menu screens?
This time it's python, more specifically CvEventManager.py.How do I retrieve my edit box data to pass to a function?
def __eventEditCityNameBegin(self, city, bRename):
popup = PyPopup.PyPopup(CvUtil.EventEditCityName, EventContextTypes.EVENTCONTEXT_ALL)
popup.setUserData((city.getID(), bRename))
popup.setHeaderString(localText.getText("TXT_KEY_NAME_CITY", ()))
popup.setBodyString(localText.getText("TXT_KEY_SETTLE_NEW_CITY_NAME", ()))
popup.createEditBox(city.getName())
popup.setEditBoxMaxCharCount( 15 )
popup.launch()
def __eventEditCityNameApply(self, playerID, userData, popupReturn):
'Edit City Name Event'
iCityID = userData[0]
bRename = userData[1]
player = gc.getPlayer(playerID)
city = player.getCity(iCityID)
cityName = popupReturn.getEditBoxString(0)
if (len(cityName) > 30):
cityName = cityName[:30]
city.setName(cityName, not bRename)
We have a very high degree of freedom when modding the C++ code so adding a bridge to .NET is likely possible. However I'm not sure it's a good idea to do so. On top of performance issues, the code organization will end up getting super messy in no time.Also... does anyone know if there is a way to call code in a .NET library, or external library for the purpose of calling code in a .NET library from the civ DLL? This isn't necessary but would save me some time. I am using .NET to test my code (mixed language app) because building a UI there is just so much faster.
Of course; a Horseman moves faster than a Spearman, no?I would like some units to move faster/slower than others. Is there a XML method to change a unit movement speed?
Of course; a Horseman moves faster than a Spearman, no?
I am confident it would have taken you less effort to find the answer to your question and to do what you want to do, rather than to make this question, but okay: Navigate to /Assets/XML/Units/CIV4UnitInfos.xml, find the unit you want to modify, and modify the value for <iMoves>.
I understand, and admit it with no difficulty. I can clarify if it's needed, as english is not my native language, even make a drawing if necessary.@Jarmrik ... um. Your question really isn't that clear (specific). I am not saying that @need my speed isn't making a false assumption, but "speed" is a very general word and in terms of the game, and without a specific context, generally <iMoves> is the go to (default) assumption one would make (even if it isn't the only one, or the logical one in your eyes). Just sayin... your clarification is helpful though.
Then I guess it will be complicated for me. I was praying for a tag with a non-explicit label that would have been put somewhere at the end of an XML file I would have missed. Thanks!To try ti answer the question itself:
I would not know that there is any setting in the xml that can influence the speed of a specific animation of a specific unit or how fast the unit is moved during the run animation (CIV4ArtDefines_Unit.xml would be the place to go). What can be done is to change the "Frequency" entry in the specific animation kf file. The larger the number, the faster the animation is played. This might cause jumps in the run loop though, did not test enough to be sure about that.
Other than that, I guess a cleaner solution would be to load the animation file into Blender (or a similar program), change the frames per second value, and save again as a new file. The so created kf file will need some corrections though (at least when using Blender). From what I remember, the "Target Name" will need to be changed to "MD" again and "NiTextKeyExtraData" will need to be filled with the audio information.
That was not how I intended my response, but I know I (being Dutch) can occasionally come across as blunt-or-insert-other-appropriate-words-here.didn't expect to get such a "veteran-to-noob" level exchange on CFC
I'm a bit tired and then possibly felt offended more than necessaryThat was not how I intended my response, but I know I (being Dutch) can occasionally come across as blunt-or-insert-other-appropriate-words-here.
For what it's worth, I liked and smiled slightly at how you worded your reply.
I don't have an answer, but maybe (most probably not) this could be another avenue to explore : https://forums.civfanatics.com/threads/zlatko-mini-formation.476669/
There are also the <UnitMeshGroups> tags in the Civ4UnitInfos.xml, but I would be careful with touching them (who knows what they can break).
Yes, that is what caught my eye too, but then in the thread where I found Zlatko's tool someone recommended against changing it because it caused a crash with ships or somesuch. That is why I specified the 'careful with touching them' part in my message.there's actually a <fMaxSpeed> tag in <UnitMeshGroups> that really intrigues me as it's not refenced in the various XML help/explanations pages I looked at.