| General | Hosted Sites | Civ5 | CivRev | Civ4Col | Civ4 | Civ3 | Civ2 | Civ1 | Misc | Marketplace |
![]() |
|
|
Welcome to Civilization Fanatics' Center. You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support. |
|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Untouchable
Join Date: May 2006
Posts: 4,145
|
Resource flow commerce bonus to specific city? +possible additional questions
I have played with an idea about mod that would require certain amount of creativity with game concepts but the problem is that all I can really do is some XML editing since Python and SDK are of the limits. Currently I'm kept back by this problem. I have tried to look around for an answer but I'm just dazzled with this. The answer might be simpler than the question.
Is there possibility that certain specific city gets commerce bonus as long as certain resource to that city is provided and only this specific city can have this bonus from this resource? Only possible solutions I have come up are example using TheLopez's Building Resource Converter Mod to make national wonder that produces new resource from resource provided and this new resource then provides the bonus only to this city OR building national wonder that works like Granary giving commercial bonus when certain resource is available (similar to health bonus from wheat). I don't know are either of these possible? If so, how and if not, would be someone interested to make such mod component?
__________________
Vote for Worst Version of Civ EVER. |
|
|
|
|
|
#2 |
|
Warlord
Join Date: Oct 2006
Location: Turin - Italy
Posts: 241
|
with that mod you mentioned there were files modded in sdk?
if so why don't you open them with notepad++ and look for modifications made. In reality sdk it's quite "easy" to understan. it a bit harder to be modified or created, but you would have 1stly an idea on how it works. (To learn my basic knowledge of SDK i made it and it worked). So you could focus on the part in which the presence of a certain building add the bonus to the city... I order to easy trace the row you need you will have to look for something like: Code:
//Give another 25% if the city has a hospital
//Check for a hospital in the city
if (pCity->hasActiveBuilding((BuildingTypes)GC.getInfoTypeFo rString("BUILDING_HOSPITAL")))
{
iPopulationChange += iCurrentPopulation / 4;
}
}
You will probably find something like this in one of files modded in that mod you mentioned. Code:
if (pCity->hasActiveBuilding((BuildingTypes)GC.getInfoTypeFo rString("BUILDING_HOSPITAL")))
The same will be with that wonder. after that row you will see the part of code where the game assign the bonus to that city only. |
|
|
|
|
|
#3 |
|
Untouchable
Join Date: May 2006
Posts: 4,145
|
Thanks for the info Duke176.
I just have started to play with XML files and the many tutorials been extremely helpful for me. Unfortunately when it comes to python etc. I seem to very soon lost my head to the vast amount of lines. It's dark journey alright since more I tried more I got sunken deeper to the mud. Have to try what I can come up. Thanks for pointing out to general direction and more. ![]() Possibly more to come when I have time to test this...
__________________
Vote for Worst Version of Civ EVER. |
|
|
|
|
|
#4 |
|
Warlord
Join Date: Oct 2006
Location: Turin - Italy
Posts: 241
|
AN EXAMPLE OF WHAT I MEAN:
all right open CvCity.cpp (from mod files) and look for (search) Code:
iCityBonusAmount = getNumBonuses((BonusTypes)iJ); if you want that int returns only the number of Bonuses of certain kind use this expression: Code:
iCityBonusAmount = getNumBonuses((BonusTypes) (GC.getInfoTypeForString("BONUS_XXXX")));
Again I suggest you to take a look at Zafzo Tutorial on How to add a mission to unit and try to understand various passages inside the SDK - it's not so hard as it seems in the begin - so after you will understand much better other modifications. |
|
|
|
![]() |
| Bookmarks |
|
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| The Commerce bonus of every governemnt | Siaphi94 | Civ3 - General Discussions | 1 | Mar 17, 2007 04:41 AM |
| Doubts about commerce and science bonus | jorge_roberto | Civ4 - General Discussions | 10 | Mar 14, 2006 02:54 PM |
| Commerce bonus and roads idea | Ex Mudder | Civ - Ideas & Suggestions | 0 | Jul 30, 2005 12:16 PM |
| Building a city on a bonus resource | Warlord Sam | Civ3 - General Discussions | 10 | Sep 01, 2004 12:33 PM |
| Resource specific city improvements | Shaitan | Civ3 - Creation & Customization | 16 | Feb 18, 2002 11:09 AM |