The Project X CivIV Modcomponent

Jorgen_CAB

Warlord
Joined
Feb 11, 2004
Messages
132
Location
Sweden
The Project X CivIV Modcomponent

This project is about new values and features that will make modding better in CivIV.
My main goal is to provide more to the core game, I will not add any dramatic changes to the game but if I do I will likely release different DLL files for that and explain in the documentation what code will do what.

For those of you who already have edited the SDK files I provide all the files that I have edited in the directory called “GameDLL Files”. I have marked all the added/changed lines with “//Jorgen_CAB” so that you may easily find all that I have changed in order to incorporate this into your own mod. I will also mark all code targeted for feature changes so you know what feature it is so that you may include or exclude them.

Version 1.0

Added Values
<iTerrainAttack> for Units
<iTerrainAttack> for Promotions
<iFeatureAttack> for Units
<iFeatureAttack> for Promotions
<iHillsAttack> for Units
<iHillsAttack> for Promotions


Game mechanics

Marching
This is a new small game concept that I will expand in the coming releases. What this will do is simply to negate moving units the terrain defensive bonus when they are moving. This will make it harder for the invading army and easier for the defender. When you put your mouse over an enemy unit and try to attack it, it will tell you if it has moved by stating that it has marched.
The marching unit will retain any unit ability for terrain and feature defences.

Some pictures on the marching feature attached below



Project X Modcomponent


To do list
  • Sepparate attack and defense values against unit types.
  • General attack and defense values.
  • Variable withdrawl rates for terrain.
  • Value för negating the marching effect for light units.

New city founding AI
For those of you who want an AI that builds cities closer together and also values costal and river tiles more should check these pictures below taken from a recent game with the new AI that I'm testing.


Any ideas are welcome!



.
 

Attachments

  • warrior1.jpg
    warrior1.jpg
    48.4 KB · Views: 326
  • warrior2.jpg
    warrior2.jpg
    48.1 KB · Views: 272
  • cities1.JPG
    cities1.JPG
    163.7 KB · Views: 215
  • cities2.JPG
    cities2.JPG
    99.7 KB · Views: 224
  • cities3.JPG
    cities3.JPG
    141.5 KB · Views: 267
Glad to see this is up! I'll have to download and test it out. :)
 
Yes, testing is a good thing.. I have done some testing but not tested all values in all combinations yet. Let me know how you are doing.
 
I love this Marching idea. I have thought about different ways to hand out an advantage to the defender, for example by removing the terrain defense when attacked by units in their own land and so, but this one is the perfect solution i was looking for. Logical and easy.
Great work!!


Two things through: One thing would be an option to not completly taking the bonus away but maybe reducing it by 50%. The other is: Do you know if the AI considers the terrain bonus when placing their units for defence? that one should be checked and probably changed in an fitting manner.
 
Very cool, I can see immediate uses for this. Am looking forward to a full complement of XML expansions from the SDK, including exposing more options to Civics, Improvements, Features, etc... But this will be great.

I presume all the text is also called from a TXT_KEY so if we want we can take the extra bangs off "MARCHING!!!" ? :P
 
Chalid said:
Two things through: One thing would be an option to not completly taking the bonus away but maybe reducing it by 50%. The other is: Do you know if the AI considers the terrain bonus when placing their units for defence? that one should be checked and probably changed in an fitting manner.

Yes, I am going to expand on this concept, I only did this because it was very easy to do.
I was leaning towards that regular marching penalty should be that a unit get 25% of the terrain defence capacity, all Light units will get 75% and if they are also either hillmen (hills) or Foresters (forest & jungles) they will negate this completely and get the full 100% defensive bonuses.

The AI already do this and move their units in the most favourable terrain if possible, I will check on this and se exactly what the AI is considering here.
 
Jorgen_CAB said:
I was leaning towards that regular marching penalty should be that a unit get 25% of the terrain defence capacity, all Light units will get 75% and if they are also either hillmen (hills) or Foresters (forest & jungles) they will negate this completely and get the full 100% defensive bonuses.
Ideally, could this be configurable in Python or XML?
 
Padmewan said:
Ideally, could this be configurable in Python or XML?

It should be possible to have values in the XML on all units, one iMarching that sets the overall penalty for marching on the unit, then different unit could have different penalties. A iHillmen value for the reduction in penalty on hills and a iForester for a reduction on the penalty in forests.

Promotions could have all these values also, so the formation promotion could give a bonus on cavalry and worse marching abilities. While the Woodsman promotion give you both better attack/defence value in forest, but also a lower penalty for marching in the forest.

I'm also working on a way to set different Withdrawl rate in different terrain, this will work by the same principle.
 
Jorgen_CAB said:
It should be possible to have values in the XML on all units, one iMarching that sets the overall penalty for marching on the unit, then different unit could have different penalties. A iHillmen value for the reduction in penalty on hills and a iForester for a reduction on the penalty in forests.
Better still, if you could set them up as optional structs somewhat like this:
Code:
<TerrainsMarching>
  <TerrrainMarching>
    <iPenalty>50</iPenalty>
    <Terrain>TERRAIN_GRASS</Terrain>
  </TerrrainMarching>
  <TerrrainMarching>
    <iPenalty>50</iPenalty>
    <Terrain>TERRAIN_PLAINS</Terrain>
  </TerrrainMarching>
</TerrainsMarching>
eh? eh?

:D
 
Vadus said:
looks nice, but what do you mean with TerrainAttack ??
Somewhat like a unit loses hp each turn on a tile ? :hmm:

The unit will get a bonus percentage on its attack value when they attack a unit on a particular type of terrain.

If you have a bonus of +50% forests attack the attacking unit gets that when the defending unit occupy a forest square.
 
Padmewan said:
Better still, if you could set them up as optional structs somewhat like this:
Code:
<TerrainsMarching>
  <TerrrainMarching>
    <iPenalty>50</iPenalty>
    <Terrain>TERRAIN_GRASS</Terrain>
  </TerrrainMarching>
  <TerrrainMarching>
    <iPenalty>50</iPenalty>
    <Terrain>TERRAIN_PLAINS</Terrain>
  </TerrrainMarching>
</TerrainsMarching>
eh? eh?

:D

Might be something like that, though you would still need the same for features and then for the hill trait since that is a very special type of terrain.

Will look into this when I begin programming on this feature, I would like to have a little more feedback on the feature as a whole before I begin coding it.

The problem with most terrain is that they don't carry any defense modifiers. It is more or less only forest and jungle (Features) and hills (some meta terrain thing) that give a bonus on defense. But in other mods this might be changed so I might as well include it as complete as it can be I suppose.
 
Jorgen_CAB, can you please check out this thread:

http://forums.civfanatics.com/showthread.php?t=167004

It is about an SDK Community Enhancement Project, otherwise known as the Civ4 Community Core Project. Read the thread to find out more. These values which you have already created would be very useful to many modders and I'de like to see it added to the community project. Please join the team and aid them in improving the moddability of Civ4 for the community!
 
Shqype said:
Jorgen_CAB, can you please check out this thread:

http://forums.civfanatics.com/showthread.php?t=167004

It is about an SDK Community Enhancement Project, otherwise known as the Civ4 Community Core Project. Read the thread to find out more. These values which you have already created would be very useful to many modders and I'de like to see it added to the community project. Please join the team and aid them in improving the moddability of Civ4 for the community!

I have just applied for that project, seems like a better place for these type of mods for the modders... :)
 
Ver nice. Always missed those values :). A flee value would be nice to (defending unit have chance to withdraw).
 
Zuul said:
Ver nice. Always missed those values :). A flee value would be nice to (defending unit have chance to withdraw).

That is going to be an optional feature in the near future, it is on my list of things to do. :)
 
Gunner said:
Just wondering, but has any progress been made lately? Those new XML options would really open up a lot of new options for modders.

Oh yes!!

I'm working on allot of new changes for the XML files, as well as some other tweaks, such as a new AI for city building etc..

I will not give a date or any promises as when it will be finished, but it should be sooner than later. :)
 
These are some very cool ideas. I do find this interesting
Separate attack and defense values against unit types.
because the devs actually thought it would better to merge these at it simplifies things. To an extent I agree and I was wondering if you might be able to set up some INI options to allow to turn off and on some of the features of this mod (like the separate attack and defense values)?

Mind you I'm definitely trying this mod in either case but it'd be nice to have the option. :)
 
Back
Top Bottom