[SDK MODCOMP] Civ4 Core Community Project v1.0

Status
Not open for further replies.

Impaler[WrG]

Civ4:Col UI programmer
Joined
Dec 5, 2005
Messages
1,750
Location
Vallejo, California
Civ 4 Core Community Project Release!

Version v1.61.0001a
Release Date: 6/11/06
Version Compatibilty: Civ4 1.61

DOWNLOAD:http://www.civfanatics.net/uploads11/CoreComunityProjectv1.0.zip


Finaly after much Modding and Merging and Crashing of games the Core Community Project Beta is ready for release. We want everyone to stresstest this release thouroughly both with and without activation of the various features. Based on your bug Reports wil will release subsequent patches and update the SourceForge CVS repository with the fixes.


OUR PLEDGE::

"I, will release the source code to any and all C++ changes I make in the SDK to facilitate the merging of my code into any other Civ4 related C++ code. I further pledge to clearly indicate changes made to the released SDK files in my releases."

OUR MEMBERS:

Though not everyone here was able to contribute a Mod in time for the First Release all have been active and worked hard guiding the project or creating content which will be integrated into the CCP in a future version. Thus would like all the following peoples give themselves a pat on the back...

Kael
The Great Apple
The Lopez
12Monkeys
SimCutie
Spoiled Fruit
Impaler[WrG]
Dale
Maniac
Lord Olleus
Jorgen_CAB
dsplaisted
chrusion
Chalid
Belizan
Gerikes
Padmewan
NikG


OUR PHILOSOPHY:

We of the CCP are well aware that modifiying the games sourcecode is hard (oh brother can it be frustrating) and unlike XML or Pyton changes made by different people can not be easily combined (easy being a relative term ofcorse as I am shure Sevo will atest too). Thus we face massive fragmentation if the changes are not consolidated under one Dll. The CCP was started to adress this issue, we are dedicated to combining and compiling as many good SDK mods together. Our primary areas of interest are Improving Python calls, enabling new features in XML, Enancing the AI, Improving the UI and making the above easily configurable for the User. In this spirit everything in the CCP defaults to retaing the vannila Civ gameplay behavior, you may see some minor tweeks that dont effect gameplay


HOW TO CONTRIBUTE:

If your interested in joining our project you will want to access our Forum. 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. Then The Great Apple will aprove you, if he is online and dosn't do it in a timley mannor then send him a PM. TThe forum is ware we discuss and debate the CCP mods and work on merging. If you cant code but have an idea you can post on the main C&C forums, we are always reading it and pick up many ideas their. If you have a mod and would like to see it included in the CCP you will need get it in a stable working state with control calls that can be used to turn the feature on and off at runtime, and use good commenting on all changes. Help is avalible but do not expect other to debug your code for you or hold your hand. If you feel your up to it TGA can make you a developer on the SF project which will enable you to commit changes directly to the CVS. Most people will probably need to get a developer to sponsor their work and Commit it for them, the more hastle free you make this for the developer the better your chances. If the Mod is small you could get away with modifying the Virgin SDK files and submiting these changed files, the developer would then use a diff tool such as WinMerge or your comment tags to find your changes and incorporate them. But if your mod is going to be more then just a few lines on a handfull of files you should checkout the latest stable version of the project from SourceForge and modify thouse files instead this will make it feasable to include. 90% of all the moding so far has been in a handfull of files CvPlayer/CvUnit/CvCity/CvInfo and they get crowded with changes very quickly. Visit SF for guides on how to check out, as I said earlier I recomend TortiseCVS.



THE FILE:

The file Provided contains an Asset folder which contains the DLL and other files required to run the CCP, the simplest way to use it is to delete the contents of your CustomAssets folder then drop all of the contents in the downloaded folder into CustomAssets. You will see that their are new XML schema files and new Python utilities that interact with the DLL to enable new features.
WARNING: These additional files MUST be included with the DLL!! Failure to include them may result in crashing or other irregular Behavior. When you download a Mods which requires the CCP files it might not include the CCP itself (Mod makers should make this clear) in which case you should place the CCP in your CustomAssets folder and invoke the Mod. If a Mod includes the CCP no special action is required other then making shure your Custom Assets is clear.


SAVE GAMES:

Due to the addition of new data members to the game its not yet possible to load older games.
WARNING: When using the CCP an attempting to load a game created without the CCP will result in a crash to desktop. Only games started with the CCP running will be loadable under the CCP. If you want to play an old game make shure your Custom Assets is clear and your current mod contains no Dll. For this reason it is recomended that Mod makers include the CCP within their Mod folders so CustomAssets can be left clear. We hope to have this issue resolved in the next version with full back loading capability of original Firaxis games and between version of the CCP. It will never be possible for unmodified Civ to load a game saved under a version of the CCP.


CVS:

About the CVS folders, these folders allow you to use the TortiseCVS program to get easy access a portion of this projects SourceForge repository (you can also visit the site at http://sourceforge.net/projects/civ4ccp/). If your like getting updates or helping us debug unstable versions you can get this cool little program at http://www.tortoisecvs.org/ (got their for their usage guides as well) Note that you just get an update of the DLL/XML/Python, if you want to look at and Contribute to the SourceCode we have a sepearte download for that and Encourage you to join us at our private CivFanatics Forum. and use it to checkout the latest versionm, if not the Folders shouldn't cause you any problems and can be ignored.


CHANGE LOGS:

For more details of the following, please look at the changelog included with the file.

1) AI:
Nothing - Further more the AI is oblivious of all of the other changes though they may benifit from them they cant "see" the benifit and will not value them any more because of the added effects.

2) UI:
Nothing

3) Performance:
- Camera Zooms in on all combats not just Offensive ones (Roger Bacon)

4) Modding:
Note: None of these will have any impact on the normal game experience, however hopefully they will aid modders in improving the game.

- Enhanced game utils. The following checks have been incorperated into python to better control the game (12monkeys):

called from CvCity.cpp
----------------------------
Spoiler :
canCityWorkOnPlot -> if you want to prevent a certain plot to be workable
canCityHurry -> to prevent hurry production in a city
canCityConscript() -> to prevent conscripting in a city
calculateCityDistanceMaintenance() -> to change the distance maintenance for a certain city. Eg. by a special building.
calculateCityNumCitiesMaintenance() -> to change the num cities maintenance for a certain city. Eg. by a special building.
spreadReligionToCity -> to take action if a new religion is spread to y city

called from CvUnit.cpp
----------------------------
Spoiler :
doUnitCommand() -> be informed about all unit commands and take action if necessary
canUnitMoveInto() -> do restrict/allow a plot for unit movement
canUnitFortify -> Eg. for fantasy mods a "restless" cast
canUnitHeal -> to prevent a unit from healing (eg. for fantasy mods)
canUnitNukeAt -> to allow to nuke a friend or yourself (return TRUE to be able to nuke yourself!)
canUnitSpread() -> eg. to decide if a missionary can spread a religion
unitUpgradePrice -> to change upgrade price for certain units (due to a special building in a city?)
isUnitInvisible -> changes a units invisiblity (maybe for TheLopez' sniper mod)
canUnitJoinGroup -> to define if a unit can join a group. Eg. for limited group sizes.

called from CvPlayer.cpp
----------------------------
Spoiler :
canPlayerContact -> influence diplomatic abilities of a civ
canPlayerTradeItem -> influence in what players can trade.
canPlayerTradeNetworkWith -> to temporarily interrupt trade networks
canPlayerRazeCity -> have influence if a city can be razed or not
razeCity -> be informed/take action when a city is razed
canPlayerFoundCity -> influence where a city can be found
canPlayerConvert -> have influence on the religion conversion of a certain player
playerFoundReligion -> to prevent a religion being founded

called from CvSelectionGroup.cpp
----------------------------
Spoiler :
canGroupStartMission -> decide what group mission is allowed or not
groupStartMission -> be infromed when a group starts a mission


- New XML tags. Won't cause errors if not included. Full interface & 'pedia support, check the new Schema files to see ware the tags need to be placed, putting them in the wrong spot will generate XML load errors.

By Roger Bacon

Civ4UnitInfos.xml
--------------------------
Spoiler :
<bFlying> Allows a Domain Land unit to move over water, units still obey <terrainImpassible> tags and need new <UnitAI> to function properly

Python Exports
bool CyUnit::isFlying()
void CyUnit::setFlying(bool Newvalue)

By (Impaler[WRG])

Civ4TraitInfos.xml
----------------------------
Spoiler :
<iHappiness> - Adds set happiness in all cites. Negative values supported.
<iDiplomacy> - Any leader with Diplomacy altering traits experiences a bonus/penalty to all Diplomatic relations
<iSpecialists> - Any leader with the trait will get the perscribed number of free specialists in all cities
<iVoteModifier> - The number of Votes a player recives in the UN is multiplied by the modifer.

Civ4BuildingInfo.xml
----------------------------
Spoiler :
<LocalSpecialistYieldChange> - Increases the yield of the set specialist for this city only
<LocalSpecialistCommerceChange> - As above but for commerce
<FreeWithTech> - gives the Building for free in all cities when the tech is discovered

Python Exports:
int CyCity::getExtraSpecialistCommerceOfType(int Commerce, int Specialist)
void CyCity::changeExtraSpecialistCommerceOfType(int Commerce, int Specialist, int Change)
void CyCity::changeExtraSpecialistYieldOfType(int Yield, int Specialist, int Change)

Pyton Alterations:
behavior of CyCity::getExtraSpecilistYieldOfType(int Yield, int Specialist)
changed to reflect local bonuses rather then just piping up to the player, and getting an all cities
modifier, to get a Bonus attactched to the player as the result of a wonder or Tech use the
new CyPlayer::getSpecilistTypeExtraYield call described below

Civ4TechInfos.xml
----------------------------
Spoiler :
<SpecialistYieldChange> - Allows specialists of a certain type to increase their yield by the set amount on discovering the tech
<SpecialistCommerceChange> - As above but for commerce

Python Exports:
int CvTechInfo::getSpecialistYieldChange(int specialist, int yield)
int CvTechInfo::getSpecialistCommerceChange(int specialist, int Commerce)
int CvPlayer::getSpecialistTypeExtraYield(int specialist, int yield)
int CvPlayer::getSpecialistTypeExtraCommerce(int specialist, int Commerce)
void CvPlayer::changeSpecialistExtraYield(int specialist, int yield)
void CvPlayer::changeSpecialistExtraCommerce(int Specialist, int Commerce)

Civ4 ImprovmentInfos.xml
-------------------------------
Spoiler :
<ImprovmentMakesValids> allow an improvment to require another improvment creating in essense an upgrade if this is the only thing validating the Improvment, the AI will probably be screwed by this so it needs considerable testing.

Civ4 CommerceInfos.xml
-------------------------------
Spoiler :
The mod will have no effect unless the Commerce tags are expanded, if Civ4TechInfos is altered to give one or more Techs the <CommerceFlexable> you can alocate Commerce towards the new Commerce types. Alternativly any thing in the game that adds commerce with tripple <iCommerce> tags can create the new Commerce types, simply extend them, the order is as follows. Note that experience dose not yet do anything, its intended to be used for Python moding.

Gold
Science
Culture
Happyness
Health
Experience



- Two new python methods: bool Cylot.isOcean(), and bool CyCity.isConnectedToOcean() (12monkeys)

- Debug function added for SDK. Check out mod readme for details (12monkeys)


5) Bug fixes:
Spoiler :
- Fixed a bug where increasing the number of commerce type would cause bad things to happen. (Impaler[WrG])
- Fixed a bug where units being transported by units which get upgraded, and lose transport capacity because of being upgraded (caravels --> frigates), were still transported. Now transported units will jump to the nearest valid plot, like when you are pushed by culture. (12monkeys)
- Fixed relocation due to culture/end war for ships. They will no longer get stuck in lakes when they were originally on the ocean. (12monkeys)
- Fixed an issue where production queues could be loaded in new games allowing construction of other Civ's UUs. Production queues can still be loaded, but you can no longer build other Civ's UUs. (12monkeys)


6) Optional Gameplay:
Spoiler :
- (configurable) GreatPeoplePointPooling by Impaler[WRG]. Re-directs all GreatPeople Points generated in an Empire to a central Pool attached to the player. Set with the GameInfo/GameOptionsInfo.xml set the <bDefault> to 1 and any game you start will perminently use the Pooling.

- (configurable) Chalids Slow Cultural Borders, also controled through GameOptionsInfo.xml and is permiently stamped on the game, recomed you combine with modification to the Cultural levels.



A page of demostration Mods will follow they show off many of the XML based changes and require the CCP in your CustomAssets.
 
New Traits v2.0
Requires the CCP in your Custom Assets
Description: Adds 10 traits to the game and alters the existing traits and assigns them to existing leaders.
Several of the new traits Charismatic, Diplomatic, Progressive use CCP features. View the changes in the Pedia

Improved Specialists v1.0
Requires the CCP in your Custom Assets
Description: Adds a number of bonuses for Specialists at various tecnologies and Buildings, unlike the above
this mod is just slapped together and just for demonstration purposes, I might come up will a well balanced
version some day,
 

Attachments

Wow. Fantastic!

So lemmie ask a question...assuming I was already working over the AI code and I wanted to make it CCP compatible...I need to D/L your source and use that? Just trying to clarify how you guys are imagining this ambitious project playing out.

Great idea...
 
Added a HOW TO CONTRIBUTE section in response to you Sevo
 
Just a few things:

1) Original thread is here. Impaler, can you stick the bit at the bottom about joining the group in? It's alot easier if people just find the join group button rather than PMing me.

2) We should be updating this within a few days. At the moment none of SimCutie's changes are incorperated due to a glitch we think we've found the solution to. These changes include an in-game options menu, a new way of handling events (yes... another one - this one ties very neatly in with the custom options screen), a few more rather cool things.

3) Can you bold the bit about not changing gamplay unless specifically told to - really should be super-emphasised so thtat everybody knows
 
Impaler[WrG] said:
If your interested in joining our project you will want to access our Forum. Go to "Group Management" in the UserCP (http://forums.civfanatics.com/profil...editusergroups)
Me being picky again.

This link is bad - should be: http://forums.civfanatics.com/profile.php?do=editusergroups.

Oh, and I'd be tempted to shove the whole changelog in a spoiler. Saves more space - it's already getting annoying having to scroll down all the way to get to the quick-reply box ;)
 
Link fixed, sorry about that I did a sloppy copy.

TGA did you know their is a repy at the top of the page, no need to scroll ;)
 
Man, I feel so stupid so frequently when I try Civ Modding - and this time, I'm not actually modding anything!

My issue is the New Traits 2.0. Here's what I've done, so if somebody could explain to me my blindingly obvious mistake, I'd be grateful.

So I put the New Traits 2.0 into my Mods folder, and then put the CVGameCoreDLL.dll inside of my CustomAssets folder. What'd I do wrong?
 
What exactly was the problem? Did you get any error messages? In what way did it not work?

When you load up the game, you should be able to go to Advanced --> Load a mod, and the New Traits 2.0 mod should be there.
 
When I load it, I gives me the XML Load error - the same one I got when I attempted to declare new traits without the benefit of the SDK.

The "element content is invalid according to the DTD/Schema. Expecting: {x-schema:CIV4CvilizationsSchema.xml}iMaxAnarchy...

Source: <iHappiness>2</iHappiness>"

So that's what happens... sorry I wasn't clearer in my first post.
 
Ah right, I understand. I think you need to unzip the modified schema files into your CustomAssets directory too. That should fix it.
 
Ugh - I'm hopeless.

Thanks for the help, but maybe I'll just leave this stuff to people who know what the **** they're doing.
 
The Great Apple said:
Everybody's got to start somewhere. :)

Hope you enjoy it!
Heh - you mistake my meaning. I just couldn't get it to work, and my blood pressure can't handle any more attempts. I suppose I'll have to learn how to do it once I get to adding traits to my mod (thankfully you came up with the exact same Charismatic trait that I did), so I'm sure this mod will prove useful... at some point.
 
Just dump everything in the downloaded CCP folder into your CustomAssets and run the mod, it should then work fine, no need to burst a blood vessel. I added some Boldness to the first post ware I originaly stated this so it should be more obvious when skimming the instructions :p

Charismatic was a rather obvious Trait, I had my eye on it from before the SDK was even released, it seems its so obvious that its going to be included in WarLords, though I think they are also giving it a WarWeariness modifier rather then Building cost cutters as I did.
 
Great work guys. :thumbsup: I really wish I could contribute but darn unit making is taking up all my time :) Still, if I do any SDK work and discover something interesting you'll be the first to know.

Btw, this "5) Bug fixes:", am I to understand that these are fixes of bugs from vanilla game, or is it just some bugs you had to deal with in this mod?
 
Finaly after much Modding and Merging and Crashing of games the Core Community Project Beta is ready for release. We want everyone to stresstest this release thouroughly both with and without activation of the various features. Based on your bug Reports wil will release subsequent patches and update the SourceForge CVS repository with the fixes.

I figured the fact I called it a Beta and was asking for their bug reports indicated we expected bugs. What else should we say?
 
Caesium said:
What about multiplayer compatibility?
Good question.

If everybody has the same version, there I don't think there should be a problem. If two poeple have different configs set then that might cause a problem, but as we're (or hopefully will be come Warlords) running it through the same method as is used for other game options they may be network compatable.
 
Status
Not open for further replies.
Back
Top Bottom