Simple Python Things

Alright, so last night, I added the Heroic Strength Promotion to the DLL. Good News is-- it is working after a unit upgrades, Bad News is-- I tested it several times last night and not once did the AI use it against me. Ok, it being in the DLL and not Python might be bad news to some as well, but it is working. I am going to do a minor tweak to the AI value for the promotion and recompile, I'll add a link here when it is up. Thank you J for an awesome concept.
 
Great. :)

Well, can't we add additional AI code in python? See "Marauder Reloaded" code. Other possibility: Low chance for auto-promote a (leader? (= unit with leader promotion)) unit with this promotion.
 
Thanks :).

Or download the latest python version, open the files with it, and try it then. It doesn't mess up the intendation there.

Yes I tested it and checking write me errors before find my code :lol:
nevertheless thinks (some from) are functional.
For exaple I wanted use your promotions but always one is functional. Two or more cause error :(
 
Here is the DL

Below are some screenshots
 

Attachments

  • After_Upgrade.JPG
    After_Upgrade.JPG
    269.5 KB · Views: 126
  • Before_Upgrade.JPG
    Before_Upgrade.JPG
    280.1 KB · Views: 138
  • Heroic_Strength_I_Civilopedia.JPG
    Heroic_Strength_I_Civilopedia.JPG
    165.6 KB · Views: 128
Alright, so last night, I added the Heroic Strength Promotion to the DLL. Good News is-- it is working after a unit upgrades, Bad News is-- I tested it several times last night and not once did the AI use it against me.

mmhh...AI is always difficult.

Ok, it being in the DLL and not Python might be bad news to some as well, but it is working. I am going to do a minor tweak to the AI value for the promotion and recompile, I'll add a link here when it is up. Thank you J for an awesome concept.

Not my concept, it was even not my idea ;).

Great. :)

Well, can't we add additional AI code in python? See "Marauder Reloaded" code. Other possibility: Low chance for auto-promote a (leader? (= unit with leader promotion)) unit with this promotion.

In my python version is additional AI code, but that's just rolling dices.

Yes I tested it and checking write me errors before find my code :lol:
nevertheless thinks (some from) are functional.
For exaple I wanted use your promotions but always one is functional. Two or more cause error :(

What errors?

Here is the DL

Below are some screenshots

:goodjob: well done.
 
Here is the DL

Below are some screenshots

there is a relict in your xml:

Code:
    <!--Promotions DLL Start-->
    <element type="iExtraStrength" minOccurs="0"/>
    <!--Promotions DLL End-->
		<element type="iCityAttack"/>
		<element type="iCityDefense"/>
		<element type="iHillsAttack"/>
		<element type="iHillsDefense"/>
		<element type="iKamikazePercent"/>
		<element type="iRevoltProtection"/>
		<element type="iCollateralDamageProtection"/>
		<element type="iPillageChange"/>
		<element type="iUpgradeDiscount"/>
		<element type="iExperiencePercent"/>
    <!--Promotions DLL v0.1 Start-->
    <element type="iExtraStrength" minOccurs="0"/>
    <!--Promotions DLL v0.1 End-->

one of them should be removed. ;)
 
mmhh...AI is always difficult.

Yeah, it is a PITA but I'm hoping the minor tweak I did works (I didn't test it before I uploaded it). Basically, what I originally did was directly clone the iCombatPercent weights for iExtraStrength then for the "tweak" all I did was add 1 to each of the multipliers for iExtraStrength (going on the logic that it will return a higher number and therefore place a higher value on the promotion if it is available).

EDIT: Thank you Cybah, I'm going to start my own thread for this so that I don't hijack The_J's thread any further.
 
Originally Posted by hrochland

Yes I tested it and checking write me errors before find my code
nevertheless thinks (some from) are functional.
For exaple I wanted use your promotions but always one is functional. Two or more cause error


What errors?
[/QUOTE]

When I tried paste more then one promotion was functional one only. It´s I think error im my paste way...
Can you, please, paste here python part of code with Sneak Promotion , Heroic Strenght Promotion and celebrity Promotion combined?

BTW, water modcomp is excellent. I´m making on animated well model now. If will be model functional, I pasted him...

thanks
HROCHland
 
Looks like a whitespace problem to me.

:yup: i also guess so.

When I tried paste more then one promotion was functional one only. It´s I think error im my paste way...

How do you do it?
When you use Notepad/Wordpad, always select the beginning of the line (not of the text!) when you try to copy + paste it.

Or try Word, it also shows you the spaces.

Can you, please, paste here python part of code with Sneak Promotion , Heroic Strenght Promotion and celebrity Promotion combined?

I'll try. I hope, i don't forget it.

I don't suggest using the Heroic Strenght promotion, because it doesn't work after upgrading a unit (TheLadiesOgre has made a dll version, but you can't compile your own dll, and you also have your own, am i right?).
I'll maybe take it out of the database.

BTW, water modcomp is excellent. I´m making on animated well model now. If will be model functional, I pasted him...

thanks
HROCHland

Nice, i'll update the model.

But you should re-download it, there was an error in it. I named the improvement WELL, like the oil well :blush:. -sr has reported the error.

->
Reuploaded the "water" modcomp, to fix that (renamed to WATERWELL, and changed all references).

I've also reuploaded the respawn promotion. I've cleaned up the code a bit, it will also place ships in coastal cities (if available), and i've added a bit AI, so that the promotion will we applied to AI-controlled units.
 
I added the Respawn promotion to my mod and confirm that it is working fine. Just a minor thing, something graphical:



It would be nice to have that ugly pink marker replaced by i.e. a rising phoenix. Any idea how to fix this??

EDIT: Forget it. Just change the path in the CvEventManager :blush:
 
Hey J, I've been trying to edit the Hagenbeck function so the buidling will start appearing and jumping at the start of the game. I tried changing the 1890 to 0 as you said, but it didn't work. If we're going by game year, wouldn't I have to change it to -4000?
 
Here's a small contribution:

Rising Phoenix button for the Respawn Promotion

Hi, The_J
here is animated model for water modcomp :)

Nice, i'll update both tomorrow :).

Hey J, I've been trying to edit the Hagenbeck function so the buidling will start appearing and jumping at the start of the game. I tried changing the 1890 to 0 as you said, but it didn't work. If we're going by game year, wouldn't I have to change it to -4000?

I've said, the second value has to be set to 0 ;).
For the first, -4000 is right :).




@hrochland: File is attached :).
 

Attachments

  • hrochland-cveventmanager.zip
    10.5 KB · Views: 78
I would have another request if you want to do it and think it can be done, i will understand if by various reasons you simply cant do it. :)
The ideea came from the fact that the christian religious orders ( templar,teuton etc.) were not quite mercenary (well officialy) therefore not fighting anybody would make them give it all they had so all the bonuses i gave them would apply vs every civ even the Papal States. So the ideea is that i try to simulate a morale and doctrine system for them since their "true official" goal was to fight the islam suporters.
So basically the bonuses of this promotion should apply only vs civs that have as state religion islam.Also for the name if you want to try it i can suggest a few things like Gods_Call, Blood_Feud, Crusader but this are only suggestions, I thought I would through them up maybe they can inspire you for anything better.
Well im waiting on your call regarding the ideea.

With all respect,
Castor_Troy
 
Top Bottom