 |
|  |
 |
|
Dreamer
|
|
Singapore
Dec 1999 time: 05:13
|
|
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).]
|
|
|  |
 |
|
Dreamer
|
|
Singapore
Dec 1999 time: 05:13
|
|
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
|
|
Singapore
Dec 1999 time: 05:13
|
|
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).]
|
|
|  |
 |
|
Mark H
|
|
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
|
|
|  |
 |
|
Mark H
|
|
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
|
|
|  |
 |
|
Locutus
|
|
ACS CTP1/2 Manager & Civ4 Co-Manager
|
 |
Hengelo, The Netherlands
Nov 1999 time: 06:13
|
|
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).]
|
|
|  |
 |
|
Dreamer
|
|
Singapore
Dec 1999 time: 05:13
|
|
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
|
|
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).]
|
|
|  |
 |
|
skorpion59
|
|
Tulsa, Oklahoma, USA
May 1999 time: 23:13
|
|
I agree with starting new threads so answers are there.
Don
|
|
|  |
 |
|
slamp
|
 |
Cannes, France
Sep 1999 time: 06:13
|
|
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).]
|
|
|  |
All times are GMT. The time now is 05:13. Apolyton Time is 00:13. |
top of page
|
|
|
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
|
|
|
|
|
|