FonziScheme
Chieftain
- Joined
- Aug 11, 2017
- Messages
- 6
I have no clue what I'm doing with Lua. However, the utility I found seemed like it was pretty self-explanatory. But I can't seem to get it working and am wondering if anyone might be able to figure out what I'm doing wrong.
First of all, I downloaded the Lua file, added it into the mod project and set VFS to true. I didn't use OnModActivated nor IngameUIaddin, only change is that VFS is set to true.
In my diplomacy_responses.xml file (set to OnModActivated, works fine for first greeting and defeat so far in regards to not using lua), I added the following under the <Language_en_US> tag.
include("UniqueDiplomacyUtilsV3.lua")
function FonziUniqueResponses()
local pActivePlayer = Players[Game.Get.ActivePlayer()]
local sLeaderType = GameInfo.Leaders[pActivePlayer:GetLeaderType()].Type
end
include("UniqueDiplomacyUtilsV3.lua")
function FonziUniqueResponses()
local pActivePlayer = Players[Game.GetActivePlayer()]
local sLeaderType = GameInfo.Leaders[pActivePlayer:GetLeaderType()].Type
if (sLeaderType -- "LEADER_ELIZABETH") then
ChangeDiplomacyResponse("LEADER_FONZI", "RESPONSE_FIRST_GREETING", "TXT_KEY_LEADER_FONZI_LIZ_FIRSTGREETING%")
end
end
include("UniqueDiplomacyUtilsV3.lua")
function FonziUniqueResponses()
local pActivePlayer = Players[Game.GetActivePlayer()]
local sLeaderType = GameInfo.Leaders[pActivePlayer:GetLeaderType()].Type
if (sLeaderType == "LEADER_ELIZABETH") then
ChangeDiplomacyResponse("LEADER_FONZI", "RESPONSE_FIRST_GREETING", "TXT_KEY_LEADER_FONZI_LIZ_FIRSTGREETING%")
end
end
FonziUniqueResponses()
What exactly am I missing?
First of all, I downloaded the Lua file, added it into the mod project and set VFS to true. I didn't use OnModActivated nor IngameUIaddin, only change is that VFS is set to true.
In my diplomacy_responses.xml file (set to OnModActivated, works fine for first greeting and defeat so far in regards to not using lua), I added the following under the <Language_en_US> tag.
<Row Tag="TXT_KEY_LEADER_FONZI_LIZ_FIRSTGREETING_1">
<Text>The lua worked!</Text>
</Row>
<Row Tag="TXT_KEY_LEADER_FONZI_LIZ_FIRSTGREETING_2">
<Text>The lua worked Dos!</Text>
</Row>
I then added the following to the bottom of the Lua file:<Text>The lua worked!</Text>
</Row>
<Row Tag="TXT_KEY_LEADER_FONZI_LIZ_FIRSTGREETING_2">
<Text>The lua worked Dos!</Text>
</Row>
include("UniqueDiplomacyUtilsV3.lua")
function FonziUniqueResponses()
local pActivePlayer = Players[Game.Get.ActivePlayer()]
local sLeaderType = GameInfo.Leaders[pActivePlayer:GetLeaderType()].Type
end
include("UniqueDiplomacyUtilsV3.lua")
function FonziUniqueResponses()
local pActivePlayer = Players[Game.GetActivePlayer()]
local sLeaderType = GameInfo.Leaders[pActivePlayer:GetLeaderType()].Type
if (sLeaderType -- "LEADER_ELIZABETH") then
ChangeDiplomacyResponse("LEADER_FONZI", "RESPONSE_FIRST_GREETING", "TXT_KEY_LEADER_FONZI_LIZ_FIRSTGREETING%")
end
end
include("UniqueDiplomacyUtilsV3.lua")
function FonziUniqueResponses()
local pActivePlayer = Players[Game.GetActivePlayer()]
local sLeaderType = GameInfo.Leaders[pActivePlayer:GetLeaderType()].Type
if (sLeaderType == "LEADER_ELIZABETH") then
ChangeDiplomacyResponse("LEADER_FONZI", "RESPONSE_FIRST_GREETING", "TXT_KEY_LEADER_FONZI_LIZ_FIRSTGREETING%")
end
end
FonziUniqueResponses()
What exactly am I missing?