revdcm eventmanager

SIMPA

Prince
Joined
Sep 17, 2007
Messages
367
Location
Zagreb,CROATIA
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:
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:
I try with Avain eventmanager but it doesnt work...thx Avain:)
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:
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###
 
You just use BugEventManager instead of CvEventManager, at least I've always been able to do that.
 
I've seen in the discussion in the Dune Wars subforum, that RevDCM changes/suppresses some things in python, so you should ask jdog, if there's something special going on.

Hey thx guys I wreally apriciate your help...I dont want to disturb them with probebly simple thing that I just dont get it yet :mad:

Hey Phungus thx I will try to do that..but it is kind a different this time the old one was kind of easy to code when you actualy just copy the code :)..but anyway thx for help..:)
 
Top Bottom