How about Requesting on SDK/Python API to Firaxis for next patch?

SimCutie

Warlord
Joined
Dec 10, 2005
Messages
197
Now we, all modders have quite a experience on modding Civ4 in both Python or C++ SDK.
Most of missing functionalities of unmodded Civ4 can be added/changed by ourselves via SDK or Python modd. We now have some set of custom python libraries or SDK enhancements that appropiates our moddings need.

But there are still some basic things that we can not do without help of Firaxis. Especially some missing API's that should be added to "unmodded Civ4" via offical patch, not via custom modd.
So, How about collect our request to Firaxis for next patch? We can send these requests to Firaxis for consideration.

For example : Version number varible (GAME_VERSION)
We can add the functionality to our Python modd or SDK modd. But it would be meaningless unless the unmodded plain Civ4 Vanilla/WorLoads DLL also supports it in same way. This varible should be availabe on python loading time, not after loading XML.

Another example : current mod path variable (MOD_PATH) in Python.
These things should be supported in plain unmodded DLL, not by custom SDK DLL.

Please post your request to Firaxis and let's discuss about it. If we come to consensus on them, we can send the request petition/open letter to Firaxis developer for consideration to include in next patch of Vanilla /Warlords.
 
I have found that Units ArtDefines are called by the UnitClass completly bypassing the Unit Instance. This makes it impossible to have local data in the Unit (such as Promotions or Damage or Civ-Ownership) modify the Graphics. Units should have their own getArtDefine() function called by the python layer/graphics engine, normaly it just pipes to the existing UnitInfo function but we could atleast modify it with alternate returns.
 
I agree. We need a function which returns the current mod directory. That, IMO, is a must.

Impaler - you're wrong. It is possible to change individual sub-entities in a unit, as well as the entire unit based on events. If you change the unitInfo, recreate the unit, and change the unitInfo back to what it was. Once a unit is created it's art stays with it until it dies.
 
I had heard it was possible but that sounds rather messy (dose it invove a lot of Python?) I would like to see the posibility to alter UnitArt on the fly and do it enirely within the C layer as well, ok I'm just getting greedy now :lol:
 
You can do it completely in C. It's not very clean, but it works, and there are no problems with performance that I've noticed. I'll shove something in the CCP.
 
In CyGInterfaceScreen class:

VOID appendMultiListButton(STRING szAttachTo, STRING szTexture, INT listId, WidgetType eWidgetType, INT iData1, INT iData2, BOOL bOption)

VOID disableMultiListButton(STRING szName, INT iListId, INT iIndexId, STRING szTexture)

VOID enableMultiListPulse(STRING szName, BOOL bEnable,INT listId, INT iIndexId)

the iIndexId argument of disableMultiListButton(), enableMultiListPulse() is index of button to modify.
But to get it correctly, we must always keep track of all the index of each button appended, which is not practical.

So I request that appendMultiListButton() should return the index of the button it appaended.
Or we should be able to set iIndexId to some symbolic value like LAST_BUTTON to select last appended button in the row of the button multi list.
Or Add new API like getNumButtonsMultiList(STRING szName, INT listId ) to get number of existing buttons in the row of the button multilist.
 
I've said this one before, but hey, this looks like a nice spot for beating it dead:

The SDK's CvDLLInterfaceMode has a setInterfaceMode, but no getInterfaceMode. The CyInterface class in python has no setInterfaceMode, but does have a getInterfaceMode().

That's just silly. It's not too hard to create the calls so that I can set in the SDK and get in python, but really now...
 
a FontSymbol query function.
Current API is dont have any query function that we can check availablility of particular symbol.
current Game.getSymbolID( FontSymbols.XXXX ) cannot be used for this purpose for custom GameFont with additional stmbols unless you modify FontSymbol enum. and use custom Game core DLL.

GameFont is frequently modded resource for many Python only mod.
So Firaxis must provide better Python API so that Python modder can query and maniulate Font Symbol with standard/stock Firaxis DLL.

I also suggest Python modder can load new Font glypse (image) dynamically for particular charater.
For example gDLL->getInterfaceIFace()->LoadSymbol( char_code, string image_path );

where char_code is (unicode) charter code and 'image_path' is Art file path of the TGA image file that contains image of the single symbol.
 
Back
Top Bottom