How do I add a new action to a building?
<div class="IPBDescription">I.e. adding a new button to observatory or phase gate?</div>I'm having some difficulty finding how to add a button the the commander GUI for a specific building. I've looked through the TechTree classes and MarineTeam class.
There's lots of references to kTechId.something however I can't find where these are declared.
I'm trying to add a button to phase-gates that when pressed will set that phase gate to top priority.
There's lots of references to kTechId.something however I can't find where these are declared.
I'm trying to add a button to phase-gates that when pressed will set that phase gate to top priority.
Comments
Also, something like that may be in a mixin, and as I've been finding out the last few days mixins can be tricky to work with.
Afraid that's all I can offer at the moment.
2. Add your tech to TechData.lua
3. Add your tech to techtree in MarineTeam.lua
4. Add your tech to Observatory.lua
* line 177: GetTechButtons(techId) which calls
* line 54: kObservatoryTechButtons table
5. Make your tech do something. Look at other ones for examples
Find in Files is your friend. The best way to learn something is search for it in the code. In this particular case, if you search for PhaseTech you'd find all of these files and locations where it's used.
VV forgot that part, thanks