ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

IQ

From ModEnc
Revision as of 04:24, 7 February 2018 by TK3600 (talk | contribs)
Jump to: navigation, search

As a Flag

Tiberian Dawn The Covert Operations Red Alert Counterstrike Aftermath Tiberian Sun Firestorm HyperPatch Red Alert 2 Yuri's Revenge Ares Generals Zero Hour Tiberium Wars Kane's Wrath
Flag: IQ
File(s): *.map, *.mpr, *.yrm, possibly hacked *.sed files
Values: Unsigned Integers
Default: 0 for humans, 1 for campaign AIs, number set in MaxIQLevels for skirmish & MP AIs
Applicable to: Maps


This flag, used on a house's entry in maps, sets the IQ of the house in question. This IQ, in return, determines what the AI can and can't do automatically, through the minimum IQ numbers set in [IQ].

As a section

In this section of rules(md).ini, the game's IQ settings are located. It lets you set a minimum IQ number required to automatically do things like putting newly produced units in "guard area" mode or replacing lost harvesters.

Example

In unmodded YR 1.001, the section looks like this:

[IQ]
MaxIQLevels=5           ; the maximum number of discrete IQ levels
SuperWeapons=4          ; super weapons are automatically fired by computer
Production=5            ; building/unit production is automatically controlled by computer
GuardArea=2             ; newly produced units start in guard area mode
RepairSell=1            ; allowed to choose repair or sell of damaged buildings
AutoCrush=2             ; automatically try to crush antogonists if possible
Scatter=2               ; will scatter from incoming threats [grenades and such]
ContentScan=3           ; will consider contents of transport when picking good target
Aircraft=3              ; automatically replace aircraft
Harvester=2             ; automatically replace lost harvesters
SellBack=2              ; allowed to sell buildings

which means that an AI with IQ=2, for example, would be able to sell back buildings, replace lost harvesters, scatter from incoming threads, auto-crush enemies, choose to repair or sell buildings, and put new units in guard area mode, but, on the other hand, could not replace lost aircraft, consider a transport's content when picking its target, control it's production or fire super weapons.

Exploiting the System

If you have read the header, you know that a human-controlled country has an AI-rating of zero. If you have read the code-box above, you also know that the minimum AI level to do something automatically (reparing and selling) is one. This is so objects belonging to a human country don't suddenly mutiny and start working on their own.

This, however, doesn't have to be a bad thing at all.

A common mod, for example, is to set RepairSell to 0 (zero), leading to the computer repairing structures automatically, even if they're owned by a human player. In heated base-defense situations, this immediate repair can mean the difference between keeping or losing important structures.
On the other hand, it also means that you cannot choose not to repair something. The AI will repair your base until it's either at full health or your credits reached the CreditReserve mark - and if that has happened, it might decide to sell your building...for the greater good.
Note, though, that I, personally, have done this specific mod for years, and the AI never sold my buildings - it's just a theoretical possibility. This mod also provides a level of convenience high enough to be in the top 5 requests when I asked which features should make their way into TD:SE. Once you've played a few games with auto-repair and got used to not having to care for damaged structures anymore, you'll painfully miss it when you play a mod where it isn't enabled. I speak from experience. ;)
I, personally, have not tried other IQ-mods, but I could imagine that setting GuardArea to 0, for example, would increase base security significantly, since newly produced units wouldn't just stupidly stand around when the base is under attack.

After all, you're a modder. Go try it out.

Production and Superweapons appears to be not functional for player when set to 0.

Applicable INI Flags

These tables show all INI flags applicable1 to IQ. The flags are grouped by the internal classes the flags are inherited from, and then listed in the order they are read in by the game. You can re-sort the rows by column values by clicking the arrow icons in the column headings. Each flag can be clicked to visit its page for detailed information.

Please note that this section is accurate only for Yuri's Revenge. All other C&C games use different sets of flags.

1 "Applicable" in this context means "read from the INI files". Certain flags listed here don't have any effect ingame , but they are read and in certain cases cause a crash if not present. Again, refer to each flag's individual page for detailed information.


[IQ]
INI File Section Key Value Type Default Value Adds to list
Rules(md).ini [IQ] MaxIQLevels int 5
Rules(md).ini [IQ] SuperWeapons int 4
Rules(md).ini [IQ] Production int 5
Rules(md).ini [IQ] GuardArea int 4
Rules(md).ini [IQ] RepairSell int 3
Rules(md).ini [IQ] AutoCrush int 2
Rules(md).ini [IQ] Scatter int 3
Rules(md).ini [IQ] ContentScan int 4
Rules(md).ini [IQ] Aircraft int 4
Rules(md).ini [IQ] Harvester int 3
Rules(md).ini [IQ] SellBack int 2


See also