Genie technology

From GenieWiki

(Redirected from Genie technologies)
Jump to: navigation, search

This page contains information for editing the technology data in Age of Kings: The Conquerors. The data structures will be given in two formats, the GeniEd Beta format, and hex editing format (C-Style Syntax). Tools that will be needed for this can be found under the external links section.


Contents

Research Structure

This section will describe the first part of the technology data, known as the research data. This data tells what the technology requires, what it costs, what civilizations have it available, where it is researched, what its name is, what its description is, how long it takes to research, what techage ID will be used, whether it is an age technology(like Imperial Age), what icon it will have, what button slot it will show up in, and what its internal name will be.

The structure is stored in the data file as follows:

struct genie_tech
{
	short required_techs[6];
	struct
	{
		short resource;
		short amount;
		char used;
	} costs[3];
	short required_count;
	short civ;
	short full_tech_mode;
	short unit_id;
	short lang_name;
	short lang_desc;
	short time;
	short effect_id;
	short age_tech; //0 for non-age tech
	short icon;
	char button_location;
	long pointers[3]; //last is unused, its always -1
	short name_len;
	char name[name_len];
};

GeniEd beta represents the structure for editing as follows:

research_#_required_tech: -1 -1 -1 -1 -1 -1
research_#_cost1_type: -1
research_#_cost1_amount: -1
research_#_cost1_used: 0
research_#_cost2_type: -1
research_#_cost2_amount: -1
research_#_cost2_used: 0
research_#_cost3_type: -1
research_#_cost3_amount: -1
research_#_cost3_used: 0
research_#_required_tech_amount: 0
research_#_civ: -1 0
research_#_location: -1
research_#_description: 0
research_#_help: 0
research_#_time: 0
research_#_effect: -1
research_#_unknown01: 0
research_#_icon: -1
research_#_button: 0
research_#_pointer: -1 -1 -1
research_#_name1_length: 0
research_#_name1:

Required Technologies

These hold the Research IDs of the technologies that are required in order for this technology to appear.


Costs

These hold the values that determine the cost of the technology. The first value contains a Resource ID. The second value contains the cost amount. The third value is a boolean that determines whether the cost is used (1) or not (0).


Required Technology Count

This holds the number of required technologies used. It ranges from 0 to 6. This does not specify the number of required techs set, but the minimum required. You could have 6 required techs, but require that only two of them be researched.


Civilization

This controls what civilization gets this technology. It is a Civilization ID, or -1 if unused.


Full Tech Mode

This tells whether this technology is available in Full Tech Tree Mode. It is set to 0 for disabled in Full Tech Mode, and 1 for enabled in Full Tech Tree Mode.


Location

This controls where the technology will appear. It is a Unit ID.


Name/Description

Although the GeniEd Beta calls this the description, it is actually the name of the technology. It is the index in the Language File that holds the name.


Description/Help

Although the GeniEd Beta calls this the help, it would be better termed as the description. It is also an index in the Language File.


Research Time

This holds the number of game seconds that this technology takes to finish being researched.


Effect Slot ID

This holds Techage ID (the second part of the technology data) that corresponds to this data.


Age Tech

This determines whether this technology is an age tech (like Imperial Age) or if it is a regular technology. It is 0 for regular and 2 for age.


Icon

This holds the Icon ID for this technology. It is the frame number of the graphic in the icon.slp minus 1.


Button

This contains the Button ID for this technology. It tells where the button will show up on the unit where it is researched.


Pointers

These numbers point to something (I don't know what). The first number is 100,000 plus the Language FIle ID for the name/description. The second number is 149,000 plus the Language File ID for the description/help. The third number has been -1 in every technology so far.


Internal Name

The name length is equal to the length of the name plus 1. The name follows immediately after the length value, and is just plain text.

Techage Structure

This section describes the second part of the technology data, known as the techage or "CHUN4" data. These structures define the effects for the above technology structures.

Their structure in the data file is as follows:

struct techage
{
	char name[31]; //Always "CHUN4", but can be anything up to 30 characters
	short effect_count;
}

struct effect
{
	char type;
	short a;
	short b;
	short c;
	float d;
};

GeniEd Beta represents them for editing as follows:

techage_#_name: CHUN4
techage_#_count: 0

techage_#_#_type: -1
techage_#_#_unit: -1
techage_#_#_class: -1
techage_#_#_attribute: -1
techage_#_#_amount: 0


Name

This is considered the name of the technology and is always equal to CHUN4. This can be set to anything, since it is unused by the game. You could use this to find the techage slot quicker.


Effect Count

This tells how many effects there are going to be.


Effects

This is a list of the various effect types. Types 101 - 103 are generally used only in technology trees, and 103 only works in this fashion. The values when an attribute is unused are as follows:

  • Attribute A: -1
  • Attribute B: -1
  • Attribute C: -1
  • Attribute D: 0

Type 0 - Attribute Modifier (Set)

Used to change unit or class attributes by setting them to a certain value.

  • Type: 0
  • Attribute A: If set, this is a Unit ID. If unused, a Class ID must be specified in Attribute B
  • Attribute B: See above
  • Attribute C: Attribute ID
  • Attribute D: Value to set

Type 1 - Resource Modifier (Increase/Decrease/Set)

Used to modify values stored by the game about the player.

  • Type: 1
  • Attribute A: Resource ID to modify
  • Attribute B: 0 (Set) or 1 (Increase/Decrease)
  • Attribute C: Unused
  • Attribute D: Value to modifiy by


Type 2 - Enable/Disable Unit

Used to make units buildable or unbuildable.

  • Type: 2
  • Attribute A: The Unit ID to enable/disable
  • Attribute B: 0 (Disable) or 1 (Enable)
  • Attribute C: Unused
  • Attribute D: Unused


Type 3 - Upgrade Unit

Used to upgrade an existing unit into a different unit.

  • Type: 3
  • Attribute A: Unit ID to upgrade
  • Attribute B: Target Unit ID
  • Attribute C: Unused
  • Attribute D: Unused


Type 4 - Attribute Modifier (Increase/Decrease)

Used to change unit or class attributes by addition or subtraction.

  • Type: 4
  • Attribute A: If set, this is a Unit ID. If unset, a Class ID must be specified in Attribute B
  • Attribute B: See above
  • Attribute C: Attribute ID
  • Attribute D: Value to modify by (negative or positive)

Type 5 - Attribute Modifier (Multiply)

Used to change unit or class attributes by multiplication.

  • Type: 5
  • Attribute A: If set, this is a Unit ID. If unset, a Class ID must be speicified in Attribute B
  • Attribute B: See above
  • Attribute C: Attribute ID
  • Attribute D: Value to multiply by


Type 6 - Resource Modifier (Multiply)

Used to modify values stored by the game about the player.

  • Type: 6
  • Attribute A: Resource ID
  • Attribute B: Unused
  • Attribute C: Unused
  • Attribute D: Value to multiply by


Type 101 - Technology Cost Modifier (Increase/Decrease/Set)

Used to change the cost of a technology for a given civilization.

  • Type: 101
  • Attribute A: Research ID
  • Attribute B: Resource ID
  • Attribute C: 0 (Set) or 1 (Addition)
  • Attribute D: Value to modify by (negative or positive) or set

Type 102 - Disable Technology

Used to disable a technology for a given civilization.

  • Type: 102
  • Attribute A: Unused
  • Attribute B: Unused
  • Attribute C: Unused
  • Attribute D: Research ID

Type 103 - Technology Research Time Modifier (Increase/Decrease/Set)

Used to change the Research Time of a technology for a given civilization.

Note: Only works in Technology Trees

  • Type: 103
  • Attribute A: Research ID
  • Attribute B: Unused
  • Attribute C: 0 (Set) or 1 (Increase/Decrease)
  • Attribute D: Value to modify by (negative or positive) or set

ID Lists

This is an alphebetized list of the various IDs used when editing technologies. Some are still incomplete. If anyone wants to update or add them, feel free, or you can email the information to sbkroger77 (at) yahoo (dot) ca.


Attribute IDs

  • 0 Hit Points
  • 1 Line of Sight
  • 2 Garrison
  • 3 Unit Size Radius 1
  • 4 Unit Size Radius 2
  • 5 Movement Speed
  • 6 Garrison Recovery Rate
  • 7 Unknown?
  • 8 Armor
  • 9 Attack
  • 10 Attack Reloading Time
  • 11 Percent Accuracy
  • 12 Range
  • 13 Working Rate
  • 14 Resource Carriage
  • 15 Unknown?
  • 16 Unknown?
  • 17 Unknown Building Mode
  • 18 Unknown?
  • 19 Projectile Unit Intelligent Accuracy (Boolean)
  • 20 Minimum Range
  • 21 Population Support
  • 22 Blast Radius (Area Damage)
  • 23 Search Radius
  • 80 Boarding Energy Reload Speed
  • 100 Resource Cost
  • 101 Creation Time
  • 102 Number of Garrison Arrows
  • 103 Food Cost
  • 104 Wood Cost
  • 105 Stone Cost
  • 106 Gold Cost
  • 107 OREX Cost?
  • 108 Healing Rate

Note: For attributes 8 (Armour) and 9 (Attack) the change value needs to be set to (Change Value) + (256 * Armour/Attack ID)

Button IDs

Page 1:

Decimal:                          Hex:
+------------------------+        +------------------------+
| 01 | 02 | 03 | 04 | 05 |        | 01 | 02 | 03 | 04 | 05 |
|----|----|----|----|----|        |----|----|----|----|----|
| 06 | 07 | 08 | 09 | 10 |   or   | 06 | 07 | 08 | 09 | 0A |
|----|----|----|----|----|        |----|----|----|----|----|
| 11 | 12 | 13 | 14 | 15 |        | 0B | 0C | 0D | 0E | 0F |
+------------------------+        +------------------------+

Page 2:

Decimal:                          Hex:
+------------------------+        +------------------------+
| 21 | 22 | 23 | 24 | 25 |        | 15 | 16 | 17 | 18 | 19 |
|----|----|----|----|----|        |----|----|----|----|----|
| 26 | 27 | 28 | 29 | 30 |   or   | 1A | 1B | 1C | 1D | 1E |
|----|----|----|----|----|        |----|----|----|----|----|
| 31 | 32 | 33 | 34 | 35 |        | 1F | 20 | 21 | 22 | 23 |
+------------------------+        +------------------------+

Note: Enabling page-changing functions is still unknown, and requires unit editing.


Icon IDs

  • 0 Crop Rotation
  • 1 Heavy Plow
  • 2 Horse Collar
  • 3 Banking
  • 4 Cartography
  • 5 Sappers
  • 6 Loom
  • 7 Coinage
  • 8 Way Galley
  • 9 Cannon Galleon
  • 10 Husbandry
  • 11 Faith
  • 12 Chemistry
  • 13 Masonry
  • 14 Architecture
  • 15 Gold Mining
  • 16 Keep
  • 17 Forging
  • 18 Iron Casting
  • 19 Spies/Trason
  • 20
  • 21 Blast Furnace
  • 22 Chain Mail Armor
  • 23 Chain Barding Armor
  • 24 Hand Cannoneer
  • 25 Ballistics
  • 26 Bombard Cannon
  • 27 Capped Ram
  • 28 Elite Skirmisher
  • 29 Crossbowman
  • 30 Feudal Age
  • 31 Castle Age
  • 32 Imperial Age
  • 33 Axe(?)
  • 34 Fletching
  • 35 Bodkin Arrow
  • 36 Pikeman
  • 37 Bracer
  • 38 Heavy Scorpion
  • 39 Heavy Demolition Ship
  • 40 Fast Fire Ship
  • 41 Beta Longboat(?)
  • 42 Hand Cart
  • 43 Light Cavalry
  • 44 Champion
  • 45 Paladin
  • 46 Fortified Wall
  • 47 Bombard Tower
  • 48 Long Swordsman
  • 49 Padded Archer Armor
  • 50 Leather Archer Armor
  • 51 Ring Archer Armor
  • 52 Heavy Cavalry Archer
  • 53 Two-Handed Swordsman
  • 54 Arbalest
  • 55 Heavy Camel
  • 56 Trebuchet
  • 57 Onager
  • 58 Guilds
  • 59 Galleon
  • 60 Treadmill Crane
  • 61 Murder Holes
  • 62 Gold Shafting Mining
  • 63 Scale Mail Armor
  • 64 Plate Mail Armor
  • 65 Plate Barding Armor
  • 66 Scale Barding Armor
  • 67 Tracking
  • 68 Scorpion
  • 69 Town Watch
  • 70 Double-Bit Axe
  • 71 Bow Saw
  • 72
  • 73 Fervor
  • 74
  • 75
  • 76 Guard Tower
  • 77 Compassing(?)
  • 78 Cavalier
  • 79 Wheelbarrow
  • 80 Squires
  • 81 Two-Man Saw
  • 82 Block Printing
  • 83 Sanctity
  • 84 Illumination
  • 85 Man-at-Arms
  • 86 Capped Ram
  • 87 Stone Mining
  • 88 Stone Shaft Mining
  • 89 Town Partol
  • 90
  • 91 Conscription
  • 92 Redemption
  • 93 Atonement
  • 94
  • 95 Strange Ship(?)
  • 96 Siege Onager
  • 97 Shipwright
  • 98 Careening
  • 99 Dry Dock
  • 100 Elite Cannon Galleon
  • 101 Siege Engineers
  • 102 Broken Wall(?)
  • 103 Hoardings
  • 104 Heated Shot
  • 105 Elite Unique Units
  • 106 Halberdier
  • 107 Unique Technology
  • 108 Heresy
  • 109 Theocracy
  • 110 Bloodlines
  • 111 Parthian Tactics
  • 112 Thumbring
  • 113 Caravan
  • 114 Herbal Medicine
  • 115 Elite Eagle Warriors
  • 116 Sign
  • 117 Cancel


Useful Information

Civilization Technology Trees

These are the Techage IDs for the civilization technology trees.

  • 254 Britons
  • 255 Japanese
  • 256 Byzantines
  • 257 Chinese
  • 258 Franks
  • 259 Goths
  • 260 Persians
  • 261 Saracens
  • 262 Tuetons
  • 263 Turks
  • 275 Celts
  • 276 Vikings
  • 277 Mongols
  • 348 Gaia
  • 446 Spanish
  • 447 Aztec
  • 448 Huns
  • 449 Mayans
  • 504 Koreans


External Links

Personal tools