[Development Thread]CIVILIZATION 4: World of Pokiphlanon

Voyhkah

Undead
Joined
Apr 25, 2009
Messages
1,444
Location
Earth
World of Pokiphlanon is fill redesign of Civ4 based on the realistic exoplanet Pokiphlanon.

The player will play as a civilization of native Takeks, struggling with other civilizations and minor city-states.

World of Pokiphlanon operates on a much larger map than Civ4 BtS, because each player gets his/her own giant tree. The player will share the tree with other city-states, which can be conquered or, once the "Nationalism" tech has been researched, peacefully absorbed.

As the game progresses, the player starts to leave the tree for the open land. At first, only mining camps can be built on the ground, then settlements, and finally cities.

The terrain is much more important in World of Pokiphlanon than in BtS. For starters, some buildings and wonders can only be built on the ground, while some can only be build in a tree.
XML: 40% Getting there...

Python: 0% There will be massive Python changes also, including new methods to which modmodders can attach new code for modmods.

SDK: 1.5% This is going to be tricky. I have only limited SDK knowledge, but plan to learn as I go. It would be extremely useful for us to have a more skilled SDK coder to help with the learning. The AI will be particularly hard.

Art: 1.1% This will be a nightmare, no use pretending otherwise. With no humans at all, and very few vehicles, getting models will be tricky. The lederheadss will be static.

The project has just started, so not much is really done yet.

OFFICIAL WEBSITE!

There is not yet a release date.
 
reserved
 
this spot reserved too...
 
also this
 
and this
 
this should be enough
 
Interesting, not just the mod on it's own, and everything around it, but also the problems you're going to encounter, and thus, have to be solved. I'm just a beginning xml'er, but I'll have a look, sleep a night, and see if this is a project I'm going to follow, or even (worse/better) going to participate into. The site looks nice too, so I'm going to check that out for sure.
 
Yeah, this should be interesting...
 
As I said, it will require some serious SDK.
 
Yeah, but you're game, right? :D Programming can be learned, after all.
 
Of course. I was just adding some new tags for buildings now.
 
UPDATE: I have successfully added our first new XML tag, <PrereqBorderTerrain>! This tag makes the given terrain necessary as a border to the city that wants to construct the building. Got that? I will now assault the Array <NoTerrains>, which declared which terrains the building CAN'T be build on.


EDIT: Sorry about accidentally pluralizing <PrereqBorderTerrain>. It is not an array.
 
OMG! :eek2: Congrats on your achievement! (Someday you can show me how you did this. :D)
 
ANOTHER (ANNOYING) UPDATE: I have finished <NoTerrains>, including the game text.

:bump:
 
UPDATE: I have successfully added our first new XML tag, <PrereqBorderTerrains>! This tag makes the given terrain necessary as a border to the city that wants to construct the building.

Could you post / upload the code for that?
 
Not sure if this would work, haven't tested it yet due to not enough framework to run the mod, but this is my code.

In CvCity.cpp, under the method canConstruct:

Code:
CvBuildingInfo& building = GC.getBuildingInfo(eBuilding);
	int terrainInt = building.getPrereqBorderTerrain();
	TerrainTypes terrain = (TerrainTypes)terrainInt;
	bool border = true;
	if (terrainInt != -1)
	{
		if (!isBorderTerrain(terrain))
		{
			return false;
		}
	}

Also in CvCity.cpp:

Code:
bool CvCity::isBorderTerrain(TerrainTypes terrain) const
{
	int xCoord = getX();
	int yCoord = getY();
	for(int x = -1; x < 2; x++)
	{
		for(int y = -1; y < 2; y++)
		{
			int relXCoord = xCoord + x;
			int relYCoord = yCoord + y;
			CvPlot* plot = GC.getMap().plot(relXCoord,relYCoord);
			if(plot->getTerrainType() == terrain)
			{
				return true;
			}
		}
	}
	return false;
}

In CvGameTextMgr.cpp:

Code:
if (kBuilding.getPrereqBorderTerrain() != NULL)
	{
		CvTerrainInfo& terrain = GC.getTerrainInfo((TerrainTypes)kBuilding.getPrereqBorderTerrain());
		szBuffer.append(NEWLINE);
		szBuffer.append(gDLL->getText("TXT_KEY_DLL_PREREQTERRAIN", terrain.getDescription()));
	}

I just realized that in my post, I had accidentally made <PrereqBorderTerrain> plural. It is not plural. Sorry, but there can be only one PrereqBorderTerrain per building.
 
And what tag should I use in the XML? PrereqBorderTerrain, and then PLAINS, for example? I assume this doesn't work with features (forests et cetera)?
 
Of course it doesn't work with features, although it should be easy enough to make it do so. And yes, <PrereqBorderTerrain>
 
Ah ok, thanks.
 
This was never something I was particularly interested in, but for my mod, I am going to have to learn... ...map scripting. Is there a good tutorial?
 
Back
Top Bottom