Hi, been lurking around the forums for a few weeks, but I couldn't seem to figure out how to modify the AI to build different/custom units (and upgrades) for my mod extension. Can anyone give insight on how to do it?
Unless you're talking about Galaxy coding, you can use Bullies to force the AI into building the unit you want. Simply select the unit in the editor, press ENTER, go to the AI tab and uncheck the 'Initially Created' box.
But that alone won't do, as you must ensure, through some work in the Data editor, that the according structure can build the unit. What you're looking for is the *Building* - Build Ability, where you can modify the Commands menu to include the unit. Just make sure the Requirements' window is clear, and, if there's any requirement, at all, that tne AI can meet it. Modify the building's command card, too, including the unit you want.
I know how to add the unit via data editor already, but how do I select the the unit when I'm doing a mod extension? the editor screen doesnt display anything for me to select it. And does this apply to all units of its type or just units that I've already pre-placed?
He means make sure your building can be built by scv, drone, or probe; that it is included in the said worker's build ability.
Then use the terrain editor to place the building. Select the building and press enter. A window will pop-up. Go to the AI tab of this window and find the checkbox that says "Initially Created" and make sure it doesn't have a check mark.
The building you placed in the editor will then look transparent.
However, I do not recommend this. Instead, you must use build trigger pointing to your specific unit as a parameter. Even better is to make your own trigger or action definition that selects a worker and builds a specified building on a target point.
The standard melee and campaign AIs doesn't include your building in them, so naturally the AI will not even be given the command to build such structure.
Rollback Post to RevisionRollBack
Whatever you do, wholeheartedly, moment by heartfelt moment, becomes a tool for the expression of your very soul.
Welp you can't preplace anything in an extension mod. Aside maybe with triggers assuming the map you're editing has points placed or something. But you can't use the terrain editor to add them.
So, does anyone actually have the answer to the question?
Because i´ve been trying to find this out myself for literally years by now, and every time i do a new search, i find threads like these, where the right question is asked, but no answer is ever provided.
So could someone just please give the real answer?
Well, both custom buildings and units. How would I start making those triggers exactly? Again, note that this is a mod extension, I can't place any units nor have access to the terrain editor.
If you can access the trigger editor then you are golden. Create triggers for the AI there. First, right-click create library, then you can start creating triggers.
I'm not quite certain if Mod Extensions and Mods are the same, but I think they are very much the same.
Rollback Post to RevisionRollBack
Whatever you do, wholeheartedly, moment by heartfelt moment, becomes a tool for the expression of your very soul.
If you can access the trigger editor then you are golden. Create triggers for the AI there. First, right-click create library, then you can start creating triggers.
I'm not quite certain if Mod Extensions and Mods are the same, but I think they are very much the same.
The AI actions i found that might be functional were these:
AISetSpecificRebuildCount
AIDefaultEconomy
AIEnableStock
AIMakeAlways
AISetStock
AITrain
And i don´t really have a clue which would be used (the in editor hints are far too nebulous). There´s also a question on wether it works properly for all players and races.
And then, what should the trigger condition be and what should the trigger event be?
And an Extension Mod is a mod that can be applied to any map while starting a custom game.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi, been lurking around the forums for a few weeks, but I couldn't seem to figure out how to modify the AI to build different/custom units (and upgrades) for my mod extension. Can anyone give insight on how to do it?
@Achronos118: Go
Unless you're talking about Galaxy coding, you can use Bullies to force the AI into building the unit you want. Simply select the unit in the editor, press ENTER, go to the AI tab and uncheck the 'Initially Created' box.
But that alone won't do, as you must ensure, through some work in the Data editor, that the according structure can build the unit. What you're looking for is the *Building* - Build Ability, where you can modify the Commands menu to include the unit. Just make sure the Requirements' window is clear, and, if there's any requirement, at all, that tne AI can meet it. Modify the building's command card, too, including the unit you want.
@DeltaCadimus: Go
I know how to add the unit via data editor already, but how do I select the the unit when I'm doing a mod extension? the editor screen doesnt display anything for me to select it. And does this apply to all units of its type or just units that I've already pre-placed?
He means make sure your building can be built by scv, drone, or probe; that it is included in the said worker's build ability.
Then use the terrain editor to place the building. Select the building and press enter. A window will pop-up. Go to the AI tab of this window and find the checkbox that says "Initially Created" and make sure it doesn't have a check mark.
The building you placed in the editor will then look transparent.
However, I do not recommend this. Instead, you must use build trigger pointing to your specific unit as a parameter. Even better is to make your own trigger or action definition that selects a worker and builds a specified building on a target point.
The standard melee and campaign AIs doesn't include your building in them, so naturally the AI will not even be given the command to build such structure.
Whatever you do, wholeheartedly, moment by heartfelt moment, becomes a tool for the expression of your very soul.
Welp you can't preplace anything in an extension mod. Aside maybe with triggers assuming the map you're editing has points placed or something. But you can't use the terrain editor to add them.
So, does anyone actually have the answer to the question?
Because i´ve been trying to find this out myself for literally years by now, and every time i do a new search, i find threads like these, where the right question is asked, but no answer is ever provided.
So could someone just please give the real answer?
My answer would be to make your own triggers that orders the AI to build said custom buildings. AIBuild()..
That is if I got the question right.
Whatever you do, wholeheartedly, moment by heartfelt moment, becomes a tool for the expression of your very soul.
@GnaReffotsirk: Go
Well, both custom buildings and units. How would I start making those triggers exactly? Again, note that this is a mod extension, I can't place any units nor have access to the terrain editor.
@Achronos118: Go
If you can access the trigger editor then you are golden. Create triggers for the AI there. First, right-click create library, then you can start creating triggers.
I'm not quite certain if Mod Extensions and Mods are the same, but I think they are very much the same.
Whatever you do, wholeheartedly, moment by heartfelt moment, becomes a tool for the expression of your very soul.
The AI actions i found that might be functional were these: AISetSpecificRebuildCount AIDefaultEconomy AIEnableStock AIMakeAlways AISetStock AITrain
And i don´t really have a clue which would be used (the in editor hints are far too nebulous). There´s also a question on wether it works properly for all players and races. And then, what should the trigger condition be and what should the trigger event be?
And an Extension Mod is a mod that can be applied to any map while starting a custom game.