Everyone waiting on the SDK?

boneys26:
Well I didn't know anything about xml untill i got this game and started messing about so I think it will be a good thing for all of us. we all have to start somewhere.

I'd suggest starting with Python: it's easier, totally free, and there's a lot of people around here who may be able to give advice. Also, the Python classes and methods you use are actually exposed C++ classes and methods so you'll be getting a feel for what's 'under the hood' in CvGameCoreDll.


The things I am waiting for the SDK for are:

AI - while you can do it in python, I think it'll be alot more efficient to use the code that is already in place for much of the decision making.

Graphics -... I'd also like to be able to edit/create new mouseover information.

Python enhancements - being able to specify new variables to be changed, as well as including more triggers.

I've been looking at stuff along these lines too. If you PM me when you get the SDK, I might be able to point you to the right parts of the code and save you some time (even though you wear the wrong shade of blue ;) ).
 
Locutus said:
But as far as undocumented methods go, could you give some examples? I tried to make my API as complete as possible, but with a few million lines of code I'm bound to have overlooked stuff. If there's anything I missed I definitely want to take a look at it, I'm currently updating the API to be up-to-specs for the new patch anyway (found some bugs in my script, and the non-SDK classes need to be updated manually).
I knew there was something I meant to reply to...

There are quite a few in CvUnitController.py - all the stuff about individual unit graphics entites. UnitEntity(pUnit) also seems to be a function to get the graphics entity for the unit, although I can't remember where that was.

PeteT said:
I've been looking at stuff along these lines too. If you PM me when you get the SDK, I might be able to point you to the right parts of the code and save you some time (even though you wear the wrong shade of blue ;)).
Excellent! Ta.
 
The Great Apple said:
I knew there was something I meant to reply to...
There are quite a few in CvUnitController.py - all the stuff about individual unit graphics entites. UnitEntity(pUnit) also seems to be a function to get the graphics entity for the unit, although I can't remember where that was.

Did you by any chance test any of those? I tried out that class last evening but couldn't get a peep out of it, I don't think it's used at all. Well, it's called from CyUnitInterface.py, but that itself isn't called anywhere, at least not anywhere in the Python files or SDK. It might be called from outside the SDK in the exe, but then only under very specific circumstances which I couldn't recreate. Unless you've found something I've missed, I think it's fair to assume for the time being that that is a left-over class from a beta build that's no longer being used, and that the undocumented functions no longer exist. Especially since those functions are not listed in the pydoc, which should at least in theory document every function exposed to Python, whether it has explicit documentation or not (that said, in making my API doc generation script I have found some anomolies that might indicate a bug in pydoc, but most likely those are just bugs in my script (that I just worked around rather than fixed, a lesson I learned from an old mutual friend of Peter and me ;))).

Maybe Peter and you can figure something out though, Peter is probably more familiar with the SDK than I am and the idea of modifying formations as you suggested does sound intriguing.
 
Thasis said:
I'm looking forward to the SDK... the only problem is I'm not sure what I'll be able to do with it. I'm not much of a programmer. I'm more of a programmer in the making. This might be a place to start my programming career I hope to eventualy procead into.

Source code is the best documentation. Meaning that at the very least it should be nice to look at the functions that exist and it should help figure out what is going on behind the sceens.
 
Locutus said:
Did you by any chance test any of those? I tried out that class last evening but couldn't get a peep out of it, I don't think it's used at all. Well, it's called from CyUnitInterface.py, but that itself isn't called anywhere, at least not anywhere in the Python files or SDK. It might be called from outside the SDK in the exe, but then only under very specific circumstances which I couldn't recreate.
No :blush:. I've been away from Civ for a couple of months, but will return home tomorrow. I'll poke around and see if I can find any. I think CyUnitInterface.py was the other file I was looking at.
 
Thanks for all those replies. I guess I was kind of looking at it from a standardisation POV instead of the use of disparate programs and fprmats. I assume the SDK will at least provide a good 'compiler' for mods, which at the minute seems to require a lot of work.

I haven't followed recent developments on here too much - at least not found threads that say 'this is the preferred method of adding models'. I did actually mean animations when I said that so I apologise.
 
HourlyDaily, I highly doubt that the SDK will provide a "compiler" for mods, from what I understand the SDK will be for more advanced mod makers with some background in C++.

Locutus, Kael or TGA could any of you provide any insight into this. Also, Locutus is it possible to at least get some HTML documentation for SDK before it is released so we know what the method signatures will be?
 
Locutus said:
Did you by any chance test any of those? I tried out that class last evening but couldn't get a peep out of it, I don't think it's used at all. Well, it's called from CyUnitInterface.py, but that itself isn't called anywhere, at least not anywhere in the Python files or SDK. It might be called from outside the SDK in the exe, but then only under very specific circumstances which I couldn't recreate. Unless you've found something I've missed, I think it's fair to assume for the time being that that is a left-over class from a beta build that's no longer being used, and that the undocumented functions no longer exist. Especially since those functions are not listed in the pydoc, which should at least in theory document every function exposed to Python, whether it has explicit documentation or not (that said, in making my API doc generation script I have found some anomolies that might indicate a bug in pydoc, but most likely those are just bugs in my script (that I just worked around rather than fixed, a lesson I learned from an old mutual friend of Peter and me ;))).

Maybe Peter and you can figure something out though, Peter is probably more familiar with the SDK than I am and the idea of modifying formations as you suggested does sound intriguing.
As far as l know, it is called from internal Action handler. When you click on some specific widget, which is drawn by some thing like CyGInterfaceScreen().addDDS( void ( string szName, string szAttachTo, string szFile, float fX, float fY, float fZ, float fWidth, float fHeight, WidgetTypes eWidgetType, int iData1, int iData2 ), the WidgetType arg and iData1,2 specifies some action.
This action is controlled by CvUnitController.ProcessEvent( pCyUnitEntity, iEvent ) The Civ4ControlInfos.XML file specifies kinds of valid Events.
So to add new control acton we have to add control defintion and new key binding to the XML file and implement actual action in C++ file. (be sure to add the new enum number in C++ header file CvEnum.h , too)
Then you can call it from Python file by specifying that action in WidgetTypes == WIDGET_ACTION and the action numer (iData1) == enum of newly defiend control info.
Alternatively you can specify WidgetType == WIDGET_GENERAL and add handler in handleInput() procedure in each screen python file.
Currently we don't have SDK and access to C++ conrol action/event handler, We can not add global key binding. We can only add screen specific key acion as I explain as alternative way.
 
Back
Top Bottom