Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Miscellaneous > Archive > CtP2-Creation/AI/Mods/Scenarios-Archive > PBEM code with Goodmod
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!

bottom of page
  
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:25
  Old Post 07-02-2003 23:34 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
PBEM code with Goodmod Support Apolyton, buy Civilization III: Complete

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.

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:25
  Old Post 08-02-2003 04:25
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Support Apolyton



Are you sure you coppied it in the right file???

Other than that try to change the event name from 'LITE_StartUp' to anything else like 'MAQ_LITE_StartUp'. There is a chance of 1 in 10000000000000000000000 that there is a event with same name which causes the problem.

MrBaggins is offline MrBaggins
King

May 1999
time: 05:25
  Old Post 08-02-2003 04:57
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

perhaps if you use the same local variable names in the same event handler (BeginTurn -post) then you get problems?

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:25
  Old Post 08-02-2003 05:54 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Inflate your Upload Space

*slaps forehead 10000000000000000000000 times.

I didnt include the new script.slc in gamefile.txt. I still get a weird turn progression with it though, like this...

-- Player1 starts at "turn 0", ends turn...
-- Player2 now starts playing on "turn 1" ends turn.
-- Player1 plays "turn 1" ends turn.
-- Player2 plays "turn 2"... etc etc strange. That could be a thing with hotseat mode and GoodMod. Anyhow.

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:25
  Old Post 08-02-2003 06:36
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

Are you in debug mode? I put those handlers into the Vanilla game and got 'out of bounds' errors.

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:25
  Old Post 08-02-2003 06:53 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Tired of ads?

Its on "DebugSlic=Yes" yeah, i didnt get any errors at all though.

Turambar is offline Turambar
Prince
England
Apr 2002
time: 05:25
  Old Post 08-02-2003 20:27 Visit Turambar's homepage!
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Support Apolyton, buy Civilization 2

Don't suppose someone's fixed diplomacy in pbem yet?

Is Maq any good at pbem btw?

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:25
  Old Post 08-02-2003 20:35 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Increase the size of your Attachments

I think Locutus and Pedrunn were most active in the diplomacy work but stopped.

And yes he is very good at PBEM. Check your email.

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:25
  Old Post 08-02-2003 22:27
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Remove this text

quote:
Originally posted by Turambar
Don't suppose someone's fixed diplomacy in pbem yet?


quote:
Originally posted by Maquiladora
I think Locutus and Pedrunn were most active in the diplomacy work but stopped.


I was fixing the PBEM diplomacy but i totally gave up because the PBEM has its turns broken (you cant get out of turn 0). What makes it impossible to play! So the PBEM diplomacy fix will just work for hotseat. And seems like we dont have all this search for hotseat games so i gave up.

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:25
  Old Post 08-02-2003 22:42 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

Yeah not alot of people wanna play CtP2 PBEM unfortunately or hotseat. Me and Turambar just started a PBEM game with the "dummy AI" trick so we can save it inbetween our turns and send it. Not ideal but what else is there...

MrBaggins is offline MrBaggins
King

May 1999
time: 05:25
  Old Post 08-02-2003 22:42
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Increase Your PM Length

Broken how?

Couldn't we keep a 'virtual track' of turn numbers?

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:25
  Old Post 08-02-2003 22:55 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

When you end turn in PBEM mode the turn count just stays at "0" and even when you end turn and go around in turns, the units (only move once), buildings (dont build) and research just stays the same, it just goes around, without actually ending the turn for any of the players.

If you can force the turn to end and clear all movement points and build/research stuff it would be great.

MrBaggins is offline MrBaggins
King

May 1999
time: 05:25
  Old Post 08-02-2003 23:15
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

Isn't there an 'Begin Turn' event. What happens when its invoked?

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:25.
Apolyton Time is 00:25.
    top of page
Rate This Thread:
archivepost
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0420 seconds (87.32% PHP - 12.68% MySQL) with 31 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net