1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

PyScenario: Beta version release

Discussion in 'Rhye's and Fall Modmods' started by Baldyr, Jun 2, 2010.

  1. Osakasayama

    Osakasayama In decline

    Joined:
    Jul 6, 2010
    Messages:
    66
    Location:
    St. Louis
    I have a problem in Beta v2.1 when I try to do anything. :confused:
    It just says "No Valid Scenario module found" when it starts!
    I just tested a random code spawning a chinise maceman (Its not on ocean tiles or anything, its in a tundra tile in NAm).
    Code:
    Trigger().date(-3000).check(None).player(2).unit(None,34,3,False).target(24,52)
    View attachment 271950
    I don't think its an issue of the Trigger, because this shows up also when when I reload using alt + shift + R.
    I'm pretty sure I have the right version of RfcMarathon too.
    I have the logs PythonDbg, which have the same "No Valid Scenario module found" repeatedly.

    Spoiler :
    load_module CvUtil

    load_module traceback

    load_module CvRFCEventManager

    load_module CvEventManager

    load_module CvScreensInterface

    load_module CvMainInterface

    load_module ScreenInput

    load_module CvScreenEnums

    load_module time

    load_module Consts

    load_module RFCUtils

    load_module PyHelpers

    load_module StoredData

    load_module cPickle

    load_module CvMercenaryManager

    load_module Popup

    load_module MercenaryUtils

    load_module MercenaryNameUtils

    load_module math

    load_module CvTranslator

    load_module re

    load_module SdToolKit

    load_module CvMercenaryScreensEnums

    load_module CvGameInterface

    load_module CvGameUtils

    load_module CvGameInterfaceFile

    load_module CvDomesticAdvisor

    load_module CvTechChooser

    load_module CvForeignAdvisor

    load_module CvExoticForeignAdvisor

    load_module IconGrid

    load_module DomPyHelpers

    load_module TechTree

    load_module CvMilitaryAdvisor

    load_module CvFinanceAdvisor

    load_module CvReligionScreen

    load_module CvCorporationScreen

    load_module CvCivicsScreen

    load_module string

    load_module CvVictoryScreen

    load_module CvEspionageAdvisor

    load_module CvOptionsScreen

    load_module CvReplayScreen

    load_module CvHallOfFameScreen

    load_module CvDanQuayle

    load_module CvUnVictoryScreen

    load_module CvDawnOfMan

    load_module CvTechSplashScreen

    load_module CvTopCivs

    load_module random

    load_module CvInfoScreen

    load_module CvIntroMovieScreen

    load_module CvVictoryMovieScreen

    load_module CvWonderMovieScreen

    load_module CvEraMovieScreen

    load_module CvSpaceShipScreen

    load_module CvPediaMain

    load_module CvPediaScreen

    load_module CvScreen

    load_module CvPediaTech

    load_module CvPediaUnit

    load_module CvPediaBuilding

    load_module CvPediaPromotion

    load_module CvPediaUnitChart

    load_module CvPediaBonus

    load_module CvPediaTerrain

    load_module CvPediaFeature

    load_module CvPediaImprovement

    load_module CvPediaCivic

    load_module CvPediaCivilization

    load_module CvPediaLeader

    load_module CvPediaSpecialist

    load_module CvPediaHistory

    load_module CvPediaProject

    load_module CvPediaReligion

    load_module CvPediaCorporation

    load_module CvWorldBuilderScreen

    load_module CvWorldBuilderDiplomacyScreen

    load_module CvDebugTools

    load_module CvDebugInfoScreen

    load_module CvMapGeneratorUtil

    load_module CvGFCScreen

    load_module CvPopupInterface

    load_module CvScreenUtilsInterface

    load_module CvScreenUtils

    init-ing world builder screen

    load_module CvWBPopups

    load_module CvCameraControls

    load_module CvAdvisorUtils

    load_module CvRFCEventHandler

    load_module RiseAndFall

    load_module CityNameManager

    load_module Barbs

    load_module Religions

    load_module Resources

    load_module UniquePowers

    load_module AIWars

    load_module Congresses

    load_module Victory

    load_module Stability

    load_module Plague

    load_module Communications

    load_module PyScenario

    load_module sdToolKit

    load_module operator

    PY:OnInit
    load_module CvAppInterface

    load_module Full_of_Resources_3_00

    load_module CvOptionsScreenCallbackInterface

    load_module copy

    load_module webbrowser

    load_module urllib

    load_module _winreg

    load_module Lows_Random_Maps_3_0

    load_module Maze

    load_module Planet_Generator_0_68

    load_module gc

    load_module pickle

    load_module Ring_World

    load_module Smart_Map

    load_module glob

    load_module Team_Battleground

    load_module Tectonics

    load_module AegeanSea

    load_module Archipelago

    load_module Awajishima

    load_module Balanced

    load_module CaribbeanSea

    load_module Continents

    load_module Cremia

    load_module Custom_Continents

    load_module England

    load_module Fantasy_Realm

    load_module Fractal

    load_module Great_Plains

    load_module Highlands

    load_module Hub

    load_module Ice_Age

    load_module Inland_Sea

    load_module Islands

    load_module Island_Campaign

    load_module Italy

    load_module Japan

    load_module Lakes

    load_module Mirror

    load_module Oasis

    load_module Pangaea

    load_module Ring

    load_module RomancingSaGa1

    load_module Setouchi

    load_module Shuffle

    load_module Tales_of_Destiny

    load_module Terra

    load_module Tilted_Axis

    load_module Wheel

    load_module Arboria

    load_module Big_and_Small

    load_module Boreal

    load_module Donut

    load_module Earth2

    load_module Global_Highlands

    load_module Hemispheres

    load_module Medium_and_Small

    load_module Rainforest

    load_module RandomScriptMap

    load_module CvWBInterface

    load_module CvWBDesc

    load_module array

    PY:loadDesc:mods\rfcmarathon\publicmaps\rfc 3000 bc, curDir:C:\Program Files\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword
    Reading game desc

    Reading teams desc

    reading team 0

    reading team 1

    reading team 2

    reading team 3

    reading team 4

    reading team 5

    reading team 6

    reading team 7

    reading team 8

    reading team 9

    reading team 10

    reading team 11

    reading team 12

    reading team 13

    reading team 14

    reading team 15

    reading team 16

    reading team 17

    reading team 18

    reading team 19

    reading team 20

    reading team 21

    reading team 22

    reading team 23

    reading team 24

    reading team 25

    reading team 26

    reading team 27

    reading team 28

    reading team 29

    reading team 30

    Reading players desc

    load_module encodings

    load_module encodings.latin_1

    Reading map desc

    Reading/creating 8432 plot descs

    Reading/creating 0 sign descs

    WB read done

    PY:player 0's alive status set to: 1
    PY:player 1's alive status set to: 1
    PY:player 2's alive status set to: 1
    PY:player 3's alive status set to: 1
    PY:player 4's alive status set to: 1
    PY:player 5's alive status set to: 1
    PY:player 6's alive status set to: 1
    PY:player 7's alive status set to: 1
    PY:player 8's alive status set to: 1
    PY:player 9's alive status set to: 1
    PY:player 10's alive status set to: 1
    PY:player 11's alive status set to: 1
    PY:player 12's alive status set to: 1
    PY:player 13's alive status set to: 1
    PY:player 14's alive status set to: 1
    PY:player 15's alive status set to: 1
    PY:player 16's alive status set to: 1
    PY:player 17's alive status set to: 1
    PY:player 18's alive status set to: 1
    PY:player 19's alive status set to: 1
    PY:player 20's alive status set to: 1
    PY:player 21's alive status set to: 1
    PY:player 22's alive status set to: 1
    PY:player 23's alive status set to: 1
    PY:player 24's alive status set to: 1
    PY:player 25's alive status set to: 1
    PY:player 26's alive status set to: 1
    PY:player 27's alive status set to: 1
    PY:player 28's alive status set to: 1
    PY:player 29's alive status set to: 1
    PY:player 30's alive status set to: 1
    PY:player 31's alive status set to: 1
    map rebuild. gridw=124, gridh=68

    preapply plots

    map apply - recalc areas/regions

    apply plots

    apply signs

    Randomize Resources

    WB apply done

    8500 - gold

    8501 - research

    8502 - culture

    8503 - espionage

    8483 - food

    8484 - production

    8485 - commerce

    8550 - judaism

    8551 - judaism

    8552 - christianity

    8553 - christianity

    8554 - islam

    8555 - islam

    8556 - hinduism

    8557 - hinduism

    8558 - buddhism

    8559 - buddhism

    8560 - confucianism

    8561 - confucianism

    8562 - taoism

    8563 - taoism

    3 SCREEN TURNED ON

    99 SCREEN TURNED ON

    ('leader starting switch:', 17, 'in civ', 3)

    ('leader starting switch:', 24, 'in civ', 7)

    ('leader starting switch:', 13, 'in civ', 16)

    ('leader starting switch:', 8, 'in civ', 17)

    ('leader starting switch:', 36, 'in civ', 18)

    ('leader starting switch:', 50, 'in civ', 26)

    PY:No valid Scenario module found!
    PY:saveDesc:C:\Users\14947126\Documents\My Games\Beyond the Sword\Saves\WorldBuilder\WBQuickSave, curDir:C:\Program Files\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword
    WBSave done

    PY:player 4's alive status set to: 0
    PY:player 5's alive status set to: 0
    PY:player 6's alive status set to: 0
    PY:player 7's alive status set to: 0
    PY:player 8's alive status set to: 0
    PY:player 9's alive status set to: 0
    PY:player 10's alive status set to: 0
    PY:player 11's alive status set to: 0
    PY:player 12's alive status set to: 0
    PY:player 13's alive status set to: 0
    PY:player 14's alive status set to: 0
    PY:player 15's alive status set to: 0
    PY:player 16's alive status set to: 0
    PY:player 17's alive status set to: 0
    PY:player 18's alive status set to: 0
    PY:player 19's alive status set to: 0
    PY:player 20's alive status set to: 0
    PY:player 21's alive status set to: 0
    PY:player 22's alive status set to: 0
    PY:player 23's alive status set to: 0
    PY:player 24's alive status set to: 0
    PY:player 25's alive status set to: 0
    PY:player 26's alive status set to: 0
    PY:player 27's alive status set to: 0
    PY:player 28's alive status set to: 0
    PY:player 29's alive status set to: 0
    PY:player 30's alive status set to: 0
    2 SCREEN TURNED ON

    SCREEN OFF

    PY:No valid Scenario module found!
    PY:No valid Scenario module found!
    PY:No valid Scenario module found!
    PY:No valid Scenario module found!
    PY:No valid Scenario module found!
    PY:No valid Scenario module found!
    PY:City Built Event: Kolhapur
    PY:City Built Event: Tianjin
    PY:City Built Event: Lagash
    ('iGameTurn', 0)

    ('TOTAL UNITS', 5)

    ('TOTAL CITIES', 3)

    Stability

    ('Base:', 0, 'Modifier:', 0, 'Total:', 0, 'civic', 25, u'Egyptian Old Kingdom')

    ('Base:', 12, 'Modifier:', 4, 'Total:', 16, 'civic', 25, u'Indian Empire')

    ('Base:', 14, 'Modifier:', 4, 'Total:', 18, 'civic', 25, u'Middle Country of China')

    ('Base:', 12, 'Modifier:', 4, 'Total:', 16, 'civic', 25, u'Babylonian Empire')

    ('dead', 4)

    ('dead', 5)

    ('dead', 6)

    ('dead', 7)

    ('dead', 8)

    ('dead', 9)

    ('dead', 10)

    ('dead', 11)

    ('dead', 12)

    ('dead', 13)

    ('dead', 14)

    ('dead', 15)

    ('dead', 16)

    ('dead', 17)

    ('dead', 18)

    ('dead', 19)

    ('dead', 20)

    ('dead', 21)

    ('dead', 22)

    ('dead', 23)

    ('dead', 24)

    ('dead', 25)

    ('dead', 26)

    ('Parameter', 0, 0)

    ('Parameter', 1, 0)

    ('Parameter', 2, 0)

    ('Parameter', 3, 0)

    ('Parameter', 4, 0)

    ('Parameter', 5, 0)

    ('Parameter', 6, 0)

    ('Parameter', 7, 0)

    ('Parameter', 8, 0)

    ('Parameter', 9, 0)

    ('Parameter', 10, 0)

    ('Parameter', 11, 0)

    ('Parameter', 12, 0)

    (u'Egypt', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'India', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'China', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Babylonia', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Greece', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Persia', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Carthage', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Rome', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Japan', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Ethiopia', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Maya', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Vikings', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Arabia', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Khmer', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Spain', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'France', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'England', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Germany', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Russia', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Netherlands', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Mali', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Portugal', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Inca', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Mongolia', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Aztec', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Turkey', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'America', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    PY:City Built Event: Cuman
    PY:City Built Event: Angle
    PY:City Built Event: Khoisan
    PY:player 27's alive status set to: 1
    PY:player 28's alive status set to: 1
    ('AI thinking (Mercenaries)', 1)

    ('AI thinking (Mercenaries)', 31)

    ('iGameTurn', 1)

    (u'Egypt', False, False)

    (u'India', False, False)

    (u'China', False, False)

    (u'Babylonia', False, False)

    ('AI thinking (Mercenaries)', 2)

    (2, 'enemyPlayersList', 0)

    ('iGameTurn', 2)

    99 SCREEN TURNED ON

    load_module encodings.string_escape

    PY:OnPreSave
    ('AI thinking (Mercenaries)', 1)

    PY:player 0's alive status set to: 0
    PY:player 1's alive status set to: 0
    PY:player 3's alive status set to: 0
    PY:player 4's alive status set to: 0
    PY:player 5's alive status set to: 0
    PY:player 6's alive status set to: 0
    PY:player 7's alive status set to: 0
    PY:player 9's alive status set to: 0
    PY:player 10's alive status set to: 0
    PY:player 13's alive status set to: 0
    PY:player 14's alive status set to: 0
    PY:player 15's alive status set to: 0
    PY:player 16's alive status set to: 0
    PY:player 17's alive status set to: 0
    PY:player 18's alive status set to: 0
    PY:player 19's alive status set to: 0
    PY:player 20's alive status set to: 0
    PY:player 21's alive status set to: 0
    PY:player 22's alive status set to: 0
    PY:player 23's alive status set to: 0
    PY:player 24's alive status set to: 0
    PY:player 25's alive status set to: 0
    PY:player 26's alive status set to: 0
    2 SCREEN TURNED ON

    SCREEN OFF

    19 SCREEN TURNED ON

    SCREEN OFF

    PY:No valid Scenario module found!
    PY:No valid Scenario module found!
    PY:No valid Scenario module found!
    PY:loadDesc:mods\rfcmarathon\publicmaps\rfc 3000 bc, curDir:C:\Program Files\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword
    Reading game desc

    Reading teams desc

    reading team 0

    reading team 1

    reading team 2

    reading team 3

    reading team 4

    reading team 5

    reading team 6

    reading team 7

    reading team 8

    reading team 9

    reading team 10

    reading team 11

    reading team 12

    reading team 13

    reading team 14

    reading team 15

    reading team 16

    reading team 17

    reading team 18

    reading team 19

    reading team 20

    reading team 21

    reading team 22

    reading team 23

    reading team 24

    reading team 25

    reading team 26

    reading team 27

    reading team 28

    reading team 29

    reading team 30

    Reading players desc

    Reading map desc

    Reading/creating 8432 plot descs

    Reading/creating 0 sign descs

    WB read done

    PY:player 0's alive status set to: 1
    PY:player 1's alive status set to: 1
    PY:player 2's alive status set to: 1
    PY:player 3's alive status set to: 1
    PY:player 4's alive status set to: 1
    PY:player 5's alive status set to: 1
    PY:player 6's alive status set to: 1
    PY:player 7's alive status set to: 1
    PY:player 8's alive status set to: 1
    PY:player 9's alive status set to: 1
    PY:player 10's alive status set to: 1
    PY:player 11's alive status set to: 1
    PY:player 12's alive status set to: 1
    PY:player 13's alive status set to: 1
    PY:player 14's alive status set to: 1
    PY:player 15's alive status set to: 1
    PY:player 16's alive status set to: 1
    PY:player 17's alive status set to: 1
    PY:player 18's alive status set to: 1
    PY:player 19's alive status set to: 1
    PY:player 20's alive status set to: 1
    PY:player 21's alive status set to: 1
    PY:player 22's alive status set to: 1
    PY:player 23's alive status set to: 1
    PY:player 24's alive status set to: 1
    PY:player 25's alive status set to: 1
    PY:player 26's alive status set to: 1
    PY:player 27's alive status set to: 1
    PY:player 28's alive status set to: 1
    PY:player 29's alive status set to: 1
    PY:player 30's alive status set to: 1
    PY:player 31's alive status set to: 1
    map rebuild. gridw=124, gridh=68

    preapply plots

    map apply - recalc areas/regions

    apply plots

    apply signs

    Randomize Resources

    WB apply done

    8500 - gold

    8501 - research

    8502 - culture

    8503 - espionage

    8483 - food

    8484 - production

    8485 - commerce

    8550 - judaism

    8551 - judaism

    8552 - christianity

    8553 - christianity

    8554 - islam

    8555 - islam

    8556 - hinduism

    8557 - hinduism

    8558 - buddhism

    8559 - buddhism

    8560 - confucianism

    8561 - confucianism

    8562 - taoism

    8563 - taoism

    3 SCREEN TURNED ON

    99 SCREEN TURNED ON

    ('leader starting switch:', 17, 'in civ', 3)

    ('leader starting switch:', 24, 'in civ', 7)

    ('leader starting switch:', 13, 'in civ', 16)

    ('leader starting switch:', 8, 'in civ', 17)

    ('leader starting switch:', 36, 'in civ', 18)

    ('leader starting switch:', 50, 'in civ', 26)

    PY:No valid Scenario module found!
    PY:player 4's alive status set to: 0
    PY:player 5's alive status set to: 0
    PY:player 6's alive status set to: 0
    PY:player 7's alive status set to: 0
    PY:player 8's alive status set to: 0
    PY:player 9's alive status set to: 0
    PY:player 10's alive status set to: 0
    PY:player 11's alive status set to: 0
    PY:player 12's alive status set to: 0
    PY:player 13's alive status set to: 0
    PY:player 14's alive status set to: 0
    PY:player 15's alive status set to: 0
    PY:player 16's alive status set to: 0
    PY:player 17's alive status set to: 0
    PY:player 18's alive status set to: 0
    PY:player 19's alive status set to: 0
    PY:player 20's alive status set to: 0
    PY:player 21's alive status set to: 0
    PY:player 22's alive status set to: 0
    PY:player 23's alive status set to: 0
    PY:player 24's alive status set to: 0
    PY:player 25's alive status set to: 0
    PY:player 26's alive status set to: 0
    PY:player 27's alive status set to: 0
    PY:player 28's alive status set to: 0
    PY:player 29's alive status set to: 0
    PY:player 30's alive status set to: 0
    2 SCREEN TURNED ON

    SCREEN OFF

    PY:No valid Scenario module found!
    PY:No valid Scenario module found!
    PY:City Built Event: Kolhapur
    PY:City Built Event: Tianjin
    PY:City Built Event: Lagash
    ('iGameTurn', 0)

    ('TOTAL UNITS', 5)

    ('TOTAL CITIES', 3)

    Stability

    ('Base:', 0, 'Modifier:', 0, 'Total:', 0, 'civic', 25, u'Egyptian Old Kingdom')

    ('Base:', 0, 'Modifier:', 4, 'Total:', 4, 'civic', 25, u'Indian Empire')

    ('Base:', 14, 'Modifier:', 4, 'Total:', 18, 'civic', 25, u'Middle Country of China')

    ('Base:', 12, 'Modifier:', 4, 'Total:', 16, 'civic', 25, u'Babylonian Empire')

    ('dead', 4)

    ('dead', 5)

    ('dead', 6)

    ('dead', 7)

    ('dead', 8)

    ('dead', 9)

    ('dead', 10)

    ('dead', 11)

    ('dead', 12)

    ('dead', 13)

    ('dead', 14)

    ('dead', 15)

    ('dead', 16)

    ('dead', 17)

    ('dead', 18)

    ('dead', 19)

    ('dead', 20)

    ('dead', 21)

    ('dead', 22)

    ('dead', 23)

    ('dead', 24)

    ('dead', 25)

    ('dead', 26)

    ('Parameter', 0, 0)

    ('Parameter', 1, 0)

    ('Parameter', 2, 0)

    ('Parameter', 3, 0)

    ('Parameter', 4, 0)

    ('Parameter', 5, 0)

    ('Parameter', 6, 0)

    ('Parameter', 7, 0)

    ('Parameter', 8, 0)

    ('Parameter', 9, 0)

    ('Parameter', 10, 0)

    ('Parameter', 11, 0)

    ('Parameter', 12, 0)

    (u'Egypt', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'India', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'China', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Babylonia', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Greece', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Persia', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Carthage', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Rome', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Japan', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Ethiopia', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Maya', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Vikings', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Arabia', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Khmer', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Spain', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'France', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'England', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Germany', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Russia', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Netherlands', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Mali', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Portugal', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Inca', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Mongolia', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Aztec', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'Turkey', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    (u'America', 'PLOT OWNERSHIP ABROAD:', 0, 'CITY OWNERSHIP LOST:', 0)

    PY:City Built Event: Tartar
    PY:City Built Event: Hun
    PY:City Built Event: Avar
    PY:player 27's alive status set to: 1
    PY:player 28's alive status set to: 1
    ('AI thinking (Mercenaries)', 1)

    ('AI thinking (Mercenaries)', 31)

    ('iGameTurn', 1)

    (u'Egypt', False, False)

    (u'India', False, False)

    (u'China', False, False)

    (u'Babylonia', False, False)

    ('AI thinking (Mercenaries)', 2)

    (2, 'enemyPlayersList', 0)

    ('iGameTurn', 2)

    PY:No valid Scenario module found!
    PY:No valid Scenario module found!
    PY:No valid Scenario module found!
    ('AI thinking (Mercenaries)', 3)

    (3, 'enemyPlayersList', 0)

    ('AI thinking (Mercenaries)', 27)

    ('iGameTurn', 3)

    PY:OnPreSave
    PY:No valid Scenario module found!
     
  2. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Firstly, turn on debugging and exceptions. Line #25 in PyScenario.py:
    Code:
    bDisplayDebugMessages = True
    Secondly, check line #46:
    Code:
                    execfile("Mods\[B]RFCMarathon[/B]\Assets\Python\Scenario.py")
    Change the highlighted scenario folder name if you're not using the default one.

    (I failed in my initial attempt at fetching the mod path dynamically. See the "path" code that I commented out. I figured this out however and a fix is due with the next update.)

    Other than that, make sure you're saving the Scenario.py file with UTF-8 text encoding.

    Did this solve your problem? If not, what is the exception shown instead of the default message?
     
  3. Osakasayama

    Osakasayama In decline

    Joined:
    Jul 6, 2010
    Messages:
    66
    Location:
    St. Louis
    Oooohh! The exceptions told me it was a spelling error. :yuck:"unit" ;)"units"

    But I don't think that was the only huge problem, because it still won't work.
    I notice that the logs say things about wierd dates like -35640.
    Could it be a mistake in the calendar?
     
  4. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Aha, the Trigger won't fire because the date now needs to be past the game date. So the year 3000 BC is really too early to fire, for reasons mathematical. I guess I should add some code that takes care of this special case however.

    The way to have something fire before the first game turn (on 3000 BC) is instead to use the startup() method. Look it up in the API.

    And the weird dates in the log are actually game months. It turns out this is how the game keeps track of dates...
     
  5. Baron03

    Baron03 Baron

    Joined:
    Nov 7, 2010
    Messages:
    254
    I cant find a download link for pyscenario. please help
     
  6. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    33,096
    Gender:
    Male
    Location:
    Leblanc
    The first post has a zip file attached.
     
  7. Baron03

    Baron03 Baron

    Joined:
    Nov 7, 2010
    Messages:
    254
    i tried using winrar to be able to install it, but i get bunch of python files instead and i can't do anything with them
     
  8. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    33,096
    Gender:
    Male
    Location:
    Leblanc
    Simply unpack the Python files into /Assets/Python/.
     
  9. Baron03

    Baron03 Baron

    Joined:
    Nov 7, 2010
    Messages:
    254
    then how do i access it? I put them there but i dont know what to do next.No wait i figured it out nevermind, but thanks!
     
  10. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Baron03, glad to hear you figured it out. I think you need to take a long, hard look at the documentation for PyScenario if you're ever gonna be able to do anything useful with it. There are several important things for you to know and understand, or you will be stuck scratching your head indefinitely... :p
     
  11. killerkebab

    killerkebab Prince

    Joined:
    Jun 25, 2009
    Messages:
    571
    I decided to go back to Civ IV and thus PyScenario, so I updated to your latest release and left RFCMarathon at v1.21 - now I can't load a game. Did the method to work out dates change?

    Here's a screenshot of the error: http://img.photobucket.com/albums/v59/KillerKebab/error.png

    Also, here's my scenario.py file:
    Code:
    #Scenario name: PyScenario script template
    
    from PyScenario import *
    
    ### enter Trigger constructors below
    ### loaded once on initialization
    ### press shift + alt + R key to reload during gameplay
    
    #Scenario name: PyScenario script template
    # custom scenario events for RFC by Killerkebab
    
    from CvPythonExtensions import CyGlobalContext
    import Consts as con
    
    ### constants
    
    gc = CyGlobalContext()
    get = gc.getInfoTypeForString
    
    iJapan = con.iJapan
    iVikings = con.iVikings
    iSpain = con.iSpain
    iAmerica = con.iAmerica
    iRussia = con.iRussia
    iChina = con.iChina
    iArabia = con.iArabia
    iFrance = con.iFrance
    iEngland = con.iEngland
    iGermany = con.iGermany
    iNetherlands = con.iNetherlands
    iTurkey = con.iTurkey
    
    iArcher = con.iArcher
    iLongbowman = con.iLongbowman
    iMusketman = con.iMusketman
    iRifleman = con.iRifleman
    iEnglishRedcoat = con.iEnglishRedcoat
    
    iChristianity = con.iChristianity
    iIslam = con.iIslam
    
    iPasture = get("IMPROVEMENT_PASTURE")
    iPlantation = get("IMPROVEMENT_PLANTATION")
    iWinery = get("IMPROVEMENT_WINERY")
    iFort = get("IMPROVEMENT_FORT")
    iForest = con.iForest
    iFloodPlains = con.iFloodPlains
    iFish = con.iFish
    iPig = con.iPig
    iClam = con.iClam
    iWhales = con.iWhales
    
    lJapanBuildings = [con.iGranary, con.iHarbor] #Japanese spawns on Honshu
    lVikingBuildings = [con.iVikingTradingPost, con.iMarket, con.iGranary] #Viking spawns in Scandinavia, Iceland
    lArabiaBuildings = [con.iHarbor, con.iGranary, con.iMarket, con.iIslamicTemple, con.iIslamicCathedral] #Arabian spawns in the Maghreb
    lRussianBuildings = [con.iGranary, con.iMarket] #Russian spawns in Eastern Europe
    lColonialBuildings = [con.iGranary, con.iMarket, con.iForge, con.iHarbor] #New colonies
    lAmericanBuildings = [con.iGranary, con.iMarket, con.iHarbor, con.iForge, con.iLibrary, con.iChristianTemple] #American West Coast spawns
    
    ### enter Trigger constructors below
    ### loaded once on initialisation
    ### press shift + alt + R key to reload during gameplay
    
    ### CITY SPAWN TRIGGERS
    
    #Maghreb
    #Allows Arabian control of Maghreb later, border proximity with Spain/France should fuel more wars.
    Trigger().player().date(600).city(58,39,"Tunis",3).culture(50).buildings(lArabiaBuildings).religions(iIslam).units(eType=iArcher)
    Trigger().player().date(800).city(55,39,"Al-Jazair",3).culture(50).buildings(lArabiaBuildings).religions(iIslam).units(eType=iArcher) #Algiers
    Trigger().player().date(1000).city(50,36,"Dar Beida",3).culture(50).buildings(lArabiaBuildings).religions(iIslam).units(eType=iArcher) #Casablanca
    
    #Japan
    #Avoids poor AI city placement in Japan, hopefully
    Trigger().player(8).check().valid().date(-500,500).interval(50,True,True).city(116,47,"Edo",3).buildings(lJapanBuildings).culture(10).units(eType=iArcher,iNum=1)
    Trigger().player(8).check().date(650,1050).interval(20,True,True).city(111,42,"Nagasaki",3).buildings(lJapanBuildings).culture(10).units(eType=iArcher,iNum=1)
    Trigger().player(8).check().date(650,1050).interval(30,True,True).city(114,51,"Sapporo",3).buildings(lJapanBuildings).culture(10).units(eType=iArcher,iNum=1)
    
    #Scandinavia
    #Gives Vikings some historical foothold in Iceland and Denmark
    Trigger().player(11).check().date(650).city(60,59,"Oslo",3).culture(10).buildings(lVikingBuildings).units(eType=iArcher,iNum=1)
    Trigger().player(11).check().date(650).city(65,63,"Luleå",3).culture(10).buildings(lVikingBuildings).units(eType=iArcher,iNum=1)
    Trigger().player(11).check().date(790).valid().city(63,58,"Birka",3).culture(10).buildings(lVikingBuildings).units(eType=iLongbowman,iNum=1)
    Trigger().player(11).check().date(840).city(60,55,"Roskilde",3).culture(10).buildings(lVikingBuildings).religions(iChristianity).units(eType=iLongbowman,iNum=1)
    Trigger().player(11).check().date(870).city(45,62,"Reykjavík",3).culture(10).buildings(lVikingBuildings).units(eType=iArcher,iNum=1)
    
    #Russia
    #Allows AI Russia to control Eastern Europe
    Trigger().player().date(740).city(68,56,"Novgorod",3).buildings(lRussianBuildings).units(eType=iLongbowman,iNum=1)
    Trigger().player().date(790).city(69,51,"Kiev",3).culture(0).buildings(lRussianBuildings).units(eType=iLongbowman,iNum=1)
    
    #Free colonies
    #For Spain
    Trigger().player(14).check().date(1500,1600).interval(10,True,True).city(25,32,iSize=3).name("Panamá").culture(50).buildings(lColonialBuildings).religions(iChristianity).units(eType=iMusketman)
    
    #For England
    #Indian Colonies, free troops are so hopefully England attempts to take all of India into the British Empire
    Trigger().player(16).check().valid(bForeign=True).date(1600,1700).interval(10,True,True).city(92,33,"Madras",iSize=3).culture(50).buildings(lColonialBuildings).religions(iChristianity).units(eType=iEnglishRedcoat,iNum=5)
    Trigger().player(16).check().valid(bForeign=True).date(1600,1700).interval(10,True,True).city(94,37,"Calcutta",iSize=3).culture(50).buildings(lColonialBuildings).religions(iChristianity).units(eType=iEnglishRedcoat,iNum=5)
    Trigger().player(16).check().valid(bForeign=True).date(1600,1700).interval(20,True,True).city(85,37,"Karachi",iSize=3).culture(50).buildings(lColonialBuildings).religions(iChristianity).units(eType=iEnglishRedcoat,iNum=5)
    Trigger().player(16).check().valid(bForeign=True).date(1780,1810).interval(5,True,True).city(118,13,"Sydney",iSize=3).culture(50).buildings(lColonialBuildings).religions(iChristianity).units(eType=iEnglishRedcoat)
    Trigger().player(16).check().valid(bForeign=True).date(1820,1850).interval(5,True,True).city(104,12,"Perth",iSize=3).culture(50).buildings(lColonialBuildings).religions(iChristianity).units(eType=iEnglishRedcoat)
    Trigger().player(16).check().valid(bForeign=True).date(1830,1860).interval(5,True,True).city(114,10,"Melbourne",iSize=3).culture(50).buildings(lColonialBuildings).religions(iChristianity).units(eType=iEnglishRedcoat)
    Trigger().player(16).check().valid(bForeign=True).date(1835,1865).interval(5,True,True).city(122,8,"Wellington",iSize=3).culture(50).buildings(lColonialBuildings).religions(iChristianity).units(eType=iEnglishRedcoat)
    
    #Free random colonies
    #England/Netherlands
    #Cape Town
    Trigger().player(16).check().valid(bForeign=True).date(1500,1700).interval(65,True,True).city(63,10,iSize=3).name("Cape Town").culture(50).buildings(lColonialBuildings).religions(iChristianity).units(eType=iMusketman)
    Trigger().player(19).check().valid(bForeign=True).date(1500,1700).interval(65,True,True).city(63,10,iSize=3).name("Kaapstadt").culture(50).buildings(lColonialBuildings).religions(iChristianity).units(eType=iMusketman)
    #Winburg
    Trigger("Spawn Winburg").random(16,19).check().valid(bForeign=True).date(1500,1700).interval(25,True,True).city(69,13,iSize=3).name("Winburg").culture(50).buildings(lColonialBuildings).religions(iChristianity).units(eType=iMusketman)
    
    #England/Netherlands/Portugal
    #Colombo
    Trigger("Spawn Colombo").random(16,19,21).check().valid(bForeign=True).date(1600,1730).interval(20,True,True).city(93,29,iSize=3).name("Colombo").culture(50).buildings(lColonialBuildings).religions(iChristianity).units(eType=iMusketman)
    
    #America
    #Allows AI America to control the West coast of the USA instead of leaving it barren
    Trigger().player(26).check().date(1850).city(11,46,"Los Angeles",4).culture(20).buildings(lAmericanBuildings).religions(iChristianity).units(eType=iRifleman,iNum=1)
    Trigger().player(26).check().date(1852).city(11,50,"Seattle",4).culture(50).buildings(lAmericanBuildings).religions(iChristianity).units(eType=iRifleman,iNum=1)
    Trigger().player(26).check().date(1868).valid().city(9,59,"Anchorage",4).culture(100).buildings(lAmericanBuildings).religions(iChristianity).units(eType=iRifleman,iNum=1)
    Trigger().player(26).check().date(1888).valid().city(1,38,"Honolulu",4).culture(100).buildings(lAmericanBuildings).religions(iChristianity).units(eType=iRifleman,iNum=1)
    
    ### CITY FLIP TRIGGERS
    
    #600AD Scenario flips
    #China
    #Avoids some instances of weak China which doesn't take over mainland possessions.
    Trigger("China Flip").player(2).check().date(650,1050).interval(30,True,True).target((101,39),(107,42)).flip().units(eType=iArcher)
    
    #Japan
    #We let the human player have free Edo since Japan doesn't start with settlers any more. This avoids most poor AI city placement
    Trigger("Edo Flip").player(8).date(620).flip("Edo").units(eType=iArcher,iNum=1)
    
    #Arabia
    Trigger().player(12).check().date(620).target(76,40).flip().units(eType=iLongbowman,iNum=2) #Baghdad
    Trigger().player(12).check().date(620).flip("Tehran").units(eType=iLongbowman,iNum=2)
    Trigger().player(12).check().date(620).flip("Sirajis").units(eType=iLongbowman,iNum=2)
    Trigger().player(12).check().date(620).flip("Kandahar").units(eType=iLongbowman,iNum=2)
    Trigger().player(12).check().date(700).flip("Alexandria")
    Trigger().player(12).check().date(750).flip("Hesperides")
    Trigger().player(12).check().date(800).flip("Tripolis")
    Trigger().player(12).check().date(900).target(58,39).flip() #Tunis
    Trigger().player(12).check().date(1000).target(55,39).flip() #Algiers
    Trigger().player(12).check().date(1100).target(50,36).flip() #Casablanca
    
    #Dual flips
    #America
    #Avoids typically weak America which rarely fights for its cities
    Trigger().player(26).check().date(1803).target((22,42),(24,43)).flip(bMinorsOnly=False).units() #New Orleans
    Trigger().player(26).check().date(1825).target((19,42),(22,51)).flip(bMinorsOnly=False).units() #Central
    Trigger().player(26).check().date(1845).target((15,44),(19,51)).flip(bMinorsOnly=False).units() #Midwest
    Trigger().player(26).check().date(1860).target((11,46),(15,51)).flip(bMinorsOnly=False).units() #West Coast
    Trigger().player(26).check().date(1914).target(25,32).flip(bMinorsOnly=False).units() #Panama
    
    ### ADDITIONAL CITY RENAME TRIGGERS
    
    #America
    Trigger().player().lost(None,iAmerica,(25,32),None).name("Panama City")
    Trigger().player().lost("Bandar Seri Begawan",iAmerica,bConquest=None).name("Brunei City")
    Trigger().player().lost("Manira",iAmerica,bConquest=None).name("Manila")
    
    #Denmark
    Trigger().player().lost("Roskilde",bConquest=None).name("Kopenhagen")
    
    #England
    Trigger().player().lost("Bandar Seri Begawan",iEngland,bConquest=None).name("Brunei City")
    Trigger().player().lost("Manira",iEngland,bConquest=None).name("Manila")
    
    #France
    Trigger().player().lost("Dar Beida",bConquest=None).name("Casablanca")
    Trigger().player().lost("Tunus",iFrance).name("Tunis")
    Trigger().player().lost(tCoords=(73,38),eReceiver=iFrance).name("Jérusalem")
    Trigger().player().lost(tCoords=(67,36),eReceiver=iFrance).name("Alexandrie")
    Trigger().player().lost(tCoords=(69,35),eReceiver=iFrance).name("Le Caire")
    
    #Russia
    Trigger().player(18).tech(eEra=con.iIndustrial).name("Sankt-Peterburg","Novgorod")
    
    #Turkey
    Trigger().player().lost("Bosna Saraj",bConquest=None).name("Sarajevo")
    
    #Vikings
    Trigger().player(11).tech(eEra=con.iRenaissance).name("Stockholm","Birka")
    Trigger().player(11).tech(eEra=con.iRenaissance).name("Kjøbmandehavn","Roskilde")
    
    ### DYNAMIC TERRAINS, RESOURCES, IMPROVEMENT AND BUILDING TRIGGERS
    
    #Construction of Arabian mosques and temples in Cairo, Khartoum, Sana'a and Jerusalem (usually don't get these as they flip before selection of Islam as state religion)
    Trigger("Spread Islam").date(620).target((69,30),(76,38)).religions(2) #Spread Islam to flipped cities
    Trigger("Build Mosques").date(620).target((69,30),(76,38)).buildings(85,86) #Build mosques and temples in flipped cities
    
    ### STABILITY TRIGGERS
    #Arabian instability near 13th century in 600AD starts only (since they get a free empire)
    Trigger("Arabian Instability").player(12).date(1150,1350).interval(20,True,True).stability(-15)
    
    
    EDIT: Don't worry, I've just redownloaded RFCMarathon as well as PyScenario and suddenly it seems to work. Even though the readme file said that I had v1.21 it seems like the v1.21 I downloaded must be different, because it works now. I have also removed the gc.getImprovement lines and CyGlobalContext import since I moved those triggers back to Resources.py.
     
  12. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    By the way, you can do without all the iConstant = con.iConstant lines by changing the import line to:
    Code:
    from Consts import *
    Also, you don't need these lines any more:
    Code:
    gc = CyGlobalContext()
    get = gc.getInfoTypeForString
    Instead you can do this:
    Code:
    iFort = eIndex("Improvement", "Fort")
    Because the eIndex() function is being imported from the PyScenario module.
     
  13. killerkebab

    killerkebab Prince

    Joined:
    Jun 25, 2009
    Messages:
    571
    Run into a weird problem - I tried to start my game and it says "No Valid Scenario Module Found" at the top of the screen when I load a game.

    I've checked my scenario.py file is in the right spot, the scenario is the same as it was before (this isn't my computer, so I copied and pasted from my computer), BTS is v3.19, RFCM is the latest download and so is PyScenario. Really confused here :/
     
  14. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    What is you mod folder called? Because it currently has to be RFCMarathon. (Fix in next version.)
     
  15. killerkebab

    killerkebab Prince

    Joined:
    Jun 25, 2009
    Messages:
    571
    It is called RFCMarathon. Like I said, the mod loads fine, the scenario doesn't.

    I copied/pasted an empty scenario.py, then copied and pasted the scenario into this file. Now all of a sudden, it works. I am confused, but it works, so I'm happy :D
     
  16. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    It was probably the import statements then, or something. Or the way you were defining constants. Because things have changed and I know that your script is from the very first version, originally. :D
     
  17. killerkebab

    killerkebab Prince

    Joined:
    Jun 25, 2009
    Messages:
    571
    Hehe, the script hasn't changed either, which is weird. All I did was delete the file, create a blank scenario.py and copy/paste my script into this file.

    That said, it is an old school script :D
     
  18. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Perhaps the text encoding wasn't kosher? Its really easy to accidentally save it as ANSI or something.
     
  19. killerkebab

    killerkebab Prince

    Joined:
    Jun 25, 2009
    Messages:
    571
    Maybe. Hell for all I know I saved it as scenario.py.txt the first time round or something equally stupid ;)
     
  20. merijn_v1

    merijn_v1 Black Belt

    Joined:
    Dec 29, 2008
    Messages:
    5,600
    Location:
    The city of the original vlaai
    @ Baldyr

    In my 2nd UB modcomp, I'm trying to give the Portugese 2nd UB a bonus to settler units. I found a code I might use, but it didn't. I changed it so it looks like this (it's CvGameUtils.py):
    Code:
    	def getUnitCostMod(self, argsList):
    		iPlayer, iUnit = argsList
    		iCostMod = -1 # Any value > 0 will be used
    		
    		return iCostMod
    
    	def getBuildingCostMod(self, argsList):
    		iPlayer, iCityID, iBuilding = argsList
    		pPlayer = gc.getPlayer(iPlayer)
    		pCity = pPlayer.getCity(iCityID)
    		
    		iCostMod = -1 # Any value > 0 will be used
    
    ## Portugese Explorers House ##
    
    		pBuildingInfo = gc.getBuildingInfo(iBuilding)
    		iPortugalExplorersHouse = CvUtil.findInfoTypeNum(gc.getBuildingInfo,gc.getNumBuildingInfos(),'BUILDING_PORTUGAL_EXPLORERHOUSE')
    		aiExceptionList = [iPortugalExplorersHouse]
    		
    		pPlayer1 = gc.getPlayer(pCity.plot().getOwner())
    
    		bPortugalExplorersHouse = gc.getInfoTypeForString("BUILDING_PORTUGAL_EXPLORERHOUSE")
    		obsoleteTech = gc.getBuildingInfo(bPortugalExplorersHouse).getObsoleteTech()
    		if ( gc.getTeam(pPlayer1.getTeam()).isHasTech(obsoleteTech) == false or obsoleteTech == -1 ):
    			for iCity in range(pPlayer1.getNumCities()):
    				ppCity = pPlayer1.getCity(iCity)
    				if ppCity.getNumActiveBuilding(bPortugalExplorersHouse) == true:
    					if ((isUnitClass(gc.getUnitInfo,gc.getNumUnitInfos(),'UNITCLASS_SETTLER'):
    
    						if (not iUnit in aiExceptionList):
    
    							return 65	# 65% of normal cost
    
    		return -1
    
    ## Portugese Explorers House ##
    		
    		return iCostMod
    Can you tell me what I did wrong?
     

Share This Page