UGO
Civilization Fanatics' Center  

Welcome to Civilization Fanatics' Center.

You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support.

Go Back   Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Civ4 - Mod Components

Reply
 
Thread Tools
Old Nov 09, 2008, 03:48 AM   #1
Pep
Warlord
 
Join Date: May 2002
Location: Spain
Posts: 222
[MODCOMP] New sentry actions for units

New sentry actions for units by Pep (use it with official patch 3.19. See attached files)

Changes from official patch:

New sentry orders:
  • Added new mission button: "Sentry until Healed" (Hotkey: Shift + H). Orders the active unit to sleep. The unit remains inactive until it reaches full strength OR an enemy unit of the same type (types: land or naval) enters its visibility range. Naval units carrying on this mission DO NOT activate by naval enemy units docked in a city within their visibility radius.
  • Added new mission button: "Sentry on naval units" (Hotkey: Shift + N). Orders the active naval unit to sleep. The unit remains inactive until an enemy NAVAL unit enters its visibility range (Very useful for privateers on enemy territory ;-)). Naval units carrying on this mission DO NOT activate by naval enemy units docked in a city within their visibility radius.
  • Added new mission button: "Sentry on land units" (Hotkey: Shift + L). Orders the active land unit to sleep. The unit remains inactive until an enemy land unit enters its visibility range.
  • Added new mission button: "Go To and Sentry" (Hotkey: X). Orders the active land or naval unit to move to a destination. The movement ends before reaching the destination if an enemy unit of the same type (land or naval) is within the visibility radius. Note: This order canīt be selected (and the action button remains invisible) if a enemy unit is already in the visibility range.

(see attached image Civ4ScreenShot0000.jpg to view the new order icons)

New city modes:
  • "Units built at city start fortified": When a city is in this mode, all the units built in the city start fortified instead of active. If the city has a waypoint, the unit fortifies when it reaches its destination. Very useful for make a city built units indefinitely without being disturbed by the interface for each new unit. Select a city or a group of cities and press <V> to select this mode. Press <J> to revert to normal mode. You can see in which mode is a particular city by selecting it and looking at the last line of the help (see attached image Civ4ScreenShot0001.jpg). The city mode is stored in the savegame using flag extension to maintain savegame compatibility.
  • "Units built at city autoairlift":
    When a city is in this mode, has an airport and a waypoint for units is set, if the built unit can't reach its destination in one turn and the destination is a city where the unit can airlift, it uses the airport automatically. Select a city or a group of cities and press <CTRL+V> to select this mode. Press <CTRL+J> to revert to normal mode. You can see in which mode is a particular city by selecting it and looking at the last line of the help. The city mode is stored in the savegame using flag extension to maintain savegame compatibility.

New mass effects for existing orders:
  • Added "mass delete mode": Presing ALT while clicking "Delete" on the active unit, deletes ALL player's units of the same type as the active one.
  • Added "mass fortify mode": Presing ALT while clicking "Fortify" on the active unit, fortifies ALL player's units of the same type as the active one. It only works if the active unit is ungroupped or groupped with units of the same type only. Also, only ungroupped or groupped with units of the active unit's type only, are fortified by this order.
  • Added "mass sleep mode": Presing ALT while clicking "Sleep" on the active unit, orders ALL player's units of the same type as the active one to sleep. Same restrictions as in "mass fortify mode".
  • Added "mass intercept mode": Presing ALT while clicking "Intercept" on the active unit (Fighter or Jet Fighter), orders ALL player's units of the same type as the active one to intercept. Same restrictions as in "mass fortify mode".

Standard movement behaviour changes:
  • Modified movement "standard" attack behaviour: now, if a unit ends its path movement on an unseen or unrevealed tile occupied by an enemy unit, the unit stops and activates so you can choose whether to attack or not (Standard behaviour was to attack the unseen unit).
  • Modified movement "standard" disembark behaviour: now, if a naval unit ends its path movement on an unrevealed land tile the unit stops and activates so you can choose whether to disembark or not (Standard behaviour was to disembark on the unrevealed land tile).

Standard selection mode changes:
  • Modified "standard" ALT + C behaviour when units from multiple domains (air, sea, land) are in the same plot. For example, standard ALT + C selects always all naval units in a sea plot, regardless of the domain of the selected unit. With the modified behaviour, if you select a unit and then pulse ALT + C, all the units of the SAME DOMAIN are selected. With this new behaviour if you select a land unit (loaded in a ship) in a sea plot and then pulse ALT + C, all land units (same domain type) in the same plot are selected.
  • Modified "standard" CTRL + H behaviour when units from multiple domains (air, sea, land) are in the same plot. For example, standard CTRL + H selects always all wounded naval units in a sea plot, regardless of the domain of the selected unit. With the modified behaviour, if you select a unit and then pulse CTRL + H, all wounded units of the SAME DOMAIN are selected. With this new behaviour if you select a land unit (loaded in a ship) in a sea plot and then pulse CTRL + H, all wounded land units (same domain type) in the same plot are selected.

New game options:
  • Added a new game option: "City governors build workboats". Now, city governors build workboats ONLY if this option is active. (Default: deactivated)
  • Added a new game option: "City governors train workers". Now, city governors trains workers ONLY if this option is active. (Default: deactivated)
  • Added a new game option: "City Governors Prioritize Goods Over Non Essential Buildings" If this option is NOT active (Default: deactivated), city governors try first to construct "non essential" buildings (like bunkers when not at war) over goods (gold, culture, etc.). Check this option if you like Civ 4 "standard" building order.

Bug fixes in official patch version:

Compatibility mode: Press CTRL + SHIFT + V to clear all new sentry orders for all units so you can save the game and load it without the mod. The units with cleared orders become active so that you can give them new orders.

How to use:

Official patch 3.19 version:
  • Copy CvGameCoreDLL.dll to Civ 4 directory subfolder: "Beyond the Sword\Assets" (Make a backup of the original file first!)
  • Copy the XML and DDS files to your "My Documents\My Games\Beyond the Sword\CustomAssets" subfolders.

Better BTS AI 0.82 merged version:

Better BTS AI mod main thread is:
http://forums.civfanatics.com/forumdisplay.php?f=245
  • Copy CvGameCoreDLL.dll to Civ 4 directory subfolder: "Beyond the Sword\Assets" (Make a backup of the original file first!)
  • Copy the XML, Python and DDS files to your "My Documents\My Games\Beyond the Sword\CustomAssets" subfolders.

DOWNLOAD:
New sentry actions for units v0.91: http://forums.civfanatics.com/downlo...=file&id=12941
New sentry actions for units v0.93 merged with Better BTS AI v0.82: http://forums.civfanatics.com/downlo...=file&id=12942

Notes:
  • Help for the new actions is only in English (and Spanish if selected in standard menu options). Sorry!
  • Source files that have been changed to build the dll are included.
  • WARNING: If you save a game using this mod and want to load it without the mod, make sure none of your units is carrying on any of the new "sentry orders" (use compatibility mode described above). If so, the game may hang your computer!
Attached Thumbnails
Click image for larger version

Name:	Civ4ScreenShot0000.JPG
Views:	343
Size:	231.3 KB
ID:	193779   Click image for larger version

Name:	Civ4ScreenShot0001.JPG
Views:	150
Size:	265.8 KB
ID:	221480  

Last edited by Pep; Oct 31, 2009 at 09:19 AM. Reason: Changed BBAI version to 0.82
Pep is offline   Reply With Quote
Old Nov 09, 2008, 04:52 AM   #2
Dresden
Emperor
 
Dresden's Avatar
 
Join Date: Jul 2008
Posts: 1,081
Hmm. Somehow I missed those bugfixes. Mind if I include them in the next Unofficial Patch (with due credit of course)?

Also, I like the "Standard movement behaviour changes." Always thought it was stupid that the game forces you to attack a unit in the black.
__________________
BUG (BTS Unaltered Gameplay) Mod: Forum || SourceForge Project || Download v3.5.1
BTS 3.17 Unofficial Patch: Forum || SourceForge Project || Download v0.21
BTS BetterAI Mod: Forum || SourceForge Project || Download v0.45
Misc ModComps (BTS): EventSigns
Dresden is offline   Reply With Quote
Old Nov 09, 2008, 05:55 AM   #3
Pep
Warlord
 
Join Date: May 2002
Location: Spain
Posts: 222
Quote:
Originally Posted by Dresden View Post
Hmm. Somehow I missed those bugfixes. Mind if I include them in the next Unofficial Patch (with due credit of course)?

Also, I like the "Standard movement behaviour changes." Always thought it was stupid that the game forces you to attack a unit in the black.
Please, feel free to include my source changes in your unofficial patch. In fact, I'm currently compiling your patch with my modcomp .

You can follow the changes to the code as they are marked with a "// jlc:" comment. The comments are not very explanatory, though.

About changing the behaviour of attacking a unit in the black, I codded it as:
- new property m_lastPlotVisible in class CvSelectionGroup, to save the state (visible or not) of the last plot of the movement.
- two new functions, "void setLastPathPlotVisibility(bool eVisible)" and "bool isLastPathPlotVisible()" to establish and retrieve the value of the new property.
- Property initialization on CvSelectionGroup::reset.
- When a new move mission begins (CvSelectionGroup::startMission) setLastPathPlotVisibility is called.
- In CvSelectionGroup::groupAttack is called isLastPathPlotVisible.
Pep is offline   Reply With Quote
Old Nov 09, 2008, 06:29 AM   #4
Pep
Warlord
 
Join Date: May 2002
Location: Spain
Posts: 222
Added Unofficial patch 0.21 version.
Pep is offline   Reply With Quote
Old Nov 28, 2008, 01:13 PM   #5
Caesium
Radiant!
 
Caesium's Avatar
 
Join Date: Jan 2006
Posts: 526
Your "Go To and Sentry" (Hotkey: X) doesn't work for me. I merged it into my sdk, but its effect is the same as the standard "Go To" - the unit doesn't sentry (no enemy visible).
Caesium is offline   Reply With Quote
Old Nov 30, 2008, 04:40 AM   #6
Pep
Warlord
 
Join Date: May 2002
Location: Spain
Posts: 222
Quote:
Originally Posted by Caesium View Post
Your "Go To and Sentry" (Hotkey: X) doesn't work for me. I merged it into my sdk, but its effect is the same as the standard "Go To" - the unit doesn't sentry (no enemy visible).
I think I misnamed this new order. It's not intended to work as "first go to and then sentry when reached the destination". It works as a "sentry while going to": you give a unit an order to go to a distant tile, but if an enemy unit is spotted in its way, the movement ends and you retake the control of the unit.
Pep is offline   Reply With Quote
Old Jan 17, 2009, 08:05 PM   #7
Pep
Warlord
 
Join Date: May 2002
Location: Spain
Posts: 222
Added Better BTS AI v0.50 version
Pep is offline   Reply With Quote
Old Jan 26, 2009, 12:30 PM   #8
Arlborn
Legendary Noob
 
Arlborn's Avatar
 
Join Date: Jul 2006
Posts: 1,922
That is actually a nice moid and I will be downloading it!

Any chance of including the 0.60 better AI into it? I believe it is more of a test version than a release, so no real need if you don 't want!

But, really, nice and simple changes right there!
__________________
Beep.
Smoking Snakes.
Economic Left/Right: -3.62
Social Libertarian/Authoritarian: -6.92
I write so small and in lemonchiffon(lol!) because I am Roxor!
Arlborn is offline   Reply With Quote
Old Jan 30, 2009, 01:20 PM   #9
Pep
Warlord
 
Join Date: May 2002
Location: Spain
Posts: 222
Quote:
Originally Posted by Arlborn View Post
That is actually a nice moid and I will be downloading it!

Any chance of including the 0.60 better AI into it? I believe it is more of a test version than a release, so no real need if you don 't want!

But, really, nice and simple changes right there!
Updated Better AI version to 0.60
Pep is offline   Reply With Quote
Old Jan 30, 2009, 05:04 PM   #10
Arlborn
Legendary Noob
 
Arlborn's Avatar
 
Join Date: Jul 2006
Posts: 1,922
Quote:
Originally Posted by Pep View Post
Updated Better AI version to 0.60
Thank you!!!! I am sure as hell using it now!
__________________
Beep.
Smoking Snakes.
Economic Left/Right: -3.62
Social Libertarian/Authoritarian: -6.92
I write so small and in lemonchiffon(lol!) because I am Roxor!
Arlborn is offline   Reply With Quote
Old Feb 25, 2009, 10:57 PM   #11
The Monster
Chieftain
 
The Monster's Avatar
 
Join Date: Feb 2009
Posts: 29
Intelligent handling of transports that can unload with 0 MP left

Quote:
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.
This reminds me of something I find frustrating about transports.

I play a lot of games on Terra maps, and will park an empty transport in the middle of the ocean waiting to take a relay of the cargo destined for the New World from another transport that will end its turn on that exact spot. Well-organized relays like this can get a settler, missionary, and worker across the ocean and unloaded in as little as 2 turns if enough transports are in the right spots, but it requires a lot of micromanagement.

There's nothing I can see in the standard missions to do this, so my choice is to have the first transport stop one tile short of the rendezvous point to give me control to complete the order. I've tried ordering the transport to go to the tile and then unload, but the Unload order doesn't seem to queue; it immediately wakes the carried units, so I have to wait/skip each of them until they get to the RP.

It would be nice to have an Unload or Transfer Cargo order that properly queues, but failing that I want to be able to give a special conditional mission to any carried unit: When a ship carrying one of these units ends its turn in a city/fort, adjacent to land, or on the same tile as a transport with movement points remaining, I want the carried unit(s) to wake up so that I can decide whether they should leave the transport/enter the other one on this turn. It would be fine with me if this were the default behavior for all units sleeping in a ship, but making it a checkbox somewhere wouldn't be bad either, as I can imagine some people getting equally frustrated at having carried units waking up all the time.


I just hate it when a ship gets focus right next to a landmass or on top of a transport that the units could have entered last turn, and I realize that city will now be founded a turn later than it should have been.
The Monster is offline   Reply With Quote
Old Mar 28, 2009, 01:21 PM   #12
Pep
Warlord
 
Join Date: May 2002
Location: Spain
Posts: 222
Upgraded Better BTS AI v0.60 version to include "Mass Sleep" mode.
Pep is offline   Reply With Quote
Old Mar 29, 2009, 05:22 PM   #13
EmperorFool
Deity
 
EmperorFool's Avatar
 
Join Date: Mar 2007
Location: Mountain View, California
Posts: 6,245
Nice changes. I may include some of these in BULL (the BUG DLL). Do you have an all-encompassing short name for this modcomp for use in the comments to mark changes? I haven't looked at the source yet, so if you do already, RTFS is an acceptable answer.

For example, in BULL I use

Code:
// BULL - UP - Barrage Fix - start
...
// BULL - UP - Barrage Fix - end
for the Unofficial Patch Barrage Fix. I'm looking for something to go where "UP" goes, preferably a little shorter than "New sentry actions for units".

Edit: Nevermind. I see you used "jlc" to mark your changes, so I'll use the same in BULL.

Also, I've got some questions about a few of these features.
  • Mass delete action: does ALT + DELETE work?
  • Mass fortify action: does ALT + F work?
For ending moving in the black, do the changes take effect only when you move into an enemy-occupied or land (for ships) tile? If I'm exploring the ocean, does my unit stop for every empty unrevealed ocean tile so I can no longer click deep into the black and have it go until it hits land?

If not, you might want to make the explanation a little clearer as it only says, "if a unit ends its movement on an unseen or unrevealed tile, the movement ends," nothing about it being occupied by an enemy, only that you won't attack automatically. For that matter, what if there's an enemy along your path before the endpoint?

Perhaps something like this:
Units will no longer attack enemies or unload their cargo automatically when entering an unrevealed tile. Instead, they will stop moving (interrupt their mission) and allow you to issue new orders.
__________________
"Genius is conscious evolution." - a friend
BUG Mod - BTS Unaltered Gameplay - Project, Forum, Download

BULL 1.0 has finally been released along with BUG 4.2 and BAT 2.1

Last edited by EmperorFool; Mar 29, 2009 at 05:30 PM.
EmperorFool is offline   Reply With Quote
Old Mar 29, 2009, 07:25 PM   #14
JEELEN
Venite, videte, audite
 
JEELEN's Avatar
 
Join Date: Oct 2006
Location: Leiden, the Netherlands
Posts: 7,428
Images: 22
Some great and long missing additions there.
__________________
MOD MOO2Civ SCENARIOS 1250 BC for BtS/1250 BC for HitM 2.01/1000 BC for BtS/1000 BC for CIV Gold BtS/600 BC for BtS/600 BC for CIV Gold BtS/300 BC for BtS/300 BC for CIV gOLD 5.2/50 AD for BtS/750 AD for BtS/750 AD for CIV Gold BtS/1000 AD for SevoMod/1066 AD for BtS/1066 AD for CIV Gold BtS/1066 AD for Thomas' War/1066 AD for Amra BtS/The Crusades !/The Crusades! for CIV Gold BtS/The Crusades! for Esnaz's Mod/1600 AD for CIV Gold BtS/1790 AD for CIV Gold BtS/1862 AD for CIV Gold BtS MAPS Amra 18 civs BtS/Random Religions 18 civs BtS/RoM 2.3 Huge Earth 18 civs/Thomas' War 2.8 Huge Earth 18 civs/HitM 2.01 Huge Earth 18 civs/GEM 5.3 Ancient 26 civs/Map pack for Chiyu's Extra mod
JEELEN is offline   Reply With Quote
Old Apr 10, 2009, 08:37 AM   #15
Melendor
Chieftain
 
Join Date: Aug 2008
Location: Rio de Janeiro, Brazil
Posts: 98
Images: 4
Suggestion: wait 5 turns (for spies only).
Melendor is offline   Reply With Quote
Old Apr 11, 2009, 08:34 PM   #16
The Monster
Chieftain
 
The Monster's Avatar
 
Join Date: Feb 2009
Posts: 29
Quote:
Originally Posted by Melendor View Post
Suggestion: wait 5 turns (for spies only).
Or wait X turns, where X is filled out via a popup dialog. You could hit 5 and Enter if you wanted, or any other value as you feel appropriate.
The Monster is offline   Reply With Quote
Old Apr 13, 2009, 11:50 PM   #17
smeagolheart
Monarch
 
smeagolheart's Avatar
 
Join Date: Sep 2007
Location: Uden, NL
Posts: 390
Hey just wanted to say this is really useful and a good addition to the game.

Good job
__________________
My mod: Destiny
A Civ 4 BTS mod: Expand your Civ4 today!
Link

Modcomps:
Examine City at Conquest!
Link
smeagolheart is offline   Reply With Quote
Old Jun 14, 2009, 11:49 AM   #18
Pep
Warlord
 
Join Date: May 2002
Location: Spain
Posts: 222
Updated modcomp to official patch 3.19
Pep is offline   Reply With Quote
Old Jun 14, 2009, 03:52 PM   #19
EmperorFool
Deity
 
EmperorFool's Avatar
 
Join Date: Mar 2007
Location: Mountain View, California
Posts: 6,245
Do the mass effects apply to all your units everywhere or only the ones on the current tile? If the latter, I recommend using CTRL because that's what Civ4 already uses for "apply to units of same type"

Also, from post 13
  • Mass delete action: does ALT + DELETE work?
  • Mass fortify action: does ALT + F work?
__________________
"Genius is conscious evolution." - a friend
BUG Mod - BTS Unaltered Gameplay - Project, Forum, Download

BULL 1.0 has finally been released along with BUG 4.2 and BAT 2.1
EmperorFool is offline   Reply With Quote
Old Jun 14, 2009, 04:20 PM   #20
Pep
Warlord
 
Join Date: May 2002
Location: Spain
Posts: 222
Quote:
Originally Posted by EmperorFool View Post
Do the mass effects apply to all your units everywhere or only the ones on the current tile? If the latter, I recommend using CTRL because that's what Civ4 already uses for "apply to units of same type"

Also, from post 13
  • Mass delete action: does ALT + DELETE work?
  • Mass fortify action: does ALT + F work?
It applies over all the units everywhere. With "Mass delete" you erase all your units of the same type in the whole map but "Mass fortify" has groupping restrictions (see the first post).

I chose "ALT" because is the key Civ 4 already uses for "Mass upgrade" (whole map effects). Indeed, I decided to introduce a "Mass fortify" action because I got tired of fortifying one by one all the units activated by a "Mass upgrade".

Mass effects only work when pressing "ALT" while clicking over the proper button. They don't work with the shortcuts, so ALT + DELETE and ALT + F do nothing.

Last edited by Pep; Jun 14, 2009 at 04:31 PM.
Pep is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Civ4 - Mod Components > [MODCOMP] New sentry actions for units

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[MODCOMP] New orders for units Pep Civ4Col - Mods and Files 11 Mar 14, 2009 03:29 PM
Sentry function not working properly when applied over a group of units Pep Civ4 - Bug Reports 1 Aug 11, 2008 05:11 PM
New missions: Sentry while healing / Sentry on naval units Nicopol Civ4 - Fall from Heaven 2 Aug 10, 2008 05:30 AM
[MODCOMP] Flavoured Units SadoMacho Rhye's and Fall Modmods 30 Mar 31, 2007 05:22 AM
Artillery on Sentry does not see Naval Units Pounder Civ3 Conquests - Bug Reports 5 Dec 22, 2003 10:12 PM



All times are GMT -6. The time now is 05:39 PM.


Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
This site is copyright Đ 2000 - 2009, Civilization Fanatics' Center.
Support CFC: Amazon.com | EB Games | Amazon UK | Amazon DE | Amazon CA | Amazon FR