WHoward's Pick 'N' Mix Mods

It probably still won't work :(

Units parked on mountains take 50hp damage a turn, and it takes more than two turns to build a tunnel
 
Mmmmh! This might be, as I tweaked the attributes, so that the tunnel creation only took 2 turns.
Maybe its possible to set unit strength to max_int as soon as tunnel creation starts? Of course this would make it impossible to destroy it once it starts.
THis can be done in the LUA part, I guess.
 
OK, a small LUA function does solve this problem. The code below is to be added in the "UnitsTBM.LUA" file.

Things to mention:
a.) The damage modifier of 50hp when parked on mountains is constant here, as I haven't found the related define. It may conflict with mods modifying this value.
b.) the code doesn't prevent that the damage is aplied, but its corrects it after it is applied
c.) if the unit already has a damage higher than 50 it will be destroyed, as the damage is corrected AFTER it will be applied, but than the unit already is killed. Haven't found a way to prevent that. A possible way, may be, to temprarily change the plottype to hills at the end of the turn and change it back to mountain at the begin. But this will allow the AI to rate it as passable terrain.


So, this isn't perfect and it's enough for me to use. Nevertheless, any ideas to improve it, are welcome.


PHP:
function onActivePlayerTurnStart()
	print("TBM: onActivePlayerTurnStart()")
	local iPlayerID = Game.GetActivePlayer()
	local pPlayer = Players[iPlayerID]
	for pUnit in pPlayer:Units() do
		if (pUnit:GetUnitType() == GameInfoTypes["UNIT_TBM"]) then
			local pPlot = pUnit:GetPlot()
			if (pPlot:GetPlotType() == PlotTypes.PLOT_MOUNTAIN) then
				pUnit:SetDamage(pUnit:GetDamage()-50)
			end
		end
	end
end
Events.ActivePlayerTurnStart.Add(onActivePlayerTurnStart)
 
Just a question on one of the mods "City Happiness" How is that susposed to work?
All i get is diplo menu on the 1st thing; clicked on it and nothing happens.
 
The City Happiness menu in the Diplo Corner should bring up this screen - http://www.flickr.com/photos/whoward69/7576428574/in/set-72157629242283669 (also clicking on the happiness number in the Top Panel should do it)

If not, check for messages in the Lua.log file

When i get another game going i'll click on the face to hope it works.
Do i have to look in the log file? last time i posted the log file on IGE...long long long log file...
If it doesn't want to play nice i'll just turn it off that mod.
Thank you anyways.
i clicked on the happy/unhappy face and no such popup. So i just turned that mod off on it anyways.
 
Do i have to look in the log file?
Well without knowing if there are any problems in there it's going to be impossible to fix it!

Have you tried without IGE?
 
Without IGE is playing a normal game. Heres the Log File:
Spoiler :
[3321.510] \Users\`\Documents\My Games\Sid Meier's Civilization 5\MODS\More Buildings (v 1)\main: Assigning ski slopes
[3329.201] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3337.454] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
stack traceback:
[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: in function 'LocalUnhappiness'
[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:106: in function 'GetCoreCities'
[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:17: in function 'GetPlayerBuildingsHappiness'
[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:502: in function 'OnBuildingsButton'
[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:480: in function <[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:474>
[3338.592] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
stack traceback:
[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: in function 'LocalUnhappiness'
[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:106: in function 'GetCoreCities'
[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:17: in function 'GetPlayerBuildingsHappiness'
[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:502: in function 'OnBuildingsButton'
[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:480: in function <[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:474>
[3338.842] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
stack traceback:
[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: in function 'LocalUnhappiness'
[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:106: in function 'GetCoreCities'
[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:17: in function 'GetPlayerBuildingsHappiness'
[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:502: in function 'OnBuildingsButton'
[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:480: in function <[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:474>
[3343.881] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
stack traceback:
[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: in function 'LocalUnhappiness'
[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:106: in function 'GetCoreCities'
[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:17: in function 'GetPlayerBuildingsHappiness'
[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:502: in function 'OnBuildingsButton'
[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:480: in function 'OnHappiness'
[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:591: in function 'call'
[string "Assets\UI\InGame\WorldView\DiploCorner.lua"]:56: in function <[string "Assets\UI\InGame\WorldView\DiploCorner.lua"]:53>
[3345.129] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:740: attempt to call method 'GetMaxHitPoints' (a nil value)
[3345.145] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3345.176] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:740: attempt to call method 'GetMaxHitPoints' (a nil value)
[3350.745] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:740: attempt to call method 'GetMaxHitPoints' (a nil value)
[3350.745] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:740: attempt to call method 'GetMaxHitPoints' (a nil value)
[3353.319] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:740: attempt to call method 'GetMaxHitPoints' (a nil value)
stack traceback:
[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:740: in function 'OnCityViewUpdate'
[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:2310: in function <[string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:2308>
[3356.283] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:740: attempt to call method 'GetMaxHitPoints' (a nil value)
[3356.314] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3356.330] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3358.561] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:740: attempt to call method 'GetMaxHitPoints' (a nil value)
[3358.576] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3358.607] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:740: attempt to call method 'GetMaxHitPoints' (a nil value)
[3375.440] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:740: attempt to call method 'GetMaxHitPoints' (a nil value)
[3375.471] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:740: attempt to call method 'GetMaxHitPoints' (a nil value)
[3377.702] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:740: attempt to call method 'GetMaxHitPoints' (a nil value)
[3377.749] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:740: attempt to call method 'GetMaxHitPoints' (a nil value)
[3380.604] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:740: attempt to call method 'GetMaxHitPoints' (a nil value)
[3380.650] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:740: attempt to call method 'GetMaxHitPoints' (a nil value)
[3380.962] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:740: attempt to call method 'GetMaxHitPoints' (a nil value)
[3381.025] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:740: attempt to call method 'GetMaxHitPoints' (a nil value)
[3383.833] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:740: attempt to call method 'GetMaxHitPoints' (a nil value)
[3383.848] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:740: attempt to call method 'GetMaxHitPoints' (a nil value)
[3385.065] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:740: attempt to call method 'GetMaxHitPoints' (a nil value)
[3385.096] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3385.112] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3389.293] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3389.574] CultureMain: -------------------------------------
[3389.574] CultureMain: Your turn execution time = 73.814
[3389.574] CultureMain: -------------------------------------
[3389.574] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3389.761] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3390.010] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3390.291] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3390.541] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3390.775] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3391.024] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3391.258] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3391.477] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3391.617] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3393.162] InfoAddictDataManager: INFO: Saving player stats took 0.195s to complete (6 inserts).
[3393.177] InfoAddictDataManager: INFO: Updating the historical data table with 0 turns took 0s to complete (0 queries)

Spoiler :
[3396.204] CultureMain: -------------------------------------
[3396.204] CultureMain: Your turn execution time = 3.01
[3396.204] CultureMain: -------------------------------------
[3396.204] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3396.344] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3396.594] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3396.703] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3396.921] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3397.155] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3397.389] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3397.483] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3397.608] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3397.732] Runtime Error: [string "C:\Users\`\Documents\My Games\Sid Meier's C..."]:267: attempt to call method 'GetLocalHappiness' (a nil value)
[3398.450] InfoAddictDataManager: INFO: Saving player stats took 0.451s to complete (6 inserts).
[3398.481] InfoAddictDataManager: INFO: Updating the historical data table with 1 turns took 0s to complete (1 queries).
 
At a guess you're not playing with G&K as that GetLocalHappiness() method appears to be only in the G&K version of pCity :(

And unfortunately it's not easy/sensible to rewrite it in Lua, so I'll have to flag the mod as "G&K only" :(
 
At a guess you're not playing with G&K as that GetLocalHappiness() method appears to be only in the G&K version of pCity :(

And unfortunately it's not easy/sensible to rewrite it in Lua, so I'll have to flag the mod as "G&K only" :(
Vanilla only MODS.
 
Vanilla only MODS.

Sorry, don't understand that.

You're playing G&K but only with vanilla mods?
Or you want all mods to be compatible with vanilla?

The latter will never be true while Firaxis add functions to the G&K code base but don't put them in vanilla - which is the case with the method this mod requires.
 
Every time i start to play a game i turn off the G&K DLC.
I gave up waiting for Firaxis/2K to fix the crashing on modded games on G&K. I only use Vanilla mods only.

There are mods on the pick-n-mix that i like and still work.
 
I gave up waiting for Firaxis/2K to fix the crashing on modded games on G&K. I only use Vanilla mods only.

I think you're confused. There is no bug to fix as G&K works just fine with mods. You are probably experiencing crashes because you are using mods made for vanilla in G&K. This has nothing to do with Firaxis. It's up to the individual mod creator to update his mod to be compatible with G&K.
 
I am not sure why I have not seem this humongous collection of amazing mods before, but at least I have now.!

Thanks ever so much in their creation and then sharing them with us.

It was not just finding this section but then....

http://www.picknmixmods.com/main/home/home.html

...to give a little more information on the functionality of each of your mods.

By the time that I has finished reading, adding and then enabling each of them I seem to have ran out of time to start a game before I need to get tea ready.!

Thanks again for sharing your work :)
 
I think you're confused. There is no bug to fix as G&K works just fine with mods. You are probably experiencing crashes because you are using mods made for vanilla in G&K. This has nothing to do with Firaxis. It's up to the individual mod creator to update his mod to be compatible with G&K.

Right... the mods i used were all G&K crashes from early in the game to later. 50-75 turns: crash. reboot last save: crashes in 10 turns or less. I ain't confused but i ran out of patience.
 
Right... the mods i used were all G&K crashes from early in the game to later. 50-75 turns: crash. reboot last save: crashes in 10 turns or less. I ain't confused but i ran out of patience.

But, again, I think you're missing the point. If the mods crash in G&K and not in Vanilla then you are using mods made for Vanilla not G&K. The crash has nothing to do with G&K itself, you are simply using the wrong mod for a G&K. In order for it not to crash the mod has to have been specifically made or updated for G&K. There is no patience involved and it's not a Firaxis issue. You have to check if the mods you are using are compatible with G&K in the first place.
 
But, again, I think you're missing the point. If the mods crash in G&K and not in Vanilla then you are using mods made for Vanilla not G&K. The crash has nothing to do with G&K itself, you are simply using the wrong mod for a G&K. In order for it not to crash the mod has to have been specifically made or updated for G&K. There is no patience involved and it's not a Firaxis issue. You have to check if the mods you are using are compatible with G&K in the first place.

I checked my mods i used: i checked it twice, i checked it 3 times, and i EVEN checked it 50 times of the mods that i use. If it was the mods at all they game would crash before it loaded. Or some kind of glitch in 1st few turns. Just like how Building for Made Fun and Echoes of Ages enabled in a game won't start.

But 50 turns in the game and its to crash? By the way; In the 2k forums people have also experienced G&K games crashing modded or not. That says its more G&K is not suit well for modded games. My frustration with G&K reached a boiling point. Don't try to convince me its my fault. Don't try to push blame on people who created the mods.
The ones that created a faulty version of G&K to not work well with mods or in a normal game; the fault lies on 2k and firaxis.
 
As the current posts have no direct relevance to my mods, could I request that any further discussion is continued in the main forum in a dedicated thread - thanks
 
Top Bottom