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 > Call To Power II > CtP2-Creation/AI/Mods/Scenarios > CityAlarm_slic
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
FRITZ is offline FRITZ
Settler
Berlin-Germany
Nov 2001
time: 05:34
  Old Post 24-07-2004 16:32 Visit FRITZ's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
CityAlarm_slic Enter the AD-FREE zone

Hi all ctp2 fans,

I havn´t had much ctp2 time for a couple of month.

But my holiday-time at the German coast (North Sea) was filled with very nasty weather.
So it was a good time to think about Slic.

I have read in the Slic-manual (by Ahenobarb) and I got some ideas about slic for the French Revolution scenario. I wrote down (without Laptop or personal computer) my ideas in the holiday-time and most of the slic-code was without great troubles (after computer transfer at home).

I will cut it short , because most stuff is available from my homepage (CityAlarm2).
The code doesn´t work perfect so far (but there is no computer -crash). Maybe someone has an idea of the mistakes in my slic-code.
Put the scenario: CityAlarm2 in your scenario folder and play for Scottland.

The aim: If there are some big foreign armies near to cities of one player, the player is alarmed by the function CityAlarm. This function gives the location of the main foreign army (the center of agression).
If the player is alarmed, a lot of big armies (the function BestPosition) will march to the best location of army formation. Another function looks if the armies are valid for formation (the army-size, the distance to the formation point, the kind of unittype are important for that function).
The next function (PositionArmies) will calculate seven places for seven armies, the formation depends on the position of the foreign agressor army.
Infantry armies (5) should be placed in a line towards the foreign army. Behind the line there are two artilliery armies. If the player has less than 7 big armies a smaller formation will be prepared.
If one army has reached the right position, the army should sleep. If all valid armies have reached the formation point, the formation stops and will move against the agressor army.

My problem: Not all armies like to sleep. Question: Is there someone who sees the mistakes in my code ?
The other parts of the code and the functions works without problems.

Another function (who looks for valid positions in the movepath e.g. no water is missing so far, this must be done later on). In my example scenario is no water.

One other useful Handler: ArmyClicked (for the same formation of Human player armies ) should do the same, maybe an Alertbox can be used to give the army-size and the distance to the formation point to computer calculation.

Maybe the CityAlarm function (if later on the code works as desired) is also useful for some other scenario writers (e.g. WW1).

Best wishes

FRITZ

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:34.
Apolyton Time is 00:34.
    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.0248 seconds (87.13% PHP - 12.87% MySQL) with 29 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