Author Topic: Tech File Tags  (Read 8561 times)

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Tech File Tags
« on: April 21, 2008, 04:58:20 PM »
This summary might be useful to people designing their own tech tree.


Here's a quick run down of tech tree tags (and ignoring a few struture issues), I see the following things being read (and looked for in the order given), with the following parameters:
Code: [Select]
BEGIN_TECH string<name> num<id>
CATEGORY num
DESCRIPTION string
TEASER string
IMPROVE_DESC string
REQUIRES num<requiredTechId>
COST num
EDEN_COST num
PLYMOUTH_COST num
MAX_SCIENTISTS num
LAB num
PLAYER_PROP propName num<propValue>
FUNCTION_RESULT propName
UNIT_PROP unitName propName num<propValue>
END_TECH

Some tags can be used multiple times for the same tech to specify multiple results. These include "REQUIRES, "PLAYER_PROP", "FUNCTION_RESULT", and "UNIT_PROP".

The tag "FUNCTION_RESULT" is quite useless. It seems to be a feature that was never completed. The only function you can specify is "Test_Function", which just returns. (A DLL could overwrite this tag or the default function address, but since the function doesn't return a value, and must therefor handle all required effects itself, this is no different then using a ResearchTrigger).

If the research cost is the same for both colonies, then you can just use "COST". It will set the internal fields for both the Eden and Plymouth research costs. If you want them to be different, then specify "EDEN_COST" and "PLYMOUTH_COST". Note that you can probably mix these tags around, but "COST" will overwrite the results of the other tags when it's processed.

The "propName" values are looked up in a list. Each propName has an intended purpose, but the game doesn't error check these (as far as I remember), so you can mix propNames and stick them where they don't belong for odd effects. Beware though, as it might cause the game to crash. This is mainly in reference to mixing vehicle unit prop tags with building unit prop tags. (Such as Turn_Rate, and Power_Required). You can check the UnitTypeInfo.txt file in the internal data structures download to try and predict the effect of a tag when it's used where it wasn't intended. (Note that Rate_of_Fire and Storage_Capacity have the same offsets, and so they will have the same effect if you use either on a given unit).

Possible values for "propName" (prefixed by the hex offset of their value) are:
Code: [Select]
// UNIT_PROP
0x0 Hit_Points
0x8 Armor
0x34 Production_Capacity
0x24 Move_Speed
0x18 Sight_Range
0x30 Rate_Of_Fire
0x14 Build_Time
0x24 Power_Required
0x30 Storage_Capacity
0x38 Storage_Bays
0x2C Production_Rate
0x28 Concussion_Damage
0x2C Penetration_Damage
0x1D Improved
0x28 Workers_Required
0xC Common_Required
0x10 Rare_Required
0x28 Turn_Rate
0x14 Build_Points
// PLAYER_PROP
0x20 Ore
// FUNCTION_RESULT
0x472910 Test_Function

For UNIT_PROPs, most tags simply overwrite an offset at a fixed location within the UnitTypeInfo class for that player with the value given. A slight exception seems to be with the "Armor" tag. For this tag (identified by the address within the propName table), it uses the value as an index into a table of armor values. It sets the corresponding looked up value when research completes. The armor table is as follows:
Code: [Select]
0x100 = 256
0xB4 = 180
0x82 = 130
0x5A = 90
0x3C = 60
0x28 = 40
The armor table is followed by other data which is numerically very large, and will most likely cause rather odd results.

Mixing propName tags between UNIT_PROP, PLAYER_PROP, and FUNCTION_RESULT tags may cause a random property on a random unit, or a random player property to be set to a random value. Probably not a good idea, nor does this seem to be of any use. (I haven't tested this, but if someone wants to, let me know how it goes).

The value written for each unitProp is 4 bytes. Note that "Improved" is not a 4 byte aligned offset. (It might overwrite part of a second field?)



The "unitName" field can take any of the internal unit names. (It loops through the UnitTypeInfo array and calls the second function in the virtual function table to get the name of that unit type. If you write code to add a new unit, it's properties can be set with this tag name). Since this table didn't paste too cleanly, the part in caps is the actual tag name, and the lower case part is the more commonly know in game name of that unit. A list of these tags is:
Code: [Select]
// Unit type 0
MAX_OBJECT_TYPE first unit on the list

// Vehicles
BIG_TRUCK  cargo truck
CON_TRUCK  convec
SPIDER   spider
SCORPION  scorpion
LIGHT_TANK  lynx
MED_TANK  panther
BIG_TANK  tiger
SURVEYOR  robo surveyor
MINER   robo miner
GEO_METRO  geo con
SCOUT   scout
BULL_DOZER  robo dozer
MOBILE_HOME  evacuation transport
REPAIR_TRUCK  repair vehicle
WALL_TRUCK  earthworker
SCAT   small capacity air transport

// Walls and tubes
TUBE   tube
WALL   wall
WALL_LAVA  lava wall
WALL_MICROBE  microbe wall

// Buildings
MINE   common ore mine
MINE_ADV  rare ore mine
TOWER_GUARD  guard post
TOWER_LIGHT  light tower
STORAGE_ORE  common ore storage
STORAGE_RARE  rare ore storage
FORUM   forum
COMMAND  command center
ASE   mhd generator
RESIDENCE  residence
ROBOT_COMMAND  robot command center
TRADE   trade center
LAB   basic lab
MED_CENTER  medical center
NURSERY  nursery
SOLAR   solar power array
RECREATION  recreation facility
UNIVERSITY  university
AGRIDOME  agridome
DIRT   dirt
GARAGE   garage
MAGMA_WELL  magma well
METEOR_DEF  meteor defense
GEOTHERMAL  geothermal power plant
FACT_ANDROID  arachnid factory
FACT_LUXURY  consumer goods factory
FACT_STRUCTURE  structure factory
FACT_VEHICLE  vehicle factory
LAB_STANDARD  standard lab
LAB_ADV  advanced lab
OBSERVATORY  observatory
RESIDENCE_P  reinforced residence
RESIDENCE_E  advanced residence
SMELTER  common ore smelter
SPACEPORT  spaceport
SMELTER_ADV  rare ore smelter
GORF   gorf
TOKAMAK  tokamak

// Weapons
ACID   acid cloud
EMP   emp
LASER   laser
MICROWAVE  microwave
RAIL_GUN  rail gun
CANNON   rpg
SELF_DESTRUCT  starflare
SELF_DESTRUCT_ADV  supernova
TURRET_DESTRUCT  guard post starflare
TURRET_DESTRUCT_ADV  guard post supernova
SCUTTLE_DESTRUCT  normal unit explosion
SPAM   esg
FOAM   stickyfoam
THORS_HAMMER  thor's hammer
SCORPION_WEAPON  energy cannon
EMP_BIG  emp missile blast
BFG   ...

// Disasters
LIGHTNING  storm
TORNADO  vortex
EARTHQUAKE  earthquake
ERUPTION  eruption
METEOR   meteor

// Resources
BEACON   mining beacon
MAGMA_VENT  magma vent
FUMAROLE  fumarole

// Wreckage
WRECK_FLAG  wreckage

// Building explosions
BLD_EXPL_SML  disasterous building explosion
BLD_EXPL_MED  catastrophic building explosion
BLD_EXPL_BIG  atheist building explosion

// Space
EDWARD   edward satellite
SOLAR_SAT  solar satellite
SPACE_1  ion drive module
SPACE_2  fusion drive module
SPACE_3  command module
SPACE_4  fueling systems
SPACE_5  habitat ring
SPACE_6  sensor package
SPACE_7  skydock
SPACE_8  stasis systems
SPACE_9  orbital package
SPACE_10  phoenix module
SPACE_11  rare metals cargo
SPACE_12  common metals cargo
SPACE_13  food cargo
SPACE_14  evacuation module
SPACE_15  children module
SULV   sulv
RLV   rlv
EMP_MISSILE  emp missile

// Consumer goods
LUX_1   impulse items
LUX_2   wares
LUX_3   luxury wares

// Inter colont shuttle
SHUTTLE  inter colony shuttle

// Arachnid packs
SPIDER_PACK  spider 3 pack
SCORPION_PACK  scorpion 3 pack

// Animations
AMBIENT_ANIM  pretty art

// Unit type 0x74
MAX_OBJECT_TYPE last unit on the list
« Last Edit: April 21, 2008, 05:03:12 PM by Hooman »

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Tech File Tags
« Reply #1 on: April 21, 2008, 05:38:41 PM »
Just an important note: The PLAYER_PROP stuff causes the game to desync in multiplayer.
Update: Apparently it doesn't! Sorry everyone!

And Hooman, what do you think BFG stands for?  ;)
« Last Edit: April 21, 2008, 06:51:56 PM by Sirbomber »
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Tech File Tags
« Reply #2 on: April 21, 2008, 06:53:31 PM »
I took a quick peek at the Player_Prop code. I can't find any indication of possible multiplayer sync issues. Are you sure about that? Anyone want to double check this? I wonder if something else caused a desync during the test.

Interesting how they only added the Ore value tag, so all you can do is research something to get your ore set to a known amount. Probably not too useful. Could maybe be used for some obscure custom level, but it's far from the normal way of playing. I guess that means only Unit_Prop is really useful then, and just ignore the Player_Prop and Function_Result tags.


I just took a quick peak at the "Improved" tag. Seems to be used by:
Code: [Select]
Common Ore Mines
Rare Ore Mines
GORF
Common Ore Smelter
Rare Ore Smelter
Observatory

The Player_Prop and Function_Result are never used in the original tech files.
 

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Tech File Tags
« Reply #3 on: April 21, 2008, 07:32:34 PM »
Yeah, the "Improved" thing upgrades certain "special" things for certain buildings that other elements of the techtree can't upgrade. Specifically, the improved meteor/missile tracking for the Observatory, the improved ore yield from mines and the improved smelting for the GORF and smelters.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Empedocles

  • Newbie
  • *
  • Posts: 15
    • http://www.justfuckinggoogleit.com
Tech File Tags
« Reply #4 on: April 22, 2008, 09:50:32 AM »
Why do my tech tree files, and all the other text files that come with OP2, display garbage when I open them?

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Tech File Tags
« Reply #5 on: April 22, 2008, 09:53:07 AM »
Either find a .vol unpacker that will decompress them, or unpack the ones from the download that aren't already compressed.
 

Offline Leviathan

  • Hero Member
  • *****
  • Posts: 4055
Tech File Tags
« Reply #6 on: April 22, 2008, 11:25:56 AM »
You can find a VOL Extractor here.

To view these files you can use notepad or any text editor. To view the mines.txt, space.txt, building.txt, vehicles.txt and weapons.txt files you can use the SheetsReader.

You can get a a SheetsReader program here.

This can read the files so there easy to view, but it does not edit them.
« Last Edit: April 22, 2008, 11:26:10 AM by Leviathan »

Offline DarekStar

  • Jr. Member
  • **
  • Posts: 79
Tech File Tags
« Reply #7 on: April 22, 2008, 08:02:46 PM »
Intrestingly iv axsadentaly activated the trade center on single player


Heres my Tech for your investigation


BEGIN_TECH "enhanced_sensors" 12115
    CATEGORY        1
    DESCRIPTION     "Our light towers and scouts are allways lacking this
reserch will increase sight range drasticly"
    TEASER          "Increased sight in all scouts and light towers"
    EDEN_COST       100
    MAX_SCIENTISTS  5
    LAB             1
    UNIT_PROP TOWER_LIGHT Sight_Range 100
    UNIT_PROP SCOUT Sight_Range 100
END_TECH
 witch activated the trade center
-Darek

Caution this user refuses to spell check or even try and spell corectly unless posting a story.

so bare with him

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Tech File Tags
« Reply #8 on: April 22, 2008, 08:46:08 PM »
Not too sure about the trade center thing, but I did notice something wrong.

If you use EDEN_COST then you should also use PLYMOUTH_COST, otherwise that field will be uninitialized. If it's an Eden only tech, then set PLYMOUTH_COST to -1. If you don't initialize the field for a colony, they could potentially still research it. Remember, -1 to disable the tech, and 0 to give it for free.

Offline Hidiot

  • Hero Member
  • *****
  • Posts: 1018
Tech File Tags
« Reply #9 on: April 23, 2008, 03:18:06 AM »
It has activated the trade center, as the trade center has that specific (12115) TechID.

It's generally not a good idea having two things with the same TechID assigned.

BTW: increasing the sight range on light towers and scouts can cause some rather... awkward effects. When I tried increasing a light tower range by 1, it would make a horizontal line of unlightened terrain that goes through the light tower itself when centering on some points in the region.
« Last Edit: April 23, 2008, 03:20:29 AM by Hidiot »
"Nothing from nowhere, I'm no one at all"

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Tech File Tags
« Reply #10 on: April 23, 2008, 06:52:55 AM »
Gee, that tech isn't blatantly unfair!  <_<

Oh, and enjoy getting spammed by "ENEMY UNIT SIGHTED!!!" messages.

Anyways, speaking of techtrees, does anybody know if Dynamix used some kind of tech ID "code"? I noticed that the first two digits of the tech ID relate to the mission you can first research that tech on, but I don't know if the other three digits mean anything.
« Last Edit: April 23, 2008, 09:05:36 AM by Sirbomber »
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline DarekStar

  • Jr. Member
  • **
  • Posts: 79
Tech File Tags
« Reply #11 on: April 23, 2008, 10:53:32 AM »
i chose 12115 at random what are the odds?
-Darek

Caution this user refuses to spell check or even try and spell corectly unless posting a story.

so bare with him

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Tech File Tags
« Reply #12 on: April 23, 2008, 12:03:39 PM »
Uh, no... The Tech ID for the Trade Center is 02115, not 12115.
Besides, if you had two techs with the same ID the game wouldn't initialize.
« Last Edit: April 23, 2008, 12:04:02 PM by Sirbomber »
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Tech File Tags
« Reply #13 on: April 23, 2008, 12:41:06 PM »
Yeah, the tech level. You know how you can specify a max tech level in the DLL? That's the upper part of the tech ID. There's a reason why they tend to jump by a thousand every so often. That's how they use the same tech file for all the campaign missions, but progressively allow what you can research.
 

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Tech File Tags
« Reply #14 on: April 23, 2008, 01:38:46 PM »
Yes, I knew about that part. It's the other part I was asking about.
Example:
Cybernetic Teleoperation = 03401
The "03" means two things: In single player, it isn't available until mission 3. In multiplayer, it's part of "group" 3.
But I was asking about the rest of it; in this case, the "401" part of the ID.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Tech File Tags
« Reply #15 on: May 25, 2008, 09:30:58 PM »
Just stumbled across a tech tree overview file I had generated. Thought it might be useful to post it.

There does seem to be a bit of logical grouping (although inconsistent) with the hundreds place of the techID, but there's really nothing special about it. The game doesn't treat anything below the thousands place as special.

Code: [Select]
1 2099 PE Spider
2 2101 PE Agridome
3 2103 PE Command Center
4 2104 PE Structure Factory
5 2106    NOT AVAILABLE
6 2107 PE Light Tower
7 2108 PE Common Ore Mine
8 2109 PE Residence
9 2110 PE Common Ore Smelter
10 2111 PE Common Metals Storage Tanks
11 2112 PE Tokamak
12 2114 PE Tube
13 2115 PE Trade Center
14 3101 PE Standard Lab
15 3201 PE Seismology
16 3202 PE Vulcanology
17 3301 PE Emergency Response Systems
18 3302 PE Metals Reclamation
19 3303 PE Health Maintenance
20 3304 PE Offspring Enhancement
21 3305 PE Research Training Programs
22 3306 PE Leisure Studies
23 3401 PE Cybernetic Teleoperation
24 3402 PE High-Temperature Superconductivity
25 3403 PE Hydroponic Growing Media
26 3405 PE Metallogeny
27 3406 PE Environmental Psychology
28 3407 PE Large-Scale Optical Resonators
29 3408 PE Focused Microwave Projection
30 3501 PE 03501 Robot Command Center
31 3502 PE 03502 Vehicle Factory
32 3601 PE 03601 Scout
33 3602  E Laser Turret
34 3603 P  Microwave Turret
35 3604 PE Cargo Truck
36 3605 PE Construction Vehicle
37 3606 PE Earthworks Constructor
38 3607    NOT AVAILABLE
39 3608 PE Robo-Dozer
40 3609 PE Robo-Miner
41 3610 PE Robo-Surveyor
42 3801 PE Guard Post
43 3851 PE Mobile Weapons Platform
44 3901 PE Advanced Vehicle Power Plant
45 5051 PE Robot-Assist Mechanic [Eden, (free for Plymouth)] (Garage, Repair Vehicle)
46 5052 PE Robot-Assist Mechanic [Plymouth, (free for Eden)] (Garage)
47 5101  E Consumerism
48 5102 PE Garage
49 5104 PE Lab, Advanced
50 5106 PE Walls, Concrete
51 5107 P  Magnetohydrodynamics
52 5108 P  Public Performance
53 5110 PE Rare Ore Processing
54 5111 PE Independent Turret Power Systems
55 5115  E Geothermal Power
56 5116 P  Legged Robots
57 5201 PE Advanced Combat Chassis
58 5202 P  Dissipating Adhesives
59 5302 PE Meteorology
60 5303 PE Severe Atmospheric Disturbances
61 5305 PE DIRT Procedural Review
62 5306 PE Recycler Postprocessing
63 5307 PE Automated Diagnostic Examinations
64 5309  E Hypnopaedia
65 5310 P  Hypnopaedia
66 5317 PE Reinforced Vehicle Construction
67 5318 PE Robotic Image Processing
68 5401  E Repair vehicle
69 5405 PE Space Program
70 5408 P  Forum Reconfiguration
71 5501 PE Smelter, Rare Ore construction
72 5502 PE Storage Tanks, Rare Metals
73 5503 PE SULV
74 5504 PE EDWARD satellite
75 5506  E Directional Magnetic Fields
76 5508 PE Electromagnetic Pulsing
77 5599 PE Rocket Propulsion
78 5601 P  Heat Dissipation Systems
79 5602 P  Rocket Launcher
80 5701 PE Lava Defenses
81 7102 PE Explosive Charges
82 7103 P  Multiple Mine Projectile System
83 7104 P  Arachnid Weaponry
84 7201 PE Rare Ore Extraction
85 7202 PE Hot-Cracking Column Efficiency
86 7203 PE Smelter Postprocessing
87 7206 PE Scout-class Drive Train Refit
88 7211  E Extended-Range Projectile Launcher
89 7212 P  Extended-Range Projectile Launcher
90 7213  E Advanced Robotic Manipulator Arm
91 7214 P  Advanced Robotic Manipulator Arm
92 7403  E Increased Capacitance Circuitry
93 7405 P  Scorpion Power Systems
94 8049 PE Meteor-Watch Observatory
95 8051  E Observatory
96 8103  E Magma Refining
97 8104  E Expanded Housing
98 8105 P  Disaster-Resistant Housing
99 8106  E High-Energy Ray-Composite Projector
100 8201 PE Dual-Turret Weapons Systems
101 8203 P  High-Powered Explosives
102 8301  E Efficiency Engineering
103 8302 P  Efficiency Engineering
104 8304  E Heat Mining
105 8306 PE Enhanced Defensive Fortifications
106 8307 PE Multitainment Console Upgrade
107 8309 PE Reinforced Panther Construction
108 8316 PE Meteor Detection
109 8317 PE Meteor detection
110 8319 P  Spider Maintenance Software Revision
111 8320 P  Reduced Foam Evaporation
112 8321 P  Arachnid Durability
113 8401    NOT AVAILABLE
114 8503  E Acid Weaponry
115 8601 PE Skydock
116 8801 PE Ion Drive Module
117 8901 PE Fusion Drive Module
118 8951 PE Fueling Systems
119 10101  E Improved Launch Vehicle
120 10102  E Artificial Lightning
121 10202 PE Command Module
122 10204 PE Solar Power
123 10205 PE Habitat Ring
124 10206 PE Sensor Package
125 10208 PE Stasis Systems
126 10209 PE Orbital Package
127 10301  E Magma Purity Control
128 10303 PE Advanced Armoring Systems
129 10305  E Grenade Loading Mechanism
130 10306 P  Grenade Loading Mechanism
131 10309  E Precision Trajectory Projection Software
132 10401 PE Phoenix Module
133 11999 PE Tiger Speed Modification
134 12101  E Heat Dissipation Systems
135 12201 P  Rocket Atmospheric Re-entry System
136 12499    NOT AVAILABLE
137 12599 PE Evacuation Module


Note: Above table attached as a txt file.
 

Offline Hidiot

  • Hero Member
  • *****
  • Posts: 1018
Tech File Tags
« Reply #16 on: May 26, 2008, 04:08:54 AM »
Well.. at least now we know where a new research goes in that list when we add one, so maybe I will be able to get that AI researching code working... If I'm going to get Code::Blocks to work that is...
"Nothing from nowhere, I'm no one at all"

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Tech File Tags
« Reply #17 on: May 30, 2008, 03:07:12 PM »
Hey, tell us what those "NOT AVAILABLE"s are, since they're only unavailable in Multitek!

02106 - Basic Lab
03607 - Evacuation Transport
08401 - Microbe Walls
12499 - Children's Module
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Tech File Tags
« Reply #18 on: May 31, 2008, 02:11:59 PM »
Meh, the list was auto generated, and I was too lazy to edit it.

Also, you'll notice 3 oddities.
Quote
30 3501 PE 03501 Robot Command Center
31 3502 PE 03502 Vehicle Factory
32 3601 PE 03601 Scout

They have their ID included in their name. I have no idea why though.
 

Offline Hidiot

  • Hero Member
  • *****
  • Posts: 1018
Tech File Tags
« Reply #19 on: May 31, 2008, 04:14:58 PM »
coincidence?

Although it does seem interesting that those are the 2 most basic vehicle-related structures and the scout is the basic unit that needs no research.
"Nothing from nowhere, I'm no one at all"