ID:948017
 
Keywords: help, strategy, tech, techtree
(See the best response by Orange55.)
Code:


Problem description:

Hello again guys I just started out on the strategy genre of gaming and I need some help making a tech tree. I've named and coded the effects of each tech but can't place them in a tree.
Any suggestion?
Can you describe the shape of the tech tree you wish to create? Is it an actual tree, where each option branches off into more options; or is it more linear? Or, is it a graph where options reconnect with certain options requiring multiple prerequisites. I'm a bit tired, so I'm not sure I described that well, but if you could link to image with another game's tech tree that has the structure you want (ie the SC2 Terran Tech Tree) that would help.

Also, do you just need help drawing them in a tree shape, or do you need help adding requirements to them so you have to learn them in the tree's order?
I have a tech tree in Axion, though without calling it that. Since I don't have any sort of visual display, all I really do is, for every ability, define a set of prerequisites for it. If I were to do a tree visually, I would probably place every ability on a screen manually and manually draw arrows between them, rather than trying to come up with some fancy automated visual system.
It's like an actual tree it has four roots which lead to more branches. I just can't figure how to make them appear automatically like when you research one tech 3 more options are enabled. I've thought of pop up windows but didn't work.
The manual system sounds good too, you mean like making an interface that holds all the techs and you can manually research techs right?
yes something similar either making it on map or either making it on skin depends on which way you can handle them better.
Best response
Victorqr I am still a little unsure of what you want? so I will ask a couple of things before I attempt to help you..(if its what I think I can write some examples of how to do this..)

1st what are the options? verbs..buttons?(I assume one of the two..please specify which it is or other.)
2nd are you requesting how to give the options to the player once he has met the technology level? or how to put the tech tree into a interface and make sure you have to have certain prerequisites before using (whatever)

I hope you clear it up in your next post...its still kinda cloudy to me... but if you are trying to create a basic interface tree(with buttons) I will show you can example of a simple 3 button tree..(root(already learned)...2 options...) hopefully this will help you..if not you can just specify what part you need explained in your next post.

------------
Code:
mob
var
tech_level=1 //simple var to keep track..
verb
Tech_Level_2()
set hidden=1
var/S=input("Tech level 2 will give you INSERT INSERT INSERT and INSERT. Research this technology type?") in list("Yes","No")
if(S=="Yes")
if(usr.tech_level>=2)
alert("You already know this skill!")
return(0)
if(usr.skillpoint==0)
alert("You dont have enough skill points!")
else
usr.skillpoint-=1
usr.verbs+=(INSERT OPTIONS HERE)
usr.tech_level+=1
Tech_Level_3()
set hidden=1
if(usr.tech_level!=2)
usr << "You do not have the prerequisite"
return(0)
var/S=input("Tech level 3 will give you INSERT INSERT INSERT and INSERT. Research this technology type?") in list("Yes","No")
if(S=="Yes")
if(usr.tech_level>=3)
alert("You already know this skill!")
return(0)
if(usr.skillpoint==0)
alert("You dont have enough skill points!")
else
usr.skillpoint-=1 //Change this as needed
usr.verbs+=(INSERT OPTIONS HERE)
usr.tech_level+=1



Thanks, the last post was really useful I never thought of making a variable that would trigger these techs. Now I'm going to make a tree. Thanks again.
In response to Orange55
Yuck if you are going to check if a variable is false you should be using the ! Operator not == 0 thats just bad programming...

[edit] on another note you shouldn't be using that many verbs when you can do it just using one proc and a verb set to each skill