- Joined
- Mar 27, 2012
- Messages
- 3,232
When making one of my projects in the past I came across a problem.
I had 4 kinds of walls:
Basic Wall(Horisontal)
Basic Wall(Vertical)
Basic Wall(Diagonal1)
Basic Wall(Diagonal2)
I needed to make a techtree requirement, that tells you to build a wall - any wall of the ones mentioned above.
After a bit of thinking I came across a solution. (Click picture to enlarge)
I created a new unit named "Basic Wall" and used used all the other Basic Wall types as the dependency equivalent. Then I made the techtree requirement take the "Basic Wall" unit, instead of any of the others. The "Basic Wall" unit would never be placed anywhere.
Later on I realized, that I could use similar ways to create a sort of a techweb.
Normally things are placed in a sort of a tree-shaped thing.
However, through dependency equivalents you can make something like this(Click picture to enlarge):
You can make E require O and (A or D).
Or you can make O require ABCDEFGH, while A requires H or B, B requires C or A, C requires D or B, etc.
You can literally go nuts with this possibility.
Now comes the important question: How?
It's actually quite simple. You make a unit that will never be trainable. Then you put all the Equivalent units in its dependency equivalents and use this unit for any dependencies you might need.
Like this(Click picture to enlarge):
The reason this works is that now whenever a game checks for your equivalent unit it also considers everything you've set as equivalents. Thus, you've effectively made a techtree requirement that contains a group of unit types.
I had 4 kinds of walls:
Basic Wall(Horisontal)
Basic Wall(Vertical)
Basic Wall(Diagonal1)
Basic Wall(Diagonal2)
I needed to make a techtree requirement, that tells you to build a wall - any wall of the ones mentioned above.
After a bit of thinking I came across a solution. (Click picture to enlarge)
I created a new unit named "Basic Wall" and used used all the other Basic Wall types as the dependency equivalent. Then I made the techtree requirement take the "Basic Wall" unit, instead of any of the others. The "Basic Wall" unit would never be placed anywhere.
Later on I realized, that I could use similar ways to create a sort of a techweb.
Normally things are placed in a sort of a tree-shaped thing.
However, through dependency equivalents you can make something like this(Click picture to enlarge):
You can make E require O and (A or D).
Or you can make O require ABCDEFGH, while A requires H or B, B requires C or A, C requires D or B, etc.
You can literally go nuts with this possibility.
Now comes the important question: How?
It's actually quite simple. You make a unit that will never be trainable. Then you put all the Equivalent units in its dependency equivalents and use this unit for any dependencies you might need.
Like this(Click picture to enlarge):
The reason this works is that now whenever a game checks for your equivalent unit it also considers everything you've set as equivalents. Thus, you've effectively made a techtree requirement that contains a group of unit types.
Last edited by a moderator: