How to update technologies?

<GameData>
<Technology_PrereqTechs>
<Delete />
<Row>
<TechType>TECH_MINING</TechType>
<PrereqTech>TECH_AGRICULTURE</PrereqTech>
</Row>
</Technology_PrereqTechs>
</GameData>

Whats wrong?
 

Attachments

  • Civ5Screen0010.jpg
    Civ5Screen0010.jpg
    216.9 KB · Views: 60
<GameData>
<Technology_PrereqTechs>
<Delete />

<Row>
<TechType>TECH_MINING</TechType>
<PrereqTech>TECH_AGRICULTURE</PrereqTech>
</Row>
</Technology_PrereqTechs>
</GameData>

Whats wrong?
This part deletes the tech prereqs for ALL techs!

What you want to do is something like this:
Code:
<Technology_PrereqTechs>
	<Delete TechType="TECH_MINING"/>
	<Row>
		<TechType>TECH_MINING</TechType>
		<PrereqTech>TECH_AGRICULTURE</PrereqTech>
	</Row>
</Technology_PrereqTechs>
At least if I understand your intentions properly - but Agriculture already is prereq for Mining, so perhaps it's something else you want to do?
 
This part deletes the tech prereqs for ALL techs!

What you want to do is something like this:
Code:
<Technology_PrereqTechs>
	<Delete TechType="TECH_MINING"/>
	<Row>
		<TechType>TECH_MINING</TechType>
		<PrereqTech>TECH_AGRICULTURE</PrereqTech>
	</Row>
</Technology_PrereqTechs>
At least if I understand your intentions properly - but Agriculture already is prereq for Mining, so perhaps it's something else you want to do?

No effect.
 
No effect.
Obviously, because Agriculture already IS prereq technology for Mining, so deleting current prereq and setting new to Agriculture just retains status quo. This is why I asked what it was you actually wanted to achieve?
 
Obviously, because Agriculture already IS prereq technology for Mining, so deleting current prereq and setting new to Agriculture just retains status quo. This is why I asked what it was you actually wanted to achieve?

I want to delete agriculture from prereq of Mining.

I need this
 

Attachments

  • Civ5Screen0011.jpg
    Civ5Screen0011.jpg
    229.7 KB · Views: 52
Then you just do this:

Code:
<Technology_PrereqTechs>
	<Delete TechType="TECH_MINING"/>
</Technology_PrereqTechs>

You are aware, however, that since everybody get Agriculture for free at the start of the game, this will have no effect on the actual game - unless you remove the free Agriculture tech an makes it something that has to be researched - right?
 
Hi, how would you do that please with the agri ID=0?

unless you remove the free Agriculture tech an makes it something that has to be researched - right?
 
Greensiberia, if what you want is what you show in the thumnail, then change the PrereqTech to itself, ie. Mining, and set the X position to 0, and the Y position to wherever you wish to show it on the column. I think it will work.
 
kaspergm, I am not interested whether Agriculture is free or not, I'll reinstate it, what I wish is the method to correctly Delete a single Tech. if you know, please.
 
Don't know too much about deleting stuff, never played with that, so can't give you advice on that account.
 
Thanks, I'll play around with your method in post 46 above and see.
 
Greensiberia

Sorry didn't realize you expected a full answer. Here's what I have gathered so far in order to do what you want. Please answer me if it works or not. thanks.

1) You need to move AGRICULTURE to the place where you want it.
2) Move MINING where you want it
3) Make MINING it's own RereqTech so it can be independent. From very old posts, it seems that without a PrereqTech, you're looking for crashes, but heh... what do I know?

Code:
<GameData>
	<Update> <!-- Moves AGRICULTURE to the Y3 position @ X0 to make space for your MINING to come -->
		<Where TechType="TECH_AGRICULTURE" />					
		<Set GridY="3"/>
	</Update>
	<Update> <!-- Moves MINING to the X0 horizontal position/column -->
		<Where TechType="TECH_MINING" />					
		<Set GridX="0"/>
	</Update>
	<Update> <!-- Moves MINING to the Y5 vertical position within the column X0 ( -->
		<Where TechType="TECH_MINING" />					
		<Set GridY="5"/>
	</Update>
	<Update><!-- Makes MINING be it's own PrereqTech - it's now independent -->
		<Where TechType="TECH_MINING" />
		<Set PrereqTech="TECH_MINING"/>
	</Update>			
<GameData>

Ok, this is the theory, I think it will work. There maybe a shorter code that combines all these 'Updates' but I'm not sure of it, but since none of the more experienced coders have answered you, I'm afraid this is what we have.

Read the following instructions to know when to use <Row> and <Update>/<Set> for the future it's important:

<Row> means a new entry of that type (i.e. <Technologies> <Row> means a new Technology; <Technology_PrereqTechs> <Row> means a new Technology_PrereqTech). <Update> means change an existing entry.

Good Luck, good modding.
 
Won't putting Mining as prereq for Mining make it impossible to ever learn Mining - or are you supposed to start with Mining? Because if you need to know Mining in order to learn Mining, obviously there is a logical mistake which at best will make this branch of the tech tree defunct - or so I would assume?
 
Or don't put any PrereqTech at all. Delete the PrereqTech as per post 46 above and don't replace it . Let us know which of the two methods work please?
 
I don't think he wants it as a "FreeTech" if you look at the Thumbnail that he's shown us, he just wants it free from any other Tech and in the same X0 column as AGRICULTURE.
 
Back
Top Bottom