Difference between revisions of "Methods"

From Elite Wiki
m (script methods GUI)
(script methods mission state: - how these work)
Line 25: Line 25:
  
 
== script methods mission state ==
 
== script methods mission state ==
  set: mission_mynumber #
+
  set: [[mission_variable]] <value>
  increment: mission_mynumber (mission_mynumber = #+1)
+
// the value could be a particular string or numeric value
  setMissionChoices: mission_yesno
+
  increment: [[mission_variable]]
 +
// increases the mission variable's value by 1.0
 +
decrement: [[mission_variable]]
 +
// decreases the mission variable's value by 1.0
 +
  setMissionChoices: <[[missiontext.plist]] key>
 +
// sets the array of choices presented at the bottom of the mission page to those described in the
 +
// entry in missiontext.plist that corresponds to the key given
 
  resetMissionChoice
 
  resetMissionChoice
 +
// makes missionChoice undefined
  
 
== player state methods ==
 
== player state methods ==

Revision as of 16:01, 21 January 2006

Methods

Methods are the actions that are performed when conditions, defined in a scripted plist, are met. Be it an entry of death_actions or scripted_actions inside a shipdata.plist or a script.plist's Do-array, or even in a AI.plist, all methods are interchangable between plists.

For example; 
a special qbomb could, in principle, detonate, send a commsmessage and cause the sun in a system to go nova.
The relevant methods could be embedded in the AI.plist or the [death_actions].

script methods GUI

addMissionText: Story_text_for_somemission (missiontext.plist)
set: mission_somemission SOME_STATE 
setGuiToMissionScreen
setMissionDescription: short_decription (missiontext.plist)
showShipModel: shiptype
clearMissionDescription
setMissionMusic: filename
setMissionImage: myface.png

script methods system

checkForShips: shiptype 
addSystemShips: shiptype # 0.66 (?)
addShips: shiptype #
addShipsAtPrecisely: shiptype 1 pwu 0 0 0.88 (?)
setSunNovaIn: #
setPlanetinfo:  (see planetinfo.plist)

script methods mission state

set: mission_variable <value>
// the value could be a particular string or numeric value
increment: mission_variable
// increases the mission variable's value by 1.0
decrement: mission_variable
// decreases the mission variable's value by 1.0
setMissionChoices: <missiontext.plist key>
// sets the array of choices presented at the bottom of the mission page to those described in the
// entry in missiontext.plist that corresponds to the key given
resetMissionChoice
// makes missionChoice undefined

player state methods

awardShipKills: #
awardEquipment: EQ_SOME_PIECE_OF_KIT
awardCredits: # 
setLegalStatus: #
testForEquipment: EQ_COOL_TOY
setFuelLeak: #
useSpecialCargo: A load full of '['thargoid_curses']' 
launchFromStation
commsMessage: Happy Newyear!
removeAllCargo
awardCargo: # Commodity

other methods

So far I have summed up the methods used in script.plists, next are the other sources. OXP_howto_AI.


This article is a stub. You can help EliteWiki by expanding it.