View Full Version : Everyone waiting on the SDK?


HourlyDaily
Mar 14, 2006, 05:53 AM
..for mod-making or improvements on existing mods?

I've been thinking that there's not much being created at the minute. I imagine there will some time taken where everyone needs to get to grips with it and how to best utilise it, but I'm really looking forward to see what we all can do. Just adding new in-game models is clearly top of the list.

This wasn't meant to be another ETA complaint thread.

TheLopez
Mar 14, 2006, 06:07 AM
Nope, I am just working on about 6 mod comps at the same time :D ... to much coffee not enough sleep.

BTW you do know we can already add custom models in the game right?

woodelf
Mar 14, 2006, 06:39 AM
Like TheLopez said, the SDK will help people with programming knowledge make better scenarios, but new models are popping up everywhere. New units (sans animations), new buildings, ect. I don't think the SDK is going to be the be-all, end-all, cure-all everyone expects.

Tyranausaurus
Mar 14, 2006, 07:06 AM
Why aren't we seeing units getting animated then? is it hard or something? I know the SDK is for programming, but why aren't animations done for the new wonderful units?

boneys26
Mar 14, 2006, 07:14 AM
Why aren't we seeing units getting animated then? is it hard or something? I know the SDK is for programming, but why aren't animations done for the new wonderful units?


I agree I've been waiting months for the cruise missile to come back (I did try myself but I'm new to xml, python, all I can do is edit the game files, add new units that someone else has made but thats it :sad: ) someone has done a cruise missile but it has no animation so I'm still waiting for it :( loving what units there has been tho :king:

sharick
Mar 14, 2006, 10:32 AM
It is possible to make animations with existing tools but it's not easy. You have to make you model, rig it, skin it, do the animations, attach effects and sounds, set up the exporter and export it. All this takes a lot of time and I prefer having 10 new units than 1 animated.

About the cruise missile. You can give it the animations from ICBM. It should work. The new planes have animations from vanilla fighter.

woodelf
Mar 14, 2006, 11:27 AM
Yup, all of the new models that people have made work perfectly with old animations. And I agree that 10 new models beats 1 new animation.

Willem
Mar 14, 2006, 02:49 PM
..for mod-making or improvements on existing mods?

I've been thinking that there's not much being created at the minute. I imagine there will some time taken where everyone needs to get to grips with it and how to best utilise it, but I'm really looking forward to see what we all can do. Just adding new in-game models is clearly top of the list.

This wasn't meant to be another ETA complaint thread.

I think alot of people are going to be disappointed when the SDK does come out. Unless you have some programming knowledge, it's really not going to offer anything. It's going to be over the heads of many of the modders who now think it's going to open a zillion doors for them. Though I guess it might give them some incentive to learn a few things in that area.

PeteT
Mar 14, 2006, 10:46 PM
What Willem said.

I wonder how many of the people who keep going on about the SDK have ever compiled a program.

It's been made quite clear that the SDK is for experienced programmers. If you don't know what's involved in building a dll, be prepared to be disappointed.

Reinharted
Mar 14, 2006, 11:52 PM
Well, while I doubt it will open a zillion doors, it could give modders (experienced and inexperienced) more options. For example, someone who knows how to really work with the SDK could create "mini-mods" that alter parts of the game. These "mini-mods" could then be made to be cut-and-paste-like and designed so that novices can use them. (If this doesn't make sense, don't worry. I've gotten little to no sleep and this is hard for me to understand myself.)

So, I'll try and give a good example.

Want a civic column allow the option of selecting more than one civic? (For example, freedom of speech, freedom of demonstration, freedom of the press, abortion, same-sex marriage, and all those little extra's.) Just copy this "text A" and place it into the "slot B". Then do like you normally would and add in more civiv options! Essentially it could make personal mods more...diverse...I guess. They'd have more features than they do now anyway. :confused:

boneys26
Mar 15, 2006, 01:40 AM
What Willem said.

I wonder how many of the people who keep going on about the SDK have ever compiled a program.

It's been made quite clear that the SDK is for experienced programmers. If you don't know what's involved in building a dll, be prepared to be disappointed.


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.

Willem
Mar 15, 2006, 02:15 AM
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.

XML's a breeze, it's no more complicated than HTML coding. The SDK is going to be a different story altogether. Not impossible to learn of course, but there's definitely going to be a curve involved.

Crash757
Mar 15, 2006, 03:04 AM
..for mod-making or improvements on existing mods?

I've been thinking that there's not much being created at the minute. I imagine there will some time taken where everyone needs to get to grips with it and how to best utilise it, but I'm really looking forward to see what we all can do. Just adding new in-game models is clearly top of the list.

This wasn't meant to be another ETA complaint thread.
Actually, it's quite busy time now, everyone (at least me) are trying to get new models done for Civ4 :)

Locutus
Mar 15, 2006, 05:35 AM
I think alot of people are going to be disappointed when the SDK does come out. Unless you have some programming knowledge, it's really not going to offer anything. It's going to be over the heads of many of the modders who now think it's going to open a zillion doors for them. Though I guess it might give them some incentive to learn a few things in that area.

Excellent assessment. I get the impression that a lot of modding ideas that people want to implement with the SDK can be implemented in Python as well, but people are waiting for the SDK 'because it's more powerful'. Aside from that being a gross underestimation of the power of Python, more powerful is not necessarily better. I've had access to the SDK for going on 2 years now, but I've barely touched it. I do regularly consult it to figure out how a Python function is implemented, and I've once or twice reported bugs and accompanying C++ bug-fixes to Soren or Jesse, but I've never really modded it. If I have a choice between doing something in Python and doing something in C++, I much, much rather do it in Python as it's a lot easier to work with, even if the syntax of the language is sometimes a bit 'special' ;) (And yes, I do have experience coding C++, and not just silly 20,000-lines-of-code utilities.) It's not that I've deliberatly avoided the SDK, so far I just haven't run into the limits of Python yet (though granted, I haven't had a whole lot of time to spare and my ideas haven't been overly ambitious (but still more ambitious than many of my ideas for other games I've modded)).

I come from the Call to Power II community, and there we've had access to the full source code of the entire game (not just the gameplay and AI part, everything) for over 2,5 years. We had very ambitious plans on what to do with it when we first got it and several (more or less) experienced C++ coders to implement those ideas, but all that's come out of it are basically a whole slew of bug-fixes and a bunch of new options in the CtP2 equivalent of the XML and Python files. The more ambitious plans proved simply too ambitious.

Although the Civ4 community is much bigger and much more high-profile than the CtP2 one, I don't think it's realistic to expect a whole lot more for Civ4, certainly in the next 2 years. People will no doubt try, but making a full conversion mod is EXTREMELY HARD and most of those who will attempt it will fail (that's not to say noone will ever succeed, but it's not something many people will be able to pull off). Mods that only introduce one or a few C++ features are easier to do, but if you're not an experienced programmer it's much harder to create copy-paste mods with C++ than it is with XML/Python (if you couldn't even mod XML a few months ago, compiling the DLL is going to be VERY HARD), so combining your favourite single-features into new mods won't be nearly as easy as it is without the SDK (and still I hear someone complaining about how hard that is almost every day). That might be made to work to some extent though, if all the C++ programmers work together on a single master-version of the code, but so far this community has shown little aptitude for communal projects (by that I don't mean project like TAM that involve maybe 10-15 people, I mean projects involving the entire community, or a substantial part of it). It's too big with too many people running around in completely different directions (which I mostly regard as a good thing, but it doesn't help with setting up community projects).

Don't get me wrong, I don't mean to insult anyone's capabilities or to discourage anyone from (trying to) use the SDK once it's available, and I certainly hope that I'm 100% wrong about the community thing (but even if not, given some time that could very well change). All I want to say is that SDK modding is for most people going to be hard, even compared to Python modding, and that I fully agree with the assessment that the SDK is being regarded by many as much more than it really is. It's not the Holy Grail of Civ4 modding.

The Great Apple
Mar 15, 2006, 07:03 AM
So, I'll try and give a good example.

Want a civic column allow the option of selecting more than one civic? (For example, freedom of speech, freedom of demonstration, freedom of the press, abortion, same-sex marriage, and all those little extra's.) Just copy this "text A" and place it into the "slot B". Then do like you normally would and add in more civiv options! Essentially it could make personal mods more...diverse...I guess. They'd have more features than they do now anyway. :confused:You can probably do this in python.

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 - while I'm not certain I'll be able to do this, I'd quite like to have the opportunity to change unit graphics outside the restrictions of documented python. 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.

EDIT: Combat - I'd quite like more power over the details


On the subject of community projects I'm not sure I agree. I can imagine that several people might come together to work on making the AI even better, for example. There can't be that many AI coders out there.

Locutus
Mar 15, 2006, 08:14 AM
You can probably do this in python.

Heh, missed that paragraph but it proves my point so well :)

On the subject of community projects I'm not sure I agree. I can imagine that several people might come together to work on making the AI even better, for example. There can't be that many AI coders out there.

True, but then that would only work for the default game AI, and only to some extent. So some people work together and improve the AI. At the same time someone comes around and makes an implementation of stacked combat that might prove popular and someone else introduces a more complex religion implementation. Both of those require AI changes of their own, quite possibly rendering them incompatible with the default game AI improvements. Now, desspite the fact that those features are not fundamentally incompatible, people will have to choose: better AI or better gameplay? Or hope someone with the necessary skills manages to combine those three features (and their AI). But what if you have 30+ different features, large and small, some fully compatible, some only partial, some completely incompatible? Good luck combining all of those in a single DLL!

I'm sure we'll see projects of several people working together (in fact I expect that to be the norm -- it's a pretty daunting task to make any major SDK mod on your own), but those projects will likely go in wildly different directions and for the most part be incompatible. Of course, to an extent that's true for XML/Python mods as well, but for the SDK it will be a lot harder to combine such mods, which is typically how big mods are created. If you want to do it 'right', every coder would have to work together on a single code base, using switches in ini files and the like to enable or disable certain functionality. That is the kind of community project I don't see happening anytime soon.

Graphics - while I'm not certain I'll be able to do this, I'd quite like to have the opportunity to change unit graphics outside the restrictions of documented python.

Not sure what you're expecting here, but don't get your hopes up too high. As far as graphics are covered under coding at all (for new models the SDK won't help -- but I think you know this), most of it is in the graphics engine, which falls outside the SDK (and is in fact proprietary (Gamebryo), so unless you're very rich we'll never see it).

The Great Apple
Mar 15, 2006, 10:07 AM
Not sure what you're expecting here, but don't get your hopes up too high. As far as graphics are covered under coding at all (for new models the SDK won't help -- but I think you know this), most of it is in the graphics engine, which falls outside the SDK (and is in fact proprietary (Gamebryo), so unless you're very rich we'll never see it).
I realise that - the changes I'd like to be able to do are things I feel are game-related not graphics engine related. For example - being able to have different individual models in a formation in different situations. I've a feeling it might be possable to do it in python, although not with documented methods. There are some default python files that use methods that aren't in any documentation though, so I might be able to guess what function I want.

Locutus
Mar 15, 2006, 11:19 AM
I realise that - the changes I'd like to be able to do are things I feel are game-related not graphics engine related. For example - being able to have different individual models in a formation in different situations. I've a feeling it might be possable to do it in python, although not with documented methods. There are some default python files that use methods that aren't in any documentation though, so I might be able to guess what function I want.

Well, that could prove to be a challenge, I don't know if it can be done, but it certainly wouldn't hurt having access to the SDK.

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).

Ranbir
Mar 15, 2006, 12:37 PM
I think alot of people are going to be disappointed when the SDK does come out. Unless you have some programming knowledge, it's really not going to offer anything. It's going to be over the heads of many of the modders who now think it's going to open a zillion doors for them. Though I guess it might give them some incentive to learn a few things in that area.

Soren did say they regretted not making an editor of sorts.

Be darn spiffy if that's why it hasn't come out yet, providing us with an editor.

Lord Olleus
Mar 15, 2006, 04:08 PM
I have never done anything in C++ ever and only started learning python a few months ago and i am only just starting to be competent at it, so c++ is not for me. However i do hope that some people will produce an expanded EventsManager.py that has functions that are called after a battle has been iniciated but before it is resolved, and other stuff like this.

J_Period
Mar 15, 2006, 04:32 PM
I realise that - the changes I'd like to be able to do are things I feel are game-related not graphics engine related. For example - being able to have different individual models in a formation in different situations. I've a feeling it might be possable to do it in python, although not with documented methods. There are some default python files that use methods that aren't in any documentation though, so I might be able to guess what function I want.

Me too ;) Like changing a model to a champion, hero, or lord version, righ? Or adding a standard bearer/musician or different weapons depending on promotion or...

Just that possibility has got me excited...

Not to mention changing the AI to deal with some of the custom stuff we've added...

PeteT
Mar 16, 2006, 09:41 AM
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 ;) ).

The Great Apple
Mar 16, 2006, 10:57 AM
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.

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.

Locutus
Mar 17, 2006, 04:41 AM
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
Mar 17, 2006, 05:15 AM
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.

Kael
Mar 17, 2006, 05:25 AM
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.

The Great Apple
Mar 17, 2006, 06:15 AM
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.

HourlyDaily
Mar 18, 2006, 10:32 PM
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.

TheLopez
Mar 18, 2006, 11:10 PM
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?

zx1111
Mar 18, 2006, 11:35 PM
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.