Last edited 22-Feb-11 04:27 EET (UTC+2) Here I try to give example lua script fragments equivalent of each civ2 macro language trigger and action. DISCLAIMER: I rely on other documentation only. Especially in civ2 side. I've never seen that macro language actually used. Mainly used documents are Macro.txt for civ2 side, and http://freeciv.wikia.com/wiki/Events_Reference_Manual for freeciv side. One problem I've had that terminologies differ, and one has to remember which (civ2 or freeciv) certain meaning words in document refers. This particular document uses freeciv terminology unless otherwise noted. Signals ======= These are rough equivalent of civ2 triggers. Freeciv emits a signal to script and script acts accordingly. To make your script listen certain signal, you add this to it: signal.connect('signal_name', 'my_function') where signal_name is kind of the signal and my_function is scripting function you will define yourself and that contains all the actions you want performed. civ2 trigger -> equivalent freeciv signal ----------------------------------------- AlphaCentauriArrival -> ? BribeUnit -> One gets unit_lost signal, but it has no briber parameter. Also, you can't tell if unit_lost means unit got killed or bribed (or disbanded, or...) See http://gna.org/patch/index.php?2548 CityDestroyed -> city_destroyed CityProduction -> city_built, signal does not contain information what got built. I have to check if that information is available otherwise. CityTaken -> city_lost Negotiation - This is quite specific to civ2 diplomacy model, not suitable for freeciv NoSchism -> ? RandomTurn -> No direct equivalent. I would store random number to variable, and then have function launched by "turn_started" signal checking turn number against that number before taking any other actions. ReceivedTechnology -> tech_researched ScenarioLoaded -> I don't think there is direct equivalent (I would use "turn_started" signal and checking if it's first turn in associated function) Turn -> turn_started TurnInterval -> turn_started, check counter on actual function UnitKilled -> unit_lost, doesn't provide as much information as civ2 trigger Actions ======= What is called as actions in civ2 terminology, is simply what lua functions triggered by signals do. In many cases equivalent of civ2 action is one call to freeciv lua api. civ2 action -> equivalent freeciv call -------------------------------------- BestowImprovement -> ? ChangeMoney -> change_gold ChangeTerrain -> ? CreateUnit -> create_unit or create_unit_full depending how much functionality one needs DestroyACivilization -> ? EnableTechnology -> ? EndGame -> player:victory (?) EndGameOverride -> ? GiveTechnology -> give_technology MakeAggression Does forced war declaration make sense in multiplayer game like freeciv? Would human players really fight only because war was automatically declared? ModifyReputation Does not make sense in (human player) multiplayer. MoveUnit -> Not possible at the moment. See https://gna.org/patch/index.php?2552 Negotiator Specific to civ2 diplomacy model, I think. PlayAVIFile -> No equivalent PlayCDTrack -> No equivalent PlayWaveFile -> ? TakeTechnology -> ? Text -> notify.player Transport I don't really understand what it does in civ2, but this is probably impossible to implement with current freeciv transport unit model.