[MODCOMP] New orders for units

Pep

King
Joined
May 28, 2002
Messages
688
Location
Spain
Civilization 4: Colonization New orders for units mod 0.1 by Pep (to use with Colonization 1.01f version)

Changelog:
(v0.1)
New orders:
  • Added new order button: "Sentry while healing". A wounded unit sleeps and awakes when it has reached its maximum strength OR an enemy unit of the same type (types: land or naval) enters its visibility range. Naval enemy units at city port DO NOT awake a naval unit carrying on this mission.
  • Added new order button: "Sentry on naval units". A naval unit sleeps and awakes only when an enemy NAVAL unit enters its visibility range. Naval enemy units at city port DO NOT awake a naval unit carrying on this mission. (Very useful for privateers on enemy territory ;-)).
  • Added new order button: "Sentry on land units". A land unit sleeps and awakes only when an enemy LAND unit enters its visibility range.
  • Added new order button: "Sentry while moving": Moves a land or naval unit and ends the movement when an enemy unit of the same type (land or naval) is seen. This order button doesn't appear if a enemy unit is already in the selected unit visibility range.

New control hotkey:
  • "Select unit with the same profession" (<Ctrl> + <X>). When pressed, all units on the same tile with the same profession as the active unit, are selected. (Very useful to select all Dragoons or Soldiers regardless its type).

Standard movement behaviour changes:
  • Modified movement "standard" behaviour: now, if a unit ends its movement on an unseen or unrevealed tile (from the initial tile when the movement begun point of view), the movement ends and thus you can choose whether to attack or not.
  • Modified movement "standard" behaviour: now, if a unit ends its movement on an unrevealed tile (from the initial tile when the movement begun point of view) the movement ends and thus you can choose whether to disembark or not.

Bug fixes:
  • Fixed a bug (present in Colonization version 1.0) which caused the visibility radius of a group of units on a sentry mission not being the highest visibility radius of all of the units inside the group (previously, the visibility radius of a group was established only by the unit leading the group).
  • Fixed a bug (present in Colonization version 1.01f) which caused a message "city X is out of Y and cannot make Z" appear when a city has 0 raw materials (of type Y) and it is producing them but not at the rate required to fully meet the demand (to produce manufactured goods of type Z).

How to Install:

  • Install Colonization.
  • Copy the included XML files and ART files in Colonization Custom folder ("My Documents\My Games\Sid Meier's Civilization IV Colonization\CustomAssets" in typical installation).
  • Overwrite official CvGameCoreDLL.dll with the included one ("Program Files\2K Games\Firaxis Games\Sid Meier's Civilization IV Colonization\Assets" folder in typical installation). Make a backup first!

Notes:
  • Ingame help for the new actions is only in English (or Spanish if selected in standard menu options). Sorry!
  • Source files that have been changed to build the dll are included. Changes made begin with "// jlc:" comment.

Download link: http://forums.civfanatics.com/downloads.php?do=file&id=17144
 
Nice ideas :), and good bug catch.
Please show a screenshot.
Will in not be cluttered with all the new icons?
Any more plans? :p
 
Nice ideas :), and good bug catch.
Please show a screenshot.
Will in not be cluttered with all the new icons?
Any more plans? :p

Well, here is the screenshot.
You are right and maybe it is a bit cluttered. Another option could be to add the new orders only as a hotkey and with no icon, but I think it would be less user friendly.

Now, I'm trying to make this mod compatible with Snoopy/Dale PatchMod...
 

Attachments

  • Civ4ScreenShot0000.jpg
    Civ4ScreenShot0000.jpg
    117.2 KB · Views: 328
Maybe even replace some orders. When do you not want to "Sentry while healing" outside a city?
 
Maybe even replace some orders. When do you not want to "Sentry while healing" outside a city?

When you are at war, trying to take an enemy city, for example. You may need some turns to take the city and you need the units damaged during the siege to be healed without awaking each turn. In this case, you already know where the enemy is, so you don't need to sentry the unit.

A "Sentry while healing" is useful with privateers (always at war), scouts and groups of few units harassing enemy territory. It is not very useful with large stacks at war. So I think both "Heal" and "Sentry while healing" orders should coexist.
 
When you are at war, trying to take an enemy city, for example. You may need some turns to take the city and you need the units damaged during the siege to be healed without awaking each turn. In this case, you already know where the enemy is, so you don't need to sentry the unit.

A "Sentry while healing" is useful with privateers (always at war), scouts and groups of few units harassing enemy territory. It is not very useful with large stacks at war. So I think both "Heal" and "Sentry while healing" orders should coexist.

It could replace the standard Sentry instead of Heal. I think that is what he meant. If the unit is at full health, regular Sentry appears, if it's not, Sentry while Heal appears.
 
It could replace the standard Sentry instead of Heal. I think that is what he meant. If the unit is at full health, regular Sentry appears, if it's not, Sentry while Heal appears.

Seems a good idea to reduce the number of displayed icons on screen, but is also not very user friendly. Perhaps you want your wounded unit to remain sentried forever until an enemy appears, and with "sentry while heal" the unit awakes when it reaches full health, forcing you to sentry it again...
 
I have updated the mod to version 0.2. Changes are:
- Button positions for new orders altered: Now, they appear at the beginning of the button bar.
- "Load from docks" icon on Europe Screen is now displayed properly.

I've erased all the iOrderPriority XML values of the new orders. This way, the "Load from docks" error of version 0.1 is fixed. The drawback is that now the new icons appear at the beggining of the button bar.

It seems there's something strange with the order of SDK actions on the one hand, and the order of XML strings on the other hand. The index recovered by getInfoTypeForString (It appears as gc.getInfoTypeForString("COMMAND_LOAD") on CvEuropeScreen.py) seems to differ from the index established to all actions on SetGlobalActionInfo SDK function. I erased the iOrderPriority XML values to handle it, but I don't know if there's a better solution.
 
Lots of things are considered actions, Controls, Commands, Builds, Promotions, ect, and all of these things are put into a single enum array. If you want to get a thing's ActionInfoIndex I think it is something like this in Python..
Code:
gc.getCommandInfo(gc.getInfoTypeForString("COMMAND_LOAD")).getActionInfoIndex()
 
Lots of things are considered actions, Controls, Commands, Builds, Promotions, ect, and all of these things are put into a single enum array. If you want to get a thing's ActionInfoIndex I think it is something like this in Python..
Code:
gc.getCommandInfo(gc.getInfoTypeForString("COMMAND_LOAD")).getActionInfoIndex()

Thanks for the info. I also have to study further the behaviour of iOrderPriority XML values. I know these values are used in the single enum array sorting, but it's unclear their truly meaning.
 
Top Bottom