DLL - Various Mod Components

Did you see that in fire tuner? Because I see nothing in fire tuner.

Keep in mind that there is a known issue with Firetuner sometimes not playing nice with GameInfo events. If an error occurs, Firetuner won't display the message and leaves you scratching your head.

I occasionally have to do the following as described in this thread to double check my work.
http://forums.civfanatics.com/showthread.php?t=485607
 
Not hard at all (in fact it's in the next version of my DLL mods - which is waiting for Firaxis to release the code for 1.0.2.21)



Anyone wanting to do this themselves, the code is in CvPlayerAI::AI_conquerCity() near the end, and you need to change

Code:
if ([COLOR="red"][B]IsEmpireUnhappy()[/B][/COLOR] || (GC.getMap().GetAIMapHint() & 2) || (GetPlayerTraits()->GetRazeSpeedModifier() > 0 && getNumCities() >= 3 + (GC.getGame().getGameTurn() / 100)) )

to

Code:
if ([COLOR="Red"][B](isMinorCiv() ? IsEmpireVeryUnhappy() : IsEmpireUnhappy())[/B][/COLOR] || (GC.getMap().GetAIMapHint() & 2) || (GetPlayerTraits()->GetRazeSpeedModifier() > 0 && getNumCities() >= 3 + (GC.getGame().getGameTurn() / 100)) )

W


Legend legend! you are. I have been trying to find a way for city states to never raze cities. it has taken years but finally someone with a solution. Thank you ....

so, if i set everything to 0 and edit the code as above , city states will always puppet conquered cities ??,just confirming if anyone here has tried that.

Any chance , someone knows of a single mod that does that , please and thanks. I'm jist worried that all these other dll components might affect my game that has a lot of other mods applied to it. a dozen or so.

Thanks again chief, awesome.
 
Easiest way if you want minors to never raze, even if they are at -1000 happy, just change it to

Code:
(isMinorCiv() ? [B][COLOR="Red"]false[/COLOR][/B] : IsEmpireUnhappy()) ...

messing with the rest of the line will confuse the AI majors
 
I'm jist worried that all these other dll components might affect my game that has a lot of other mods applied to it. a dozen or so.

Thanks again chief, awesome.

Edit the CustomModOptions.xml file and change all the values to be 0 except for CS_RAZE_RARELY - that'll switch all the other changes off
 
Edit the CustomModOptions.xml file and change all the values to be 0 except for CS_RAZE_RARELY - that'll switch all the other changes off

...and this modularity and forward thinking is why I take my hat off to you as I also became alarmed about what might break until I realized what this file actually did.

Bravo :hatsoff:
 
Think I'll put

"as that should switch all the other changes off"

;)

If you have an SQL file in your mod, the easy way to do this is as

Code:
UPDATE CustomModOptions SET Value=0 WHERE Class>2;

which will leave the API and bug-fixes enabled, if you want to disable those as well (although some can't be disabled as they are so minor)

Code:
UPDATE CustomModOptions SET Value=0 WHERE Class>0;

which just leaves the default data values unchanged
 
Awesome, thanks.I just modified them and going for a test drive now.


Any chance one of you lads are aware and know why there is no animation for player 1 in hotseat ?.
 
This lua code should stop minor civs from razing any cities (although I've noticed if the city is pop 1, sometimes it will still be razed in the end).

Code:
-- for minor civs, loop through the players
-- for each player loop through their cities
-- check to see if each city is being razed... if so, unraze the city.

function UnrazeCity()

for iPlayer=GameDefines.MAX_MAJOR_CIVS, GameDefines.MAX_CIV_PLAYERS-1, 1 do
	local pPlayer = Players[iPlayer];
	if pPlayer:IsEverAlive() then 
			
		-- Enumerate cities
		
		for pCity in pPlayer:Cities() do

			-- City exists and is being razed?
    		if pCity ~= nil and pCity:IsRazing() then 
			pCity:DoTask(TaskTypes.TASK_UNRAZE);
				
			return pCity							
    		end
		end
	end
end
end

Events.ActivePlayerTurnEnd.Add(UnrazeCity);
 
If you have an SQL file in your mod

Umm...read the email I sent you. Bad things happened to my mod...but then again its me and you know all about my stupidity at times :mischief:
 
OK, if you have an SQL file in your mod AND you set your mod to depend on the DLL (and not try to execute SQL against a table that doesn't yet exist and hence abort the entire file) ;)

Also, the SQL I emailed you didn't have the WHERE clause ... zeroing out all the data values may not be healthy (I suspect a divide by zero error would occur at some point in time)
 
Having trouble running the v12 of the DLL. Mid-way through the first few turns Civ crashes with the following, every time:

Problem signature:
Problem Event Name: APPCRASH
Application Name: CivilizationV_DX11.exe
Application Version: 1.0.2.44
Application Timestamp: 510a1a7a
Fault Module Name: CvGameCore_Expansion1.dll
Fault Module Version: 3.0.3.0
Fault Module Timestamp: 5160229e
Exception Code: c0000094
Exception Offset: 0011a473
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 2057
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

I've tried clearing the cache and modinfo folders, restarting windows to clean any cached dlls, multiple times to no avail. I can see nothing relevant in the logs. Indeed no sign of (new) errors.

I'm running it with only CivUP and GEM at this time. Below is a link to my mod folder versions of them, as I'm running the latest betas from github, plus some bug-fixes of my own. It runs flawlessly without the DLL - indeed no sign of the extreme happiness bug from earlier - the cause of which I'm still trying to narrow down.

https://www.dropbox.com/s/pbgwr5ecc61h009/MODS.zip
 
This lua code ...
Executes every turn for every minor for (nearly) every city so adds a major overhead.
And doesn't stop the first population reduction (hence why cities of one will raze regardless), in which case you could have just hooked the event that notifies when a city changes size, which would be far more efficient
Also doesn't work properly if the minor captures two cities in the same turn - which I've seen happen
 
Having trouble running the v12 of the DLL.
I'm running it with only CivUP and GEM at this time.

Thanks for the info, I'll add it to the task list, but as I don't use CivUP/GEM it's not high on the list
 
Thanks for the info, I'll add it to the task list, but as I don't use CivUP/GEM it's not high on the list

The crash didn't happen with v11, but I did narrow the happiness bug (always from specialists) down to an issue between CivUP/GEM and your DLL; I ran several games for 300+ turns on autorun in FireTuner with only them, and it showed up majorly every time, while the equivalent games without the DLL showed no such trouble at 400+ turns.

Regarding the crash bug, it'd be very helpful if you could try to reproduce it, then I'll know it's not something unique about my setup. It shows up within 4 or 5 turns.

Thanks for putting it on the list.
 
Edit the CustomModOptions.xml file and change all the values to be 0 except for CS_RAZE_RARELY - that'll switch all the other changes off

i switched everything to 0, except for city state, worker alert and spy extras. so far so good and city state has puppetted , great thanks.


again ... awesome, thanks.
 
how do you set the focus for puppet cities?

I am running v11, but I can't click on anything under Citizen Management of the puppet city. Or is it somewhere else?

thanks.
 
Got it. Thanks. :thumbsup:

I am really looking forward to try the hovering units enhancements in v12.
 
Back
Top Bottom