Is it possible to mod TerrainTypes.xml?

I'm having trouble getting my terrain tweaks to stick. If I mod the file in the main Elemental directory I get what I want, but I would rather not mod the original file. In what directory am I supposed to put modded TerrainTypes info so that it is read by the game? I do have the 'use mods' option set.

Edit: I would also like to mod the CoreEnvironments.xml file so I can change the snow level. I haven't tried yet but I would expect similar issues.

12,995 views 17 replies
Reply #1 Top

To mod those files, copy their ENTIRE content into a new modfile. Then change that file. Those things should stick. In the in-game map editor, you'll see two different versions of each terraintype when you do this. As far as I know, you can use either and they'll save as the same terrain defined in the map xml (0-17). New terraintypes must be added AFTER the other terraintypes.

Note that you can't make up new environments, only new terraintypes.

That's all I know, after that - let the experimentation begin.

Edit: Put the mod file in the same place you would put any other mod file. Edit2: just to be clear, you'll need two mod files, one for terrain and one for environment.

 

Reply #2 Top

Thanks, really I'm just making a few tweaks to get rid of some goofiness in the new Elementerra. I'll be ready to discuss this goofiness later with an initial map file example, but in all things are working very well minus some ugliness that will need to be addressed at some point.

Also, to be clear, I put these files in the Mods/English folder correct? That's really a wild guess I haven't had any luck yet.

Reply #3 Top

The mods folder is in your My Documents\My Games\Elemental folder, NOT the install directory.

Reply #4 Top

Ok, I put the whole modified file in my Documents\My Games\Elemental\Mods\Data folder, and also tried the Mods\Data\English folder, but it's not loading up. Can anyone tell my exactly what folder to put this file in?

Reply #5 Top

C:\Users\yourusername\Documents\My Games\Elemental\Mods\yourterrainmod\

on win7 64bit

 

Reply #6 Top

Quoting cephalo, reply 4
Ok, I put the whole modified file in my Documents\My Games\Elemental\Mods\Data folder, and also tried the Mods\Data\English folder, but it's not loading up. Can anyone tell my exactly what folder to put this file in?
End of cephalo's quote

 

Most likely there is a problem in your XML file that is causing it not to load.

Reply #7 Top

If you want a second set of eyes, post a link or something and I'll take a look at it.

Reply #8 Top

Quoting Heavenfall, reply 5
C:\Users\yourusername\Documents\My Games\Elemental\Mods\yourterrainmod\

on win7 64bit

End of Heavenfall's quote

I'm using Vista, and I'm thinking it should be the same. It's still not loading. I'm naming my directory 'Elementerra' but that's the only difference in the directory structure. Is this the exact directory structure I need?

Quoting Aerion, reply 6

Most likely there is a problem in your XML file that is causing it not to load.

End of Aerion's quote

At this point I'm actually only changing one number from the original file. Just to double check I re-copied the file and changed it again to make sure. I'm editing with Visual C# express 2008 and its intellesense will tell you if you violate the rules. Also, I made the same change in the install directory and the change worked in that case.

I noticed that when I changed the file in the install directory, the game took forever to load because it detected an XML change. With the file in my Documents location the game is starting up right away, all though I'm not sure what I should be expecting in that case.

Reply #9 Top

That's normal.

Have you had any other mods work?

Reply #10 Top

Quoting Heavenfall, reply 9
That's normal.

Have you had any other mods work?
End of Heavenfall's quote

Actually no, this is my very first attempt at using an XML mod other than maps. To use maps I only needed to check the 'use mods' option and put the maps in the user 'Maps' directory.

Reply #11 Top

Try to get some other mod to work. At least if they do, that will rule out mods not working for some reason.

Other than that, i got nothing.

Reply #12 Top

Ok, I have one more really strange observation. When I try to use my mod, the beaches on my map use the wrong texture! When I delete those extra folders with my mod in them, my beaches go back to normal...

The thing is, I never touched anything regarding beaches or any kind of texture definition. I only changed the maxHeight of the city terrainType.

And... one more question. When you said to copy the whole file, should I have changed the file name? I left it the same. Edit: nevermind, changing the name did not help. It did ruin my beaches again though. I'm finding that even if I use the un-modded file and put it in a mod folder, it also ruins my beaches. So that has nothing to do with any changes that I made.

Reply #13 Top

Changing the filename may be a good idea, but I don't think it would affect anything.

Stuff affecting other stuff? Sounds exciting. It's new ground from here on out!

Reply #14 Top

Quoting Heavenfall, reply 13
It's new ground from here on out!
End of Heavenfall's quote

Very clever mister! It is indeed new ground. It looks like some kind of wasteland instead of a sandy beach.

Reply #15 Top

Heavenfall, if you have time, I wonder if you could do me a favor. Try modding the TerrainTypes.xml file by setting the MaxHeight tag in the 'City' terrain type to 1000. When you build your first city, the city tile will suddenly form into a huge spire! That is if the mod is working. That's what happens when I mod directly to the install directories.

The reason I'm trying to figure these values out, is because I am now making very nice and functional multi-level high relief maps... but there's a snag. When you build a city on a higher altitude than normal, the tile will morph to the height value contained in this variable, which is normally 50. That basically causes the mountain you are on to melt away. It's all super annoying.

There is a MaxHeight and a MinHeight variable, but the cities seems to morph to whichever of these is highest. I'm thinking its a bug that they didn't notice because normally they both have the same value of 50. I'm hoping I can find a setting that will trick the game into leaving the altitude alone.

Reply #16 Top

Huh... it didn't seem to do anything when I changed around heights (in a mod).

Basically, the only thing I tried before was replacing textures in different terrain+environment combos. I guess I shouldn't have said they could be modded.

Reply #17 Top

So the modding system doesn't work for any old xml file eh? Only certain ones? At least I can stop trying and just do my experimentation with the original file. I'm ok with that.