Dynamic 2D Leaderscenes

Yep, you just add those fields to your leader's entry in that table and put in the name of your texture file. Like this:

<VV_LeaderSceneOverride>YourTextureHere.dds</VV_LeaderSceneOverride>

Ah, OK, that's simple enough. Thanks!

(I tried looking at your Neptune civs to see what you had used there, but it's all SQL... let's just say that SQL is my kryptonite. I can understand Lua better, and as a person with no background in programming whatsoever, I have a feeling that means something. :p )
 
Do I keep the <ArtDefineTag>Balalaika_Scene.xml</ArtDefineTag> tag?

I'm assuming yes, since I've now tried both with and without, and without is giving me the blank screen with "There is no Leaderscene loaded for this leader" you might expect. However, with that tag, I'm getting no change in leaderscene either:
Spoiler :



 
You still need ArtDefineTag, yeah. Well, I actually haven't tried a civ without it, but most of my Neptunia Civs just use a small black image for their leaderscene defined there.

What's likely is that either:
  • The SQL file adding the fields to the Leaders table is loading after your Leader definition file. It must come first in load order.
  • You didn't add in the XML file for the 2D Leaderscenes utility as a DiplomacyUIAddin

Edit: database and Lua logs will help here
 
Oh! Never mind, I figured it out! The VVLeaderHeadImageOverride.lua wasn't set to vfs=true. Thanks so much for the help, and for posting this tutorial, Vice!

Spoiler :




(And I would have included a screenshot of her Friendly leaderscene, but it's apparently nigh impossible to do that on a two-person map).
 
How might i go about making it so it changes by era? I've been looking through your code and i can't quite see how to change it from opinion to era.
 
How might i go about making it so it changes by era? I've been looking through your code and i can't quite see how to change it from opinion to era.

You'll need to write a function using pPlayer:GetCurrentEra() to get the player's current era, then return a texture based on what value that returns (such as GameInfoTypes.ERA_ANCIENT). Are you familiar with Lua?
 
Regarding dynamic leader scenes, how do you assign a special leader scene whenever a specific Decision (with E&D) is enacted?

Example:
Spoiler :
First Special Leaderscene logic for Son Gohan (Base and SSJ Form):
If the player is Vert and she has enacted the "Commission a BL Visual Novel Starring Son Gohan and 'Put Random Male Leader here', he is blushing (for the first time) he sees Vert.


I'm still learning Lua and also set up a second Special Leaderscene Logic, but I'm not sure if I coded it correctly:

Code:
--Second Special Leaderscene logic for Son Gohan (Base and SSJ Form):
--If the player is Blanc and she is at War with him, he is pissed at seeing her and shows the same face Blanc does when she's Hostile.
local iBlanc = GameInfoTypes.LEADER_VV_BLANC
local iWhiteHeart = GameInfoTypes.LEADER_VV_WHITE_HEART
local iBlancUD = GameInfoTypes.LEADER_VV_BLANC_ULTRA
local iWhiteHeartUD = GameInfoTypes.LEADER_VV_WHITE_HEART_ULTRA
function SonGohanSpecialLeadersceneAnger( iPlayer, iDiploUIState, szLeaderMessage, iAnimationAction, iData1 )
	local pPlayer = Players[iPlayer]
	local pActivePlayer = Players[Game:GetActivePlayer()]
	if pPlayer:GetLeaderType() == iSonGohan or pPlayer:GetLeaderType() == iSonGohanSSJ or pPlayer:GetLeaderType() == iSonGohanUltra or pPlayer:GetLeaderType() == iSonGohanSSJUltra and pActivePlayer:GetLeaderType() == iBlanc or pActivePlayer:GetLeaderType() == iWhiteHeart or pActivePlayer:GetLeaderType() == iBlancUD or pActivePlayer:GetLeaderType() == iWhiteHeartUD
	and Teams[pPlayer:GetTeam()]:IsAtWar(pActivePlayer:GetTeam()) then
		local iApproach = pActivePlayer:GetApproachTowardsUsGuess(iPlayer);
		if iApproach = MajorCivApproachTypes.MAJOR_CIV_APPROACH_WAR then
			return "SonGohanSceneDynamicWarBlanc.dds"
		end
	end

	return nil
end
Events.LoadScreenClose.Add(function () LuaEvents.AddFunctionToLeaderSceneTable(SonGohanSpecialLeadersceneAnger) end)

Hopefully, it's not too hard to make or it requires altering E&D.
 
Regarding dynamic leader scenes, how do you assign a special leader scene whenever a specific Decision (with E&D) is enacted?

Example:
Spoiler :
First Special Leaderscene logic for Son Gohan (Base and SSJ Form):
If the player is Vert and she has enacted the "Commission a BL Visual Novel Starring Son Gohan and 'Put Random Male Leader here', he is blushing (for the first time) he sees Vert.

The way you do this one is:

Spoiler :
you don't, because that decision is getting axed in Vert's next update and thus you'd be wasting your time :p

(It will be replaced by something which gives her back something resembling her current UA -- so that I can replace that UA with the "declare a City-State your little sister" UA she's been needing since the beginning)




I'm still learning Lua and also set up a second Special Leaderscene Logic, but I'm not sure if I coded it correctly:

Code:
--Second Special Leaderscene logic for Son Gohan (Base and SSJ Form):
--If the player is Blanc and she is at War with him, he is pissed at seeing her and shows the same face Blanc does when she's Hostile.
local iBlanc = GameInfoTypes.LEADER_VV_BLANC
local iWhiteHeart = GameInfoTypes.LEADER_VV_WHITE_HEART
local iBlancUD = GameInfoTypes.LEADER_VV_BLANC_ULTRA
local iWhiteHeartUD = GameInfoTypes.LEADER_VV_WHITE_HEART_ULTRA
function SonGohanSpecialLeadersceneAnger( iPlayer, iDiploUIState, szLeaderMessage, iAnimationAction, iData1 )
	local pPlayer = Players[iPlayer]
	local pActivePlayer = Players[Game:GetActivePlayer()]
	if pPlayer:GetLeaderType() == iSonGohan or pPlayer:GetLeaderType() == iSonGohanSSJ or pPlayer:GetLeaderType() == iSonGohanUltra or pPlayer:GetLeaderType() == iSonGohanSSJUltra and pActivePlayer:GetLeaderType() == iBlanc or pActivePlayer:GetLeaderType() == iWhiteHeart or pActivePlayer:GetLeaderType() == iBlancUD or pActivePlayer:GetLeaderType() == iWhiteHeartUD
	and Teams[pPlayer:GetTeam()]:IsAtWar(pActivePlayer:GetTeam()) then
		local iApproach = pActivePlayer:GetApproachTowardsUsGuess(iPlayer);
		if iApproach = MajorCivApproachTypes.MAJOR_CIV_APPROACH_WAR then
			return "SonGohanSceneDynamicWarBlanc.dds"
		end
	end

	return nil
end
Events.LoadScreenClose.Add(function () LuaEvents.AddFunctionToLeaderSceneTable(SonGohanSpecialLeadersceneAnger) end)

Hopefully, it's not too hard to make or it requires altering E&D.

This one should work as is, but you can skip checking for approach since you're already checking for the civ being at war with the active player beforehand.
 
The way you do this one is:

Spoiler :
you don't, because that decision is getting axed in Vert's next update and thus you'd be wasting your time :p

(It will be replaced by something which gives her back something resembling her current UA -- so that I can replace that UA with the "declare a City-State your little sister" UA she's been needing since the beginning)

One less Leaderscreen to worry about! (Sorry for being a bit off-topic, but I admit, it would've been amusing to see his reaction for it :lol: :crazyeye:)

This one should work as is, but you can skip checking for approach since you're already checking for the civ being at war with the active player beforehand

Really? That sounds good. Thanks for the reply!
 
Top Bottom