SIMPA
Prince
Pozdrav!!
I think that anyone notice that revdcm 2.51 doesnt have cvevent manager like some older version...now if you want to add something with python changes it is not yust to copy code![Mad :mad: :mad:](https://civfanatics-data.community.forum/assets/smilies/mad.gif)
![Mad :mad: :mad:](https://civfanatics-data.community.forum/assets/smilies/mad.gif)
I try to add planetbuster from The_J in my mod but Idont know how to do it...whatever Itry I cant get it work![cry :cry: :cry:](/images/smilies/cry.gif)
![cry :cry: :cry:](/images/smilies/cry.gif)
I try with Avain eventmanager but it doesnt work...thx Avain![Smile :) :)](https://civfanatics-data.community.forum/assets/smilies/smile.gif)
Please does anyone know how to add planetbuster in revdcm 2.51 python!!!
I know there is explanation how to add new event in revdcm 2.51 but I just dont get it..I am to stupid![Mad :mad: :mad:](https://civfanatics-data.community.forum/assets/smilies/mad.gif)
So please if someone....
I think that anyone notice that revdcm 2.51 doesnt have cvevent manager like some older version...now if you want to add something with python changes it is not yust to copy code
![Mad :mad: :mad:](https://civfanatics-data.community.forum/assets/smilies/mad.gif)
![Mad :mad: :mad:](https://civfanatics-data.community.forum/assets/smilies/mad.gif)
I try to add planetbuster from The_J in my mod but Idont know how to do it...whatever Itry I cant get it work
![cry :cry: :cry:](/images/smilies/cry.gif)
![cry :cry: :cry:](/images/smilies/cry.gif)
I try with Avain eventmanager but it doesnt work...thx Avain
![Smile :) :)](https://civfanatics-data.community.forum/assets/smilies/smile.gif)
Please does anyone know how to add planetbuster in revdcm 2.51 python!!!
I know there is explanation how to add new event in revdcm 2.51 but I just dont get it..I am to stupid
![Mad :mad: :mad:](https://civfanatics-data.community.forum/assets/smilies/mad.gif)
So please if someone....
Spoiler :
## Nations in War2EventManager
##
## Imports BugEventManager
##
## Changes:
## - add GreatPersons mod
##
## Copyright (c) 2009 avain
##
## Author: avain
from CvPythonExtensions import *
import CvEventManager
import CvUtil
gc = CyGlobalContext()
localText = CyTranslator()
# --------- GreatPersonMod BTS -------------
import CvGreatPersonModEventManager
def onNukeExplosion(self, argsList):
'Nuke Explosion'
pPlot, pNukeUnit = argsList
CvUtil.pyPrint('Nuke detonated at %d, %d'
%(pPlot.getX(), pPlot.getY()))
###Planetbusterbegin###
if (pNukeUnit is not None and pNukeUnit.getUnitType() == gc.getInfoTypeForString('UNIT_PLANETBUSTER')):
iX = pPlot.getX()
iY = pPlot.getY()
for iXLoop in range(iX - 1, iX + 2, 1):
for iYLoop in range(iY - 1, iY + 2, 1):
pPlot = CyMap().plot(iXLoop, iYLoop)
if (( pPlot.isPeak()==true ) or (pPlot.isHills()==true)):
pPlot.setPlotType(PlotTypes.PLOT_LAND, True, True)
pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_COAST" ), 1, 1)
###Planetbusterend###
##
## Imports BugEventManager
##
## Changes:
## - add GreatPersons mod
##
## Copyright (c) 2009 avain
##
## Author: avain
from CvPythonExtensions import *
import CvEventManager
import CvUtil
gc = CyGlobalContext()
localText = CyTranslator()
# --------- GreatPersonMod BTS -------------
import CvGreatPersonModEventManager
def onNukeExplosion(self, argsList):
'Nuke Explosion'
pPlot, pNukeUnit = argsList
CvUtil.pyPrint('Nuke detonated at %d, %d'
%(pPlot.getX(), pPlot.getY()))
###Planetbusterbegin###
if (pNukeUnit is not None and pNukeUnit.getUnitType() == gc.getInfoTypeForString('UNIT_PLANETBUSTER')):
iX = pPlot.getX()
iY = pPlot.getY()
for iXLoop in range(iX - 1, iX + 2, 1):
for iYLoop in range(iY - 1, iY + 2, 1):
pPlot = CyMap().plot(iXLoop, iYLoop)
if (( pPlot.isPeak()==true ) or (pPlot.isHills()==true)):
pPlot.setPlotType(PlotTypes.PLOT_LAND, True, True)
pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_COAST" ), 1, 1)
###Planetbusterend###