Chiyo-chan
Chieftain
- Joined
- Jul 18, 2010
- Messages
- 10
I have tried adding some new tech's to the game, i wanted a few new ones which would be restricted to a new civ i am working on, but i am having troubles keeping the tech locked. The Lanun have "Sea Faring" which cannot be researched by anyone (and they start with it), this is essentially what i am trying to achieve. I tried making a similar copy of Sea Faring to work from but nothing is working. I was hoping simply setting the <icost> values to -1 would work but this just sets the ingame research cost to 1.
I am not good with Python but looked into it a little, i found a bit of code:
Now as said i am not good at Python, honestly i don't get most of it. To my understand though this is possibly the code i need to add to my tech, which i tried doing like so;
I haven't made the civ yet who will use it but tested this on both current civs (Lanun, both Elven leaders, Banor ect) and it seems to just remove the UI in game. not quite sure what i am missing.
I have created a entry in the XML which adds the tech to the tech tree which works fine, i have added definition values to let the game read it's name and such in game in the gametext files too. I figured adding this line of Python would do the trick but it didn't.
Does anyone know
1 - what i am doing wrong or missing?
2 - why when i add the additional line of python does it break my games interface and doesn't let me do much more than move units (can't settle cities or anything). I figure this might be my ignorance though. I can confirm this is associated with the above code as when i remove my added bit, everything works as it should.
Any help on this would be appreciated, as mentioned Python is something i am not good with, i am currently reading some tutorials to get the hang of it but most of these are based on the OG civ games and not FFH mods so whilst i don't get the old stuff, the one ones throw me completely.
I only in theory need this initial starting tech to work in a similar way to Sea Faring, once i have this one i can simply hitch of it with further follow up tech's by making this a pre-required tech.
Also - is it possible to make techs require a certain building to research them? I figure this would be a alt way around the issue if i could change the tech to require xxx Palace to research, as only the respective civ would have their own palace and thus restrict access.
Thanks for anyone who takes the time to read this.
I am not good with Python but looked into it a little, i found a bit of code:
Code:
if eTech == gc.getInfoTypeForString('TECH_SEAFARING'):
if iCiv != gc.getInfoTypeForString('CIVILIZATION_LANUN'):
return True
if pPlayer.isHuman() == False:
Code:
if eTech == gc.getInfoTypeForString('TECH_
Otherworldly_Presence
'):
if iCiv != gc.getInfoTypeForString('CIVILIZATION_LANUN'):
return True
if pPlayer.isHuman() == False:
I haven't made the civ yet who will use it but tested this on both current civs (Lanun, both Elven leaders, Banor ect) and it seems to just remove the UI in game. not quite sure what i am missing.
I have created a entry in the XML which adds the tech to the tech tree which works fine, i have added definition values to let the game read it's name and such in game in the gametext files too. I figured adding this line of Python would do the trick but it didn't.
Does anyone know
1 - what i am doing wrong or missing?
2 - why when i add the additional line of python does it break my games interface and doesn't let me do much more than move units (can't settle cities or anything). I figure this might be my ignorance though. I can confirm this is associated with the above code as when i remove my added bit, everything works as it should.
Any help on this would be appreciated, as mentioned Python is something i am not good with, i am currently reading some tutorials to get the hang of it but most of these are based on the OG civ games and not FFH mods so whilst i don't get the old stuff, the one ones throw me completely.
I only in theory need this initial starting tech to work in a similar way to Sea Faring, once i have this one i can simply hitch of it with further follow up tech's by making this a pre-required tech.
Also - is it possible to make techs require a certain building to research them? I figure this would be a alt way around the issue if i could change the tech to require xxx Palace to research, as only the respective civ would have their own palace and thus restrict access.
Thanks for anyone who takes the time to read this.
Last edited: