Adding new values for domain, classes and Shemas for Units

Jorgen_CAB

Warlord
Joined
Feb 11, 2004
Messages
132
Location
Sweden
I have bin tinkering around with the XML files these last few days now. I do understand how they are built up and used and how to add instances to the schema model, and thus be able to add new categories for modding unit values.

What I want to do for a modd I'm thinking on is to add terrain attack values, such as increased attack for mounted unts in grassland and plains etc.. There is allot of thing one could do here.

Now, this will of coerce require me to change the combat logic some, so are there anyone who know if combat is made in Python or in C++ (changeable with the SDK)???
 
I'm almost positive the combat is done in C++. Also, changing the xml schemas is probably not a good idea and the game probably won't even be able to use new tags you add in yet.
 
The actual formulas used are in C++, so you'll have to wait for the SDK for that.

Domains are also 'hardcoded'. You can add more in the XML files, but the game won't actually know what to do about them. These are used by the AI for pathfinding purposes, so the ability to add more would have been a huge task (virtually necessitating complete rewrite of the AI pathfinding routines). For most of the purposes you would have used Domains for, I'm sure you could use UnitCombats instead.

And giving a unit Attack bonuses depending on the terrain they are standing on (actually the terrain they leave when attacking) isn't possible, as that terrain isn't factored in the combat formula - only the defending unit's terrain is factored in, as that's where the combat is supposed to be happening. Again, it may be possible when the SDK is out, but only time will tell.

But what exactly do you want to do? I'm sure a lot of it can be accomplished without changing the formulas.
 
Ok changing the domain seem to be a little bit difficult, but nevertheless could be useful in a Fantasy scenario, who knows... :p

Now, the most important part would be to add attack values for the terrain a unit is attacking in to. That is mounted units attacking a plain or grassland tile, the same as the city attack trait i presume, you just call it Forrest Attack or Plain Attack or something.
This would make mounted units more effective in the open against all units but less so in forest. Woodsmen would not only defend better in the forest but also be more dangerous on the attack there.

Only have a higher defence value in forest is not good, it is to easy to just ignore a unit with a to high defence value if there attack value is small enough. Most Melee/infantry gain enough defence bonus in woods as it is.

Now most if my modding will be for a fantasy scenario, and there I want more variation between units, and I don't think it will be to hard adding some values to the schemas to use in the combat model once the SDK is out. I will certainly try it anyway. :)

There might be other values that other modders want to have, such as different withdrawn chances in different terrain. Once again... cavalry should have a greater withdraw chance in open terrain and a low in forest and hills.
It should be easier to withdraw when fighting in the forest than when fighting in the open for melee/infantry units etc...

All this are only calculations to be added to the combat model.
 
Back
Top Bottom