Puzzling policy problem

Thalassicus

Bytes and Nibblers
Joined
Nov 9, 2005
Messages
11,057
Location
Texas
The Inspiration policy and Piety finisher below do not seem to work with the Policy_FreeUnitClasses table. When I acquire them ingame, no units appear. There are no error messages in lua.log or database.log. What might be the problem? :think:

Code:
<Policy_FreeUnitClasses>
    <Row>
        <PolicyType>POLICY_INSPIRATION</PolicyType>
        <UnitClassType>UNITCLASS_ARTIST</UnitClassType>
        <Count>1</Count>
    </Row>
    <Row>
        <PolicyType>POLICY_PIETY_FINISHER</PolicyType>
        <UnitClassType>UNITCLASS_PROPHET</UnitClassType>
        <Count>1</Count>
    </Row>
    <Delete PolicyType="POLICY_CITIZENSHIP" />
    <Row>
        <PolicyType>POLICY_CITIZENSHIP</PolicyType>
        <UnitClassType>UNITCLASS_WORKER</UnitClassType>
        <Count>2</Count>
    </Row>
</Policy_FreeUnitClasses>

Any other effect I give these policies works okay. The citizenship policy gives 2 workers okay.
 

Attachments

I dont realy have a solution to your problem Thal. We on CCTP have encountered other little issues with the policies though, that lead me to belive theres certain hardcoded things going on with them(Happiness per GU only ever giving +1 no matter that you set it higher, for one. There is something with the CS bonus's too that I can not remeber atm).
 
There is a column in the Policies table called IncludesOneShotFreeUnits. I think you should set it to true for policies that provide free units.
 
I would like to specifically comment on the granting of great prophets through policies. I do not think that these prophets have a religion attached, meaning you cannot spread or enhance a religion with him. Be careful.
 
"Some"? Are you implying that it does work for other policies?

Openers don't fire the PolicyAdopted event (they do fire the PolicyBranchOpened event). Perhaps finishers don't either -- I'm not sure. In any case, they may be treated differently in the dll. (I couldn't tell from your post if Inspiration was an opener or finisher.)
 
Back
Top Bottom