Ryoga
King
- Joined
- Oct 12, 2010
- Messages
- 993
So lately I've been messing with Gameinfo and I tried to find ways to retrieve and change data in its tables.
At first it was promising, it seemed to be quite easy, but then I reached a wall with tables related to leader dialogs.
As an example, this is the testing code that I created:
Related XML codes:
I used exactly the same method for both "Technologies" and "Diplomacy_Responses".
In both cases the system to retrieve data is correct as it gives the correct result on the print (the row's ID on Diplomacy_Responses is indeed 655).
However while in the case of "Technologies" both in the game and on Live Tuner the selected entry is correctly replaced with "Test String", absolutely nothing happens with "Diplomacy_Responses", not even an error notification and the default line "TXT_KEY_GENERIC_INFLUENTIAL_ON_AI%" is given instead.
Just why?
And let's suppose that I want to find another way to change an entry on "Diplomacy_Responses" or directly on the line on "Language_en_US" (which seems to be even harder as it isn't even a table in GameInfo), what should I do?
At first it was promising, it seemed to be quite easy, but then I reached a wall with tables related to leader dialogs.
As an example, this is the testing code that I created:
Code:
GameInfo.Diplomacy_Responses[655].Response = "Test String"
local temp = GameInfo.Diplomacy_Responses[655].Response
GameInfo.Technologies[0].Description = "Test String"
local temp2 = GameInfo.Technologies[0].Description
print( "This mod is working and: "..temp .." and " ..temp2)
Related XML codes:
Code:
<Row LeaderType="GENERIC">
<ResponseType>RESPONSE_INFLUENTIAL_ON_AI</ResponseType>
<Response>TXT_KEY_GENERIC_INFLUENTIAL_ON_AI%</Response>
</Row>
Code:
<Row>
<ID>0</ID>
<Type>TECH_AGRICULTURE</Type>
<Cost>20</Cost>
<Description>TXT_KEY_TECH_AGRICULTURE_TITLE</Description>
<Civilopedia>TXT_KEY_TECH_AGRICULTURE_DESC</Civilopedia>
<Help>TXT_KEY_TECH_AGRICULTURE_HELP</Help>
<Era>ERA_ANCIENT</Era>
<Trade>true</Trade>
<GoodyTech>true</GoodyTech>
<GridX>0</GridX>
<GridY>5</GridY>
<Quote>TXT_KEY_TECH_AGRICULTURE_QUOTE</Quote>
<PortraitIndex>0</PortraitIndex>
<IconAtlas>TECH_ATLAS_1</IconAtlas>
<AudioIntro>AS2D_TECH_AGRICULTURE</AudioIntro>
<AudioIntroHeader>AS2D_HEADING_TECH_AGRICULTURE</AudioIntroHeader>
</Row>
I used exactly the same method for both "Technologies" and "Diplomacy_Responses".
In both cases the system to retrieve data is correct as it gives the correct result on the print (the row's ID on Diplomacy_Responses is indeed 655).
However while in the case of "Technologies" both in the game and on Live Tuner the selected entry is correctly replaced with "Test String", absolutely nothing happens with "Diplomacy_Responses", not even an error notification and the default line "TXT_KEY_GENERIC_INFLUENTIAL_ON_AI%" is given instead.
Just why?
And let's suppose that I want to find another way to change an entry on "Diplomacy_Responses" or directly on the line on "Language_en_US" (which seems to be even harder as it isn't even a table in GameInfo), what should I do?