Scripting: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 35: | Line 35: | ||
|(get-name character) ||%character.name% ||Character's handle ||Selatos ||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 | |||
|- | |- | ||
[row][col](get-gender character)[/col][col] %character.gender% [/col][col]Character's gender [/col][col]Male [/col][col]N/A [/col][col]Yes[/col][/row] | [row][col](get-gender character)[/col][col] %character.gender% [/col][col]Character's gender [/col][col]Male [/col][col]N/A [/col][col]Yes[/col][/row] |
Revision as of 23:26, 12 November 2014
SWC has adopted an in-house scripting language.
[row][col](get-gender character)[/col][col] %character.gender% [/col][col]Character's gender [/col][col]Male [/col][col]N/A [/col][col]Yes[/col][/row] [row][col][/col][col] %character.unharmed% [/col][col]is Character unharmed? [/col][col]N/A [/col][col]N/A [/col][col]Yes[/col][/row] [row][col][/col][col] %character.slightlywounded% [/col][col]is Character slightly wounded? [/col][col]N/A [/col][col]N/A [/col][col]Yes[/col][/row] [row][col][/col][col] %character.wounded% [/col][col]is Character wounded? [/col][col]N/A [/col][col]N/A [/col][col]Yes[/col][/row] [row][col][/col][col] %character.badlywounded% [/col][col]is Character badly wounded? [/col][col]N/A [/col][col]N/A [/col][col]Yes[/col][/row] [row][col][/col][col] %character.formal% [/col][col]Character's formal greeting [/col][col]Sir/Ma'am [/col][col]N/A [/col][col]Yes[/col][/row] [row][col][/col][col] %character.faction% [/col][col]Character's current faction [/col][col]New Republic [/col][col]Freelance [/col][col]Yes[/col][/row] [row][col][/col][col] %character.isowner% [/col][col]Is character the owner of the NPC [/col][col]Produces no output [/col][col]Empty String [/col][col]Yes[/col][/row] [row][col][/col][col] %character.ismanager% [/col][col]Is character the manager of the NPC [/col][col]Produces no output [/col][col]Empty String [/col][col]Yes[/col][/row] [row][col][/col][col] %character.issupervisor% [/col][col]Is character the owner of the NPC [/col][col]Produces no output [/col][col]Empty String [/col][col]Yes[/col][/row] [row][col][/col][col] %faction.name% [/col][col]Character's faction's name [/col][col]New Republic [/col][col]Empty string (if freelance) [/col][col]Yes[/col][/row] [row][col][/col][col] %faction.type% [/col][col]Character's faction's type [/col][col]Mining [/col][col]Empty string (if freelance) [/col][col]Yes[/col][/row] [row][col][/col][col] %faction.leader% [/col][col]Character's faction's leaders name [/col][col]Ellias [/col][col]Empty String (if freelance) [/col][col]Yes[/col][/row] [row][col][/col][col] %faction.website% [/col][col]Character's faction's leaders name [/col][col]http://swcombine.com (Link) [/col][col]Empty string (if freelance) [/col][col]Yes[/col][/row] [row][col][/col][col] %owner.name% [/col][col]Name of the NPC's owner [/col][col]Darkness [/col][col]Empty string if special owner (Market, None) [/col][col]Yes[/col][/row] [row][col][/col][col] %owner.entityType% [/col][col]Type of the NPC's owner [/col][col]Faction or Character [/col][col]Empty string if special owner (Market, None) [/col][col]Yes[/col][/row] [row][col][/col][col] %character.infofield% [/col][col]Owner's 1st infofield [/col][col]Emperor [/col][col]Empty String [/col][col]Yes[/col][/row] [row][col][/col][col] %character.infofield2% [/col][col]Owner's 2nd infofield [/col][col]1st Recon Division [/col][col]Empty String [/col][col]Yes[/col][/row] [row][col][/col][col] %character.infofield3% [/col][col]Owner's 3rd infofield [/col][col]2nd Expansionary Fleet [/col][col]Empty String [/col][col]Yes[/col][/row] [row][col][/col][col] %location.city% [/col][col]Current city name [/col][col]City 327 [/col][col]Unknown [/col][col]Yes*[/col][/row] [row][col][/col][col] %location.planet% [/col][col]Current planet name [/col][col]Glee Anselm [/col][col]Unknown [/col][col]Yes*[/col][/row] [row][col][/col][col] %location.system% [/col][col]Current system name [/col][col]Danju [/col][col]Unknown [/col][col]Yes*[/col][/row] [row][col][/col][col] %location.sector% [/col][col]Current sector name [/col][col]Tapani [/col][col]Unknown [/col][col]Yes*[/col][/row] [row][col][/col][col] %location.destination% [/col][col]Destination name [/col][col]"Corellia sector" (if deep space)[/col][col][/col][col][/col][/row] [row][col][/col][col]"Corellia system" (if heading to that system)[/col][col][/col][col][/col][col][/col][col][/col][/row] [row][col][/col][col]"Corellia planet" (if heading in sublight)[/col][col][/col][col][/col][col][/col][col][/col][/row] [row][col][/col][col]"Atmosphere (3,4) of Corellia" (if heading in atmo)[/col][col][/col][col][/col][col][/col][col][/col][/row] [row][col][/col][col]"Ground (3,4) of city Cityname on Corellia" (if heading to ground in city)[/col][col][/col][col][/col][col][/col][col][/col][/row] [row][col][/col][col]"Ground (3,4) at (4,7) on Corellia" (if heading to ground outside a city)[/col][col][/col][col][/col][col][/col][col][/col][/row] [row][col][/col][col][/col][col]Unknown [/col][col]Yes*[/col][col][/col][col][/col][/row] [row][col][/col][col] %location.eta% [/col][col]ETA for current travel [/col][col]3 days, 24 hours and 5 minutes [/col][col]Unknown [/col][col]Yes*[/col][/row] [row][col](get-name (get-container self))[/col][col] %container.name% [/col][col]Current container name, e.g. the ship or vehicle standing in [/col][col]Tydirium [/col][col]Unknown [/col][col]Yes[/col][/row] [row][col][/col][col] %container.type% [/col][col]Current container type, e.g. the ship or vehicle standing in [/col][col]Lambda Shuttle [/col][col]Unknown [/col][col]Yes[/col][/row] [row][col][/col][col] %container.entityType% [/col][col]Current container entity type, e.g. the ship, vehicle, city, planet, station [/col][col]Ship, Vehicle, City, Planet, Space Station [/col][col]N/A [/col][col]Yes[/col][/row] [row][col]cgt-year[/col][col] %cgt.year% [/col][col]Gets current CGT year [/col][col]12 [/col][col]N/A [/col][col]Yes[/col][/row] [row][col]cgt-day[/col][col] %cgt.day% [/col][col]Gets current CGT day [/col][col]183 [/col][col]N/A [/col][col]Yes[/col][/row] [row][col]timeofday[/col][col] %time.ofday% [/col][col]Gets current phase of day [/col][col]Morning, Afternoon, Evening [/col][col]N/A [/col][col]Yes[/col][/row]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 |
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).