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.
Add javascript into the UI that goes: "Oh you selected a commander factory... let me add a build option for the commander you spawned with". Maybe also remove the other build options. Not sure anymore how the normal build options ended up in the UI, but I seem to remember you had to add them to some files on the UI side anyway. Just don't do that and instead have dynamic javascript for it. 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.
hi, Hi, 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 in german: hi, 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.