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 > Battles shoud destroy tile Improvments.
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 22-08-2001 21:29
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Battles shoud destroy tile Improvments. Support Apolyton buy from Amazon

For the first time i lost to the AI today. I am not totally dead, but my lands become a battlefield. From that game i had an idea .
Tile Improvments should be destroyed (pillaged) in a battle over them. That would add such a good and realistic feature. Does anyone know if that is possible?

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:15
  Old Post 22-08-2001 21:57 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Put an end to popups!

code:
HandleEvent(BattleAftermath) 'pillage' pre{ Event:CutImprovements(location[0]); }

Its that simlpe

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:15
  Old Post 22-08-2001 22:21
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Suffering from ads?

!!!!!!!

Thanks IW.
It is working.

Last edited by Pedrunn on 22-08-2001 at 22:54

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:15
  Old Post 23-08-2001 02:55 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Full PM-box? Change here!

It actually works? wow, that's surprised even me!

Glad I could help, I had a bit of trouble posting earlier, but it seems to have come through ok.

Kull is offline Kull

King
El Paso, TX USA
Mar 1999
time: 22:15
  Old Post 23-08-2001 04:52 Visit Kull<br><a href=/members><img src=/forums/images/lifer-icon.gif border=0></a><BR>'s homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Enter the AD-FREE zone

That is a great idea, Pedrunn. It's very realistic, and probably should be incorporated into the new mods. Perhaps a poll is in order to gauge the depth of opinion for or against?

Wombat: Wow, talk about "Ask and ye shall receive"!

hexagonian is offline hexagonian
King
Gnawing on your mind...
Jun 1999
time: 23:15
  Old Post 23-08-2001 18:03 Visit hexagonian's homepage!
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

Can I just tack it onto the end of another one of your codes???

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:15
  Old Post 23-08-2001 21:24
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

Unfornutelly since i got that code, Although it worked just fine through the cheat mode i am experiencing game crashs (3 times now) with the message the CTP2 caused an error on the CTP2.exe.
All the crashs happen in abut turn 40-50 wich is the time barbarians ussually appears. My theory is that the AI x Barbarians combat are causing these crashs. Did someone who got this code are experiencing this problem. I will just start a game without it. And i will keep informing.

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:15
  Old Post 23-08-2001 21:37 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Support Apolyton buy from Amazon

Uh-oh It wasn't me!

I see no way that it can be, though the tile improvement functions are notoriously buggy...

Sure Dave, tack it in anywhere, it has no variables, no functions, nothing.

Paulypav is offline Paulypav
Warlord
Shirley, NY, USA
Oct 2000
time: 05:15
  Old Post 23-08-2001 22:57
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Support Apolyton, buy Call to Power 2

Is it possible to make it a random event as well, or is it basically the tile improvement gets destroyed when there's a battle on it. I'm guessing, based on my limited knowledge that it wouldn't be possible to make it occur randomly.

Even if you could make it random you would want it heavily weighted towards destroying the improvement. Leaving a percentage chance of the improvement surviving would reflect the percentage of improvements that survive overall, as partially destroying improvements would likely take way too much work.

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

I have just finishing figuring up what happened.
Since i was playing autosaved i went check to see if a battle really happened. The game crashed when it was the turn of the brown ones so they were the first checked.
There was a battle after all. Among a barbarian Light calvary and a Brown Spearman. But surprisily there wasnt a tile not even close to the battle .
I deleted the code and restarted the same game. I am curently at turn 70 and no sight of crashs. The Barbarians even attacked and conquered my capitol (those bastards).

I do not get it! you make a code that work to destroy tile imps. but it crashs when a regular batle happens. Yet everything works fine through Cheat Mode.
I did not get a good conclusion. And i hope someone did played this code. I want to know if it is just me (since my CTP2 is tottally full of others codes) or this did it happen with someone else.

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:15
  Old Post 25-08-2001 01:35 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Increase Your PM Length

Oops, this is the exact same problem that crashed the original natural disaster codes
It works fine when there is a tile imp, because it can remove it. When there is not a tile imp, there is nothing to remove, and the game crashes.
Take 2:

code:
HandleEvent(BattleAftermath) 'pillage' pre { int_t i; for(i = 0; i < 24; i = i + 1){ if(TileHasImprovement(location[0], i)){ Event:CutImprovements(location[0]); } } }

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:15
  Old Post 25-08-2001 09:16
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Lose 30 kilos (of popups)

Thanks again IW i will try a new game now.
And to think that i was going to give uo of this great idea :
wish me good luck!

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:15
  Old Post 25-08-2001 18:37
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

I started the new game and i am almost at turn 100. I got some battles with the barbs and they worked fine. No crash. Although none of them were over tile imps. But they did get destroyed through the cheat mode.
I think it is all ok now. Great Job IW.

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:15
Post  Old Post 25-08-2001 21:00 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Avatar Enlargement: We've got the solution

quote:
Originally posted by Paulypav
Is it possible to make it a random event as well, or is it basically the tile improvement gets destroyed when there's a battle on it. I'm guessing, based on my limited knowledge that it wouldn't be possible to make it occur randomly.


This code should make it possible:

code:
HandleEvent(BattleAftermath) 'pillage' pre { int_t i; if (Random(6) > 0) { for(i = 0; i < 24; i = i + 1){ if(TileHasImprovement(location[0], i)){ Event:CutImprovements(location[0]); } } } }


This code should give you a change one seventh that your tile improvement will survive the battle.

-Martin

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:15
  Old Post 27-08-2001 08:02
Edit/Delete Message Reply w/Quote
#15 Report this post to a moderator
Help yourself to an AD-FREE life

quote:
Originally posted by Martin Gühmann

This code should give you a change one seventh that your tile improvement will survive the battle.

-Martin


It just keeps getting better and better.

  < 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.0435 seconds (88.64% PHP - 11.36% 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