Scripting: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
SWC has adopted an in-house scripting language. | SWC has adopted an in-house scripting language. | ||
==Wildcards== | |||
{| border="1" cellspacing="0" cellpadding="5" align="center" | {| border="1" cellspacing="0" cellpadding="5" align="center" | ||
! SWC Lisp | ! SWC Lisp | ||
Line 43: | Line 44: | ||
| ||%character.infofield3% ||Character's 3rd infofield ||2nd Expansionary Fleet ||Empty String ||Yes | | ||%character.infofield3% ||Character's 3rd infofield ||2nd Expansionary Fleet ||Empty String ||Yes | ||
|- | |- | ||
|(get-gender character) ||%character.gender% ||Character's gender ||Male ||N/A ||Yes | |||
|- | |- | ||
| ||%character.unharmed% ||is Character unharmed? ||N/A ||N/A ||Yes | |||
|- | |- | ||
| ||%character.slightlywounded% ||is Character slightly wounded? ||N/A ||N/A ||]Yes | |||
|- | |- | ||
| ||%character.wounded% ||is Character wounded? ||N/A ||N/A ||Yes | |||
|- | |- | ||
| || %character.badlywounded% ||is Character badly wounded? ||N/A ||N/A ||Yes | |||
|- | |- | ||
| || %character.formal% ||Character's formal greeting ||Sir/Ma'am ||N/A ||Yes | |||
|- | |- | ||
| || %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 | |||
|- | |- | ||
| 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). | 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). |
Revision as of 23:36, 12 November 2014
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 |
%npc.infofield% | NPC's infofield | Master Carpenter | N/A | Yes | |
(get-gender self) | %npc.gender% | NPC's gender | Male | N/A | Yes |
%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 | |
%npc.unharmed% | is NPC unharmed? | N/A | N/A | Yes | |
%npc.slightlywounded% | is NPC slightly wounded? | N/A | N/A | Yes | |
%npc.wounded% | is NPC wounded? | N/A | N/A | Yes | |
%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 |
%character.infofield% | Character's 1st infofield | Emperor | Empty String | Yes | |
%character.infofield2% | Character's 2nd infofield | 1st Recon Division | Empty String | Yes | |
%character.infofield3% | Character's 3rd infofield | 2nd Expansionary Fleet | Empty String | Yes | |
(get-gender character) | %character.gender% | Character's gender | Male | N/A | Yes |
%character.unharmed% | is Character unharmed? | N/A | N/A | Yes | |
%character.slightlywounded% | is Character slightly wounded? | N/A | N/A | ]Yes | |
%character.wounded% | is Character wounded? | N/A | N/A | Yes | |
%character.badlywounded% | is Character badly wounded? | N/A | N/A | Yes | |
%character.formal% | Character's formal greeting | Sir/Ma'am | N/A | Yes | |
%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 |
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).