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 > Wanna share your SLIC functions?
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
Dreamer is offline Dreamer
Chieftain
Singapore
Dec 1999
time: 05:13
Post  Old Post 29-12-1999 16:58 Visit Dreamer's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Wanna share your SLIC functions? Remove this text

Here is one simple SLIC that I have created to give a free Nuke unit in the capitol city upon discovery of Quantum Physics.

code:
TypeLocation human_player_capitol; Trigger 'NewNuke' when (discovery.type && IsHumanPlayer(player.1) && HasAdvance(player.1, ID_ADVANCE_QUANTUM_MECHANICS)) { ExtractLocation(player.capitol, human_player_capitol); CreateUnit(player.1, UnitType("UNIT_NUKE"), human_player_capitol, 0); DisableTrigger('NewNuke'); }


I later found that after discovering the advance and you saved the game to play in future, the trigger activated again upon the next discovery. So I added another trigger to solve the problem.

code:
Trigger 'CheckAdvances' when (IsHumanPlayer(g.player) && HasAdvance(g.player, ID_ADVANCE_QUANTUM_MECHANICS)) { DisableTrigger('NewNuke'); }


Hope these is of benefit to you people.


[This message has been edited by Dreamer (edited January 02, 2000).]

Nordicus is offline Nordicus
King
Vancouver, B.C., Canada
Oct 1999
time: 21:13
  Old Post 30-12-1999 02:32 Visit Nordicus's homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Get a bigger avatar today!

Hi, Dreamer. This is great idea--I have limited knowledge of Slic, so I have basically nothing to share, but I was thinking the other day how nice it would be if there was a thread where many Slic functions could be posted, instead of being so scattered through various threads...
I'll dig around later and post some stuff I've seen around.

Later.

Dreamer is offline Dreamer
Chieftain
Singapore
Dec 1999
time: 05:13
Exclamation  Old Post 30-12-1999 10:53 Visit Dreamer's homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

Just in case those who are using the above mentioned slic function as an example to create naval units, you need to put the created units 1 tile square away from your capitol city.

code:
// Example :- CreateUnit(player.1, UnitType("UNIT_AIRCRAFT_CARRIER"), human_player_capitol, 1);

If your capitol is on land and not a coastal city, sorry you'll not get any units create cos the function treat the city location as a land terrian.

I'll be looking into future enhancement to these soon.

[This message has been edited by Dreamer (edited January 02, 2000).]

Dreamer is offline Dreamer
Chieftain
Singapore
Dec 1999
time: 05:13
Question  Old Post 30-12-1999 11:04 Visit Dreamer's homepage!
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Full PM-box? Change here!

I am also looking into creating guerrilla units around city upon captured by enemy just like Civ2 did. Anyone wanna share some thoughts on this?

Pls refer this topic to :- http://apolyton.net/forums/Forum11/...html?date=03:03

[This message has been edited by Dreamer (edited January 05, 2000).]

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

He great idea to post all kinds of loose SLIC functions in one thread. I'll add anything I have made so far as soon as I find the time.

Mark H is offline Mark H
Chieftain

Nov 1999
time: 05:13
Lightbulb  Old Post 01-01-2000 02:47
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Support Apolyton buy from Amazon

I seem to recall that Dutcheese's trigger to add muskateers was posted on these forums somewhere, could somebody repost it, or post which forum and thread, or tell me where to find it in the scenario pack?

I believe I've solved the ai empty city problem! I plan to add a unit (town guard) and have one built each time a city is built. These units will have a movement of 0 (how easy was that)! I plan to have reasonable versions of the units for different time periods.

Now somewhere in ctp is the flag that allows a unit to fortify, and I don't mean the "can_entrench" flag in unit.txt. Somewhere in SLIC is the flag that actually does the entrenching, and I'd like to do that with these units upon creation. Any guesses where to look?

I don't see any need to add these to the ai build lists since 1 per city is all there should be (later ages will have a weak range unit too). The only possible problem I see is a conflict with the unit_gather code, will the ai count these units if they aren't in the build lists? This could be fixed (if it is a problem) by adjusting the gather code. Maybe somebody already knows? If anyone has any other suggestions or sees any other possible conflicts, please chime in!
Mark

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:13
Post  Old Post 01-01-2000 23:05 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 Call to Power 2

Mark,

To give units orders in SLIC you can use the functions SetOrder and AddOrder and I think you can find the available orders in in orders.txt in the ctp_data\default\gamedata directory. The orders there are a bit obscure sometimes, so I don't know exactly which order you need, you might need to experiment a little. Let me know if/when you get it to work.

BTW, I don't know what function of Dutcheese you are referring to, could you tell me what it is supposed to do exactly?

Mark H is offline Mark H
Chieftain

Nov 1999
time: 05:13
Post  Old Post 02-01-2000 06:49
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

The Dutcheese mod adds a phalanx to every city built before turn 4 (should be easily converted). I looked thru all the files included with the mod but saw no triggers. The Quicker Mod is similar but adds muskateers and city growth, couldn't find it there either.
Mark

slamp is offline slamp
King
Cannes, France
Sep 1999
time: 06:13
Post  Old Post 03-01-2000 17:14 Visit slamp's homepage!
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Browse Apolyton AD-FREE

There are some errors:
Dutcheese mod add 2 musketters
Soph mod add 1 phalanx.
I write (again) using triggers some quick mod for pbem. Take a look on http://slaamp.virtualave.net/ctp/
If you want I can publish here the triggers.

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

Well, I found the trigger you were referring to, Mark. I found it in the file dutcheesescenariopak7.2.zip. Unzipped, it should have been placed in the directory scenarios\dutcheese\scen0001\default\gamedata and the file should have been called script.slc.
Well, here's the trigger, copied straight from the file:

code:
trigger 'MakeCities' when (city.built && (g.year <= 3) && (player.cities <= 10)) { //add improvements AddPops(city.1,4); CreateUnit(player,UnitType("UNIT_MUSKETEERS"),city.1.location,0); CreateUnit(player,UnitType("UNIT_MUSKETEERS"),city.1.location,0); //CreateUnit(player,UnitType("UNIT_MUSKETEERS"),city.1.location,1); //CreateUnit(player,UnitType("UNIT_MUSKETEERS"),city.1.location,1); //AddBuildingToBuildList(city,Silo); }


It looks really ugly like this, so I'll clean it up a little:

code:
trigger 'MakeCities' when (city.built && (g.year <= 3) && (player.cities <= 10)) { AddPops(city.1,4); CreateUnit(player,UnitType ("UNIT_MUSKETEERS"),city.1.location,0); CreateUnit(player,UnitType("UNIT_MUSKETEERS"),city.1.location,0); }


Dreamer,
I like your idea of guerrilla-units. It should be fairly simple to implement.

Locutus
[This message has been edited by Locutus (edited January 03, 2000).]
[This message has been edited by Locutus (edited January 03, 2000).]
[This message has been edited by Locutus (edited January 03, 2000).]

WesW is offline WesW
CTP1/2 Modification Site Admin
Florence, Al., USA
Jan 1970
time: 23:13
Post  Old Post 04-01-2000 05:19 Visit WesW's homepage!
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Remove this text

This guerrilla unit trigger sounds good to me, as well. Will unit placement depend upon surrounding terrain, like in civ 2?

Dreamer is offline Dreamer
Chieftain
Singapore
Dec 1999
time: 05:13
Red face  Old Post 04-01-2000 10:44 Visit Dreamer's homepage!
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Got spare money?

Glad to hear you guys like the idea, but I'm having problems. I wanna use the city.capture as a trigger but it doesn't passes any value that SLIC is unable to determine whose city it belong to before capture so as to create the guerrilla units belonging to the previous city owner. Help!!!

My idea is to place the units 2 tiles square away from city to prevent immediate killing by enemy units in city.

Pls refer this topic at :- http://apolyton.net/forums/Forum11/...html?date=03:03

Yes WesW, in CTP the terrian does affect the placement of units. If the city are surrounded all by sea then guerrilla units will not apply to it, unless our SLIC perform a check on the city surrounding and create sea units instead.

[This message has been edited by Dreamer (edited January 05, 2000).]

Mark H is offline Mark H
Chieftain

Nov 1999
time: 05:13
Post  Old Post 05-01-2000 08:23
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Support Apolyton, buy Civilization: The Boardgame

Thanks guys! Saved me a bunch of time, really appreciated. Now I have to check out
these movable units with 0 movement (ack!).

Just a thought here, why not make the guerilla
units barbarians? Realistically they shouldn't be as
easily controlled as "regular units" (IMHO).
Mark

[This message has been edited by Mark H (edited January 04, 2000).]

Dreamer is offline Dreamer
Chieftain
Singapore
Dec 1999
time: 05:13
Question  Old Post 05-01-2000 10:17 Visit Dreamer's homepage!
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

hmm...barbarian. Maybe Skorpion59 can help me find out what the player index is for barbarian player?

Pls refer this topic to :- http://apolyton.net/forums/Forum11/...html?date=03:03

[This message has been edited by Dreamer (edited January 05, 2000).]

skorpion59 is offline skorpion59
Prince
Tulsa, Oklahoma, USA
May 1999
time: 23:13
Post  Old Post 05-01-2000 13:23 Visit skorpion59's homepage!
Edit/Delete Message Reply w/Quote
#15 Report this post to a moderator
Support Apolyton

I agree with starting new threads so answers are there.

Don

slamp is offline slamp
King
Cannes, France
Sep 1999
time: 06:13
Post  Old Post 14-01-2000 17:36 Visit slamp's homepage!
Edit/Delete Message Reply w/Quote
#16 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

Great idea to share slic codes.
Here one to add, gold, PW, and the first 20 advances

trigger 'InitializeBonus' when (unit.beginturn && (g.year == 0)) {
message(player, 'InitializeBonusMessage');
}

// add gold, pw, advances
messagebox 'InitializeBonusMessage' {
Abort();
numAdvance = 20 ;
bonusGold = 19900 ; // Gold bonus = 20000 (100 by default)
bonusPW = 20000 ; // PW bonus
AddGold(player,bonusGold);
SetPW(player,bonusPW);
i = 0;
while(i < numAdvance) {
GrantAdvance(player,i);
i = i + 1;
}
// 0 -> AGRICULTURE, 1 -> TOOLMAKING, 2 -> MINING, 3 -> DOMESTICATION, 4 -> BRONZE_WORKING
// 5 -> STONE_WORKING, 6 -> JURISPRUDENCE, 7 -> SHIP_BUILDING, 8-> WRITING, 9 -> GEOMETRY
// 1 -> MONARCHY, 11 -> IRON_WORKING, 12 -> RELIGION, 13 -> CITY_STATE, 14 -> PHILOSOPHY
// 15 -> TRADE, 16 -> BUREAUCRACY, 17 -> ASTRONOMY, 18 -> THEOCRACY, 19 -> BANKING
}

[This message has been edited by slamp (edited January 14, 2000).]

slamp is offline slamp
King
Cannes, France
Sep 1999
time: 06:13
Post  Old Post 14-01-2000 17:39 Visit slamp's homepage!
Edit/Delete Message Reply w/Quote
#17 Report this post to a moderator
Support Apolyton, buy Civilization 2

This message, add one pop to each n-first cities (here n=10 ):

messagebox 'increaseCityMessage' {
  Abort();
  // user variables
  numSettlers = 10 ; // numbers of cities must be >= 2
  CityIndex = 0;
  while((CityIndex < player.cities) && (Cityindex < numSettlers)) {
    SetCityByIndex(1, player, CityIndex);
    AddPops(city, 1);
    CityIndex = CityIndex + 1;
  }
}

[This message has been edited by slamp (edited January 14, 2000).]

  < 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.0504 seconds (91.31% PHP - 8.69% 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