View Full Version : Enhanced Techtrees


Civinator
Aug 10, 2006, 02:23 AM
This tutorial describes a way to create a more visually descriptive Science Advisor screen.

No more wading through various technologies to find out when policemen come, when you are allowed for communication trading, safe crossing over the oceans or when you can see uranium on the map. The adding of resources, citizens, diplomatic options and governments will also add a lot of flavour to the Science Advisor screen.

May be the following screenshots explain best, what you gain with the new idea about doing techtrees:

The first screene shows an "Ancient techtree". In the info-box there appears an icon for the new resource "iron", discovered with the tech "ironworking". The techtree also shows that you can build the specialist "Scientist" when “Mathematics” are discovered. The specialist “Merchant” appears with the tech “Trade” and you can build "Embassies" with the discovery of "Writing" (and some other things).

When you click on the infobox of the techtree, you get the info of the next screene, the advance-info-page. Here you see, that you get the resource "Iron" when you have discovered "Ironworking". Please note, that you get this info now without a resource icon, that is infected with the "HYP Law-bug".

In the next screene you see what happens when you click on that "Iron-icon" in the advance-info-page. There is no more hyperlink overflow with dozens of units that can be built with that resource, as the “bug-infected” resource icon with the hard coded information that leads to that bug, is now bypassed.

Civinator
Aug 10, 2006, 02:24 AM
Better information in the infoboxes of techtrees

The "enhanced techtree" focuses mainly on additional information in the techtree about citizens (specialists), new possibilities like crossing the sea or ocean, new agreements like map-trading or communication-trading, short: new options with no still existing special icons in the game.

Secondary is the information about new options that already have a special icon in the game but don´t appear in the techbox (like resources and governements). Here you need a special technic ("more than 4 in a row") to eleminate the hardcoded existing icon (more below).

As a side-effect there are some new possibilities against the "HYP Law-bug"
(Maximum hypertext links exceeded).


Steps to introduce these additional informations directly in the techtree (but first, please make copies from all files you edit!):

A) Common steps for all additional infos appearing in the techtree:

1. Create a “dummy” era-none tech
2. Create a building that requires the era-none technology (“Dummy-building”).
3. Add the new info for the techtree as new building (“Info-building”) to the editor.
The “Info-building” can be a special citizen, a new diplomatic ability, a new trading-
option, a new resource, a new government or something else.

a) Do the pediaicon-entry for the “Info building” (like you would do for a normal building.)
b) Add the icons (large and small) for the “Info-building” to the folder civilopedia/icons/buildings
c) Do the civilopedia-entry for the “Info-building” (BLDG_***)

The steps 3d-3e are only cosmetics. The new techtree works without these steps:

d) In the Labels-text you can chance the entry “City Imp's” to something more
appropriate (may be “New Options” or something like that, as now a lot of other
infos can appear on the City Imp's-info-page).
e) Wipe out the info-text in the civilopedia advance entry about new appearing resources
(and so on) as you don´t need it any longer (or connect it with the new civilopedia
building entry). This reduces the chance to run into the "HYP Law-bug" (more about
this in step 7).

4. Make the “Info-building” require the Dummy-building (which in turn requires the era
none tech). This makes sure the “Info-building” can not be built.
5. Make the "Info-building" require whatever technology you want it to appear with.

6. If you want, make the “Info-building” the first of some improvements in the
improvement-column of that advance, by typing the space tab in front of the name of
the “Info-building” in the editor.


Because the game engine treats the new info as a building, the building will show up in the tech tree.


B) Additional step for existing special civilopedia-graphics, that normally not
appear in the infobox of the techtree (especially resources):

In the editor you can´t change the entry for resources from GOOD_ to BLDG_ without a crash of the game. The entry GOOD_ in the editor (not in the civilopedia) seems necessairy, that the game treats the resource as a resource in gameplay.

As the computer makes its hard coded entry on the “GOOD_ level”, but you have to do your “Info-building” on the BLDG_level, there are now two strings of information in the civilopedia. When clicking on that techbox, this resource appears twice on the advance-info-page:

a) In the City Imp's -column appears the resource icon from the “Info-building”
b) In the resource-column appears the hard coded resource icon (often containing the "HYP Law-bug" as too many units are connected to that resource)

To eliminate the original hard coded icon from the advance-info-page, that opens, when you click on one of the info-boxes in the techtree, you must do the following additional step, I call “more than 4 in a row”:

7. Elimination of the hardcoded resource icon in the advance-info-page:

5 (or more) units given by that advance or 5 (or more) buildings eliminate the
hardcoded resource icon from the advance-info page.


C) “Side-effect” against the "HYP Law-bug"

Beside the new possibilities for information in the techtree, you get one - in my eyes important – page that is cleaned from the "HYP Law-bug". If you eliminate the “bug-infected” hard coded resource icon that is connected with too many units and therefore causes the message “Maximum hypertext links exceeded“ as it is described above in step 7 of the tutorial, you get the info about the resource on the advance page "bug-free", as this info is connected to the new building-entry and not to the “bug-infected” resource-entry.

The user of mods that contain the new idea about doing techtrees is sent on a safer route. The chance, that you klick on that resource on the next page (the unit page) that contains the "bug-infected" resource icon again, is smaller (but not eliminated). This is no poison to kill that nasty bug, but a small remedy, to bring that ugly bug outside of one of your rooms.

D) Manoeuvring through the civilopedia in the traditional way (ctrl-C) is still possible as normal, but then also the "HYP Law-bug" still exists as normal, as here is no “bypass” by the “Dummy-building”.

Please take into account, that each of these “Dummy-entries” consumes one of your 256 spots for different improvements and there are now duplicated entries in the civilopedia-index. But I think, for most constellations, the features you win, outweigh this. Especially there is a much better use of new citizens (specialists) in the game when they are placed in the infobox of the techtree.


A special „thank you very much“ to PCHighway for his huge feedback and the translation of important parts of my tutorial to an understandable English. Also a great “thank you” to Weasel OP, Takhisis, BadKharma and odintheking for their encouraging words and replies in the linked discussion thread. More details can be read here:http://forums.civfanatics.com/showthread.php?t=179476


More about techtrees can be found here:
Connecting the dots on the tech tree: http://forums.civfanatics.com/showthread.php?t=17368
Ka-el: Techtrees: http://forums.civfanatics.com/showthread.php?t=21058
Techcosts: http://forums.civfanatics.com/showthread.php?t=110921

Stormrage
Aug 10, 2006, 02:40 AM
Thanks Civinator! :D