Rise and Fall Development

Rise And Fall Development

Main

News

Chat Forums

Pictures

Documentation

Development

Code

Download

SourceForge Logo

TechTree.dat: This file will be escentially the same as I have stated before. (below) The only major difference is the description is going to be included in this file. I am going to keep it fairly close to the civ tech tree type. Techs will only have a max of 2 prerequisits. I was thinking of more, but I donít want to complicate things more than they should be, and on average 2 prerequisits will do. The file will contain this data: Tech Name, Tech Discription, AI stuff, Prerequisits, an Epoch, a category, what races can have it, and any special events or bonuses for having it.


TechTree.txt: This file will contain the following information. I am going to keep it fairly close to the civ tech tree type. Techs will only have a max of 2 prerequisits. I was thinking of more, but I donít want to complicate things more than they should be, and on average 2 prerequisits will do. Each line in the file will contain a list like this.

TechNumber, TechName, AI, Modifier, PreReq1, PreReq2, Epoch, Category, RaceCanHave?, picture

TechNumber: This is a number, place holder for users making tech trees. It is used by the PreReq1, and PreReq2, to save having to build a tree in my program using the tech names.
TechName: This is the full name of the tech as a string.
AI: This is a number used by the computer to determine what tech to research.
Modifier: Like civ, this is a number used to adjust the AI number. Depending on the AIís civilization and stance, civilized/military this number will be added or removed from the AI number.
PreReq1 and 2: A number representing a needed tech item to get. 0 is for no tech items required.
Epoch: This is a number is used for selecting what type of historical era your culture is in if you get this tech. Basically it is for saying ĎHey, you made it out of the stone age, and into the bronze age.í What the actual ages there are in the game will depend on the game type.
Category: This is used to say what type of technology it is. Some examples are military tech, scientific tech, religious tech.
RaceCanHave: This is partially from Civ2: Test of Time, though I put it in a different place. It says if a race is denied a technology. This is especially useful in sci-fi, or fantasy game, where there can be totally different races, with totally different tech trees. Currently there are 3 states for each race in the RaceCanHave field. The sates are 0 (canít ever get) 1(can research) and 2(canít research but can get). Item number 2 requires stealing or trading for the tech item. I am limiting RaceCanHave to 8 races. I doubt anyone will need more than that. Some games may allow more than 8 races, but will be limited in their tech tree to use one of the 8 race slots. I am doing this for simplicity. If I have the extra room in the end I will think about increasing this to 16, 32, or 64 races. However if it gets that complex, it may be better to have different tech trees all together for each race. I may do that too.
Finally Picture: This is a picture file in the Textures directory that can be used to show a picture of the technology.

Example:

1 "Gun Powder" 10 2 0 0 3 4 11112200 "techGunPowder.jpg"
2 "Metalworking" 8 1 0 0 3 4 11112200 "techMetalWorking.jpg"
3 "Bullet" 10 3 1 2 3 4 11111120 "techBullet.jpg"

This basically says that the bullet can be researched once you research gun powder and metalworking. It also says that race 5 and 6 can only steal gunpowder and metalworking, but can research bullet after words. And it also says that race 7 can only steal the bullet.

It is important to notice that the tech tree dosenít actually do anything, but allow players to research and learn new technologies. Links in other places will allow for these technologies to be used. For example, an item in the Units.txt file will only allow players to make riflemen after the bullet is researched. It is possible that later I may add a flags list the TechTree.txt file that will allow some things to happen based on a tech research, but there is a limit on the number of flags that need to be added. Requirements make things easier than flags.