PlayerCanTrain & Loadscreen text

Machiavelli24

Mod creator
Joined
May 9, 2012
Messages
818
I've been having two issues and I wanted to know if anyone else has seen something similar.

1. The PlayerCanTrain event doesn't seem to be implemented in Beyond Earth. I've added a function that just prints a line when the event fires and the text is never printed. No errors in the logs and I know my lua file is being run. It seems to either be failing silently or isn't implemented by the C++.

Code:
function OnGameStartTest(isLoadGame)
	print("Game start event fired, isLoadGame: " .. tostring(isLoadGame));
end
Events.SerialEventGameInitFinished.Add(OnGameStartTest);
Code:
function CityTrainTest(playerID, cityID, unitID)	
	print("in city can train unitID: " .. tostring(unitID));

	return true;
end
GameEvents.CityCanTrain.Add(CityTrainTest);
Code:
function PlayerTrainTest(playerID, unitID)	
	print("in player can train unitID: " .. tostring(unitID));

	return true;
end
GameEvents.PlayerCanTrain.Add(PlayerTrainTest);

2. How do you change the text that shows up on the load screen? It looked like the UI used whatever was in Civilizations table IntroductionQuote column to get a set of strings. I changed the table and added a couple of strings. It worked once and then never worked again.

Code:
UPDATE Civilizations SET IntroductionQuote = 'TXT_KEY_EOE_INTRO_MESSAGE_%';

INSERT INTO Language_en_US(Tag, Text) VALUES
('TXT_KEY_EOE_INTRO_MESSAGE_1',		'blah blah 1'),
('TXT_KEY_EOE_INTRO_MESSAGE_2',		'stuff stuff 2');

I can see the Intro quote column being different in the database.
 
Top Bottom