File: ASLref.txt

package info (click to toggle)
gearhead2 0.701-2
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 14,220 kB
  • sloc: pascal: 49,692; makefile: 95; sh: 12
file content (328 lines) | stat: -rw-r--r-- 15,939 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
1. TRIGGERS
		* If adding a new trigger which may be linked to a plot, don't forget
		  to add it to gamedata/standard_triggers.txt

	5MIN			Generated every five minutes
	ALARM			Called when something sets off alarm
	ATTACK			Called when PC shares same tile as hostile encounter
	APPLAUSE		Using performance skill, favorable result
	CLEANUP			Story is ending, do plot cleanup
	CLUE_SURVIVAL
	CLUE_REPAIR
	CLUE_MEDICINE
	CLUE_SCIENCE
	CLUE_CODEBREAKING
	CLUE_MYSTICISM
	CLUE_INSIGHT
	DEPLOY			Placed in team gears; called during map deployment
	ENCGOAL[scene ID]	An encounter has reached its target square
	END			Trigger placed when scene ends
	EWM[scene number]	Objection Check: Enter via world map
	FAINT[cid]		Model with Character ID has been destroyed
	FIRE!			Trigger set when a fire starts on map
	GET[ID Number]		Get item which has Narrative ID
	GREETING		First label called when interact started
	HALFHOUR		Generated every half hour of game time
	HOUR			Generated every hour of game time
	KEY[ID Number]		Objection Check; Item used/activated
	LOCAL[ID Number]	Triggers a local event
	MOVE[cid]		Model with Character ID has moved
	NPCOPENDOOR		Request sent when NPC wants to open a door
	NU[team]		Number of masters on team has changed
	PCATTACK		PC has fired a weapon
	PUMPNEWS		Applied to quests and moods once every 6 hours
	QUARTER			Generated every 6 hours (1/4 of a day)
	RESCUE			The PC has resuscitated a disaster victim
	RESULT[number]		Called when interact menu item selected
	REVEAL			Called when hidden metaterrain is discovered
	START			First trigger placed when scene entered
	SURRENDER[cid]		Model with Character ID has surrendered
	TD[uid]			Model on gameboard removed from play
	THIEF!			Trigger set whenever PC botches a PickPockets roll
	TMOVE[team]		Member of given team has moved
	UPDATE			Sent to all objects on gameboard at start and when requested
	USE			First label called when prop activated

	*** DEBUG TRIGGERS ONLY ***
	PLAYERVILLAIN		Player has gained villainous reputation
				from DeclarationOfHostilities procedure.
		I'm hoping to use this to finally track down all the bugs.


2. BASIC COMMANDS

	&[label]		Calls a local macro, stored either in the current gear,
				the plot, or the story. Local macros are defined exactly
				as regular macros are. Think of them as procedures and
				functions for ASL.
	ACCEPT			Return TRUE from ConditionAccepted
	ACTIVATEMEME [NarrativeID] [SceneID]	Activate a meme
	ADDCHAT [number]	Add prompt[num] to interact menu
	ADDDEBRIEFING [npc] [msg]	Add a message from NPC for debriefing [ARENA MODE]
	ADDREACT [value]	Alter NPC reaction score
	AIRRAIDSIREN		All NPCs will flee the gameboard
	ALERT [msg number]	Display a text message the PC won't ignore
	ALTERCONTEXT [changes label]	Will alter the story context by the string provided
	ALTERCOREMISSIONNTEXT [changes label]	Will alter the core mission context [ARENA MODE]
	ANNOUNCE [tag] [num]	Display an announcement after this conversation or event
	ARENAREP [change]	Changes the arena team reputation by a set amount [ARENA MODE ONLY]
	ATTACK [Team1] [Team2]	Team1 will attack Team2
	BLOCK			Erase trigger, prevent further events
	BOMB			Blow up current scene
	CASHPRIZE [value]	Give player money
	CHECKCOMPONENTS		Load new component if needed
	COMPOSE [trigger label] [parameter] [cmd line identifier]
			Create new script event
	DELETENPC [Character ID]	Eliminate NPC
	DELETEFACTION [Faction ID]	Deactivate faction
	DRAWTERR [x] [y] [terrain]	Alter the gameboard
	DYNAMIC [Scale] [Renown] [Strength] [NU1 label] [NU2 label]
			Start a dynamic scene
	DYNANPC [cid] [team]	Insert NPC into dynamic scene
	E=			Set Plot Element
	EMAIL [idnum]		Store message for PC in source gear
	ENDCHAT			Delete all items from interact menu
	ENDPLOT			Delete the current plot
	EndPlotsByConID [Controller ID]	Delete all plots associated with a given Controller ID
	ENDSTORY		Delete source story, pass CLEANUP to plots
	EXIT [code]		Leave current scene with exit code
	EXPRESSDELIVERY		Have shopkeeper ship mecha from another town
	FORCECHAT [CID]		Force conversation with NPC
	FORCEEXIT [scene]	Exit the scene, overriding previous EXIT commands
	FREEZENPC [CID]		Remove NPC from play; store as global
	G= [idnum] [value]	Set global variable
	G+ [idnum] [value]	Add global variable
	GOTO [label]		Jump to another line in the program
	HISTORY [idnum]		Add message to adventure history
	IF= [value1] [value2] <ELSE [label]>
	IF# [value1] [value2] <ELSE [label]>	If V1 <> V2...
	IFFACTION [FID] <else [label]>	If faction is active...
	IFFACTIONENEMY [FID] <else [label]>	If faction is arch-enemy of PC...
	IFG [value1] [value2] <ELSE [label]>	If V1 > V2...
	IFKEYITEM [NID] <ELSE [label]>	If PC has key item...
	IFM [uid] <ELSE [label]>	If root level gear is active...
	IFMECHACANENTERSCENE [scene id]		If PC's mecha can enter listed scene...
	IFMERITBADGE [badge id]		If the PC has this merit badge (or ability)...
	IFNOOBJECTIONS [trigger label] [parameter] <ELSE [label]>
		If the produced trigger is not blocked...
	IFNPCARCHENEMY [UID] <else [label]>	If NPC is arch-enemy of PC...
	IFPERSONA [CID] <ELSE [label]>	If NPC is alive...
	IFSAFEAREA <ELSE [label]>	If the current scene is safe...
	IFSCENE [label] <ELSE [label]>	If current scene matches description...
	IFSKILLTEST [Skill] [Stat] [Target] <ELSE [label]>	If the PC passes a skill test...
	IFSTORYLESS <ELSE [label]>	If SOURCE has no linked story...
	IFUSKILLTEST [Skill] [Stat] [Target] <ELSE [label]>	If the PC passes a skill test... (unlimited tries)
	IFYESNO [desc msg] ["yes" msg] ["no" msg] <ELSE [label]>
	L= [idnum] [value]	Set local variable
	L+ [idnum] [value]	Add local variable
	LOADD [script line label]	Load a dynamic scene
	LOSERENOWN		PC will lose 5 points or 25% of renown
	LTRIGGER [tag]		Set a local trigger, calling some other script in same gear
	MAGICMAP		Makes all tiles on current map visible
	MECHAPRIZE [faction list label] [renown] [theme] [modpoints]
		Give PC a mecha appropriate to factions, renown, theme, and modification points.
	MEMO [idnum]		Store reminder for PC in source gear
	MONOLOGUE [cid] [msg id]	The requested NPC will speak a single line outside of conversation
	MORETEXT [script line label]	Display text file from disk
	MOREMEMO [tag]		View memos of type [tag] - EMAIL,MEMO,NEWS
	MOVENPC [CID] [Scene ID]	Move a character to the requested scene
	N=			Set Story Element
	NEWCHAT			Reset interact menu
	NEWD [scale]		Create a new dynamic scene
	NEWS [idnum]		Store global news message in source gear
	NEXTCOMP		End current core story plot, load next component
	P= [idnum] [value]	Set plot variable
	P+ [idnum] [value]	Add plot variable
	PCENEMY [cid]		NPC will become PC's enemy
	PMEMO [plotid] [Message Number]	Store a memo relating to this subplot
	PRINT [idnum]		Display message in console area
	PURGESTORY		Pass CLEANUP to and delete story plots
	PUMPNEWS		Applies the PUMPNEWS to city subcoms in this world
	QMEMO [qid] [Message Number]	Store a memo relating to this quest
	RANDOMMECHA [faction list label] [renown]	Give PC a mecha appropriate to factions, renown
	REPUTATION [rep num] [value]	Alter PC's reputation
	RETREAT [team ID]	Remove team from the gameboard
	RETURN			Exit a dynamic scene
	REVERTPERSONA		Switch from plot-based person to permanent persona
	RUNAWAY [CID]		Remove NPC from the gameboard
	S= [idnum] [value]	Set story variable
	S+ [idnum] [value]	Add story variable
	SAVEPOS			Remember PC's current location
	SAY [idnum]		Display message in interact area
	SAYANYTHING		Say meaningless random message
	SAYPLOTMSG [plot message id]	Say a message taken from the PLOT rather than PERSONA
	SCHOOL [skill list identifier]	PC can train skills
	SEEKGATE [scene ID]	Player will enter next map at entry of specified scene
			***IMPORTANT*** Only works if called after Exit, Return, etc
	SEEKTERR [terrain type]		Set where PC will enter next scene
	SETENCOUNTER [SID] [Value]	Sets encounters active/inactive by SceneID
	SETMOOD [Mood NID] [City]	Activates a prefab mood
	SETSCENEFACTION [scene ID] [faction ID]
	SHOP [wares identifier]
	SHUTTLE			Start the intercity shuttle service
	SMEMO [Message Number]	Store a memo in the story
	STARTPLOT [script line label] [renown] <ELSE [label]>	Load a plot
	STARTSTORY [script line label] [renown] <ELSE [label]>	Load a story
            The plot request may include paramaters if called from within a plot
	TIME [delay]		Advance game clock
	TORD [team] [order <parameters>]	Set orders for team
	TRAINNPC [CID] [script line label]	Will teach the NPC one of the listed
				skills/talents. Skills are +, Talents are -.
	TRANSFORM [frame]	Switch a prop's appearance to alternate state
	TREPUTATION [team number] [rep num] [value]	Set rep for team
	TRIGGER [base] [value]	Add an event trigger to the queue
	TRIGGER0 [base]		Add an event trigger w/o parameter to the queue
	UPDATEPLOTS		Check the plots for this city; load more if needed
	UPDATEPROPS		Sends an "UPDATE" trigger to all gears on gameboard
	V= [idnum] [value]	Set source variable
	V+ [idnum] [value]	Add source variable
	VMSG [ident] [value]	Print standard value message
	WMECHA [team] [renown] [strength]	Stock current scene with mecha
	WMONSTER [team] [renown] [strength]	Stock current scene with monsters
	XPV [experience award]	Give PC experience

3. BASIC FUNCTIONS
		*Remember when adding a new function to arenascript.pp to update the
		 macro initializer.

	&[label]		Calls a local macro, stored either in the current gear,
				the plot, or the story. Local macros are defined exactly
				as regular macros are. Think of them as procedures and
				functions for ASL.
	?Mecha [team number]	Random mecha UID
	?Pilot [team number]	Random pilot UID
	@[gear ID]		UID of root-level gear
	* [A] [B]		Returns A * B
	CHATNPCID		CID of interact NPC
	COMTIME
	CONCERT [size] [sktar]	Play concert minigame; score returned in range 0-150.
	D[Die Size]
	E[idnum]		Plot element value
	EScene [idnum]		Element's scene ID
	FacBuddies [idnum]	Number of friends/lovers/allies PC has in faction
	FacMem [idnum]		Number of members
	FacScene [idnum]	Number of controlled scenes
	FXPNeeded [level]	Number of faction XP for next level
	G[idnum]		Global variable value
	HARDSKILLTAR [Reputation]	Scales a target number for skill rolls
	HOSTILEFACTIONS		Number of active, military factions with
			active, military enemies
	L[idnum]		Local variable value
	MAPTILE [X] [Y]		Terrain value of tile X,Y
	N[idnum]		Story (Narrative) element value
	NEXTDAY			Returns the start of the next game day
	NPCREP [CID] [idnum]	NPC's reputation score
	P[idnum]		Plot variable value
	PCFAC			PC's faction ID
	PCMEKS			Number of meks PC owns
	PCREP [idnum]		PC's reputation score
	PCSCALE			Scale of PC's root level gear
	PCUID			PC's unique ID
	PCX			PC X position
	PCY			PC Y position
	PCSKILLVAL [skill] [stat]	Highest skill value from player lance
	PRICE [renown] [percent]	Good asking price for plot event
	RANGE [uid1] [uid2]	Range between two gears by UID
	REACT			Reaction score with interact NPC
	REWARD [renown] [percent]	Good salary for combat mission
	S[idnum]		Story variable
	SCENEFACTION [scene ID]		Scene's faction ID
	SCENEID			ID of current scene
	SELFUID			Source's unique ID
	SKILLTAR [Reputation]	Scales a target number for skill rolls
	SKROLL [Skill Number] [Stat Number]	PC makes a skill roll
	SOCSKILLTAR [Reputation]	Gives a target number for social skill rolls
	T[team number]		Number of active masters on team
	THREAT [Reputation] [Percent]	Good difficulcy value for mission
	V[idnum]		Source variable value
	WMTHREAT [Reputation]	Good WMon difficlulcy value for level
	WORLDID			Returns the ID of the current world

4. MESSAGE FORMATTING STRINGS
	\CHATNPC		The NPC currently being spoken with
	\CHATNPCMECHA		The name of the mecha of the NPC being spoken with
	\DATE [time]		Converts [time] to game display format
	\ELEMENT [n]		The name of plot element N
	\EXACT_SCENE [ID]	The exact_name of a scene
	\FACRANK [FID] [Rank]	Faction rank name
	\FACTION [FID]		The name of the faction
	\FACTION_DESIG [FID]	The designation of the faction
	\HINT [LayerID]		Returns a subplot hint
	\HINT_MEMO [LayerID]	Returns a subplot hint and records a plot memo
	\ITEM [NID]		The name of an item
	\ITEM_DESC [NID]	The description of an item
	\ITEM_HISTORY [NID]	The history of an item
	\ITEM_USAGE [NID]	The probable use for an item
	\MEK [UID]		The name of a mecha, grabbed by unique ID
	\NARRATIVE [n]		The name of story element N
	\OFFSPRING [CID]	Child noun (Son/Daughter) for NPC (0=PC)
	\OPR [NID]		Object pronoun (him,her) for NPC (0=PC)
	\PC			The PC's name
	\PCJOB			The PC's job
	\PERSONA [CID]		The name of a NPC
	\PILOT [UID]		The name of a character, grabbed by unique ID
	\PPR [NID]		Posessive determiner (his,her) for NPC (0=PC)
	\RANK			PC's rank name
	\SCENE [ID]		The name of a scene
	\SECRET [NID]		A plot secret
	\SIBLING [CID]		Sibling noun (Sister/Brother) for NPC (0=PC)
	\SOURCE			The name of the script source gear
	\SPR [NID]		Subject pronoun (he,she) for NPC (0=PC)
	\VAL [x]		The provided value

5. GEAR GRABBERS
	GrabDesig [desig]	Grabs an item by its designation
	GRABCONTROLLER [ID]	Grabs a plot controller: either a scene or a mood
	GRABENTRANCE [scene ID]	Grabs a scene entrance
	GRABLOCAL [uid]		Grabs a model from gameboard
	GRABPARENT		Grabs the parent of the currently grabbed gear
	GrabRoot		Grabs the root of the currently grabbed gear
	GrabRootScene		Grabs the root scene of the currently grabbed scene
	GRABSUBSCENE [n]	Grabs a subscene of the current scene
	GRABTEAMNAME [name]	Grabs a team with the provided name

6. GRABBED GEAR COMMANDS
	DELETEGG		Deletes the grabbed (physical) gear
	DEPLOYGG [team]		Places the grabbed gear in the current scene
	GADDNATT [G] [S] [V]
	GALTERCONTEXT [label]	Alters the story context string by the changes provided
	GIVEGG			Gives the grabbed (physical) gear to PC
	GMENTAL			The grabbed gear will waitaminute and 5MP
	GMONOLOGUE [msg id]	The grabbed gear will speak a single line outside of conversation
	GMORALEDMG [Morale]	Adds morale damage to the grabbed gear
	GNEWPART [label]	Adds new item, monster, NPC to game board
	GOPENINV		Allows PC to trade items with grabbed gear
	GQUITLANCE		The grabbed gear quits the lance
	GRUNAWAY		If easily found on map, GG runs away
	GSETNATT [G] [S] [V]
	GSETSATT [key] [info label]
	GSETSTAT [Slot] [Value]
	GSKILLLEVEL [Reputation]	Scales skill points to set level
	GSKILLXP [Skill] [XP]	Gives skill-specific experience to GG
	GSTAMINA		The grabbed gear will waitaminute and 5SP
	IFGARCHALLY		True if GG an arch-ally of PC
	IFGARCHENEMY		True if GG an arch-enemy of PC
	IFGCANJOINLANCE		True if GG can join the lance, assuming GG is an ally
	IFGHASITEM [NID]	True if GG has item in possession
	IFGHASSKILL [Skill]	True if GG has the listed skill
	IFGINPLAY <else [label]>	True if GG on map and operational
	IFGDEAD <else [label]>	True if GG is Nil or is destroyed
	IFGOK <else [label]>	True if GG exists and not destroyed
	IFGSEALED <else [label]> True if NPC GG is enviro-sealed
	IFGSEXY <else [label]>	True if NPC GG exists and is sexy to PC
	IFTEAMCANSEEGG [team] <ELSE [label]>	If the grabbed gear can be seen by team...
	MOVEANDPACIFYGG [Scene ID]	Move GG to scene, setting teamdata to something peaceful
	MOVEGG [Scene ID]	Moves the grabbed (physical) gear

7. GRABBED GEAR FUNCTIONS
		*Remember when adding a new function to arenascript.pp to update the
		 macro initializer.
	GNatt [G] [S]
	GS			Grabbed gear S descriptor
	GSCENE			Scene ID of the grabbed gear
	GStat [stat]
	GV			Grabbed gear V descriptor

8. METACOMMANDS
	!Talk [CID]		Forces conversation with NPC