Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
So obviously the game developers trigger this official OnCityPopulationChanged event now also when a unit is created... but why.. and how to know if it was triggered because of a unit, instead of new pop...
My first idea would be to test if maybe the developers added an additional information to this event, which I currently do not check.
So you could try to edit the NotificationSlide.lua and search for this function:
function OnnCityPopulationChanged( playerID, cityID, NewAmount)
if PrintSetting.Value then
print("OnCityPopulationChanged: "..tostring(playerID).." "..tostring(cityID).." "..tostring(NewAmount));
end
OnAddNotification("NEWPOP", playerID, cityID, nil, NewAmount);
end
and change it to:
function OnnCityPopulationChanged( playerID, cityID, NewAmount, a, b)
if PrintSetting.Value then
print("OnCityPopulationChanged: "..tostring(playerID).." "..tostring(cityID).." "..tostring(NewAmount).." "..tostring(a).." "..tostring(b));
end
OnAddNotification("NEWPOP", playerID, cityID, nil, NewAmount);
end
I added a and b within the brackets and within the print statement to test if there are more values.
Test it again with this change and show me the log when creating a unit shows the notification.
I guess it will look like this:
NotificationSlide: OnCityPopulationChanged: 0 65536 2 nil nil
but maybe one of them is not nil. If so, show me this line from a real newpop vs a "fake" newpop
anything else i can try?
I made a new thread at civfanatics, maybe there someone knows more =/
https://forums.civfanatics.com/threads/oncitypopulationchanged-event-fires-for-training-units-in-gs.645191/