Mynex
Warlord
- Joined
- Sep 30, 2010
- Messages
- 287
Okay, so I'm still working on _adding_ 2 additional policies to the 10 present... NOT replacing them... I've got the 2 policies (just the shell atm, nothing in them yet) set up in the XML...
I've got a PolicyBoxChanges.xml with just the 2 new policies in place (based on the \Assets\UI\InGame\Popups\SocialPolicyPopup.xml)
My Complete file - PolicyBoxChanges.xml
And for good measure, here's the actual policies xml file I created; CIV5PolicyChanges.xml
I've got the 3 files OnModActivated/UpdateDatabase/>path< in place...
So what happens? Policy window does not open. Policies are listed in the civilopedia just fine... But trying to open the policy window either from the main window icon or the 'select policy' above the minimap, fails.
I've hit all the places where there is an ID (# or policy name) - Green Society is 10 and Consumerism is 11... in both the xml and lua...
I've compared all the size, anchor, offset, etc and _all_ the policy boxes in the xml & lua are the same... the only differences I can see are in the ID area and TXT_KEY stuff..
I'd really like to be able to add policy, not just replace them... So I'm asking for the super LUA/XML guys & gals to look this over and point me where I done did wrong!
One other thought I had, could it be stashed in the dll that there can _only_ be 10 policies?
Anyways, help appreciated!
Have to break this post up, character limit hit.. next post is the lua file I'm using in it's entirety...
I've got a PolicyBoxChanges.xml with just the 2 new policies in place (based on the \Assets\UI\InGame\Popups\SocialPolicyPopup.xml)
My Complete file - PolicyBoxChanges.xml
Spoiler :
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 10/26/2010 7:11:39 PM -->
<!-- Update UI/InGame/Popups/SocialPolicyPopup.xml (Tied into SocialPolicyPopup.lua? Need to check) with the below -->
<Box>
<Grid>
<Stack>
<!-- GREEN_SOCIETY BOX -->
<Box Size="190,290 " Anchor="C,T" Color="0,0,0,0">
<!-- Policy Branch Image -->
<Image Anchor="C,T" Offset="0,0" TextureOffset="0.40" Size="190,90" Texture="Assets/UI/Art/Icons/SocialPoliciesLiberty.dds" ID="BranchBack10" ToolTip="TXT_KEY_POLICY_BRANCH_GREEN_SOCIETY_HELP"/>
<Image Anchor="C,T" Offset="0,0" Size="190,290" Texture="Assets/UI/Art/Icons/SocialPoliciesTrim.dds">
<!-- Policy Choices ScrollPanel -->
<ScrollPanel Anchor="C,T" Offset="0,86" Size="190,500" Vertical="1" ID="GreenSocietyPanel">
<ScrollBar Offset="-4,0" Style="VertSlider" Anchor="R,C" AnchorSide="I,I" Length="460"/>
<UpButton Offset="-4,-3" Style="ScrollBarUp" Anchor="R,T" AnchorSide="I,I"/>
<DownButton Offset="-4,-3" Style="ScrollBarDown" Anchor="R,B" AnchorSide="I,I"/>
</ScrollPanel>
</Image>
<!-- Disabled Boxes -->
<Box ID="LockedBox10" Size="190,260" Offset="0,30" Anchor="C,T" Color="0,0,0,0">
<HideOnMouseOver>
<Image Anchor="C,T" Offset="0,0" TextureOffset="0.30" Size="190.260" Color="255.255.255.255" Texture="Assets/UI/Art/Icons/SocialPoliciesLiberty.dds"/>
</HideOnMouseOver>
</Box>
<!-- adopt button -->
<GridButton Size="170,36" Anchor="C,T" Offset="0,46" Font="TwCenMT18" String="" FontStyle="Shadow" Color0="Beige.255" Color1="Black.128" Style="BaseButton" ToolTip="TXT_KEY_POLICY_BRANCH_GREEN_SOCIETY_HELP" Hidden="0" ID="BranchButton10">
<Image Anchor="R,C" Offset="0,0" Size="48,48" Texture="48Lock.dds" ID="Lock10"/>
</GridButton>
<Box ID="DisabledBox10" Size="190,290" Offset="0,0" Anchor="C,T" Color="0,0,0,0">
<HideOnMouseOver>
<Image Anchor="C,T" Offset="0,0" Size="190.290" Color="255.255.255.255" Texture="Assets/UI/Art/Icons/SocialPoliciesLiberty.dds"/>
<Box Size="190,290" Offset="0,0" Anchor="C,T" Color="0,0,0,200"/>
</HideOnMouseOver>
</Box>
<!-- Title -->
<Label Anchor="C,T" Offset="0,8" String="TXT_KEY_POLICY_BRANCH_GREEN_SOCIETY_CAP" Font="TwCenMT20" FontStyle="Shadow" Color0="Beige.255" Color1="Black.255"/>
<!-- Era Label
<Label ID="EraLabel1" Anchor="C,T" Offset="0,40" WrapWidth="185" LeadingOffset="-4" String="TXT_KEY_ERA_AVAILALBE" Font="TwCenMT16" FontStyle="Shadow" Color0="Beige.255" Color1="Black.128" />
-->
</Box>
<!-- CONSUMERISM BOX -->
<Box Size="190,290 " Anchor="C,T" Color="0,0,0,0">
<!-- Policy Branch Image -->
<Image Anchor="C,T" Offset="0,0" TextureOffset="0.50" Size="190,90" Texture="SocialPoliciesOrder.dds" ID="BranchBack11" ToolTip="TXT_KEY_POLICY_BRANCH_CONSUMERISM_HELP"/>
<Image Anchor="C,T" Offset="0,0" Size="190,290" Texture="Assets/UI/Art/Icons/SocialPoliciesTrim.dds">
<!-- Policy Choices ScrollPanel -->
<ScrollPanel Anchor="C,T" Offset="0,86" Size="190,500" Vertical="1" ID="ConsumerismPanel">
<ScrollBar Offset="-4,0" Style="VertSlider" Anchor="R,C" AnchorSide="I,I" Length="460"/>
<UpButton Offset="-4,-3" Style="ScrollBarUp" Anchor="R,T" AnchorSide="I,I"/>
<DownButton Offset="-4,-3" Style="ScrollBarDown" Anchor="R,B" AnchorSide="I,I"/>
</ScrollPanel>
</Image>
<!-- Disabled Boxes -->
<Box ID="LockedBox11" Size="190,260" Offset="0,30" Anchor="C,T" Color="0,0,0,0">
<HideOnMouseOver>
<Image Anchor="C,T" Offset="0,0" TextureOffset="0.30" Size="190.260" Color="255.255.255.255" Texture="SocialPoliciesOrder.dds"/>
</HideOnMouseOver>
</Box>
<!-- adopt button -->
<GridButton Size="170,36" Anchor="C,T" Offset="0,46" Font="TwCenMT18" String="" FontStyle="Shadow" Color0="Beige.255" Color1="Black.128" Style="BaseButton" ToolTip="TXT_KEY_POLICY_BRANCH_CONSUMERISM_HELP" Hidden="0" ID="BranchButton11">
<Image Anchor="R,C" Offset="0,0" Size="48,48" Texture="48Lock.dds" ID="Lock11"/>
</GridButton>
<Box ID="DisabledBox11" Size="190,290" Offset="0,0" Anchor="C,T" Color="0,0,0,0">
<HideOnMouseOver>
<Image Anchor="C,T" Offset="0,0" Size="190.290" Color="255.255.255.255" Texture="SocialPoliciesOrder.dds"/>
<Box Size="190,290" Offset="0,0" Anchor="C,T" Color="0,0,0,200"/>
</HideOnMouseOver>
</Box>
<!-- Title -->
<Label Anchor="C,T" Offset="0,8" String="TXT_KEY_POLICY_BRANCH_CONSUMERISM_CAP" Font="TwCenMT20" FontStyle="Shadow" Color0="Beige.255" Color1="Black.128"/>
<!-- Era Label
<Label ID="EraLabel8" Anchor="C,T" Offset="0,40" WrapWidth="185" LeadingOffset="-4" String="TXT_KEY_ERA_AVAILALBE" Font="TwCenMT16" FontStyle="Shadow" Color0="Beige.255" Color1="Black.128" />
-->
</Box>
</Stack>
</Grid>
</Box>
And for good measure, here's the actual policies xml file I created; CIV5PolicyChanges.xml
Spoiler :
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 10/26/2010 6:30:04 PM -->
<GameData>
<!-- Update XML/GameInfo/CIV5Policies.xml with the below -->
<Policies>
<Row>
<Type>POLICY_GREEN_SOCIETY</Type>
<Description>TXT_KEY_POLICY_BRANCH_GREEN_SOCIETY</Description>
<BuildingProductionModifier>-10</BuildingProductionModifier>
<Civilopedia>TXT_KEY_CIV5_POLICY_GREEN_SOCIETY_TEXT</Civilopedia>
<Help>TXT_KEY_POLICY_GREEN_SOCIETY_HELP</Help>
<PortraitIndex>24</PortraitIndex>
<IconAtlas>POLICY_ATLAS</IconAtlas>
<IconAtlasAchieved>POLICY_A_ATLAS</IconAtlasAchieved>
</Row>
<Row>
<Type>POLICY_CONSUMERISM</Type>
<Description>TXT_KEY_POLICY_BRANCH_CONSUMERISM</Description>
<PortraitIndex>30</PortraitIndex>
<BuildingProductionModifier>25</BuildingProductionModifier>
<Civilopedia>TXT_KEY_POLICY_CONSUMERISM_TEXT</Civilopedia>
<Help>TXT_KEY_POLICY_CONSUMERISM_HELP</Help>
<IconAtlas>POLICY_ATLAS</IconAtlas>
<IconAtlasAchieved>POLICY_A_ATLAS</IconAtlasAchieved>
</Row>
</Policies>
<Policy_Flavors>
<Row>
<PolicyType>POLICY_GREEN_SOCIETY</PolicyType>
<FlavorType>FLAVOR_EXPANSION</FlavorType>
<Flavor>10</Flavor>
</Row>
<Row>
<PolicyType>POLICY_CONSUMERISM</PolicyType>
<FlavorType>FLAVOR_GOLD</FlavorType>
<Flavor>10</Flavor>
</Row>
</Policy_Flavors>
<!-- Update XML/GameInfo/CIV5PolicyBranchTypes.xml with the below -->
<PolicyBranchTypes>
<Row>
<Type>POLICY_BRANCH_GREEN_SOCIETY</Type>
<Description>TXT_KEY_POLICY_BRANCH_GREEN_SOCIETY</Description>
<Help>TXT_KEY_POLICY_BRANCH_GREEN_SOCIETY_HELP</Help>
<Title>TXT_KEY_GREEN_SOCIETY_TITLE</Title>
<EraPrereq>ERA_MODERN</EraPrereq>
<FreePolicy>POLICY_GREEN_SOCIETY</FreePolicy>
</Row>
<Row>
<Type>POLICY_BRANCH_CONSUMERISM</Type>
<Description>TXT_KEY_POLICY_BRANCH_CONSUMERISM</Description>
<Help>TXT_KEY_POLICY_BRANCH_CONSUMERISM_HELP</Help>
<Title>TXT_KEY_CONSUMERISM_TITLE</Title>
<EraPrereq>ERA_MODERN</EraPrereq>
<FreePolicy>POLICY_CONSUMERISM</FreePolicy>
</Row>
</PolicyBranchTypes>
<!-- Update XML/NewText/EN_US/CIV5GameTextInfos_Jon.xml with the below -->
<Language_en_US>
<Row Tag="TXT_KEY_POLICY_BRANCH_GREEN_SOCIETY">
<Text>Green Society</Text>
</Row>
<Row Tag="TXT_KEY_POLICY_BRANCH_GREEN_SOCIETY_CAP">
<Text>GREEN SOCIERTY</Text>
</Row>
<Row Tag="TXT_KEY_POLICY_BRANCH_GREEN_SOCIETY_HELP">
<Text>A [COLOR_POSITIVE_TEXT]Green Society[ENDCOLOR] ADD TEXT HERE[NEWLINE][NEWLINE] ADD TEXT HERE [COLOR_POSITIVE_TEXT]BUIDING MAINTENANCE[ENDCOLOR] by 10%.[NEWLINE][NEWLINE]</Text>
</Row>
<Row Tag="TXT_KEY_POLICY_BRANCH_CONSUMERISM">
<Text>Consumerism</Text>
</Row>
<Row Tag="TXT_KEY_POLICY_BRANCH_CONSUMERISM_CAP">
<Text>CONSUMERISM</Text>
</Row>
<Row Tag="TXT_KEY_POLICY_BRANCH_CONSUMERISM_HELP">
<Text>[COLOR_POSITIVE_TEXT]Consumerism[ENDCOLOR] ADD TEXT HERE[NEWLINE][NEWLINE] ADD TEXT HERE [COLOR_POSITIVE_TEXT]BUIDING MAINTENANCE[ENDCOLOR] by 10%.[NEWLINE][NEWLINE]</Text>
</Row>
<Row Tag="TXT_KEY_CIV5_POLICY_GREEN_SOCIETY_HEADING">
<Text>Green Society</Text>
</Row>
<Row Tag="TXT_KEY_CIV5_POLICY_GREEN_SOCIETY_TEXT">
<Text>GREEN SOCIETY TEXT ADD TEXT</Text>
</Row>
<Row Tag="TXT_KEY_POLICY_GREEN_SOCIETY_HELP">
<Text>GREEN SOCIETY HELP ADD TEXT</Text>
</Row>
<Row Tag="TXT_KEY_SOCIALPOLICY_GREEN_SOCIETY_ADV_QUEST">
<Text>GREEN SOCIETY ADV QUEST ADD TEXT</Text>
</Row>
<Row Tag="TXT_KEY_SOCIALPOLICY_GREEN_SOCIETY_HEADING3_BODY">
<Text>GREEN SOCIETY HEADING3 BODY ADD TEXT</Text>
</Row>
<Row Tag="TXT_KEY_SOCIALPOLICY_GREEN_SOCIETY_HEADING3_TITLE">
<Text>Green Society</Text>
</Row>
<Row Tag="TXT_KEY_CIV5_POLICY_CONSUMERISM_HEADING">
<Text>Consumerism</Text>
</Row>
<Row Tag="TXT_KEY_POLICY_CONSUMERISM_TEXT">
<Text>CONSUMERISM TEXT ADD TEXT</Text>
</Row>
<Row Tag="TXT_KEY_POLICY_CONSUMERISM_HELP">
<Text>CONSUMERISM HELP ADD TEXT</Text>
</Row>
<Row Tag="TXT_KEY_SOCIALPOLICY_CONSUMERISM_ADV_QUEST">
<Text>CONSUMERISM ADV QUEST ADD TEXT</Text>
</Row>
<Row Tag="TXT_KEY_SOCIALPOLICY_CONSUMERISM_HEADING3_BODY">
<Text>CONSUMERISM HEADING3 BODY ADD TEXT</Text>
</Row>
<Row Tag="TXT_KEY_SOCIALPOLICY_CONSUMERISM_HEADING3_TITLE">
<Text>Consumerism</Text>
</Row>
<Update>
<Where Tag="TXT_KEY_SOCIALPOLICY_HEADING1_BODY" />
<Set Text="Social Policies are branches of choices representing the way you choose to govern your people. Will you be an authoritarian ruler, sacrificing a little freedom for discipline and increased productivity? Will you organize your civilization to have a strong military, or will you concentrate your efforts on expanding culture and borders? Do you want to set up your civ as a monarchy or democracy? There are 12 different branches to choose from, each headlining a specific aspect of government.[NEWLINE][NEWLINE]Social policies have concrete effects for gameplay. Some increase your cities' production, while others generate more wealth, and still others help create a more effective military. There are no right or wrong policy choices in the game, and one policy may be better for a given circumstance than another, or better suit your personal playing style. Try them out and see.[NEWLINE][NEWLINE]Policies are arranged into 10 separate branches, each of which (once adopted) unlock a tree of five different policies. Unlocking these individual policies will give you the benefits described, and can even lead to a Cultural Victory." />
</Update>
</Language_en_US>
<!-- Update XML/BasicInfos/CIV5Concepts.xml with the below -->
<Concepts>
<Row>
<Type>CONCEPT_SOCIAL_POLICY_BRANCH_GREEN_SOCIETY</Type>
<Topic>TXT_KEY_TOPIC_SOCIALPOLICY</Topic>
<Description>TXT_KEY_SOCIALPOLICY_GREEN_SOCIETY_HEADING3_TITLE</Description>
<Summary>TXT_KEY_SOCIALPOLICY_GREEN_SOCIETY_HEADING3_BODY</Summary>
<AdvisorQuestion>TXT_KEY_SOCIALPOLICY_GREEN_SOCIETY_ADV_QUEST</AdvisorQuestion>
<Advisor>ECONOMIC</Advisor>
<CivilopediaHeaderType>HEADER_POLICIES</CivilopediaHeaderType>
</Row>
<Row>
<Type>CONCEPT_SOCIAL_POLICY_BRANCH_CONSUMERISM</Type>
<Topic>TXT_KEY_TOPIC_SOCIALPOLICY</Topic>
<Description>TXT_KEY_SOCIALPOLICY_CONSUMERISM_HEADING3_TITLE</Description>
<Summary>TXT_KEY_SOCIALPOLICY_CONSUMERISM_HEADING3_BODY</Summary>
<AdvisorQuestion>TXT_KEY_SOCIALPOLICY_CONSUMERISM_ADV_QUEST</AdvisorQuestion>
<Advisor>ECONOMIC</Advisor>
<CivilopediaHeaderType>HEADER_POLICIES</CivilopediaHeaderType>
</Row>
</Concepts>
</GameData>
I've got the 3 files OnModActivated/UpdateDatabase/>path< in place...
So what happens? Policy window does not open. Policies are listed in the civilopedia just fine... But trying to open the policy window either from the main window icon or the 'select policy' above the minimap, fails.
I've hit all the places where there is an ID (# or policy name) - Green Society is 10 and Consumerism is 11... in both the xml and lua...
I've compared all the size, anchor, offset, etc and _all_ the policy boxes in the xml & lua are the same... the only differences I can see are in the ID area and TXT_KEY stuff..
I'd really like to be able to add policy, not just replace them... So I'm asking for the super LUA/XML guys & gals to look this over and point me where I done did wrong!

One other thought I had, could it be stashed in the dll that there can _only_ be 10 policies?
Anyways, help appreciated!
Have to break this post up, character limit hit.. next post is the lua file I'm using in it's entirety...