Scripting

From Star Wars Combine :: Game Guide
Revision as of 18:56, 12 November 2014 by Ruben Wan (talk | contribs)
Jump to: navigation, search

SWC has adopted an in-house scripting language.

Wildcards

SWC Lisp Old Wildcard Description Example Default For Custom NPCs?
(get-name self) %npc.name% NPC's name Joe Bloggs N/A Yes
(get-race self) %npc.race% NPC's race Nautolan N/A Yes
(get-infofield self) %npc.infofield% NPC's infofield Master Carpenter N/A Yes
(get-gender self) %npc.gender% NPC's gender Male N/A Yes
(get-formal self) %npc.formal% NPC's formal greeting Sir/Ma'am N/A Yes
%npc.ally% is NPC IFF friendly? N/A N/A Yes
%npc.enemy% is NPC IFF enemy? N/A N/A Yes
%npc.neutral% is NPC IFF neutral? N/A N/A Yes
(is-unharmed? self) %npc.unharmed% is NPC unharmed? N/A N/A Yes
(is-slightly-wounded? self) %npc.slightlywounded% is NPC slightly wounded? N/A N/A Yes
(is-wounded? self) %npc.wounded% is NPC wounded? N/A N/A Yes
(is-badly-wounded? self) %npc.badlywounded% is NPC badly wounded? N/A N/A Yes
(get-name character) %character.name% Character's handle Selatos N/A Yes
(get-race character) %character.race% Character's race Human N/A Yes
(get-infofield character) %character.infofield% Character's 1st infofield Emperor Empty String Yes
(get-infofield2 character) %character.infofield2% Character's 2nd infofield 1st Recon Division Empty String Yes
(get-infofield3 character) %character.infofield3% Character's 3rd infofield 2nd Expansionary Fleet Empty String Yes
(get-gender character) %character.gender% Character's gender Male N/A Yes
(is-unharmed? character) %character.unharmed% is Character unharmed? N/A N/A Yes
(is-slightly-wounded? character) %character.slightlywounded% is Character slightly wounded? N/A N/A ]Yes
(is-wounded? character) %character.wounded% is Character wounded? N/A N/A Yes
(is-badly-wounded? character) %character.badlywounded% is Character badly wounded? N/A N/A Yes
(get-formal character) %character.formal% Character's formal greeting Sir/Ma'am N/A Yes
(get-name (get-faction character)) %character.faction% Character's current faction New Republic Freelance Yes
%character.isowner% Is character the owner of the NPC Produces no output Empty String Yes
%character.ismanager% Is character the manager of the NPC Produces no output Empty String Yes
%character.issupervisor% Is character the owner of the NPC Produces no output Empty String Yes
%faction.name% Character's faction's name New Republic Empty string (if freelance) Yes
%faction.type% Character's faction's type Mining Empty string (if freelance) Yes
%faction.leader% Character's faction's leaders name Ellias Empty String (if freelance) Yes
%faction.website% Character's faction's leaders name http://swcombine.com (Link) Empty string (if freelance) Yes
%owner.name% Name of the NPC's owner Darkness Empty string if special owner (Market, None) Yes
%owner.entityType% Type of the NPC's owner Faction or Character Empty string if special owner (Market, None) Yes
%character.infofield% Owner's 1st infofield Emperor Empty String Yes
%character.infofield2% Owner's 2nd infofield 1st Recon Division Empty String Yes
%character.infofield3% Owner's 3rd infofield 2nd Expansionary Fleet Empty String Yes
%location.city% Current city name City 327 Unknown Yes*
%location.planet% Current planet name Glee Anselm Unknown Yes*
%location.system% Current system name Danju Unknown Yes*
%location.sector% Current sector name Tapani Unknown Yes*
%location.destination% Destination name "Corellia sector" (if deep space)
"Corellia system" (if heading to that system)
"Corellia planet" (if heading in sublight)
"Atmosphere (3,4) of Corellia" (if heading in atmo)
"Ground (3,4) of city Cityname on Corellia" (if heading to ground in city)
"Ground (3,4) at (4,7) on Corellia" (if heading to ground outside a city)
Unknown Yes*
%location.eta% ETA for current travel 3 days, 24 hours and 5 minutes Unknown Yes*
(get-name (get-container self)) %container.name% Current container name, e.g. the ship or vehicle standing in Tydirium Unknown Yes
%container.type% Current container type, e.g. the ship or vehicle standing in Lambda Shuttle Unknown Yes
%container.entityType% Current container entity type, e.g. the ship, vehicle, city, planet, station Ship, Vehicle, City, Planet, Space Station N/A Yes
cgt-year %cgt.year% Gets current CGT year 12 N/A Yes
cgt-day %cgt.day% Gets current CGT day 183 N/A Yes
cgt-hour n.a. Gets current CGT hour 23 N/A Yes
cgt-minute n.a. Gets current CGT minutes 59 N/A Yes
timeofday %time.ofday% Gets current phase of day Morning, Afternoon, Evening N/A Yes

Entries with a "Yes" are available for custom NPCs. Entries with a "Yes*" may have some limitations on their use (e.g. they may not be available when the NPC cannot reliably determine the information without godmodding - for example location whilst in hyperspace).