Requesting following features

can you fix it so that it doesn't break saves? I presume that it breaks saves that were made before the dlll was introduced....

will this affect worldbuildersaves?
 
interesting stuff here....

In the unlikely case you're referring to anything I did - feel free to use it (just don't forget to credit ;) )

I presume that it breaks saves that were made before the dll was introduced....

Yep.

can you fix it so that it doesn't break saves?

Theoretically yes. It's not worth the hassle, in my opinion.

will this affect worldbuildersaves?

I have no idea.
 
I'm working on the Python but having some problems with the English unhappiness under occupation. Because I'm using CyCity.changeExtraHappiness() to adjust the (un)happiness level of the city on conquest, but the CyCity.getExtraHappiness() method isn't returning what I'm expecting it to. It seems that the game is adjusting the extra happiness on its own, making it hard to predict what to add/subtract. At least it reads zero while the city is under occupation...

Asaf: I guess what I need is CyCity.setExtraHappiness() then...
 
I'm working on the Python but having some problems with the English unhappiness under occupation. Because I'm using CyCity.changeExtraHappiness() to adjust the (un)happiness level of the city on conquest, but the CyCity.getExtraHappiness() method isn't returning what I'm expecting it to. It seems that the game is adjusting the extra happiness on its own, making it hard to predict what to add/subtract. At least it reads zero while the city is under occupation...

Asaf: I guess what I need is CyCity.setExtraHappiness() then...

I looked at the code and it seems as though it should work.
Can you post your Python code and point at what's not working?
 
Ok, I think I solved it. It turns out that a conquered city is actually a new CyCity instance. So the extra happiness is reset to zero by default. And the old, now invalid, CyCity instance displays a -1 value (as in None).

This should mean that the code is going to be really simple. :king: I'll be back once I get all of it working.
 
Finally time for testing! :D I've attached the Python files - unpack the archive in the mods Python folder. Since I suggest you only try my code out at this stage - without any other custom Python interfering - you should back-up your CvEventManager.py and CvGameUtils.py and replace with mine. (This will disable any other Python mod component you currently have running.) Because we can merge the code later - in fact, I'd like to do it once you're satisfied with the powers code.

Just to make sure - these are the powers included:
  • Carthage: Power of the Sea - +1 movement for all naval units
  • Greece: Power of Democracy - Enables Universal Sufferage from the start
  • Brittania: Power of Rebellion - Conquored English cities suffer increased unhappiness and are more likely to revolt against foreign rulers
  • Pictia: Power of the Highlands - Hills +1 food
  • Gaul: Power of the Dun - Cities built on hills get +10% defence
In case something is missing - let me know. Also except there to be some odd bug or glitch somewhere in the code. I haven't tested any of it with your mod, after all. :p Its actually your job to find the error(s) - so that i can fix it. (I trust that you have enabled Python exceptions, by the way.)

The most obvious thing creating trouble would be that the civilization short names doesn't match. Because I'm using the names as identifiers. (And yes, it should work with any language setting. Please test to make sure. :mischief:)

Also, you need to edit PythonCallbackDefines.xml:
Spoiler :
Code:
	<Define>
		<DefineName>USE_CAN_DO_CIVIC_CALLBACK</DefineName>
		<iDefineIntVal>1</iDefineIntVal>
	</Define>

And finally, this is what you edit in order to fine-tune the powers (in Powers.py):
Spoiler :
PHP:
# mod settings
iCarthageMoves = 1
eGreeceCivic = getIndex("Civic", "Universal Suffrage")
iEnglishUnhappiness = 2
iEnglishCulture = 10
iGallicDefenseBonus = 10
iPicticFood = 1
Now I can start on the Rebels mod comp. :D (edit: first draft done :king:)
 

Attachments

  • Powers.zip
    14.4 KB · Views: 49
I'm working on the Rebels mod-comp and doing some improvements on the code. Like not check all player's cities on every turn, and since there seem to be 10 of them in the scenario this equates to a base 10% chance of any player's disordered city to be hit with the event. The good thing is that the lag caused by the mod-comp is also reduced to 10%.

One thing though: I also have to multiply the chance of rebellion probability by 10, which in turn means that 10% is the highest sensible value to use, because the event is only checked every 10 turns for any given player. Unless some Civs can be excluded from the event altogether.

I suggest we set the probabilities as 5% for civilized Civs and 10% for the uncivilized ones - and for any city founded by the Britons. How does that sound?
 
yer thats fine. I should be able to test the code tonight
 
oh sorry didn't see that! yeah sounds fine... I just about to test the code
 
ok on first anylisis... Greek works.... Carthage does no longer works.... Pictish does not work... not sure how to find out if gaul works or briton for that matter



I put all of the files in the main python folder after removing all other python apart from my civlopedia python which just edits the name of one of the pedia tabs (BTS concepts -> New Concepts)
 
ok I have got my python exception!

Traceback (most recent call last):

File "CvEventInterface", line 23, in OnEvent

File "CvEventManager", line 187, in handleEvent

File "CvEventManager", line 333, in onGameStart

File "Powers", line 40, in pictia

Attribute Error: 'CyPlayer' object has no attribute 'setExtraPlotTypeYield'
 
ok on first anylisis... Greek works.... Carthage does no longer works.... Pictish does not work... not sure how to find out if gaul works or briton for that matter
No Python exceptions?

Found a Gaul hill city to see if the defense bonus appears? Switch players (alt + z) Conquere a conquere it to see if the bonus disappears.

Conquere a Briton city to see if you get the +2 "Aaarrggh!" unhappiness. (I couldn't find a way to add to the ethnic unhappiness.)

I could actually test your mod also. Where can I download the version you're currently using?
 
Aha, you need to install Asafs custom DLL file. Obviously. :rolleyes:
 
and where do I put that :lol: also there is no uploadable version for the one I'm using :lol: it's unfiinished but if you want it I can make a little zip for you... (can you unpack 7zip because I might use that just for this...)
 
The custom DLL goes into the Assets folder of your mod.

I don't know what 7zip is. I'll send you my email in a PM.
 
what about the rest? it says there is changed C++ sources in there does the whole folder get entered?
 
just use the dll
 
ok btw I have to send 4 emails to you to get the whole mod across lol...

use the first as a basis
second e-mail - take the unit art out of the folder named units and put in the units folder of the first e-mail (it's the other half)
Make a new folder in art named Leaderheads and put in the contents of e-mail 3 and 4 (only the ClovisFINAL folder and markantony or what after not the zip folders names...)
 
I tried putting just the dll in the Jamie'sRomeMod1.3/Assets and it crashed the game.... can you post a screenshot of where it should be?
 
Top Bottom