Workers building things while embarked.

Neirai

the Forgiven
Joined
Aug 5, 2013
Messages
1,046
Location
Canada
Is there a reason why I can't get my custom workers to build things when they are embarked?

I'm trying to get the same effect as the Japanese Samurai. I copied the XML code, with the exception of allowing the custom worker to build all the other things that Workers can. I can embark them (no surprise) but they won't build the boats.

Is there something in the code that I don't know about?
 
It won't work for standard Builds. Only Builds that have CanBeEmbarked set to true can be performed by embarked units.
 
Thanks, PawelS. That worked.

New question: The AI doesn't build fishing boats while the workers are on automated. Is there any way to fix this?
 
Is there something in the code that I don't know about?

Without a modded DLL, it's hard coded to the Samurai

Code:
if ((isEmbarked() && !pkBuildInfo->IsCanBeEmbarked())
    && (strcmp("UNIT_JAPANESE_SAMURAI", getUnitInfo().GetType()) != 0))
 
Does anyone know if playing around with this would change how the AI uses this unit, or just if they build them or not?

<Row>
<UnitType>UNIT_WORKBOAT</UnitType>
<FlavorType>FLAVOR_NAVAL_TILE_IMPROVEMENT</FlavorType>
<Flavor>9</Flavor>
</Row>
 
The AI doesn't build fishing boats while the workers are on automated. Is there any way to fix this?

Well, I've never seen automated workers build moai, so it might be some AI quirk, anyway
 
Top Bottom