devolution
Prince
The downside with doing it in python (ignoring the possible performance implication) is that the AI will not be aware of the effect of the building.
Yes but sadly there is no other way. You could do it in C++ but that would be more complicated and harder to do.The downside with doing it in python (ignoring the possible performance implication) is that the AI will not be aware of the effect of the building.
Oh yes there are quite a few problems I just found out now. If the player switches to Serfdom the city doesn't get 1 extraWhat if a player switches civics, the city changes owner (with different civics), or the building is removed again (e.g. conquest).
Doing it in the DLL would be less complicated. Harder, only if you are unfamiliar with DLL modding.
Yes but sadly there is no other way. You could do it in C++ but that would be more complicated and harder to do.
What if a player switches civics, the city changes owner (with different civics), or the building is removed again (e.g. conquest).
Doing it in the DLL would be less complicated. Harder, only if you are unfamiliar with DLL modding.
Function addresses I expect. Attaching another screenshot (no infinite loop in this one). Apparently, the profiler has access to debug symbols for some of the Microsoft DLLs. Here's a screenshot of an infinite loop in d3d9.dll (from this post in the Tech Support subforum).What can I expect to see if the loop is in the exe instead?
I'll do the Removal code tomorrow since it's getting late here for me.Thank you very much for sample code! I'll hold off on anything for until I see what the removal code looks like, but it's really nice to know it can be done. Out of curiosity, what would doing it in C++ involve - I actually do have more experience in that than XML and Python from Paradox modding.
What would the DLL involve?
First step is being able to compile a DLL. You can find guides on that in the tutorials forum.What would the DLL involve?
Thanks again.
Yeah, should have taken the screenshot with that call selected, although its stack didn't seem helpful to me. Will come back with more info when I have it on hand.Going by the profile from the last screenshot I posted, normally, most of the calls to initCvPythonExtensions come from BaseThreadInitThunk in kernel32.dll, which, according to a quick web search, "starts a Win32 thread," (source) so initCvPythonExtensions appears to be a thread entry point. That could make it difficult to tell what the call structure is. Have you taken a look at the "called from"/ "child calls" list and "call stacks" tab for initCvPythonExtensions? (I don't think initCvPythonExtensions is selected in the screenshot.) I guess it could be a Python loop; if so, then I don't think I've ever had to debug such a case. I could still try to load your profile and browse around if you save and upload it and think it might help.
Looks like it's only for combat animations (CvBattleDefinition) and air mission animations (CvAirMissionDefinition). Those are the two derived classes in CvStructs.h, and I saw the EXE call CvMissionDefinition::getUnit only in those circumstances in my test yesterday; e.g. unit movement and worker missions did not result in a getUnit call.CvMissionDefinition doesn't mean anything to me, is that a mission in the sense of a unit order, e.g. building improvements or healing etc.?
. . . unless you also have the Assimilation modcompAnyway you shouldn't worry about the building being removed because if the building is a unique building then it will automatically be replaced by the original kind of building it the city is conquered.
you mean the one created by Kael? https://forums.civfanatics.com/resources/assimilation.9911/. . . unless you also have the Assimilation modcomp![]()