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 > Can i make disband add a pop?
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
Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:15
  Old Post 07-09-2001 20:20
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Can i make disband add a pop? Support Apolyton buy from Amazon

What can i do to make disband a unit add a pop when it is done in a city?
Please if it is not possible tell me. I need to get this answer.

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:15
  Old Post 07-09-2001 22:02 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

code:
HandleEvent(DisbandUnit) 'addpopsinpedrunnscity' pre { city_t tmpCity; GetCityByLocation(unit[0].location, tmpCity); if(CityIsValid(tmpCity)){ AddPops(tmpCity, 1); } }

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:15
  Old Post 07-09-2001 22:19
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton buy from Amazon

Thanks IW, i really wouldnt know what to do without you.

This is just a small request. If it gives too much work do not do it.
Can you make a prerequisite wich the only units to add pop when disbanded must have the following line in their data in the unit.txt

code:
BuildingRemovesAPop

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:15
  Old Post 08-09-2001 02:52 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Get a bigger avatar today!

code:
HandleEvent(DisbandUnit) 'addpopsinpedrunnscity' pre { city_t tmpCity; message(1,'addpops2'); GetCityByLocation(unit[0].location, tmpCity); if(CityIsValid(tmpCity)){ if ((unit[0].type == UnitDB(UNIT_SEA_ENGINEER)) ||(unit[0].type == UnitDB(UNIT_SETTLER)) ||(unit[0].type == UnitDB(UNIT_URBAN_PLANNER))) { AddPops(tmpCity, 1); message(1,'addpops1'); } } } Messagebox 'addpops1' { Show(); } Messagebox 'addpops2' { Show(); }


That should be the code, but it doesn't work. Ben's code only works if you disband a fortified unit from the City Manager. Therefore the two message boxes in the code to check what is really executed and so far there is nothing executed if the unit is not fortified. I also experimented with the DisbandArmyOrder but so far no real success.

-Martin

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:15
  Old Post 08-09-2001 04:09 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Support Apolyton, buy Civilization 2

Very strange This is why I hate SLIC. This is why I love SLIC, and love to hate SLIC, and hate to love SLIC

I guess what to do is fortify it...

code:
HandleEvent(DisbandUnit) 'addpopsinpedrunnscity' pre { city_t tmpCity; message(1,'addpops2'); GetCityByLocation(unit[0].location, tmpCity); if(CityIsValid(tmpCity)){ if ((unit[0].type == UnitDB(UNIT_SEA_ENGINEER)) ||(unit[0].type == UnitDB(UNIT_SETTLER)) ||(unit[0].type == UnitDB(UNIT_URBAN_PLANNER))) { AddPops(tmpCity, 1); message(1,'addpops1'); } } } HandleEvent(DisbandArmyOrder) 'tryagain' pre { int_t i; unit_t tmpUnit; for(i = 0; i < army[0].size; i = i + 1){ GetUnitFromArmy(army[0], i, tmpUnit); unit[0] = tmpUnit; if ((unit[0].type == UnitDB(UNIT_SEA_ENGINEER)) ||(unit[0].type == UnitDB(UNIT_SETTLER)) ||(unit[0].type == UnitDB(UNIT_URBAN_PLANNER))) { GetCityByLocation(unit[0].location, tmpCity); if(CityIsValid(tmpCity)){ AddPops(tmpCity, 1); } } } }


Sorry about the mess, but this should check through any armies you're disbanding too.

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:15
  Old Post 09-09-2001 01:14
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Avatar Enlargement: We've got the solution

IW, you forgot to define the simbol tmpCity. But it was defined in the first code so i just copied and paste it in the second. The code is now working .
Thanks again.

PS: This is my first code fixing . I am almost feeling like a Slic Writter now

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:15.
Apolyton Time is 00:15.
    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.0268 seconds (87.84% PHP - 12.16% 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