Trying to create a new Tech advance

malicious bloke

Warlord
Joined
Jul 7, 2007
Messages
124
Location
Welsh Wales
OK, I created myself a new unit, the antimatter shock trooper, it works fine and everything. But then I decided to make it dependant on having antimatter technology which I created in rules.txt.

Basically I altered User def tech A so it reads

Antimatter Weapons, 8, -2, Sup, FP, 3, 0, u1

But when I try and enter the game it just crashes.

I guess I need to create a civpedia thing for it aswell maybe?
 
I get Error "civKeyNotFound(units) (BadRules.txt)" in Module <startup> data: [the stats I entered for the unit]

If I dont try and have the unit dependant on the tech advance, the advance appears in the tech tree ok, but then after you research it it's still there...and it brings up the advanced flight page from civpedia because it doesnt have one for itself.

Oh and it doesnt appear in the edit tech thing in the cheats menu either.

Any tips of what I need to edit and where to find it would be much appreciated
 
Is this:
Antimatter Weapons, 8, -2, Sup, FP, 3, 0, u1

an exact copy of the line in your rules.txt? Because the comma before U1 should be a semi-colon. The semi-colon indicates a comment. The U1 at the end of that line is only an informative comment (so you know how to refer to it) and not part of the definition.
 
Nah, i read it wrong, it is a semi-colon.

I also tried changing the prerequisite for the tech so it isnt dependant o fusion power (since the only thing dependant on it is future tech), but it still keeps reappearing after i learn it.

My best guess is that since it has no civpedia entry or anything, the game doesnt recognise it, and having a unit requiring an invalid tech causes an error.

But it says in rules.txt that you can create your own tech, so there must be a way to do it properly
 
Totally sure, I kept backups just in case I made a mistake and so far as I can see i've only changed two lines.

I tried shifting the tech in the list so it was in alphabetical order, and now it appears in the edit tech cheat thingy, but only in loaded games, if i try and start a new one it crashes
 
It wasnt dependant on future tech, it was dependant on fusion power.

But future tech is normally the only thing that dependant on fusion power.

And the problem still arises when i have it dependant on other things (i tried superconductor and laser...same result)
 
I have never made any tech dependant on Future Tech before, perhaps simply the way that Future Tech works (like how it keeps going forever and you can continue to research them) might mess it up...?

This works just fine. Only thing is that techs dependent on future tech will never be researchable as I recall...

This can't be diagnosed unless the entire rules.txt is uploaded I say :)
 
The problem's in the @UNITS section. You've used lower case for the Shock Trooper's prerequisite tech when it should be upper case. Tech codes are case-sensitive. Fixed in the attachment.
 

Attachments

Cheers, didnt realise that. Right that's stopped the game crashing on startup...

...next annoying problem is that when I try to research the tech it actually researches advanced flight, and then the actual tech reappears in the list. Is there another file I need to edit to make the technology stick?
 
I have the soldout games re-release...whichever version that is. It isnt the multiplayer one, and I've never had to install any patch (only download patches if games wont run on XP usually). What does this patch normally do?
 
Back
Top Bottom