| 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 |
|
Chieftain
Join Date: Jul 2009
Location: Ann Arbor, MI, USA
Posts: 5
|
There are two excellent mods that I would like to combine into a single game experience -- they are NeverMind's 2-Plots City Radius Mod, and Aymerick's Custom House ver 0.02. If it were a matter of integrating XMLs I could probably make it work, but both Mods employ Python and dll files.
Does anyone know of a Mod out there that combines the Custom House and 2-Plot radius; or, short of that, is there a straightforward way I could get the 2 mods to work together? Any help would be greatly appreciated. |
|
|
|
|
|
#2 | |
|
Prince
Join Date: Oct 2008
Posts: 509
|
Quote:
1. Take Aymerick's Custom House 0.02 mod as a basis. 2. Add NeverMind's 2-Plots City Radius Mod to your basis (Aymerick's Custom House 0.02) Now, step by step. Make next changes 2a. SDK changes - in CvDefines.h of your basis add this part from 2-Plots City Radius Mod: Code:
#define NUM_CITY_PLOTS (21) //NM - City Radius 2 #define CITY_HOME_PLOT (0) #define CITY_PLOTS_RADIUS (2) //NM - City Radius 2 Code:
int aiCityPlotX[NUM_CITY_PLOTS] =
{
0,
0, 1, 1, 1, 0,-1,-1,-1,
0, 1, 2, 2, 2, 1, 0,-1,-2,-2,-2,-1, //NM - City Radius 2
};
int aiCityPlotY[NUM_CITY_PLOTS] =
{
0,
1, 1, 0,-1,-1,-1, 0, 1,
2, 2, 1, 0,-1,-2,-2,-2,-1, 0, 1, 2, //NM - City Radius 2
};
int aiCityPlotPriority[NUM_CITY_PLOTS] =
{
0,
1, 2, 1, 2, 1, 2, 1, 2,
3, 4, 4, 3, 4, 4, 3, 4, 4, 3, 4, 4, //NM - City Radius 2
};
int aaiXYCityPlot[CITY_PLOTS_DIAMETER][CITY_PLOTS_DIAMETER] =
{
{-1, 17, 18, 19, -1,}, //NM - City Radius 2 - Start
{16, 6, 7, 8, 20,},
{15, 5, 0, 1, 9,},
{14, 4, 3, 2, 10,},
{-1, 13, 12, 11, -1,} //NM - City Radius 2 - End
};
2b. Then compile a new CvGameCoreDLL.dll with CodeBlocks (or "Code::Blocks") program. 3. Phyton changes. Compare in Notepad++ CvMainInterface.py of your basis and CvMainInterface.py from NeverMind's 2-Plots City Radius Mod. You see only 2 changes in Code:
# ON PLOT WORKERS###=====City Radius 2 (NeverMind)===1/2=====###
pHeadSelectedCity = CyInterface().getHeadSelectedCity()
ButtonSize = (CITY_VIEW_BOX_HEIGHT_AND_WIDTH - (MAP_EDGE_MARGIN_WIDTH * 4)) / 5
if (pHeadSelectedCity and CyInterface().getShowInterface() == InterfaceVisibility.INTERFACE_SHOW):
for iPlotIndex in range(gc.getNUM_CITY_PLOTS()):
if iPlotIndex != gc.getCITY_HOME_PLOT():
pUnit = pHeadSelectedCity.getUnitWorkingPlot(iPlotIndex)
pPlot = pHeadSelectedCity.getCityIndexPlot(iPlotIndex)
if not pPlot.isNone():
worldPosition = pPlot.getPoint()
worldPosition.x -= gc.getPLOT_SIZE() / 2
screenPosition = CyEngine().worldPointToScreenPoint(worldPosition)
# PLOT DRAG ON PANELS
###=====City Radius 2 (NeverMind)===2/2=====###
screen.addDDSGFC("PlotDragOn" + str(iPlotIndex), "", int(screenPosition.x), int(screenPosition.y) - ButtonSize / 4, CITY_VIEW_BOX_HEIGHT_AND_WIDTH / 5, CITY_VIEW_BOX_HEIGHT_AND_WIDTH / 5, WidgetTypes.WIDGET_ASSIGN_CITIZEN_TO_PLOT, iPlotIndex, -1)
CitizenHideList.append("PlotDragOn" + str(iPlotIndex))
5. XML changes. Compare GlobalDefinesAlt.xml of your basis and GlobalDefinesAlt.xml from NeverMind's 2-Plots City Radius Mod and add a new part: Code:
<Define> <DefineName>MIN_CITY_RANGE</DefineName> <iDefineIntVal>2</iDefineIntVal> </Define> <Define> <DefineName>CAMERA_CITY_ZOOM_IN_DISTANCE</DefineName> <fDefineFloatVal>5650</fDefineFloatVal> </Define> 6. Now you can start to play your combined mod. Good luck in your modding! |
|
|
|
|
|
|
#3 |
|
Chieftain
Join Date: Jul 2009
Location: Ann Arbor, MI, USA
Posts: 5
|
Thank you for the thoughtful detailed reply. But as I am not at all familiar with dll, the step that stumps me is 2b: "Then compile a new CvGameCoreDLL.dll with CodeBlocks (or "Code::Blocks") program."
I've downloaded code blocks, and done the file edits, but I have not hit on the procedure to compile a dll -- and cannot seem to find a simple tutorial to help. |
|
|
|
|
|
#4 | |
|
Civ4Col Modder
Join Date: Jan 2011
Location: Stuttgart, Germany
Posts: 3,232
|
Quote:
Any other good Development Environment (IDE) capable of working with C++ will do. I myself rather use Microsoft Visual C++ Express Edition. (in private 2008 and professionaly 2010) (Works perfectly for me since years. It has stronger debugging functionalities and better error messages to my opinion.) I think there should be tutorials around in the Civilization part of this forum. (I am not sure where exactly though.) Of course you will need: A) Full set of sources. (I suppose you have them.) B) Additional libraries. (Python24 and Boost-1.32.0. Supplied with the game) C) A good makefile. (Found in DLL-sources of most major projects.) Don't give up. Last edited by raystuttgart; Dec 26, 2011 at 11:32 AM. |
|
|
|
|
|
|
#5 |
|
Civ4Col Modder
Join Date: Feb 2011
Location: France
Posts: 665
|
Hi skiboy !
Nicer idea you've got. No don't give up! Ray's right. I was in the same place a few moths (or rather years) ago. When I first tried to modify Colonization, I didn't even know what an Xml file was exactly! Here's a tutorial for Code::Block Thanks to that tutorial (and M07 who showed me that tutorial!) I managed to compile a few dlls of my own! .Installing and using the SDK by Kael Edit: I've tried it on three different computers, it worked on only two of them. I've never been able to compile with Windows 7 64bits ... But with Windows XP and Windows Vista it works perfectly! |
|
|
|
|
|
#6 |
|
Kami of Awakened Dreamers
Join Date: Sep 2006
Location: Indiana, USA
Posts: 2,288
|
ok, i got the files i need, now i have to figure out how to use this - and in instructions, you make it sound like you can compare lines of code and know where to insert them by means of a script? or do you jsut synchronize scrolling and spend 5 hours trying to compare? how do you know where to insert differences?
__________________
The Modiquette The best post ever. ![]() Proud member of Religion and Revolution! Colonization will never be the same again! Check it out, the time is coming... |
|
|
|
|
|
#7 |
|
Civ4Col Modder
Join Date: Jan 2011
Location: Stuttgart, Germany
Posts: 3,232
|
With programming skills (XML, C++ and Python) you will know where to insert and how to merge.
Creating a DLL also involves a little bit more than just putting lines of code in some source files. You should know how to use an IDE (Development Environment) and how to set up your project and how to compile a DLL. Eventually you should acquire some programming knowledge before starting here. ![]() Don't give up, it will simple take some time. Good luck. |
|
|
|
|
|
#8 | |
|
Emperor
Join Date: Apr 2004
Location: Vienna, Austria
Posts: 1,533
|
Quote:
But in many mods you will have "tag" comments indicating changed; for instance, Kailric's Inventor mod uses the tag "//TK Inventor" for SDK changes. |
|
|
|
|
![]() |
| Bookmarks |
|
| Thread Tools | |
|
|