1. Firaxis celebrates the "Asian American and Pacific Islander Heritage Month", and offers a give-away of a Civ6 anthology copy (5 in total)! For all the details, please check the thread here. .
    Dismiss Notice
  2. Old World has finally been released on GOG and Steam, besides also being available in the Epic store . Come to our Old World forum and discuss with us!
    Dismiss Notice

revdcm eventmanager

Discussion in 'Civ4 - Creation & Customization' started by SIMPA, Jul 22, 2009.

  1. SIMPA

    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###
     
  2. phungus420

    phungus420 Deity

    Joined:
    Mar 1, 2003
    Messages:
    6,296
    You just use BugEventManager instead of CvEventManager, at least I've always been able to do that.
     
  3. The_J

    The_J Say No 2 Net Validations Administrator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    36,313
    Location:
    DE/NL/FR
    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.
     
  4. SIMPA

    SIMPA Prince

    Joined:
    Sep 17, 2007
    Messages:
    367
    Location:
    Zagreb,CROATIA
    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..:)
     

Share This Page