Simple Python Things

:confused: why did i not get this error?
Try to change pPlayer.getCivilizationAdjective () to pPlayer.getCivilizationAdjective (0).
Or put there a 1, or 2...no idea.
This will affect, what adjective will be placed in the text, for example american or...is there more than one adjcetive in the english text?
In german there are more, for example deutsche, deutschen, deutsch, ect.
You have to test, what number fits best, what adjective is grabbed.
Can't say, which is the right one, i still don't have access to civ :(.


P.S. this error occured in 1892 BTW, so it was before it was even supposed to occur.

In your code it says 1890 ;).
 
No, in English we only have one adjective. I'll try to figure it out though, and I didn't even realize that my code still said 1890, I was supposed to change that to 1896. Thanks. :goodjob:
 
I keep getting more and more, maybe something is wrong with the button?

Traceback (most recent call last):
File "BugEventManager", line 362, in _handleDefaultEvent
File "Espionage", line 109, in onCombatResult
RuntimeError: unidentifiable C++ exception




00:14:58 TRACE: Error in combatResult event handler <bound method Espionage.onCombatResult of <Espionage.Espionage instance at 0x169F5738>>
00:14:58 TRACE: unidentifiable C++ exception
 
Thank you for reminding me.
The error is still the same as some pages ago.
The additional information does not provide any further information :/.

After nearly 2 weeks of "holidays", i'm back at my civ computer, i'll check that myself tomorrow.
 
Thank you for reminding me.
The error is still the same as some pages ago.
The additional information does not provide any further information :/.

After nearly 2 weeks of "holidays", i'm back at my civ computer, i'll check that myself tomorrow.

Yeah, thats about all i get, but it only happens when a BARBARIAN unit attacks your unit, but then again once in awhile it when I attack a BARBARIAN unit. Its only the barbarians that are causing this problem. I believe.:crazyeye:


It just doesnt SHOW the btn (when i win)SOMETIMES not all the time), and thats where i think the problem is, again, just guessing.:crazyeye:
 
Okay, it does not have anything to do with the barbarians, i've tested it today.
I've added the bugfixes, about we've talked in the last time, but noone from these should influence this current bug, i think.
I've also tested it with BUG, does also work.
Could you maybe merge it and test it again? This would be helpfull :).
 
I think The J said he would fix some problem with the Industry Espionage promotion.
 
Sorry, no, i meant the Industry Espionage promotion.

The IEP works great, just that darn Militia one. I can get the IEP ones to work in WoC/MLF without any problems.
 
Thanks cybrxkhan :).



And what's with the error message from above :confused:?

Sorry i was just confused (normal) :lol:, ok i mergred it, but i havent played lately will get back to it after tomorrow, sorry, (Brain F_rt):crazyeye:
 
Hi all. Can I have one question, please?
I downloaded enslaver modcomp and nedd one little editation help with python.

PHP:
## Slaver! ##		
		pPlayer = gc.getPlayer(pWinner.getOwner())
		if pWinner.isHasPromotion(gc.getInfoTypeForString('PROMOTION_SLAVER')):
			if pPlayer.getCivics(gc.getInfoTypeForString('CIVICOPTION_LABOR')) == gc.getInfoTypeForString('CIVIC_SLAVERY'):
				if (unitY.getUnitCombatType() == gc.getInfoTypeForString("UNITCOMBAT_MELEE")) or (unitY.getUnitCombatType() == gc.getInfoTypeForString("UNITCOMBAT_GUN")) or (unitY.getUnitCombatType() == gc.getInfoTypeForString("UNITCOMBAT_MOUNTED")) or (unitY.getUnitCombatType() == gc.getInfoTypeForString("UNITCOMBAT_ARCHER")):
					if CyGame().getSorenRandNum(100, "Bob") <= 60:
						iUnit = pLoser.getUnitType()
						newUnit = pPlayer.initUnit(gc.getInfoTypeForString( 'UNIT_SLAVE' ), pWinner.getX(), pWinner.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.NO_DIRECTION)
						newUnit.finishMoves()
						CyInterface().addMessage(pWinner.getOwner(),False,15,CyTranslator().getText("TXT_KEY_SLAVER",()),'',0,'Art/Interface/Buttons/Units/slave.dds',ColorTypes(44), pWinner.getX(), pWinner.getY(), True,True)						

## Slaver! ##

I need add possibility:
OR GET unit 'UNIT_SLAVE_2' -20 % chance
__________________________

In new code I need this:

40 % for 'UNIT_SLAVE' or 20 % for 'UNIT_SLAVE_2'

Can somebody update code for me, please? :please:
thanks and sorry for infiltration :blush:
Hroch
 
Let me try:

Code:
## Slaver! ##        
        pPlayer = gc.getPlayer(pWinner.getOwner())
        if pWinner.isHasPromotion(gc.getInfoTypeForString('PROMOTION_SLAVER')):
            if pPlayer.getCivics(gc.getInfoTypeForString('CIVICOPTION_LABOR')) == gc.getInfoTypeForString('CIVIC_SLAVERY'):
                if (unitY.getUnitCombatType() == gc.getInfoTypeForString("UNITCOMBAT_MELEE")) or (unitY.getUnitCombatType() == gc.getInfoTypeForString("UNITCOMBAT_GUN")) or (unitY.getUnitCombatType() == gc.getInfoTypeForString("UNITCOMBAT_MOUNTED")) or (unitY.getUnitCombatType() == gc.getInfoTypeForString("UNITCOMBAT_ARCHER")):
                    if CyGame().getSorenRandNum(100, "Bob") <= 40:
                        iUnit = pLoser.getUnitType()
                        newUnit = pPlayer.initUnit(gc.getInfoTypeForString( 'UNIT_SLAVE' ), pWinner.getX(), pWinner.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.NO_DIRECTION)
                        newUnit.finishMoves()
                    else if CyGame().getSorenRandNum(100, "Bob") <= 33:
                        iUnit = pLoser.getUnitType()
                        newUnit = pPlayer.initUnit(gc.getInfoTypeForString( 'UNIT_SLAVE_2' ), pWinner.getX(), pWinner.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.NO_DIRECTION)
                        newUnit.finishMoves()
                        CyInterface().addMessage(pWinner.getOwner(),False,15,CyTranslator().getText("TXT_KEY_SLAVER",()),'',0,'Art/Interface/Buttons/Units/slave.dds',ColorTypes(44), pWinner.getX(), pWinner.getY(), True,True)                        

## Slaver! ##


Basically we roll a dice 100 and if it's <= 40 (40%) then we get unit Slave, and if it's not then we make another roll and if it's <= 33 (33% from 60% = 20%) then we get Slave 2.


Fix me if I am wrong.
 
Many many thanks, Deon. I will try it now.
Thank you for your quick help. I woo compile ideas from slaves and enslaver modcomps and this is excellent solution for me.
thanks more
Hroch
 
Back
Top Bottom