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 > SLICers please read: Alexander the Great Scenario
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
Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:15
  Old Post 28-09-2001 22:34 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
SLICers please read: Alexander the Great Scenario Get a bigger avatar today!

A few months ago, Harlan and I worked together on creating an improved version of the Alexander the Great Scenario that came with CtP2 (actually, we already started doing this even before CtP2 was released). Due to time contraints and technical difficulties we gave up on this after a while. Now, with most of the MedMod work done and with Harlan once again motivated to work on this, we decided to continue our work (actually, this was already a few weeks ago but school and other stuff kept me rather busy). Our plans are not nearly as ambitious this time as they were last time, mainly because Harlan plans on having this finished before Civ3 comes out but we still have some technical difficulties to work out and could use all the help we can get, esp. from SLIC coders. If anyone wants to help out with the project, please let us know, we would be very grateful.

Failing that, I'm would also be very happy if some of you could take a moment to look at the main problem we're currently dealing with and let us know what you think. Stray thoughts, suggestions, complete solutions, anything is welcome, 'cause quite frankly I'm bummed Here it is:

The problem has to do with large stacks. If in CtP2 an army is moving from A to B and it along the way encounters another of the same civ, one of two things can happen. If the size of both armies combined is smaller or equal to 12, the moving army continues along its way without disruptions (no problems here). However, if both armies combined are larger than 12, the moving army stops right in front of the second army and does nothing. It will fortify and wait until the blocking army moves out of the way. However, if this other army is standing in that position because it's defending a city or some other defensive point, the army that was moving to a target will be stuck behind this defensive army forever (unless the goal it was trying to achieve no longer exists). The moving army never decides to deviate from the shortest path and continue via a detour or split up and send the army through in parts, it simply sits there and does nothing. In the Alexander the Great Scenario this is quite a problem because there are a lot of road chokepoints surrounded by desert or mountains and a defensive army in or near FE Tarsus can block any Persian reinforcements from reaching the Ionian cities when the Macedonians are conquering these. This is not the only case though and overall it really decreases AI performance (it's not unusual to have 3 or more stacks stuck behind a defensive chokepoint), in Harlan's eyes it even makes the scenario unplayable. Problems in solving this is 1) there is, as far as I can see, no proper way of detecting when units are stuck like this and 2) actually getting the units passed the blocking stack. I have no idea how to deal with the first problem and as far as the second problem goes, I can come up with some radical things such as teleporting the stack or destroying the blocking stack, but it's still difficult to detect where the stack was going in the first place and working out the details.

Any help anyone could give us would be very much appriciated...

player1 is offline player1
King
Belgrade, YU
Sep 2001
time: 06:15
  Old Post 29-09-2001 16:56
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Lose 30 kilos (of popups)

What about:
1) Swiching positions between moving and defending units
2) Forcing defending units to move on random square outside city or fort
3) Invisible RAILROADS alongside cities & forts, so moving units won't go
through cities or forts

player1 is offline player1
King
Belgrade, YU
Sep 2001
time: 06:15
  Old Post 29-09-2001 16:57
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

But, I don't know how to slic that.

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:15
  Old Post 29-09-2001 21:25 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Enter the AD-FREE zone

It all depends on finding out which stack is defending, and which is trying to move...
How about something that fires when a unit is fortified outside a city, which keeps a record of how long the units have been there. Then, after 10 turns or so, however long seems to work best, to create invisible railroads like player1 suggests, next to the tile the stack is in.
The enemy AI shouldn't be able to use it, because it can't move into the enemy ZOC, but the reinforcements behind the defensive stack will. Once it attempts to use it, you can reset the fortification turn counter, and pillage the railroads. Maybe you could pillage before the reinforcements use it, but so they still complete the move Then the route would be changed, but the goal the same. If not, then the AI gets a small movement bonus each time. (Its not like it will use it to cheat on the human...)

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:15
  Old Post 29-09-2001 23:43 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

quote:
Problems in solving this is 1) there is, as far as I can see, no proper way of detecting when units are stuck like this and 2) actually getting the units passed the blocking stack. I have no idea how to deal with the first problem and as far as the second problem goes, I can come up with some radical things such as teleporting the stack or destroying the blocking stack, but it's still difficult to detect where the stack was going in the first place and working out the details.


For the stack that stops on a road before a city if an unit or an army can be detected in the inner city radius than it is also possible to detect if it is fortified on that road, and if you can dedect if it is on a road that is in the inner city radius you can detect in that radius another road tile. So all what you have then to do is to teleport the stack from the one side to the other side. Of coarse that could be causing some unnecessary teleportation, because it doesn't detected if it is fortified, because it is stucked or for defence.

-Martin

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:15
Post  Old Post 30-09-2001 01:14 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Support Apolyton, buy Civilization 2

OK here is my first trial of a unit teleporter around the city so far I have no idea why it doesn't work probably. So far it teleports a unit to the goal location, but it seems that the unit now have two locations on the one hand the old location were you can see the unit and the new location were you can click and gets the unit, too. Maybe a bug could be located in the GetUnitFromCell function I have no idea how to use the index I just set the index to 0. And there is another problem if you disband know the army that was teleported you get a crash. Maybe someone else could find a sollution I would like to use the teleport order that would be a improvemnt of diplomod as well.

-Martin

Attachment: unitteleporter.zip
This has been downloaded 7 time(s).

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:15
  Old Post 03-10-2001 02:50 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

Thanks for all the ideas, guys, those are all very usefull! I think I'll give player1's and IW's ideas of invisible railroads a try first. Martin's idea is probably more elegant but, looking over the code, it seems to only work for cities and it assumes that there are at most two road tiles next to the tile that blocks the units, while this is not always the case. I'll keep you guys posted on my testresults (but I got a new batch of schoolwork coming up so it could take a week to implement)...

Harlan is offline Harlan
Civ3 Scenario Haven Admin
Berkeley, CA, USA
Aug 2005
time: 21:15
  Old Post 05-10-2001 12:10
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Support Apolyton buy from Amazon

Go, Locutus, go! We're rooting for you. And thanks for the suggestions from everyone.

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:15
  Old Post 13-10-2001 20:03 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Browse Apolyton AD-FREE

Okay, I give up, I'm gonna need your help once again guys: can anyone tell me why the code below doesn't work? I'm probably overlooking something really stupid but I can't get the game to produce tile improvements (rest of the the code works fine)...

code:
HandleEvent(EntrenchUnit) 'AG2_CreateRailRoad' post { location_t tmpLoc; unit_t tmpUnit; int_t i; tmpUnit = unit[0]; Message(g.player, 'AG2_GotHere'); // test code for (i = 0; i < 8; i = i + 1) { // check all neighbours Message(g.player, 'AG2_GotHere2'); // test code GetNeighbor(tmpUnit.location, i, tmpLoc); Terraform(tmpLoc, 1); // test code Event:CreateImprovement(0, tmpLoc, 1, 0); // this doesn't work!!! } } // messages are for testing purposes only, string ripped from info_str.txt Messagebox 'AG2_GotHere' { Text(ID_IA_PILLAGE_SUICIDE); } Messagebox 'AG2_GotHere2' { Text(ID_IA_TERRAFORM_DEAD_TILE); }

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

Those tile improvements have been a pain all year . I think maybe you need to give the enabling advance to the tile's owner before you can place the improvement, and make sure they have enough PW as well (as railroads aren't otherwise used, you could just make their cost 0).

Martin's goodmod places an invisible time imp. under each good in the game, so take a look at that for a reliable code.

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

Actually, I based my code on Martin's mod. I'm may be stupid but I'm not that stupid Unfortunately Martin's mod contains a huge amount of SLIC code and I didn't check it all out very thoroughly, quite possible that I missed something.

I did give the Barbarians all advances through the cheat-window but that didn't help. I totally forgot about PW cost though, I will certainly give that a try...

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:15
Post  Old Post 14-10-2001 03:49 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Support Apolyton buy from Amazon

And there is another problem with the tile improvements you can't place them on neutral tiles. You have first to build a fort or a fort like tile improvement. In the neighbourhood of that tile were you whish to place the final tile improvement afterwards this auxilary tile improvemnt will be pillaged. Unfortunatly it is not good for your goal, because you can't pillage a neutral tile improvement without causing a crash. So your road should have some characteristics of a fort. This fort tile should become a part of the owners territory if you have a choke point on neutral territory. Maybe you should reconsider my idea instead of the BeginTurn event you could use the EntrenchOrder event. That would make the code independent from cities.

-Martin

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:15
  Old Post 16-10-2001 16:19 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Remove this text

Thanks for the info, Martin, that is something else I hadn't considered yet. For now I'm still playing around with an adapted version of IW's solution but if that proves too troublesome I'll switch to your solution or the solution Peter (Triggs) emailed me about.

  < 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.0388 seconds (89.33% PHP - 10.67% 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