Discussion in 'Mod Support' started by robintick, July 24, 2015.
Anyone figured out how to enable a factory to build commanders ?
It's actually really easy.
The units a factory can build are determined by the field "Buildable types" in the unit.json. Just make base_commander.json's unittypes match up with the buildable types of a factory and you're good.
The commanders will act, more or less, as decoy commanders. Stat wise they'll be identical to the one you start out with, but if your main com dies the game will still end. It is impossible to prevent this without server scripts.
Thanks that worked, too bad you have to specify a commander, I kinda hoped that it would somehow magically use your preferred commander when you set it to base commander, but no.
Weird that nobody put this on PAMM yet.
I guess you could make the UI side of the mod "magically" only offer the option for the commander the player started with.
How would you do that ? because you have to specify a specific commander.json in build.js
If you use base_commander.json it builds an invisible commander that ceases to exist once construction is finished, I tried
When you specify a specific commander the factory builds him normally.
Server side the factory could build all commanders. The players UI however dynamically would only show the option for the one commander the player started with.
Maybe have a look at mikeyhs mod that limits what players are allowed to build. It does similar modifications, that prevent players from building things by removing the option from the UI.
I once built a few commander in my mod "power units" some time ago. Have but again out done because you had to control all built Commander himself. (little is a lot of work to manage) The Commander was a "supper Units" thought.
If you want to know is pointed look at times in the file, the com.radar at since has not changed much. Everywhere com .... stands, is a commander.
The Commander can be built in a fabrick.
sorry for my bad english
ich hatte vor einiger zeit mal eine paar commander in meinen mod "powerunits" eingebaut. Habe die aber wieder raus getan da man alle gebauten Commander selber steuern musste. (is bischen viel arbeit die zu managen) Die Commander waren als "supper Units" gedacht.
Wenn du wissen willst wies geht schau dir mal in der datei, den com.radar an der da wurde nicht viel geändert. Überall wo com.... steht, ist ein commander.
Die Commander kann man in einer Fabrick bauen.
Separate names with a comma.