| General | Hosted Sites | Civ5 | CivRev | Civ4Col | Civ4 | Civ3 | Civ2 | Civ1 | Misc | Marketplace |
![]() |
|
|
Welcome to Civilization Fanatics' Center. You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support. |
|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 | |
|
Chieftain
Join Date: Oct 2010
Location: Albury, Australia
Posts: 11
|
[BUG & SOLUTION] Technology tree pipes not linking correctly when expanding the tree
Came across this bug when trying to add a new Tech to the game, basically the tech tree wouldn't connect some pipes correctly when they spanned more than 1 space along the x axis (see first screenshot).
I searched through the TechTree.lua file for the tech tree and found it was due to a typo by the original author, basically he forgot to add the xOffset to downward turning pipes when they were in conjuntion with upward or straight pipes. To fix the pipe connection issue the following changes need to be made to the TechTree.lua file found in the Assets/InGame/UI/TechTree folder, first, find the section of the code in the below quote, its a fair way down (the file is too long to quote the entire thing) and add the changes highlighted in blue. The result of this Fix can be seen in the second screenshot. Quote:
|
|
|
|
|
|
|
#2 |
|
Emperor
Join Date: May 2010
Location: The United States
Posts: 1,165
|
You're a genius.
|
|
|
|
|
|
#3 |
|
Deity
Join Date: Mar 2007
Location: Mountain View, California
Posts: 9,624
|
First entry for the Unofficial Patch!
Now, who's gonna run it?
__________________
Monkeys killing monkeys killing monkeys over pieces of the ground. Silly monkeys, give them thumbs they make a club and beat their brother down. BUG Mod - BTS Unaltered Gameplay [ Forum | Download | FAQ | Known Issues | Troubleshooting | Modding Tutorial ] |
|
|
|
|
|
#4 |
|
Warlord
Join Date: Aug 2009
Posts: 138
|
Nice catch. I've encountered a similar bug. In my case, the pipes are going too far, instead of not far enough. Unfortunately, I don't think the solution for this one is going to be quite so pretty. I'm completely new to this Lua malarkey, so I may be wrong (in fact I hope I am), but it seems to me that each tech can only have one xOffset value. This in turn means that a given tech can only lead to other techs that have the same GridX values as each other.
Curiously enough, there is one tech in the default techtree, Combustion, that does not conform to this rule. And, less curiously, the pipe that leads from said tech is one of the downward-hooked ones, of exactly the kind that your fix applies to. So it seems the bug is no mere typo by a forgetful author, it is in fact a dirty hack to stop the default techtree from breaking. (In fact I have just taken a look at the default techtree with this fix enabled, and Combustion does indeed break.) I have no idea why they didn't just shuffle a few of the techs along one column. Anyway, I'm slightly digressing from my point. As you can see from my screenshot, my techtree has techs that lead to multiple different columns. Quite a few, in fact, and it'd be a right pain to try to reshuffle all of them all over the place. As I said, I'm new to Lua, so I've been scratching my head for a while, and I can't see any kind of elegant solution that would allow for techs to be arranged in this manner. I thought I'd ask to see if you, or anyone else, had any ideas. |
|
|
|
|
|
#5 | |
|
Chieftain
Join Date: Oct 2010
Location: Albury, Australia
Posts: 11
|
Quote:
For the mean time you could move all the techs above and above and to the right of the red square in your thumbnail to the right one tech spacing, this should at least make all the pipes connect correctly. Hopefully firaxis addresses these tech tree pipe connection issues in a soon to come patch, if not I can see them becoming a stumbling block for modders trying to do more advanced things with the tech tree. |
|
|
|
|
|
|
#6 |
|
Warlord
Join Date: Oct 2010
Location: NYC
Posts: 179
|
Thanks....needed that, kept having the same problems but I was too lazy to break down the code.
You're the man!!! |
|
|
|
|
|
#7 |
|
Emperor
Join Date: Apr 2010
Posts: 1,002
|
Hi JANorton,
Anychance you can upload a copy of the TechTree.Lua with your changes already in it? I have tried to add in your changes, but I do not get any changed results. or do I have to add an action for it to fire the new TechTree.Lua? |
|
|
|
|
|
#8 |
|
Chieftain
Join Date: Oct 2010
Location: Albury, Australia
Posts: 11
|
No action required just simply have it included in your mods folder structure, see attached for the modified file.
|
|
|
|
|
|
#9 |
|
Emperor
Join Date: Apr 2010
Posts: 1,002
|
TYVM! Much appreciated!
|
|
|
|
![]() |
| Bookmarks |
|
| Thread Tools | |
|
|