Techs are a mess, I need some help so I'll be asking lots of questions
How do I put a tech field in the right "box", for example what should I do if I want to put Construction where Force Fields is? Is it related to AI_group? What is AI_group?
What's the purpose of starting_techfield? Isn't enough that a tech_field has prev_field_id set to 0? If I set a starting_techfield to advf_power does it mean the tech tree will be completely researched on that branch? I read the PDF manual, but it's still confusing...
Also, what's the point of prewarp_techfield and postwarp_tech, aren't known techs implicit from the tech_field list?
There are 8 branches of technology and each first tech field of a branch has prev_field_id set to 0, so from this information alone, the game cannot know which branch is which.
This is where starting_techfield comes in, to mark the start of a specific technology branch.
example:
tech_field advanced_magnetism = 7 0 36 250 4;
prev_field_id is 0, indicating that this is the first field of a branch, but which one?
starting_techfield force_fields_field1 = advanced_magnetism;
sets this field as the start of the force fields branch.
If you set a starting_techfield to advf_power it means that there is nothing in that branch. In-game such branch will show up empty. Individual technologies do not become known that way.
example:
tech_field advf_fields = 79 0 0 25000 18;
note both prev_field_id and next_field_id are set to 0
starting_techfield force_fields_field1 = advf_fields;
the force fields branch now technically starts with hypertech field, but in-game there is just an empty branch.
You can place any tech field in any branch, but a broken chain of techfields within a branch, can have weird effects on how the tech tree looks in-game and at worst can cause a game crash.
When modding the tech tree, empty tech fields need to be prevented, otherwise the game will crash too (or rather: freeze with a black screen after mapgen).
An easily overlooked culprit here is that the game removes certain techs for certain races and for strategic games.
example:
If hydroponic farm is the only tech in a tech field and you start the game with a Lithovore race, the farm is removed from the game, that tech field will become empty, breaking the tech tree.
example:
If battle pods is the only tech in a tech field and you start the game with tactical combat off, battle pods is removed from the game, again causing a black screen of failure.

AI_group, or 'tech level' sets the value / desirability of a tech field for the AI, the higher this value the more AI will prioritize it (affecting its research pathing but also tech exchange for example)
By default values are set according a fields research points value, a 50 RP field is AI_group 1, 80 RP field is group 2, etc.
prewarp_techfield is used to define the group of tech fields that are known at an average technology start.
This is used in modding to make a field researchable from an average tech start, and can be done by replacing the entry with 'starting_tech'
Post-warp essentially is an average-tech start plus some extra technologies already known.
postwarp_tech defines which techs are known. The first 7 entries of this list are excluded from strategic mode.
example:
postwarp_tech postwarp_tech_1 = 56;
Reinforced hull is given at a post-warp start, but is not part of strategic mode.