Uprising Empire

Uprising Empire 1.0.0

Hi,

np ask as many questions you want,

1) the building never disapear if it's conquered, I will try to find a way to fix that

2) free cities can revolt normally I think, but if you want them to revolt eaily without need to be in negative or even have separatism you could add "(pPlayer.IsFreeCities and pPlayer:IsFreeCities())" at line 1610 in UprisingEmpireUI.lua where :

if pPlayer:IsBarbarian() then
for _, pCity in pPlayer:GetCities():Members() do
if not Nodice and math.random(0,10) > 8 then
GetCulturalPresure(pCity)
OnSeparatistRevoltWin(pCity:GetX(), pCity:GetY(), 63, {})
end
end
return;
end

like

if (pPlayer.IsFreeCities and pPlayer:IsFreeCities()) and pPlayer:IsBarbarian() then
for _, pCity in pPlayer:GetCities():Members() do
if not Nodice and math.random(0,10) > 8 then
GetCulturalPresure(pCity)
OnSeparatistRevoltWin(pCity:GetX(), pCity:GetY(), 63, {})
end
end
return;
end

I didn't test it but it should work.
 
Hi Gueux
The mod is broken on the latest version of civ6. Autoplay 60 turns on standard and clicking on big blue "make a dedication button" in the bottom right does nothing. No errors in log just this message:
UprisingEmpireUI: SoundToPlay
UprisingEmpireUI: SoundToPlay
UprisingEmpireUI: SoundToPlay
UprisingEmpireUI: SoundToPlay
UprisingEmpireUI: SoundToPlay
NotificationPanel: NOTIFICATION_COMMAND_UNITS
NotificationPanel: Notififcation Done
NotificationPanel: NOTIFICATION_COMMEMORATION_AVAILABLE
NotificationPanel: Notififcation Done
UprisingEmpireUI: Phase has Begun
EraCompletePopup: PopupManager.LOCK 'EraCompletePopupXP2', id: 2193781, priority:1000
EraCompletePopup: START EraPopupAnimation
EraCompletePopup: START EraPopupAnimation
EraCompletePopup: PopupManager.Unlock 'EraCompletePopupXP2', id: 2193781, priority:1000
UprisingEmpireUI: SoundToPlay
NotificationPanel: NOTIFICATION_CHOOSE_CIVIC
NotificationPanel: Notififcation Done
NotificationPanel: NOTIFICATION_GOVERNOR_APPOINTMENT_AVAILABLE
NotificationPanel: Notififcation Done
NotificationPanel: NOTIFICATION_CIVIC_DISCOVERED
NotificationPanel: Notififcation Done
 
I don't know what could cause this, can you try this version

I remove the help building of country that shouldn't have it and I modified how the notification are created cause it wasn't updated since 1 year.
 

Attachments

  • Uprising Empire.rar
    57.4 KB · Views: 106
Cool Gueux you fixed it! Brilliant job in such a short time. I'll do an autoplay through 500 turns. The mod was performing great with the help of some mods to boost the AI. The memory leak is still there but only if you play one session all 500 turns.
 
In latest version, if a city is razed and you have loyalty banners on you get this error:
UprisingEmpireUI: Turn :117 free city change owner at55.29
Runtime Error: C:\Users\Harry\Documents\My Games\Sid Meier's Civilization VI\Mods\Uprising Empire\UI\CityBanners\UprisingEmpireUI.lua:3393: attempt to index a nil value
stack traceback:
C:\Users\Harry\Documents\My Games\Sid Meier's Civilization VI\Mods\Uprising Empire\UI\CityBanners\UprisingEmpireUI.lua:3393: in function 'OnSeparatistRevoltWin'
C:\Users\Harry\Documents\My Games\Sid Meier's Civilization VI\Mods\Uprising Empire\UI\CityBanners\UprisingEmpireUI.lua:1609: in function 'RevoltType'
C:\Users\Harry\Documents\My Games\Sid Meier's Civilization VI\Mods\Uprising Empire\UI\CityBanners\UprisingEmpireUI.lua:784: in function 'InitializeEachTurn'
 
I don't know if it's linked to the razed city, I don't have anything at line 3393, and is the razed city at X 55 Y 29 ?
 
I don't know if it's linked to the razed city, I don't have anything at line 3393, and is the razed city at X 55 Y 29 ?

Not sure, the city was completely wiped from the map. Only thing left was the loyalty banner :)

Here is another:
UprisingEmpireUI: BuildBuilding table: 000000025406AF60 85 false true
Runtime Error: C:\Users\Harry\Documents\My Games\Sid Meier's Civilization VI\Mods\Uprising Empire\UI\CityBanners\UprisingEmpireUI.lua:764: operator .. is not supported for string .. nil
stack traceback:
C:\Users\Harry\Documents\My Games\Sid Meier's Civilization VI\Mods\Uprising Empire\UI\CityBanners\UprisingEmpireUI.lua:764: in function 'InitializeEachTurn'
 
Not sure, the city was completely wiped from the map. Only thing left was the loyalty banner :)

Here is another:
UprisingEmpireUI: BuildBuilding table: 000000025406AF60 85 false true
Runtime Error: C:\Users\Harry\Documents\My Games\Sid Meier's Civilization VI\Mods\Uprising Empire\UI\CityBanners\UprisingEmpireUI.lua:764: operator .. is not supported for string .. nil
stack traceback:
C:\Users\Harry\Documents\My Games\Sid Meier's Civilization VI\Mods\Uprising Empire\UI\CityBanners\UprisingEmpireUI.lua:764: in function 'InitializeEachTurn'
Fixed it by adding this line:

Line 761:
if pCapitalCity then
BuildBuilding(GameInfo.Buildings["BUILDING_NEW_CIV_HELP"].Index, {pCapitalCity:GetOwner(), pCapitalCity:GetID()}, false, true)
local cityKey = pCapitalCity:GetX().."."..pCapitalCity:GetY();--glider1
SaveToSlot("cityHasHelpBuilding"..cityKey, false);
end
 
Hi, I forgot the cityKey, but did you fix the razed city problem? is it you who raze or an AI?
 
Hi, I forgot the cityKey, but did you fix the razed city problem? is it you who raze or an AI?
It was a one off never seen it again. AI razed the city. I'll definitely keep an eye on it. Latest version is working well through 500 turn autoplay and I'm now doing a handplay as well.
 
This one has got me beat any ideas?

Runtime Error: C:\Users\Harry\Documents\My Games\Sid Meier's Civilization VI\Mods\Uprising Empire\UI\Notification\NotificationPanel_MN.lua:32: attempt to index a nil value
stack traceback:
C:\Users\Harry\Documents\My Games\Sid Meier's Civilization VI\Mods\Uprising Empire\UI\Notification\NotificationPanel_MN.lua:32: in function 'NotificationManager.Find'
D:\Steam\steamapps\common\Sid Meier's Civilization VI\Base\Assets\UI\Panels\NotificationPanel.lua:1594: in function 'OnNotificationAdded'
[C]: in function 'func'
[C]: in function '(anonymous)'
 
add this

if not notificationEntry then
return;
end


in NotificationPanel_MN before line 32, should look like :

function NotificationManager.Find(playerID, notificationID)
local pNotification = BASE_NotificationManager_Find(playerID, notificationID)
if not pNotification then
local notificationEntry = GetNotificationEntry( playerID, notificationID );
if not notificationEntry then
return;
end
local kNotificationCustom = notificationEntry.m_PlayerID.."."..notificationID;
pNotification = pNotificationTable[kNotificationCustom];
end
return pNotification;
end


and

if pTopNotification and pTopNotification.IsCustom then

at line 53, should look like :

function TryDismissCustomNotificationStack( playerID:number, notificationID:number )
local pTopNotification = NotificationManager.Find( playerID, notificationID );
if pTopNotification and pTopNotification.IsCustom then
for k,pNotification in pairs (pNotificationTable) do
if pNotification:CanUserDismiss() and pTopNotification:GetTypeName() == pNotification:GetTypeName() then
OnNotificationDismissed( pNotification:GetPlayerID(), pNotification:GetID() )
pNotificationTable[k] = nil
end
end
end
end


if you have any problem with notifications after this I'll look what's the problem but for now it should do the trick
 
Last edited:
I found this building in my faith production queue:
upload_2020-7-30_19-36-34.png


Currently trying to work out how to stop it. I don't see any lua code for it. I think you were intending it to give a newly spawned civ a chance. Will all AI's choose it every turn since it costs 0 faith?
 
Hi, I didn't notice that :/, does setting MaxPlayerInstances to 0 fix it? to do it go in UprisingEmpireData.sql at line 52 and set 0 where it's -1 should look like :
INSERT INTO Buildings (
BuildingType,
Name,
Cost,
MaxPlayerInstances,
MaxWorldInstances,
Capital,
PrereqDistrict,
Description,
RequiresPlacement,
RequiresRiver,
Housing,
Entertainment,
EnabledByReligion,
AllowsHolyCity,
MustPurchase,
Maintenance,
IsWonder,
OuterDefenseStrength,
MustBeLake,
MustNotBeLake,
RegionalRange,
AdjacentToMountain,
ObsoleteEra,
RequiresReligion,
GrantFortification,
DefenseModifier,
InternalOnly,
RequiresAdjacentRiver,
MustBeAdjacentLand,
AdjacentCapital,
UnlocksGovernmentPolicy
)
VALUES (
'BUILDING_NEW_CIV_HELP',
'HELP NEW CIV',
'1',
'0',
'-1',
'0',
'DISTRICT_CITY_CENTER',
'HELP NEW CIV',
'0',
'0',
'0',
'5',
'0',
'0',
'1',
'0',
'0',
'0',
'0',
'0',
'10',
'0',
'NO_ERA',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0'
);
you need to reload your any save to make it work.

if you want to destroy every illegal building you could, in UprisingEmpireUI.lua at line 1634 :

if (loadSlot("cityHasHelpBuilding"..cityKey) and pCity ~= pPlayerCapital) or not loadSlot("cityHasHelpBuilding"..cityKey) then
 
Thanks Gueux max instances to 0 fixed it. Easy mistake to make. Thanks for the suggestions on how to delete them from the other players. I'll not worry about it. By the way the development version of this mod (not released yet) has thrown no errors at all it has been perfect so far other than this building bug playing it by hand.
 
I got an interesting situation where Firaxis code and your mod are working towards the same end but the Firaxis code will probably flip the city first!

upload_2020-7-31_7-12-26.png


I like how your mod overlays Firaxis code but doesn't replace it. It could get confusing for players though but I like it. In the above shot the Firaxis code will flip the city but yours will not!:) It means there are even more revolt possibilities.
 
I could add an option button to deactivate the loyalty may be
 
Last edited:
I reloaded the screen shot above, refresh it and take a look. It shows your culture values verses Firaxis. I think in this situation it could be because I play with another mod that increases city distances to 5 but also adjusts the pressure radius.

EDIT: I don't like the idea of deactivating the firaxis code. It means that there are a lot of systems and policy choices that become irrelevant
 
Last edited:
Top Bottom