Where to look

tonnerkiller

Chieftain
Joined
Mar 12, 2009
Messages
3
Location
Mainz
Hello everyone,
I just signed in here, because I thought it' time for me to try what I can do in modding.

So I'm a complete newby, I used to do some programming some years ago, so I'll find my way to write something.
My probem is rather the overview: I have so many xml, python and c++ files that I am not sure, where to look for things, so maybe you could give me the right direction on the following:

I read about the canal thing, or ideas to have ships sailing up a river. I thought I give it a try to see how far I can go on that one. So basically I think I should go aong these steps:

1. See how rivers work in the game and delete the whole concept out of the game at first, so there will be no rivers.

2. Implement rivers as tile features, similar to Civ2 I think, but that's a long time since I played it...

3. Allow certain units to enter tiles with the certain river feature, e.g. small ship units.

4. Finally maybe adding a tile improvement "canal", so ships can go through land tiles, thus allowing all those famous canals like Suez, Panama, etc...

And in the end I'd have to tell the AI what I did.

I know it's a long way to go, and I do not want to do it in 2 weeks or so. But finally I think I shoud have an idea about how things go.

So my question to you is, where do I start, how can I find out the places the original river concept is coded (I know that must be at several places).

Thank you
De Benny
 
Wellcome to the forums, fellow countryman. I think, it's really a big project, you picked up there. Probably you have do do SDK and xml changes for that, and perhaps you should start with something smaller to get a feeling for Civs structure. First of all you can start with the tutorials in the subsection of this forum, there are really many.

For your idea: I think there should be an easier way. There is allready a flag checking whether a land title is next to a river (or to be more precise to a source of fresh water) or not. You could try to create a tag, which is allowing some sea units to enter these titles. But of course it will look very strange ingame, because the grafics aren't made for this. So it will look like the ship is sailing (or whatever) over land. But you would have this problem anyway, because rivers are allways between two land titles.
 
someone already started some project similar to this, creating a new terrain type though I think.

It was more like a river in the middle with coast on both sides of the tile. It would require 6 new graphics (north to south, north to east, north to west, south to east, south to west, and west to east... i think all other combos are redundant)

making the AI's learn it wouldn't even be required if you did it right.
 
Thank you. I know it is quite some work to do. I'm just trying to find my way to start things. And I want to get an overview in the end, maybe I really should start just adding a new leader, though that's not the kind of change I'd ike to change at all.
Is there a description of how to add a new tile sort, or a new improvement or the like? I haven't been able to find one yet, so if you know of one...

Thanks
De Benny
 
Try /assets/xml/terrain/TerrainInfos.xml. Actually, anything within the terrain folder (4 files, I believe) is probably what you're looking for. You can create a new terrain type in TerrainInfos.xml by copying/pasting an existing entry. There are flags for <bLand> and <bWater> or something like that in TerrainInfos, I'm not sure if it well let you flag both of them as true, but if it does that would make the tile passable to land units and water units. I guess that's how you'd go about creating it as a terrain type, but it might be better to create it as an improvement/overlay. Anyway, you'd have to create art for the tiles obviously (it would need the graphics as the person above me said, plus all the possible combinations of the rivers joining each other [a southwards river getting tributaries from east and west, for example]). You'd also need to modify the python mapscripts to generate your new river tiles rather than the old one. You wouldn't even need to get rid of the old river system if you just modified the mapscripts to generate your new river tiles.

This is just my speculation though, my modding experience only consists of changing a few xml values. I'm sure there's much more than that involved, but it might be a good place to start.
 
Thank you Bob. I wasn't aware that I'd have to deal with mapscripts, I thought the program would do this automatically... (stupid me).
I wonder whether bWater refers to water tiles, as I am just reading through some of the sdk and there bWater seems to identify whether the tile has access to fresh water, but I'm only finding my way into things...
 
Back
Top Bottom