Thalassicus / cep-bnw

Civ V Communitas Expansion Pack
32 stars 22 forks source link

CS Unit Gifting Notification Fails #76

Open bhearsum opened 10 years ago

bhearsum commented 10 years ago

(formerly: random unit spawn)

I've been experienced this since I started using cep-bnw (but not in the old gem mods).

The basic problem is that I have random unit spawns. For example, while I'm constructing a building in a city a Knight will spawn there. Sometimes it seems like the unit that spawns is the same as the last unit I previously built there -- but I'm not sure if it's like that 100% of the time.

I've seen this happen with various unit types, various leaders, and in both my capital and non-capital cities.

GrantSP commented 10 years ago

Could you provide your logs and perhaps a saved game? I don't believe anyone else has experienced this.

Is this with any other mods loaded?

Thalassicus commented 10 years ago

Are you certain these are not units gifted by military citystates?

bhearsum commented 10 years ago

No other mods involved. I'm happy to send logs & and a save - I'll try to do that later today. How do I enable logging/where do I find the logs?

I'm pretty certain they aren't from city states simply because there's no "XXX has given you a new unit" alert when it happens (but I do get alerts from real city state gifts in the same game). I think (but need to double check) that these units spawn in the city itself instead of just outside a city like city state gifts.

bhearsum commented 10 years ago

Here's a save: http://hearsum.ca/~bhearsum/Pocatello_0166%20AD-1060.Civ5Save

A few turns before this I had a Knight spawn in Moson Kahni (one of the ones that's now north of it).

GrantSP commented 10 years ago

I played this saved game for another 50 turns. No new units arrived, other than ones from my allied CSs. There are no strange messages or errors in the logs so I am at a loss as to where they are coming from.

PS. After liberating Valletta and smashing Spain into the ground, The Celts came knocking and took 2 cities within about 5 turns of me taking Seville. Ah well.

bhearsum commented 10 years ago

Haha, you did better than me - I was struggling with Spain.

So, I'm happy to try to reproduce this again on my own. Where can I get the log that you're looking for? Is it just the in game "notification log"?

GrantSP commented 10 years ago

Have a look at this. Solving Bugs

bhearsum commented 10 years ago

OK, I repro'ed in a different save, I'll upload the save I started from and one from immediately after this occurred. A few turns after I started playing I had an arquebusier appear near Washakie (in the tile southwest of it). I got a notification for this. Later (15-20 turns) I had a galleon appear in Moson Kahni with no notification that it was from a city state.

Interestingly, I see no record of the arquebruiser in lua.log, but the galleon shows up as a "CustomNotification" even though I never received one...

Before save: http://hearsum.ca/~bhearsum/Pocatello_0187%20AD-1270.Civ5Save After save:http://hearsum.ca/~bhearsum/Pocatello_0205%20AD-1450.Civ5Save Lua.log: http://hearsum.ca/~bhearsum/Lua.log

GrantSP commented 10 years ago

I am in the middle, actually near the end, of another game and I have just had this happen to me. I just had a GoldenAge finish and several cities completed their projects when a Gunship appeared in my capital along with a notification of a "Unit has gained enough experience for a promotion". The Gunship being that unit.

The log shows this entry: [692950.263] MT_Initialize: WARN Turn 338 CustomNotification name='CSUnitReward' tip='New Helicopter Gunship' text='A new Helicopter Gunship arrived in your [ICON_CAPITAL] Capital from your militaristic [ICON_CITY_STATE] City-State allies.'

So the problem appears to be in the Custom Notifications. The FireTuner panel GameUI shows no popups hidden behind anything so it is just not triggering.

EDIT: Ok, 4 or 5 turns later I get another unit but this time it is with a notification popup. Seems to back up the idea the CustomNotifications is not handling ALL the incoming notifications. In my case I would say the Golden Age end and the city project completions messed with the CSUnitReward.

skodkim commented 10 years ago

Playing a game with 3.10.2 right now and I have long had a feeling that something was wrong with custom notifications here.

\Skodkim

bhearsum commented 10 years ago

Hooray, I'm not crazy! Does this mean that the events are valid, and just not being reported properly? Let me know if there's anything else I can do to help here.

GrantSP commented 10 years ago

The events are valid, you are receiving Unit gifts from CS. It is the event notifications not being properly handled. As to you not being crazy? Well...

stackpoint commented 10 years ago

Looks like the function GiveCSNewYields() in Cat_Events.lua handles a modified CS Unit Gifting.

CustomNotification.lua seems to be disabled and the CustomNotification() function has been simplified to basically Events.GameplayAlertMessage which is the top centered white background text.