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 > Unit Updater Questions
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
Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:21
  Old Post 30-07-2002 04:31 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Unit Updater Questions Increase the size of your Attachments

Is there any way to make upgrading your own units selective? Rather than just at the point of the obsolete advance. For example, moving the old unit onto a city with a certain building and upgrading it ala Civ3.

And, is there a limit to how many upgrades you can script? Or more directly, does it slow down anything to have saaay 27 different upgrades?

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:21
  Old Post 30-07-2002 16:18 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Support Apolyton, buy Civilization 2

I noticed in Cradle, that has about 36 unit ungrades so im guessing speed isnt a problem.

centrifuge is offline centrifuge
Prince
USA
Apr 2002
time: 22:21
  Old Post 30-07-2002 19:44
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton buy from Amazon

I remember talk about this, a few months ago. I'm all for this idea as well, the requirement of a "barracks" some gold and PW, sounds good to me. The problem is if the AI can do it. IIRC, (correct me if I'm wrong) the AI in Civ3 doesn't use it. Perhaps it wouldn't be that big of deal as long as the AI keeps pumping out units on a regular basis.

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:21
  Old Post 30-07-2002 20:13
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

In the code the AI automaticly have all of its units upgraded. so the AI isnt a problem.
I think the problem is how to trigger the code. The code now is triggered when you get an advance.
You idea from civ3 seems a nice one.
Anyway, Peter Triggs is a better person to talk about it.

HuangShang is offline HuangShang
King
USA, SoCal, L.A.
Jul 2002
time: 21:21
  Old Post 30-07-2002 20:52
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Support Apolyton buy from Amazon

i like the idea too

centrifuge is offline centrifuge
Prince
USA
Apr 2002
time: 22:21
  Old Post 30-07-2002 21:14
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Support Apolyton buy from Amazon

quote:
Originally posted by Pedrunn
In the code the AI automaticly have all of its units upgraded. so the AI isnt a problem.
I think the problem is how to trigger the code. The code now is triggered when you get an advance.
You idea from civ3 seems a nice one.
Anyway, Peter Triggs is a better person to talk about it.


I think that triggering it roughly same way would work fine from a game play aspect. The current code, only allows an upgrade once, after the initial advance is discovered. I'm SLIC handicapped, but it seems that it should be possible to offer the option of upgrade anytime that an advance is discovered. This won't allow for an upgrade on demand, as in Civ3, but will allow for more upgrades than are currently available.

An alterrnate route is to offer it every third turn (for example) and have the requirement of having a unit in a city with an improvement that is there strictly for the purpose of upgrading. Hey here's an idea, lets call that improvement a barracks

Hermann the Lombard is offline Hermann the Lombard
Prince
Hoboken, NJ, USA
Jun 1999
time: 00:21
  Old Post 30-07-2002 21:40
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

I have considered adding "2nd try" upgrade opportunities, and in fact I have done so occasionally when I "lost" an upgrade by trading for the tech, or most recently because if two unit types upgrade at the same advance, you can only select upgrades for one of the two types (only one pass through the unit list).

Hexagonian doesn't like 2nd chances here because he wants the human player to have to plan ahead to have the right gold at the right time.

HuangShang is offline HuangShang
King
USA, SoCal, L.A.
Jul 2002
time: 21:21
  Old Post 31-07-2002 06:06
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Browse Apolyton AD-FREE

quote:
Originally posted by Hermann the Lombard
I have considered adding "2nd try" upgrade opportunities, and in fact I have done so occasionally when I "lost" an upgrade by trading for the tech, or most recently because if two unit types upgrade at the same advance, you can only select upgrades for one of the two types (only one pass through the unit list).

Hexagonian doesn't like 2nd chances here because he wants the human player to have to plan ahead to have the right gold at the right time.


so... how did you do it... i mean add '"2nd try" upgrade opportunities'

thanx

Hermann the Lombard is offline Hermann the Lombard
Prince
Hoboken, NJ, USA
Jun 1999
time: 00:21
  Old Post 31-07-2002 21:20
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Support Apolyton, buy Call to Power 2

I edited the SLIC (the extent of my SLIC editing, to date). The first time I had missed several upgrades by trading for the techs, before I realized that scotched the upgrades. Afraid of screwing something up, I created my own little mod, complete with Modswapper entry. For the actual editing, I merely substituted later techs for the enabling techs that I had "lost."

The only tricky part was figuring out which files I needed to edit to create the mod and to isolate my changes so they wouldn't affect anything else (providing I remember the Ritual of Reloadslic, of course). There were 3 text files and 2 slic files, some in default\gamedata and some in english\gamedata. If for some reason you wanted to see the changes, I have a zip file with the five files. Baby steps in THIS forum!!

The most recent time, I edited the updater SLIC to simply swap the entries for Archer and Composite Archer, so that now the Archer upgrades first, then the Composite Archer. I had enough cash to upgrade all my archer units, then I was able to upgrade Comp.Archers selectively.

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:21
  Old Post 03-08-2002 05:27
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Support Apolyton, buy Civilization: The Boardgame

I'm not ignoring you guys. I've got some debugging to do but keep your fingers crossed and I might have something for you in a couple of days.

BTW, sneaky move, Hermann.

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:21
  Old Post 05-08-2002 19:48 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Got spare money?

Hi Peter, thanks for looking into this.

I have another small query. You made a script a few weeks ago to remove the unproductive tiles and replace them with other tiles when the game generated a map, i tried to d/l the attachment from the original thread but its not available anymore, could you post it here if you still have it? or somewhere i can find it...

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:21
  Old Post 05-08-2002 22:42
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Support Apolyton, buy Call to Power 2

cool! I cant wait to see this!

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:21
  Old Post 06-08-2002 04:34
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Support Apolyton, buy Civilization: The Boardgame

quote:
Originally posted by Maquiladora:
Is there any way to make upgrading your own units selective? Rather than just at the point of the obsolete advance. For example, moving the old unit onto a city with a certain building and upgrading it ala Civ3.


That's an interesting idea. It might be possible, but I'm really not sure. What occurs to me is that you could add a new order, "Update", with it's own button, and then when you pressed the button you'd have a whole bunch of checks to see if the unit was in a city that had the Barracks and it's owner had the advance that enabled an update. That's a bit complicated and nobody's tried anything like it. It would mean writing new code that's essentially completely separate from the existing Updater system.

About the map thing: What mod are you playing?

Pedrunn,

Don't get too excited, I'm just working on fixing up the existing Updater code.

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:21
  Old Post 06-08-2002 04:55 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Increase Your PM Length

quote:
Originally posted by Peter Triggs
About the map thing: What mod are you playing?


Not using it for any mod(yet). Im interested in excluding/replacing some terrain for my maps, specifically glacier, desert hill and desert mountain. Im going to convert the others i dont want to something new.

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:21
  Old Post 06-08-2002 07:14
Edit/Delete Message Reply w/Quote
#15 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

Ooops

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:21
  Old Post 08-08-2002 05:16
Edit/Delete Message Reply w/Quote
#16 Report this post to a moderator
Support Apolyton, buy Civilization 2

The reason I asked about what mod you were playing with, is because the version I posted earlier used Martin's GoodMod1.slc, so it would only work in mods that already have that included. Here's a version that I've ripped out of it; this should work with any setup. Anyone who wants to use this needs to go to the file ...\ctp2_data\default\gamedata\script.slc and at the very bottom of it, add the line

quote:

#include "MAQ_Terra.slc"


and then just put the attached file in the folder ...\ctp2_data\default\gamedata

I don't know how familiar you are with SLIC, but it's all done with the terraform function:

quote:


VOID Terraform(location, terrain)

Change location into a different terrain type.

0 TERRAIN_TYPE_FOREST
1 TERRAIN_TYPE_PLAINS
2 TERRAIN_TYPE_TUNDRA
3 TERRAIN_TYPE_GLACIER
4 TERRAIN_TYPE_GRASSLAND
5 TERRAIN_TYPE_DESERT
6 TERRAIN_TYPE_SWAMP
7 TERRAIN_TYPE_JUNGLE
8 TERRAIN_TYPE_MOUNTAIN
9 TERRAIN_TYPE_HILL
10 TERRAIN_TYPE_WATER_SHALLOW
11 TERRAIN_TYPE_WATER_DEEP
12 TERRAIN_TYPE_WATER_VOLCANO
13 TERRAIN_TYPE_SPACE
14 TERRAIN_TYPE_WATER_BEACH
15 TERRAIN_TYPE_WATER_SHELF
16 TERRAIN_TYPE_WATER_TRENCH
17 TERRAIN_TYPE_WATER_RIFT
18 TERRAIN_TYPE_DEAD
19 TERRAIN_TYPE_BROWN_HILL
20 TERRAIN_TYPE_BROWN_MOUNTAIN
21 TERRAIN_TYPE_WHITE_HILL
22 TERRAIN_TYPE_WHITE_MOUNTAIN
23 TERRAIN_TYPE_DEAD_HILL


The numbers in the left hand column are used in the code as follows. MGGoodLoc is the tile location being looked at.

code:
ran=random(3); //generate a random number 0 <= ran < 3 if (TerrainType(MGGoodLoc)==2 || TerrainType(MGGoodLoc)==3){ //if the location is tundra or glacier if (ran==0){//33% chance of changing it to grassland terraform(MGGoodLoc,4);//change to grassland } elseif (ran==1){//33% chance of changing it to plains terraform(MGGoodLoc,1);//change to plains } else{//33% chance of changing it to forest terraform(MGGoodLoc,0);//change to forest } }


I put the random number bit in so that it would break up the big clumps of terrain (tundra/glacier above) that you often find.

I hope that's enough info to let you get on with changing it if you want to. If not, feel free to ask for advice.

It works fine for me but this may be because of the way I've modified some of the data in const.txt. Tell me how it works with the data you're using.


PS, The new updater code will take a few more days. I'm, er uhm, having too much fun beta testing Call to Bloodlust.

Attachment: maq_terra.slc
This has been downloaded 6 time(s).

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:21
  Old Post 08-08-2002 06:08 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#17 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

if you, er... need any help beta-testing...

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:21
  Old Post 08-08-2002 19:09 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#18 Report this post to a moderator
Put an end to popups!

Thanks Peter. Ill have a little dabble around and find my way. Unfortunately what i know about writing/interpreting slic you could write on the back of a stamp, but this looks alright.

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:21
  Old Post 09-08-2002 02:48
Edit/Delete Message Reply w/Quote
#19 Report this post to a moderator
Support Apolyton, buy Civilization: The Boardgame

A small sugestion, Peter. It is not going to affect the code but i really think you shoul change numbers to
TerrainDB(TERRAIN_*).
That was the first thing i did when i got BlueO's original city expansion. This prevents incompatibilities with mods (There isnt a mod that changed the order of the terrains but it might have in the future), and really save you the time of having to look this chart you showed, prevents small mistakes with huge consequences and makes editing easier.

Last edited by Pedrunn on 09-08-2002 at 02:54

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