[RT] Creating Personality For New Sponsor - LUA Setup?

g02703

Chieftain
Joined
Apr 2, 2016
Messages
33
I pretty much understand the relationship between Civilization, Personality, PersonalityTrait, and PersonalityTraits_Perks. I am able to get my sponsor to show up on game setup, icon, and help text (which explains its unique trait).

I have the following basic markup: In CivBEPersonality_My_Sponsor.xml:

Spoiler :

<GameData>
<Personalities>
<Row>
<Type>PERSONALITY_MY_SPONSOR</Type>
<ScriptName>MySponsorPersonality</ScriptName>
<UniquePersonalityTrait>PERSONALITY_TRAIT_CHARACTER_CULTURE_A</UniquePersonalityTrait>
</Row>
</Personalities>

</GameData>


I'm simply using Franco-Iberia's personality as a template, only replacing the faction's name.

I'm keeping the UniquePersonalityTrait the same.

I also happened to create a script MySponsorPersonality.lua, and put the same exact code as what was in FrancoIberiaPersonality.lua.

Spoiler :

local Personality = hmake CvPersonalityScript{};

----------------------------------------------------
-- Constants
----------------------------------------------------
local VARIABLE_TRAIT_OPTIONS = {
--TODO
};

----------------------------------------------------
-- Methods
----------------------------------------------------
function Personality.OnInit(playerType : number)
end

return Personality;


I don't think the above does anything, really. They all look identical for all sponsors.

I configured CivBEPersonality_My_Sponsor.xml to build OnModActivated and to UpdateDatabase, like we're supposed to.

I also included MySponsorPersonality.lua - as InGameUIAddin, and Import into VFS False.

The game loads, however, I'm losing a lot of graphic elements - all water is gone, I can't see units, I can't see artifacts.

Is there anything wrong with my setup?

As aside questions:

1. How do you open both ModBuddy and FireTuner at the same time?
2. What are those log files that everybody talks about in FireTuner that might explain anything that went wrong?
 
Those scripts must be loaded as "Personality", not "InGameUIAddin" (you must type that manually).

However, these files are just empty blueprints that don't do anything, probably from earlier stages during development, reusing scripts from other sponsors will not cause any issues (unless of course the devs decide to fill those scripts with content at some point, which is unlikely).
 
Those scripts must be loaded as "Personality", not "InGameUIAddin" (you must type that manually).

However, these files are just empty blueprints that don't do anything, probably from earlier stages during development, reusing scripts from other sponsors will not cause any issues (unless of course the devs decide to fill those scripts with content at some point, which is unlikely).

What other "phantom" content types are there? Is there documentation somewhere?
 
What other "phantom" content types are there? Is there documentation somewhere?
Quest... QuestObjective... Personalities... PersonalityTraits... not sure if there are more "official" ones, but there are some others created and used by other modders - The "Type" is basically just a variable that other files can look for.


for questObjectiveScript in Modding.GetActivatedModEntryPoints("QuestObjective") do

will loop through all lua files that have been added as Type 'QuestObjective' and ignore all other lua files. See QuestSystem.lua for an example on how exactly it is used.
 
Back
Top Bottom