SDK Community enhancement project

"Doxygen", that's the name I was trying to remember. Thanks.

There are a few comment blocks scattered through the sources like the following:

Code:
//------------------------------------------------------------------------------------------------------
//
//  FUNCTION:   CvUnitFormationInfo()
//
//  \brief		Reads from XML
//
//------------------------------------------------------------------------------------------------------

I don't think this is standard Doxygen style. Can anyone here identify the style?
 
This is valid doxygen documentation of code - it's just an odd style.

Myself, I'm used to doxygenating like this:

/**
* @function CvUnitFormationInfo()
* @brief Reads from XML
**/

Of course, if you place this comment block immediately before the function, you can eliminate the @function line and have only the single line - and if you have only the single line you don't need the @brief.

Fully doxygenating this code would make it very easy to understand - you can automatically generate call graphs, linkages, whatever... But it's a MASSIVE amount of code to retroactively go back and comment.

As I move through the code on my own I'm adding doxygen headers - but there's no way I'll be getting anywhere near 100%. Where I work we add doxygen comments as we code - if you don't, your code doesn't get anywhere near the official code vault.
 
BTW - I'm very interested in modifying the AI, and will be working along my own experimental paths (I'm interested in integrating evolutionary algorithms and neural network to with the AI, but it shall be difficult to train these sorts of algorithms to successfully take on a task of this difficulty)...

However, I'm also interested in helping out in any ongoing modificiation of the AI that might stick to more traditional means... C++ is what I do at the present moment - I've certainly seen worse code than this Civ4 dll. If there is an effort spearheaded for AI improvement count me in.
 
Right, I thought I'd post this here rather than PMing everybody who has expressed interest.

We now have a private mod forum on CFC. To be able to access it you will have to go to "Group Management" in the UserCP (http://forums.civfanatics.com/profile.php?do=editusergroups),
and apply to join the "Civ4 Community Enchancement Project" group. I'll then have to approve you, and you will be able to see the forum right at the bottom of the main forum list (below Site Feedback).

If I don't seem to be accepting you, but I do seem to be online then drop me a PM - it doesn't notify me automatically, so I have to remember to check whenever I log on.
 
brian.clow said:
BTW - I'm very interested in modifying the AI, and will be working along my own experimental paths (I'm interested in integrating evolutionary algorithms and neural network to with the AI, but it shall be difficult to train these sorts of algorithms to successfully take on a task of this difficulty)...
Good luck with this! Sounds great.
 
PeteT said:
"Doxygen", that's the name I was trying to remember. Thanks.

There are a few comment blocks scattered through the sources like the following:

Code:
//------------------------------------------------------------------------------------------------------
//
//  FUNCTION:   CvUnitFormationInfo()
//
//  \brief		Reads from XML
//
//------------------------------------------------------------------------------------------------------

I don't think this is standard Doxygen style. Can anyone here identify the style?

That looks like standard doxygen to me.

VS also has it's own embedded document comment form based on XML, as I mentioned.
 
Wow - I am glad this community has guys like you onboard - I took a look at the SDK for my own edification, and it could have been in Greek for all I know.

Let me offer a hearty hear hear to "
But, as you guys have discussed I can see a HUGE advantage of a community project that adds new python functions, and xml aattributes to the game to make life easy for modders."

All I want is some new traits for leaders!

Good luck, guys.
 
Nice. I'd like do do some minor AI tweaking as well. Just downloaded the SDK and found some small thing that i would like to change.

Where can i sign in?
I'm coding primary in C but have some experience in c++, too.

EDIT: Ok found where to sign in.
 
Hi All,

I probably won't have much time to look at the SDK myself, but I do have a thought about the AI

The main problem (imho) is not that it is bad, it is that it is predictable. We know the AI is highly unlikely to attack us in the beginning of the game, we know that as soon as we declare war his light brigade will go suicide on us, and we know that they won't really sneak around our defenses most of the time (unless we leave our coastal capital without any defense at all :blush:)

So what I would like to suggest is to mainly make more 'personalities' rather than improve the current AI. The personalities woud be randomly picked at the beginning (and might change during the game?), so that there *might* be a gung ho archer chop rush AI next to us, and it might be an pacifist "defense is for paranoids" builder... just like playing against humans :-)

As far as I can tell, even if these new personalities are not as good objectively, their very existence will make the AI as a whole stronger.
 
Just a quick update bump.

We've pretty much got most of the fiddly stuff sorted, and people are working away at their own contributions. Hopefully we should have something good to show for it by the middle of May.
 
I'm even later than Belizan, and it seems like work is fully in progress, but I would chime in with Belizan that anything that will expose more functionality to the Python/XML layers of customization would be a boon. There are just some strange holes in XML that are there, e.g. civics allow changes of features' happiness but no healthiness, etc. Anything that you can do to make Python and XML layers more flexible would make this a "must have" meta-mod for all other mods.

One Mod to Rule Them All

anyway, good luck -- I wish I could help but don't have a C++ compiler nor really the time :(
 
I too just read this thread. While I may not be able to contribute (my experience with C++ ended with my creation of a Fahrenheit <=> Celsius converter program), I will definitely support you guys and provide any ideas/contributions that I may make in order to give modders more flexibility.

Belizan, you were completely on target with the statement of your desires of SDK use: giving more choices to modders of XML and Python. This is something this community needs - once we get that, there will be many more great mods out there. Many people have excellent ideas, but they don't have the coding knowledge to make them a reality. This project could actually make it a reality!

Here is something I would like to see, which is kind of an extension of being able to program random events in the XML. I asked TheLopez about this a little while back, but perhaps as the new SDK modding team the Civ4 Community Core Project team can work on this together.

I'de like to see an "Objectives" system, or a "task-and-reward" system. In other words, a system where you have goals to complete in order to gain something useful to you, and/or to win the game. It would provide incentives for human players to play a certain way. Age of Empires, or Empire Earth, might come to mind... RPGs have a similar system as well. Adapted to Civ4, you could set more victory conditions, or just conditions that can raise your score and possibly gain you new technology, units, gold, experience, events, etc. etc.

If barbarian attack break out in Rome, the objective could be to destroy all barbarian leaders. The reward could be destruction of all remaining barbarian units, extra happiness in your cities. Playing as the Ottoman Empire against Europe, an objective could be to capture Constantinople; doing so will give you the technology "Greek Fire" or will give you new army units. Another could be "conquer the Balkans within 50 turns," yielding a prize of a ripe Janissary army.

These objectives could also lead to more, complex objectives; and, the course you take can determine the outcome of history. For example, in a World War II mod/scenario two objectives could be to take out France and to take out Russia. You decide to go Blitzkrieg and conquer France, then move on toward the Soviet Union. Do you split your forces to gain oil in the Caucasus or do you send them all towards Stalingrad?

You have choices A, B, and C. If you complete A, then A1 or A2 will happen. If you complete B, then C2 will happen. If you complete C, then C1 or C2 will happen. I'm not sure if I'm communicating my thoughts clearly, but hopefully some of you have played enough RPGs and Empire Earth II to understand what I'm asking for.

Such a system would have tremendous value for mods; it would make them MUCH more interesting, and actually increase strategy for the human player.


I wish the Civ4CCP team well-being and great luck in this endeavor. :)
 
This project seems like a great idea. I have just made my first contribution and this is just the sort of thing that I think could be great.

I started with adding some new values for modders to use and I'm continuing on my efforts to do so. Small changes so far.

What I would like to have is the possibility of modders to have an easy way of using different features in the modified dll. Possibly having an XML file for the project where you can activate and put in some different values for different type of features. I was just looking for an easy way of doing this, but there might already be someone here who thought of a better idea?
 
At the moment, as first task, I think we need a framework for Python MOD coding and let merge all MOD easily. I just post a thread as below, I think if I post here is right firstly:
1. Change all Default Handler to Custom handler
&#12288;File cvEventInterface.py:
&#12288;&#12288;normalEventManager = CvEventManager.CvEventManager()
&#8594; normalEventManager = MyCustomEventManager.MyCustomEventManager() (like MOD GreatPerson, TechWindow did)
&#12288;File CvScreenInterface.py:
&#12288;&#12288;foreignAdvisor = CvForeignAdvisor.CvForeignAdvisor()
&#8594; foreignAdvisor = MyCustomForeignAdvisor.MyCustomForeignAdvisor() (like Exotic Foreign Advisor did)
&#12288;&#12288;militaryAdvisor = CvMilitaryAdvisor.CvMilitaryAdvisor(MILITARY_ADVIS OR)
&#8594; militaryAdvisor = MyCustomMilitaryAdvisor.MyCustomMilitaryAdvisor(MI LITARY_ADVISOR)
&#12288;&#12288;domesticAdvisor = CvDomesticAdvisor.CvDomesticAdvisor()&#12288;
&#8594; domesticAdvisor = CvCustomDomesticAdvisor.CvCustomDomesticAdvisor()
....

2. Make new Custom handler file to initialize custom handler, call default handler if need.
&#12288;MyCustomGameUtils.py
&#12288;MyCustomEventManager.py (Initialize AutoLog, TechWindow, GreatPerson....)
&#12288;MyCustomForeignAdvisor.py
&#12288;MyCustomMilitaryAdvisor.py
&#12288;MyCustomDomesticAdvisor.py
....

3. Make a file for real method to process event.
&#12288;MyAutoLog.py(autolog.py),
&#12288;MyTechWindow.py(TechWindow.py),
&#12288;MyGreatPersonScreen.py(CvGreatPersonScreen. py)
....

4. Any else.
 
I would like to see the usability of all the tools we have improved. With access to the SDK we can just open the Pandoras Box of wild design :crazyeye: or we can build solid scaffolding that will assist us with opening the Pandoras Box later :beer: . Someone is not going to be able to resist for too long and will fling it open with just enough force to do something half decient (half being the key word). If we have prepared a better, cleaner starting point, these jumpers will use our code base to perform a much better job of flinging Pandoras Box open and producing a rare piece of work!
 
Okies - a question to people.

At the moment we are considering the issue of backward savegame compatability. As it stands, we have three options:

1) No backward compatability. Any save made will not be able to be transferred anywhere at all. New versions will not be compatable with old versions.

2) Full backward compatablitly. Save games will be compatable with saves made with older versoins of the CEP, as well as with the default game. However many changes made in newer versions would have to be disabled for old save-games for the compatabilty to work.

3) Semi-backward compatability. Every one in so many versions will break compatablitly with older versions, and a new game would have to be started to use the new version. Only features that that don't break save-game compatability will be included.

Advantages of 1) are that it's alot easier from the coding point of view. It also is slighty easier for the user to understand, and there won't be hundreds of "why isn't this cool feature working?" questions.
 
The Great Apple said:
Okies - a question to people.

At the moment we are considering the issue of backward savegame compatability. As it stands, we have three options:

1) No backward compatability. Any save made will not be able to be transferred anywhere at all. New versions will not be compatable with old versions.

2) Full backward compatablitly. Save games will be compatable with saves made with older versoins of the CEP, as well as with the default game. However many changes made in newer versions would have to be disabled for old save-games for the compatabilty to work.

3) Semi-backward compatability. Every one in so many versions will break compatablitly with older versions, and a new game would have to be started to use the new version. Only features that that don't break save-game compatability will be included.

Advantages of 1) are that it's alot easier from the coding point of view. It also is slighty easier for the user to understand, and there won't be hundreds of "why isn't this cool feature working?" questions.
I think that the third option is the best compromise. Especially since I'm sure there will be features that won't break save game compatibility by default, i.e. you won't even have to worry about them. Also, it doesn't necessarily need to be based strictly on versioning, i.e. every 0.5 version you break compatibility and rest of the time you don't. Just go based on features, if for example you have 20 features planned for next version and two of them break compatibilty then maybe just push them to version after next. And on the other hand, if there is feature that must be included in next version, but it breaks compatibility well then let it. As long as you make it clear when people can use old saves and when not, it shouldn't be a problem, they'll just finish their current games using older version and then move on to the next. Of course you should always keep downloads for one or two versions back.
 
Keep in mind that like any other Mod Component the new DLL can be included in a Mods Assets folder and thus thouse games get stamped with that Mods name, they can still be played if the player keeps that Mod folder around after getting the newest version.
 
Back
Top Bottom