Code:
HandleEvent(BeginTurn) 'LITE_StartUp' post { location_t startLocation; unit_t startUnit; unit_t tmpUnit; int_t i; int_t PBEMPlayer; for(PBEMPlayer = 1; PBEMPlayer < 33; PBEMPlayer = PBEMPlayer + 1) { if(IsPlayerAlive(PBEMPlayer)) { // movement bonus for first turn GetUnitByIndex(PBEMPlayer, 0, startUnit); AddMovement(startUnit, 900); startLocation = startUnit.location; // free units for (i = 0; i < 2; i = i + 1) { CreateUnit(PBEMPlayer, UnitDB(UNIT_SETTLER_NOMAD), startLocation, 0, tmpUnit); AddMovement(tmpUnit, 900); } // bonus Gold + PW SetPW(PBEMPlayer, 5000); AddGold(PBEMPlayer, 9900); // random extra bonus advance i = Random(6); if (i == 0) { GrantAdvance(PBEMPlayer, AdvanceDB(ADVANCE_MASONRY)); } elseif (i == 1) { GrantAdvance(PBEMPlayer, AdvanceDB(ADVANCE_IRON_WORKING)); } elseif (i == 2) { GrantAdvance(PBEMPlayer, AdvanceDB(ADVANCE_HULL_MAKING)); } elseif (i == 3) { GrantAdvance(PBEMPlayer, AdvanceDB(ADVANCE_TRADE)); } elseif (i == 4) { GrantAdvance(PBEMPlayer, AdvanceDB(ADVANCE_DRAMA)); } elseif (i == 5) { GrantAdvance(PBEMPlayer, AdvanceDB(ADVANCE_JURISPRUDENCE)); } } } DisableTrigger('LITE_StartUp'); } // bonuses for first 3 cities HandleEvent(CreateCity) 'LITE_CityBonus' post { city_t tmpCity; tmpCity = city[0]; if (player[0].cities <= 3) { // for all 3 cities CreateUnit(player[0], UnitDB(UNIT_HOPLITE), tmpCity.location, 0); CreateUnit(player[0], UnitDB(UNIT_HOPLITE), tmpCity.location, 0); CreateUnit(player[0], UnitDB(UNIT_WARRIOR), tmpCity.location, 0); CreateUnit(player[0], UnitDB(UNIT_SETTLER_ORIG), tmpCity.location, 0); CreateUnit(player[0], UnitDB(UNIT_CARAVAN), tmpCity.location, 0); // extra for capital if (player[0].cities <= 1) { PlantGood(tmpCity.location); // Has to be event Event: CreateUnit(player[0], tmpCity.location, tmpCity, UnitDB(UNIT_CARAVAN), 0); Event: CreateUnit(player[0], tmpCity.location, tmpCity, UnitDB(UNIT_CARAVAN), 0); Event: CreateUnit(player[0], tmpCity.location, tmpCity, UnitDB(UNIT_CARAVAN), 0); } } if (g.year > 10) { DisableTrigger('LITE_StartUp'); } }
Does anyone know why when i try to use this code with SAP+Goodmod, the trigger doesnt work? I think it might have something to do with the goods created with goodmod at the start.
Its also doesnt create the extra 2 settlers, doesnt give any of the 6 random advances to any players either and doesnt create the free caravans. Basically the whole trigger doesnt work with GoodMod but i dont know how to fix it, it does work with SAP2 alone though. Ignore the new settler names, its just a workaround for a fast moving settler to start the game with. I get no errors, it just doesnt work.
Comment