[MODCOMP] Unit Statistics

Just so that I don't have to hurry a new release: In the attachment is the correct CvScreensInterface.py for Warlords. Just rename it from .txt to .py and replace the current file.
 

Attachments

If I wanted to have this mod incorporated with the Pirates mod (by Lopez), would it be hard to do?

Thx
jonpfl
 
The SDK files don't conflict, but you have to compile your own DLL file out of them. Check this thread for more info.

If you've got your combined DLL, the rest is a piece of cake.
 
Ok, I will attempt to do that today

How do I differentiate from building for Civ4 and warlords?

Thx
jonp
 
The process is the same, the files are different. There is a download link to the 1.61 SDK in the thread I mentioned, the Warlords files are in the Warlords\CvGameCoreDLL subdirectory.
 
Teg_Navanis said:
The process is the same, the files are different. There is a download link to the 1.61 SDK in the thread I mentioned, the Warlords files are in the Warlords\CvGameCoreDLL subdirectory.

Are the files in the warlords directory standalone (I can build from there) or do I have to merge them with the Civ4 1.61 files?

Thx
jonpfl
 
A new version is out, including two large bugfixes for Warlords, a bunch of UI improvements by Mongoose and some minor bugfixes.
 
It would seem that for some reason the python to fire off the random names does not seem to work.

Well at least it does not work in standard numerical naming mode and in nexus so I assume it would not work in Lopez's code either. The funny part is it seems that its loading in the python error logs.... and no detectable errors.

I've tested this a few different ways and its not my merge or compile as it does not work in the newly posted Regiment adapted with EDU (which uses Unit Statistics as well) anyway...

I think this may have something to do with DEJ's Event Handler... But I'm not 100% sure. I do know that when doing my warlords merges for my big mod that the event handler version is often different. 6 of one half a dozen of another though.... LOL...

I know it works in mongoose's adaptation and jeckels adaptation (of the rename function) and the proper python file is called and the INI is set just no clue why on create (in game or world builder) the rename does not happen.
 
I guess your problem is the .ini parser. There are two conditions for it to work:

1. the config file should be in the main folder of the mod (this is a no-brainer :))

2. The file CvModName.py in the Assets\python folder must contain the mod's name (i.e. the name of the mod folder). This file is used by the .ini parser to find the correct mod path. This is somewhat clumsy, but there seems to be no other way to find out the active mod folder (in python at least).


You can also try editing the python files themselves (namely UnitStatisticsDefines.py), but make sure to also change the standard values in block 143-166. There is a small bug in the .ini parser ("config != None" is always true, no matter whether the config file is actually found or not) that causes the standard values in block 40-141 to be overwritten anyway.
 
Have conditions 1 and 2 met with the mod. Like I said I am getting a good portion of stuff to run, right now my two headache's are specialist stacker and the random names. The rest of the Stats mod works flawless which I would imagine would not work if there was a problem with CVModNames.py

I could try doing the defines to isolate if it is a problem with the .ini reader I don't think I changed anything in the default settings other than to turn naming on so I actually don't know if it is getting to the .ini file.

I know other .ini files are being read though which leads me to believe that the problem is not with your code but with DEJ's parser. :crazyeye:

Editing the .py file seems to be a good next step to see whats going on.
 
Ok that did the trick (editing the UnitStatisticsDefines.py).

So I guess it is a problem where I thought it was in the .ini reader, question is why does it work on some mods but not others ok no worries will try to update the ini file reader code and see if that helps.

:)

Thanks for the help
 
Hello Teg_Navanis

I'm playing [WARLORDS] Amra's Modpack v2

I also like "Three Square Radius Cities Mod by Roger Bacon and Strand, Warlords version by Konradius" for huge maps, it's only the one file CvGameCoreDLL.dll.

I understand that the Unit Stats mod included in Amra's also has a CvGameCoreDLL.dll file (somehow both have the same size exactly), is there a simple way for me to merge them, I'm not a programmer but I can recruit a friend for help.

Thanks in advance.
 
@ simkodavid

Yes there is, it would require the source of both mods and the warlords SDK.
Which is available on the Mod Component Threads and in the Warlords directory.
It would also require a C++ compiler. There are a few threads in creation and customizing on how to set this up.

That being said there is a problem....

The problem is we do not know what other SDK mods are in Arma's Modpack so that merging them might break something else. The best bet is to make a request to the mod designer to add Unit Statistics.
 
Ket said:
The problem is we do not know what other SDK mods are in Arma's Modpack so that merging them might break something else. The best bet is to make a request to the mod designer to add Unit Statistics.
Just this one.
 
Thanks guys.

To my amazement I'v replaced CvGameCoreDLL.dll with the one from Three Squares City Radius and Unit Stats. is still working.

I should ask Three Squares City Radius Warlords version creator - Konradius, maybe he merged them for some reason already.
 
simkodavid said:
Thanks guys.

To my amazement I'v replaced CvGameCoreDLL.dll with the one from Three Squares City Radius and Unit Stats. is still working.

I should ask Three Squares City Radius Warlords version creator - Konradius, maybe he merged them for some reason already.
You replaced your original version?
Dooh...
Always have it as a mod or in CustomAssets...
 
@Teg & Mongoose

I did a diff of Mongoose's SDK and Teg's Warlords version and there are some differences in the sections that are Teg's. I know Mongoose added some functionality but that is cleared defined by comments this stuff is just general code change's...

Example

Teg's
Code:
// unit statistics additionstart
                        CyUnit* pyUnit1 = new CyUnit(this);
                        CyUnit* pyUnit2 = new CyUnit(pDefender);
                        CyArgsList pyArgs;
                        pyArgs.add(gDLL->getPythonIFace()->makePythonObject(pyUnit1));
                        pyArgs.add(gDLL->getPythonIFace()->makePythonObject(pyUnit2));
                        [B]pyArgs.add(0);[/B]
                        pyArgs.add(iDamage);
                        gDLL->getEventReporterIFace()->genericEvent("combatHit", pyArgs.makeFunctionArgs());
                        delete pyUnit1;
                        delete pyUnit2;
// unit statistics additionend

Mongoose
Code:
						//
						CyUnit* pyUnit1 = new CyUnit(this);
						CyUnit* pyUnit2 = new CyUnit(pDefender);
						CyArgsList pyArgs;
						pyArgs.add(gDLL->getPythonIFace()->makePythonObject(pyUnit1));
						pyArgs.add(gDLL->getPythonIFace()->makePythonObject(pyUnit2));
						[B]pyArgs.add(1);[/B]
						pyArgs.add(iDamage);
						gDLL->getEventReporterIFace()->genericEvent("combatHit", pyArgs.makeFunctionArgs());
						delete pyUnit1;
						delete pyUnit2;
						//

Should I merge this stuff?
 
This is not a difference between Mongoose's mod and mine: the code block exists twice in the file. The first one (pyArgs.add(0)) is used when the defender is hit, the second one (pyArgs.add(1)) when the attacker is hit.
 
Back
Top Bottom