(1.2)VOID SetString(index,
stringid)
Set string.<index> to the string (from the string
database) stringid. For Example, if you these strings in the database: SCENARIO_AUTHOR_MESSAGE "This scenario was written by [string.1.name]"
SCENARIO_AUTHOR "Joe Rumsey"
And you put this in a SLIC messagebox: SetString(1, ID_SCENARIO_AUTHOR);
Text(ID_SCENARIO_AUTHOR_MESSAGE);
The resulting text in the message will be: This scenario was
written by Joe Rumsey
(1.2)VOID SetStringByDBIndex(index,
stringindex)
Set string.<index> from the integer string id
stringindex. See also GetStringDBIndex
and SetString
(1.2)INT
GetStringDBIndex(stringid)
Get an integer string id for the named
string ID. For example, if you want to store the id of SCENARIO_AUTHOR for
later use: scenarioAuthorStringId = GetStringDBIndex(ID_SCENARIO_AUTHOR);
Then to use it later, SetStringByDBIndex(1, scenarioAuthorStringId);
Text(ID_SCENARIO_AUTHOR_MESSAGE);
(1.2)VOID SetActionKey(index,
string)
Set the key for key.<index>.pressed to the first
character in string. (Or to ctrl + second character if the first character is
'^'). To write a trigger that fires when the key is pressed, use the trigger
variable key.n.pressed, where n is the index you passed to SetActionKey. E.G.:
...
SetActionKey(1, "a");
...
trigger 'aKeyPressed' when (key.1.pressed) {
Message(g.player, "TheAKeyWasPressed");
}
VOID SaveGame(name)
Save a game with the given name.
VOID LoadGame(name)
Load the named game. Must have been saved
from SLIC with SaveGame.
(1.1) VOID GodMode(onoff)
Turn God
mode on (onoff = 1) or off (onoff = 0) (the equivalent of the Show Map button
in the editor).
VOID ExitToShell()
Exit to the main screen.
VOID EnableTrigger('trigger_id')
Enable the named trigger.
VOID EndTurn()
End this turn.
VOID DisableTrigger('trigger_id')
Disable the named trigger.
(1.1) VOID Deselect()
Cause the
currently selected unit/city/resource to be deselected.
VOID DeactivateTutorial()
Turn off the tutorial.
(1.1) VOID CatchUp()
Cause the
graphics system to synchronize with the game's internal state (fast forward
unit moves, for example)
(1.2)VOID CantEndTurn(onoff)
When
onoff is 1, set the game in a mode where you cannot end the turn. Calling with
onoff to 0 sets things back to normal.
(1.2)VOID BlankScreen(blank)
If blank
is non-zero, set the screen to blacked out, otherwise turn it back on. Used by
hotseat and email messages.
(1.2)VOID AddCenter(location)
Add a
recenter event on location to the animation queue.
(1.2)VOID AddEffect(location, namestr,
soundid)
Add a special effect at location to the animation queue.
namestr is the name from speceffid.txt (E.G. "SPECEFFECT_NUKE"), soundid is
the ID from sounds.txt (E.G. "SOUND_D_DEFAULTDEATH"). Example: AddEffect(unit.1.pos, "SPECEFFECT_NANO", "SOUND_ID_NANO_TERROR");
Note that if the location is not visible to the onscreen player, this
special effect won't be seen.
Science
(N.D)VOID StealRandomAdvance()
Not
documented by Activision, special function for spies.
(N.D)VOID StealSpecificAdvance() uses
dropdown
Not documented by Activision, special function for spies.
VOID SetResearching(player, what)
Set the player to research
what.
VOID SetScience(player, level)
Set the player's science level to
level.
VOID GrantAdvance(player, advance)
Give the player the advance
specified.
INT HasAdvance(player, advance_name)
Return true if the player
has the advance.
VOID EnableChooseResearch()
Reenable the choose research dialog
for the tutorial player.
VOID DisableChooseResearch()
The choose research dialog is
disabled for the tutorial player.
VOID Research()
Obsolete
Timer
VOID StopTimer(int)
Stop the given timer.
VOID StartTimer(index, duration)
Start timer index, set to
expire in duration seconds. trigger 'foo' when (timer.<index>) {...} to
tell when this timer has expired.
VOID SetTimerGranularity(gran)
Set SLIC's timer mechanism to
check timers every gran seconds. 1 second is the best granularity possible.
The default is 5 seconds.
Rank
INT UnderseaRank(player)
The player's rank in terms of undersea
cities.
INT TradeRank(player)
The player's rank in terms of number of
trade routes.
INT SpaceRank(player)
The rank of this player in terms of space
ownership.
INT PopulationRank(player)
Rank of the player in terms of total
population.
INT MilitaryRank(player)
The rank for the given player in terms
of strength of military units.
INT KnowledgeRank(player)
Rank of the player in terms of number
of advances.
INT GoldRank(player)
Get the rank of the player in terms of how
much gold they have. 1 being the highest rank.
INT GeographicRank(player)
The rank of the player according to
how much land they own, 1 being the most.
INT CitiesRank(player)
Returns the ranking of the player by
number of cities (1 being the highest)
Screens/Tabs
VOID OpenCity()
Open the city status screen.
VOID OpenCityTab()
Set the control panel to the city tab.
VOID OpenCiv()
Open the civ status screen.
VOID OpenCivTab()
Set the control panel to the civ tab.
VOID OpenDiplomacy()
Open the diplomacy screen.
VOID OpenInfo()
Open the info screen.
VOID OpenLaborTab()
Open the labor tab.
VOID OpenMaxTab()
Open the max tab.
VOID OpenOptions()
Open the options screen.
VOID OpenProductionTab()
Open the production tab.
VOID OpenScience()
Open the science screen.
VOID OpenThroneRoom()
Open the throne room.
VOID OpenTrade()
Open the trade screen.
VOID OpenUnit()
Open the unit status screen.
VOID EnableScreensButton()
Enable the screens button.
VOID EnableTileImprovementButton()
Enable the tile improvements
button.
VOID DisableScreensButton()
Disable the screens button.
VOID DisableTileImprovementButton()
Disable the tile
improvements button.
VOID LibraryAdvance(int)
VOID LibraryBuilding(int)
VOID LibraryConcept(int)
VOID LibraryGovernment(int)
VOID LibraryTerrain(int)
VOID LibraryTileImprovement(int)
VOID LibraryUnit([unit|int])
VOID LibraryWonder(int)
All of the above functions open the
great library to the appropriate page.