Here's an image showing the preliminary technology tree setup. To make it a bit more interesting I activated the Energy Bank facility (using the default bank graphics).
SMACX provides us with, initially, excellent conditions for implementing the SMACX technology tree into Civilization IV. We have the technology quotes, text and audio, and the graphical technology representations.
I tried to replace the "agriculture" technology with Centauri Ecology, but quickly abandoned the project and decided to built the technology tree from scratch using the existing technology schema (template).
The "CIV4TechInfos.xml" and the "CIV4GameTextInfos_Objects.xml" files are the ones I use to define the technologies and get the proper names showing in the game. Technology text quotes are stored in the "CIV4GameTextInfos.xml" file.
In "CIV4TechInfos.xml" I can set a specific sound file to be played once a specific technology is discovered. Additionally, I can set which technology icon to graphically represent the technology. I found that all these icons are read from the "techtree_atlas.dds" file.
The grahics are a bit more complex to add, though. Using the SMACX icons, I copy, resize, and paste these into the "techtree_atlas.dds" file as shown in the attached image.
It would probably not be a problem to add all of the SMACX technologies this way.
I haven't done more than about 15 technologies, but would appreciate any comments on this particular project--especially if there would be a better way to implement the SMACX technology tree.
Here's an image showing the preliminary technology tree setup. To make it a bit more interesting I activated the Energy Bank facility (using the default bank graphics).
Remember that the white arrows in Civ 4 indicate an "or", in that only one of those prerequisite technologies needs to be discovered.
"Cutlery confused Stalin"
-BBC news

Woah that's sweetNice work.
Chaos Theory, while the white arrows do indicate an "or", this relation is not present in SMACX. However, they do help when I am trying to position the technologies in the "tree structure". Ultimately, they will be either completely removed, converted to "and" relations or somehow retaining the "or" relation in a re-design of the SMACX technology structure.
I managed to isolate the technology buttons into separate smaller .dds files. This allows for a little extra flexibility when trying to create new icons without worrying too much about redoing the whole thing. To this, I tried to add some depth to the icons.
Here's an in-game example from the Civilopedia (The Merchant Exchange).

You can position a tech in the tech grid with the gridX and the gridY parameters in the civ4techinfos.xml
It should make the arrows less cluttered.
Can you insert comments in this xml file? Whenever I tried, the pre-requisites etc all got messed up.
no sig

Extremely good work Rubin (as always!)! If you can get all of techs inserted and linked by the time we release the first version of the mod (which won't be for a while yet) then that would be fantastic!
I haven't inserted the Lal leaderhead pic yet, but will probably do that this evening. Since you are also working on this are you interested in generating another leaderhead? If so let me know which one and I will designate that one next as far as building the Faction via the C4 files.
D
And if Dale DOES choose self exile, then 'poly just lost another one of their star gaming contributors, and that's a pity, since this is still a gaming site.
-=Vel=-

Does anyone have a list of the secondary benefits gained from techs? I'm thinking commerce techs and fungus bonus here.
Implementing the entire SMACX technology tree using this method is extremely easy and could be done in a few days, I believe. However, balancing the technology costs, benefits, weights, etc. seems tricky at the moment.
I haven't found out how to have a technology description shown in the Civilopedia--only the technology quotes and the strategy advice seem to work.
Initially, I placed all the technologies in the F6 Advisor screen so that all tier 1 technologies (E1, D1, C1, B1) would be in the first colomn, tier 2 in the second column, etc. However, this turned out very messy. That is why I added the white arrows and repositioned some of the technologies. Additionally, the prerequisite technologies depicted on a technology (the small icons) partially cover some of the technology names.
To make it simple I went for this naming convention for the new technologies:
TECH_APPLIED_PHYSICS
TECH_SECRETS_OF_THE_HUMAN_BRAIN
TECH_CENTAURI_ECOLOGY
TECH_DOCTRINE_LOYALTY
TECH_BIOGENETICS
...etc.
I also found that inserting a : in the technology description didn't work, hence "Doctrine: Mobility" is now "Doctrine Mobility". I am sure someone may be able to figure out how to fix this.
For now, I am leaving ou the comments in the .xml files. I haven't tried adding any yet.
Regarding the secondary technology bonuses, there is a list in the .xml file. But, I am not sure if we are able to change this "list" in order to match the SMACX bonuses. Though, we can initially mess with the variables already present and get something fairly decent.
Darsnan, generating leaderheads of the same poor quality as I did the Lal leaderhead takes a few minutes. I am hoping to have the seven original factions implemented soon; by reading about the work you've done with the Peacekeepers I quickly added that faction based on the "Washington"/American template. Once we know exactly which files are affected by adding a new faction, we can add more factions and remove the default ones; which I am currently preserving in order to be able to test any changes in-game. This applies to technologies as well.
Edit: Implemented 27 technologies so far; that is all tier 1 and tier 2 technologies and a single tier 3 technology (Superconductor). For the most part, I am using template/default graphics to be replaced as soon as the entire technology tree is implemented. I am wondering if we could use the existing units, civics, buildings, etc. and tie these to the new technologies in order to produce a playable modded version very quickly. Depending on how the project progresses, this could prove very helpful in terms of fine tuning the code we've already implemented--simply because the default, and now obsolete, technologies could be safely removed from the mod.
Last edited by Rubin; November 18, 2005 at 23:34.
Here is what I know about SMAC tech costs:
The cost of each tech is dependent on the number of techs already researched. the increase in cost of each tech (on a large map) starts at 30, and by the end of the game is about 150.
The tech cost curve is slightly-greater-than-linear, however it is inconsistent. I wish I could say each subsequent tech is always more expensive than the last, but alas, it's not so. In a game trial I ran exactly ONE tech cost less than the previous one. *sigh* who programmed this schlock... also sometimes techs increase by 30-40, and other times by 90-150, with rhyme nor reason, other than the small increases are the usual at the start of the game, and the large at the end. For all I know the values are taken from a table of costs and not generated by an algorithm. Or it might be semi-randomized or dependent on other things. Lets try and NOT exactly reproduce the SMAC tech costs.
Starting tech cost = ~22
Final tech cost = ~5000
Tech count = 88
Formulawise, the difference between each tech is approximately:
25 + n
(where n is the number of techs researched)
Integrate that and each tech costs:
25n + (n^2)/2
That curve fits it "Good enough" for me.
If you want an approximate fit for "fixed costed techs" I would suggest this, from intuition it should play okay...
Cost = 50 + 25 * L^2
where L is the tech level.
This will put starting techs at a cost of 75, which at SMAC energy levels (starting base = 2 labs) would take 36 turns to research. Yay. But Civ4 works differently, because the Capital has 8 energy. So I think we'll need to give the HQ 8-10 bonus energy too.
So if you want to give the techs costs, then the above formula should work okay, I think.
I will also look into the Python and XML to find a way to reproduce the SMAC system.

The formula for tech costs in smac is available on this forum. The problem is, it's completely different than civ4's tech cost:
civ4 : each tech has a certain cost, no matter what.
smac : tech cost doesn't care about which tech you're researching, but about : # of techs when research starts (so if you trade/steal 5 techs in the mean time, your next one will be much more expensive), turn (later in game costs decrease), tech leader or not (tech leader = more expensive).
For simplicity, you could set all level 1 techs to the same cost, all level 2 techs to the same cost ... This way, pure b-lining to certain techs won't be so dificult anymore (because the tech cost doesn't increase if you pop an "unwanted" tech). Maybe with Python we can change the tech costs, but it'd be easiest for the first version to set them fixed for each tech.
For the civilopedia texts :
XML\Text\CIV4GameText_Civilopedia_Techs.xml
no sig
PJayTycy, I am aware of the civilopedia entries in the .xml file, but I have no idea how to access these in the game. When browsing the technologies in the in-game civilopedia, I find none of the technology descriptions. How do I get to read the technology descriptions from within the game?
Balancing the technology tree may be a delicate endeavor. If we choose to abandon the original SMACX costs model and go for, initially, a fixed cost; then perhaps we ought to utilize the "or" requirements in addition to the "and" requirements. I could be wrong, but I assume this would allow for an easier balancing between the different technology paths--especially considering making "less desireable" technologies desireable. Later, we may wish to change all of this; but for an early playable mod, perhaps this is the way to go?
Edit: Found the "hidden" button in the top right corner of the Civilopedia screen enabling the technology descriptions.
Last edited by Rubin; November 19, 2005 at 06:29.

You guys are already at it![]()
Impressive!

ah, sorry Rubin, I misunderstood you. Do you mean those civilopedia-texts are never shown in-game ? I haven't really tested when certain texts appear, but you could very well be right.
There are 4 texts: description, civilopedia, strategy and quote. Probably description is shown in the civilopedia instead. How many different texts does smac have for each tech? I know the quote, the scientific description of the breakthrough and the datalinks, but maybe there are more?
in Python, you can do this:
gc = CyGlobalContext()
tech_info = gc.getTechInfo(int TechID)
civilopedia_text = tech_info.getCivilopedia()
So, if we want to acces it for an interface screen (the datalinks) in our mod, it's no problem.
no sig
PJayTycy, as I noted in the edit above, I found the descriptions in-game. The 4 text references for each technology need not be implemented immediately as long as each new technology entry uses one of the default references already present in the text files. The full text implementation may be done at a later stage--or, perhaps, gradually.
I've done a little more than 50% of the technology tree by now (last entry currently is Photon/Wave Mechanics, tier 6).
Good news about the Python possibilities.
Edit: Minor update. I now have all the SMACX technologies in the game. I still need to do the graphics, technology prerequisites, "discovery" quotes, etc. All default technologies--except Mysticism--are still present; simply removing these might prevent some in-game testing. However, the technology framework is done now.
Last edited by Rubin; November 19, 2005 at 08:26.
Excellent work Rubin.![]()
SMAC/X FAQ | Chiron Archives
The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. --G.B.Shaw
Here's a screenshot of the "scientific breakthrough" popup. The text quote is somehow messed up, but the voiceover plays perfectly.
The text box was obviosly formatted for shorter quotes. Good work Rubin. Did you edit the technology icon yourself or is this an effect placed by the game engine?
SMAC/X FAQ | Chiron Archives
The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. --G.B.Shaw
I did the graphics for the icon by adding some texture and depth to the original SMACX icons. I then resized the new icon (64x64) and placed it on a dark "SMACX" background. I've only noticed the game scaling the icons to fit different screens (i.e. normal sized icon in the civilopedia, smaller icon in the F6 advisor screen) and applying a "glowing" effect when hovering over the icon.Originally posted by Illuminatus
Did you edit the technology icon yourself or is this an effect placed by the game engine?
Initially, I did not bother with depth and texture. What you see in the images in the first few posts in this thread is the same icons and backgrounds--but without depth and texture. When I tested those in the game they looked awfully flat and dull.
I can redo the icons preserving the original SMACX look. No problem.
Actually I like the new icons.Looks much better than the original SMACX look.
SMAC/X FAQ | Chiron Archives
The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. --G.B.Shaw

Rubin.. Illu is right. It's such an improvement.
#play s.-cd#g+c-ga#+dgfg#+cf----q.c
#endgame
Quantum P. is a champion: http://geocities.com/zztexpert/docs/upoprgv4.html

You're great Rubin
If you need a hand converting the Images to a usable format, there are like 100, including tech's and secret projects, so ask around

Excellent work!!
Can you use the ascii code for the ":" symbol? The code is "ampersand#58;"Originally posted by Rubin
I also found that inserting a : in the technology description didn't work, hence "Doctrine: Mobility" is now "Doctrine Mobility". I am sure someone may be able to figure out how to fix this.
Kinjiru, thank you very much for that piece of information! I have noticed those strange numbers throughout the .xml files--they are no longer a mystery to me. Sadly, the #58 entry does not get accepted, but I can use other ascii codes and get them to show properly; just not the #58 one. I looked up some ascii tables in case I used a wrong notation, extra spaces, hex, etc. I even tried #058 and searched all of the .xml files for any #58 entries. Nothing. Odd...
Rubin, try this:
:
-- What history has taught us is that people do not learn from history.
-- Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Also according to W3C Recommendation 04 February 2004
Code:An ampersand '&' may be escaped numerically '&' or with a general entity '&'.
-- What history has taught us is that people do not learn from history.
-- Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
As far as tech costs go can we use the Civ4 techs as a base number? (i.e. Some level 1 techs are 30 points while more attractive L1 ones are 50.) Or, maybe calibrate it to fit Blake's fomula in post #10?![]()
Don't rule me out when I'm losing. Save your celebration until after I'm gone.

I'd say either the smac way (currently nearly impossible) or the civ4 way. Not yet another (our own) system.
no sig
binTravkin, I tried your suggestions, but still no luck (: got me severel errors when loading the MOD). The #58 entry may be somehow correct as I get the same result when I simply use : .
The problem is, that if I define the name "Doctrine: Mobility" I only get "Doctrine" showing up in the game. I assume this is part of the translation code for other languages. When I use for example "Doctrine& Mobility" I get the full "Doctrine& Mobility" in the game. The same happens when I replace the & with the ascii code.
Now, here is the catch: If I replace the : with the ascii code I get the exact same result as without the replacement, only "Doctrine" shows.
--
Until I get a better suggestion, I'll go with Blake's tech cost formula for testing. Feel free to revise each individual technology cost. Also, for game testing, I need to know which files to modify to go with removing all the original technologies. In particular, I am worried that age transitions and victory conditions may be corrupted if the default technologies are removed.
Edit: I tried deciding on a format to go with the new icons. To this I made 4 differently colored patterns--derived from the SMACX colors used. Creating a new icon for a technology or building is then a simple matter of applying the appropriate pattern (and setting depth & light intensity/angle).
I also experimented with a transparent background for the icons (modifying the alpha mask). I found this a bit more tricky to get right, but I assume it is possible to do.
Here are the 4 patterns used (set on the applied background as well):
Edit 2: I have temporarily uploaded the icons for the technologies 00 to 06 (check the SMACX "techs" folder for the corresponding original icons). The uploaded files are all ready to implement, hence the format is .dds. I have, again, tried to use a strict naming convention. This applies specifically to the implementation of the audio quotes.
Icons here: Edit 3: File removed.
Last edited by Rubin; December 18, 2005 at 17:58.

Yes, it is.Originally posted by Rubin
The problem is, that if I define the name "Doctrine: Mobility" I only get "Doctrine" showing up in the game. I assume this is part of the translation code for other languages.
For example, some words that should be used in plural or singular forms are seperated by it.
So, you could have something like (again, not exactly, but from memory):
Code:{key}BLAH{/key} {english} {text}he:they{/text} {plural}false:true{/text} {/english} {/key}
no sig
Bookmarks