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 > Civilization: Call To Power > CtP-Creation > The ghost civ problem. (Eliminated civ still there)
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
12.Sep: `CTP CHALLENGE LADDER` - SEPTEMBER UPDATE
09.Sep: EARLY BUILD SPRITE EDITOR
02.Aug: `SUPERLEAGUE` SIGN-UP

bottom of page
  - CIVILIZATION: CALL TO POWER @ GAMESTOP $9.99 - CIVILIZATION: CALL TO POWER @ AMAZON $9.99
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
Martin the Dane is offline Martin the Dane
Prince
Aarhus, Denmark
Feb 2000
time: 06:13
  Old Post 31-10-2000 05:06 Visit Martin the Dane's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
The ghost civ problem. (Eliminated civ still there) Increase the size of your Attachments

Back in May I started a thread over in the help section calle: Eliminated AI still there!!! the problem in short is as follows:

Some times when a civ is eliminated the civ will still appear on the diplomacy screen effectively making a conquest victory impossible, then if you turn on the cheat mode the civ will disappear. I believe I have found the cause.

I was playing the Vikings and had eliminated the Swedes but at the next turn they were still there.
In an attempt to find the problem I turned on cheat mode gave the Swedes a new city and subsequently eliminating it, now to my surprise I saw a unit die when I pressed the button I then reloaded the game from a save prior to entering cheat mode, and sent a bomber over the square and lo and behold there was a Swedish diplomat and a lawyer, since I was at war with them my bomber killed them right away. Now there are no more Swedes.

Normally when the last city of a civ has been eliminated or conquered the civ's remaining units will die at the beginning of that civ's next turn, thus eliminating the civ from the game. This however does not always happen, in fact it will not happen if you save and reload the game before completing the turn in which the civ was eliminated.
You don't have to eliminate all the orphaned tropes in order to eliminate the dead civ, one will do, unless you make a save reload after killing the unit. (I did )

I don't know if any of you SLIC wizards can think up a fix to that, what about some check to see it the civ has any cities, and if not eliminate any remaining units, has to take the beginning of the game into account though.

[This message has been edited by Martin the Dane (edited October 30, 2000).]

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:13
Post  Old Post 31-10-2000 17:45 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Support Apolyton, buy Call to Power 2

Well, that shouldn't be too hard to do, how about this:

code:
trigger 'CivDies' when (city.captured) { if (player.1.cities == 0) { i = 0; while (i < player.total) { SetUnitByIndex(i, city.owner, tmp); i = i + 1; } } }


I made this up in 3 minutes or so and didn't test it, so I can't guarantee it'll work, but it should be very close to working. I'll see if I can test it out tonight (can't promiss anything, since I'm rather busy and I don't have the game installed at the moment), or maybe someone else can.

Gedrin is offline Gedrin
Warlord

Jun 1999
time: 05:13
Post  Old Post 01-11-2000 10:10
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton buy from Amazon

I have a few improvements to suggest:


trigger 'CivDies' when (city.captured) {
if (player.1.cities == 0) {
i = 0;
while (i < player.totalunits) {
// player.1 == city.owner and unit.1 is a unit in the capturing army so use index 2 so as to not clear it out.
SetUnitByIndex(2, city.owner, i);
KillUnit(unit.2);
i = i + 1;
}
}
}


Same disclaimer as above.


Gedrin
[This message has been edited by Gedrin (edited October 31, 2000).]
[This message has been edited by Gedrin (edited October 31, 2000).]

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:13
Post  Old Post 01-11-2000 01:46 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Support Apolyton or Terrorists Win

Ah yes, thanks for fixing those bugs, Gedrin, it looks much better like that. One thing though, I'm not sure if city.owner will be the new or the old owner of the city, so I replaced it with player.1. Also, I'm not sure if player.1 is the player that conquers the city or the player that has it's city conquered, so it might be that player.1 should be player.2. So if anyone wants to try this (Martin?), use the code below (it looks like I won't have time for it until at least Friday, maybe even later). If this doesn't work, try replacing all three instances of player.1 with player.2.

code:
trigger 'CivDies' when (city.captured) { if (player.1.cities == 0) { i = 0; while (i < player.1.totalunits) { SetUnitByIndex(2, player.1, i); KillUnit(unit.2); i = i + 1; } } }


For ease of testing the 0 in the if-line could also be replaced with 1 (or any other number for that matter) so that all units get destroyed when the civ has exactly 1 city left after conquering a city.

Martin the Dane is offline Martin the Dane
Prince
Aarhus, Denmark
Feb 2000
time: 06:13
  Old Post 01-11-2000 04:14 Visit Martin the Dane's homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Get a bigger avatar today!

Thanks guys. What should we mere mortals do without you people

I went along and did some testing (Where is the sweating smilie ). As Locutos sugested the player getting killed might be player.2 and not player.1. There was however a comon bug in your code: Don't increase i when using it to iterate through a list that you want to clear.
The code ends up as follows:

code:
trigger 'CivDies' when (city.captured) { if (player.2.cities == 0) { while (0 < player.2.totalunits) { SetUnitByIndex(1, player.2, 0); KillUnit(unit.1); } } }


I tested this, and it's kind of fun waching a whole load of units die just because you walked right into their last undefended city.

Ok, who includes this in a mod, seems like a little overkill to send out a mod containing only this.

Martin the Dane

[This message has been edited by Martin the Dane (edited October 31, 2000).]

Gedrin is offline Gedrin
Warlord

Jun 1999
time: 05:13
Post  Old Post 01-11-2000 20:29
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Lose 30 kilos (of popups)

Well gee Martin, you a mere mortal picked up on something we missed, incrementing i.

Locutus good point about city.owner but I believe player.1 is the victim and player.2 is the aggressor. Trouble is Martin I see your code differs in that regard. So please let me know if that was accurate since if I am correct then the trigger would have done nothing at all... except hit false in the if condition...so any units that died have been CTP itself doing it not your trigger.

I believe that city.owner would already have been updated to player.2 since in my Refugee trigger I get a message with the city.name is colour coded to match the agressor... Hmmm... IIRC that is. I'll check on that. Oh and it's my Refugee trigger that makes me think player.1 is the victim, See:
*snip*
// pick a random number in [0,Cities(player.1))... in not inclusive!
destCityIdx = Random (Cities(player.1));
SetCityByIndex(2, player.1, destCityIdx);
AddPops (city.2, 1);
*snip*
If player.1 is the agressor and I pick a random city of his then the pop should flee to the attackers cities... that of course does not happen.

Gedrin


Martin the Dane is offline Martin the Dane
Prince
Aarhus, Denmark
Feb 2000
time: 06:13
Exclamation  Old Post 02-11-2000 04:36 Visit Martin the Dane's homepage!
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Inflate your Upload Space

quote:

Well gee Martin, you a mere mortal picked up on something we missed, incrementing i.

"Elemtary my dear Watson" and by the way I didn't say stupid, just mortal you se my SLIC knowledge is at the same level as my German, understanding but not writing/speking it.

Well Gerdin, I tried bot player.1 and player.2 and with player.1 nothing happend while with player.2 the units were killed one at a time. Just checked again, so player.2 is the victim while player.1 is the agressor.
(The code is directly copy poasete from the .slc file.)

CTP will not kill the units untill after the player press END, that's why the problem is there in the first place.

You wrote something about not using index 1 to select the units for 'execution', I have however not experienced any problems doung so.


quote:

If player.1 is the agressor and I pick a random city of his then the pop should flee to the attackers cities... that of course does not happen.

Are you so sure about that? It did when I tried your code.
The city.owner has ben updated though, I got the growth in the captured city once (out of a total of three attempts) and by the way you wouldn't get the city growth message if the city recieving the refugies was not yours.

Martin the Dane

Gedrin is offline Gedrin
Warlord

Jun 1999
time: 05:13
Post  Old Post 03-11-2000 02:48
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Support Apolyton or Terrorists Win

Hmmm....Well it looks like I need to look at my refugee trigger anew.

I can confirm that city.owner is updated to the aggressors civ. Tried it last night and its certain I was mis-remembering.

And if player.1 is the agressor then I would expect my refugees to flee into the attackers waiting arms. I don't think was happening... mind you this depends on my copy here being that same as the one I have at home... which I can't check right at this momment.

My comments about not using unit index 1 is only because other triggers that execute on city.captured (if there are any) *may funtion* on a unit in the attacking army *and* be executed after this one. Unlikely so you probably will not see anything, but it is a minor bug waiting, lurking...

Gedrin

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:13.
Apolyton Time is 00:13.
    top of page
Rate This Thread:
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.0326 seconds (88.83% PHP - 11.17% MySQL) with 30 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