Advertisement
Guest User

ConsoleFunctionsFormatted

a guest
Sep 23rd, 2014
2,627
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 123.69 KB | None | 0 0
  1.  namespace Global {
  2.     virtual Script quitNoMaintenance(()) {}
  3.     virtual Script quit(()) {}
  4.     virtual Script AddStuff(( string player_id )) {}
  5.     virtual Script AddArmors(( string player_id )) {}
  6.     virtual Script AddTools(( string player_id )) {}
  7.     virtual Script AddWeapons(( string player_id )) {}
  8.     virtual Script AddStarterStuff(( string player_id )) {}
  9.     virtual Script serverCmdOrder_to_formation(( string client, string order_type )) {}
  10.     virtual Script serverCmdCreate_formation(( string client, string formation_type )) {}
  11.     virtual Script serverCmdresuscitate(( string client, string magnitude )) {}
  12.     virtual Script serverCmdcreateRest(( string client, string duration, string healAmount )) {}
  13.     virtual Script serverCmddealDamage(( string client, string partOfBody )) {}
  14.     virtual Script serverCmdhealFracture(( string client, string partOfBody, string durationMultiplier )) {}
  15.     virtual Script serverCmdhealWound(( string client, string partOfBody, string durationMultiplier )) {}
  16.     virtual Script serverCmdremoveFracture(( string client, string partOfBody )) {}
  17.     virtual Script serverCmdremoveBleeding(( string client, string partOfBody )) {}
  18.     virtual Script serverCmdremoveWound(( string client, string partOfBody )) {}
  19.     virtual Script serverCmdcreateFracture(( string client, string partOfBody )) {}
  20.     virtual Script serverCmdcreateBleeding(( string client, string partOfBody )) {}
  21.     virtual Script serverCmdcreateWound(( string client, string partOfBody )) {}
  22.     /*! Call exec() on all scripts from the %folder excluding filenames specified in %exclude.
  23. Usage example:
  24. reloadScriptsFromFolder("global", "init main onceOnly");
  25. will exec all files except init.cs, main.cs and onceOnly.cs
  26.  */
  27.     virtual Script reloadScriptsFromFolder(( string folder, string exclude, string ext )) {}
  28.     virtual Script getClientConnectionByCsHash(( string accoundHash )) {}
  29.     virtual Script serverRpcCAUTH(( string peer, string clientKey )) {}
  30.     virtual Script onTCPInitError(( string tcpServer, string error )) {}
  31.     virtual Script onTCPInitOK(( string tcpServer )) {}
  32.     virtual Script onTCPError(( string tcpServer, string errorCode, string errorMessage )) {}
  33.     virtual Script initTCPServer(( string port )) {}
  34.     virtual Script InitHorsePack(()) {}
  35.     virtual Script InitHorses(()) {}
  36.     virtual Script InitAIHorses(()) {}
  37.     virtual Script spawnPlayer(( string client, string JUNK, string JUNK )) {}
  38.     virtual Script onSteamServerRegistered(()) {}
  39.     virtual Script destroyWorld(()) {}
  40.     virtual Script loadAIs(()) {}
  41.     virtual Script createWorld(()) {}
  42.     virtual Script serverCmdenterVehicle(( string client )) {}
  43.     virtual Script radiusDamage(( string sourceObject, string position, string radius, string damage, string damageType, string impulse )) {}
  44.     virtual Script cm_config_CalcPlayerPostHitTimeScale(( string JUNK )) {}
  45.     virtual Script cm_config_CalcPlayerHitTimeScale(( string JUNK )) {}
  46.     virtual Script cm_config_CalcPlayerDmgByHit(( string hitSpeed, string hitNodeName, string hitBoxName, string groupDmgLevel, string chargeTime )) {}
  47.     virtual Script cm_config_CalcHouseMaterialQuantity(( string currQuantity, string cellCount )) {}
  48.     virtual Script updateCMConfig(()) {}
  49.     virtual Script serverCmddismountVehicle(( string client )) {}
  50.     virtual Script cmChatSendLocalMessageToClient(( string client, string fromName, string position, string message )) {}
  51.     virtual Script onServerDestroyed(()) {}
  52.     virtual Script onServerCreated(()) {}
  53.     virtual Script serverCmdUnmountWeapon(( string client )) {}
  54.     virtual Script serverCmdToggleWeaponSlot(( string client, string slot )) {}
  55.     virtual Script clearBottomPrintAll(()) {}
  56.     virtual Script clearCenterPrintAll(()) {}
  57.     virtual Script clearBottomPrint(( string client )) {}
  58.     virtual Script clearCenterPrint(( string client )) {}
  59.     virtual Script bottomPrint(( string client, string message, string time, string lines )) {}
  60.     virtual Script centerPrint(( string client, string message, string time, string lines )) {}
  61.     virtual Script bottomPrintAll(( string message, string time, string lines )) {}
  62.     virtual Script centerPrintAll(( string message, string time, string lines )) {}
  63.     virtual Script updatePlayerCountDisplay(()) {}
  64.     virtual Script serverCmdClientReadyToEnterGame(( string client )) {}
  65.     virtual Script serverCmdSimpleAuth(( string client )) {}
  66.     virtual Script serverCmdReadyState(( string client )) {}
  67.     virtual Script serverCmdTakeCameraPos(( string client )) {}
  68.     virtual Script serverCmdSetCameraPos(( string client, string transform )) {}
  69.     virtual Script serverCmdSetCameraFly(( string client )) {}
  70.     virtual Script serverCmdSetCameraNewtonDamped(( string client )) {}
  71.     virtual Script serverCmdSetCameraNewton(( string client )) {}
  72.     virtual Script serverCmdDropCameraAtPlayer(( string client )) {}
  73.     virtual Script serverCmdDropPlayerAtCamera(( string client )) {}
  74.     virtual Script peerCmdUpdateCameraSpeed(( string JUNK, string speed )) {}
  75.     virtual Script peerCmdUpdateCameraMode(( string JUNK, string mode )) {}
  76.     virtual Script serverCmdSetCameraSpeed(( string client, string speed )) {}
  77.     virtual Script serverCmdNetSimulateLag(( string client, string msDelay, string packetLossPercent )) {}
  78.     virtual Script messageAllExcept(( string client, string team, string msgType, string msgString, string a1, string a2, string a3, string a4, string a5, string a6, string a7, string a8, string a9, string a10, string a11, string a12, string a13 )) {}
  79.     virtual Script messageAll(( string msgType, string msgString, string a1, string a2, string a3, string a4, string a5, string a6, string a7, string a8, string a9, string a10, string a11, string a12, string a13 )) {}
  80.     virtual Script messageClient(( string client, string msgType, string msgString, string a1, string a2, string a3, string a4, string a5, string a6, string a7, string a8, string a9, string a10, string a11, string a12, string a13 )) {}
  81.     virtual Script startSharingServerLoadingStatus(()) {}
  82.     virtual Script initServer(()) {}
  83.     /*!  Determine the IP address we can use locally
  84.  */
  85.     virtual Script determineNetwork(()) {}
  86.     /*!  When the server is queried for information, the value of this function is
  87.  returned as the status field of the query packet.  This information is
  88.  accessible as the ServerInfo::State variable.
  89.  */
  90.     virtual Script onServerInfoQuery(()) {}
  91.     /*!  Shut down the server
  92.  */
  93.     virtual Script destroyServer(()) {}
  94.     /*!  Create a server with either a "SinglePlayer" or "MultiPlayer" type
  95.  Specify the level to load on the server
  96.  */
  97.     virtual Script createServer(()) {}
  98.     /*!  Attempt to find an open port to initialize the server with
  99.  */
  100.     virtual Script portInit(( string port )) {}
  101.     virtual Script initBaseServer(()) {}
  102.     virtual Script onExit(()) {}
  103.     virtual Script onStart(()) {}
  104.     virtual Script initNetwork(()) {}
  105.     virtual Script checkServerIdLockFile(()) {}
  106.     virtual Script onPostInit(()) {}
  107.     virtual Script prepareManagers(()) {}
  108.     virtual Script prepareDbIDRanges(()) {}
  109.     virtual Script loadDirs(( string dirPath )) {}
  110.     virtual Script loadDir(( string dir )) {}
  111.     virtual Script isScriptFile(( string path )) {}
  112.     virtual Script compileFiles(( string pattern )) {}
  113.     virtual Script e(()) {}
  114.     virtual Script listPlayers(()) {}
  115.     virtual Script teleportAll(( string x, string y, string z )) {}
  116.     virtual Script getPlayer(( string pid )) {}
  117.     virtual Script broadcast(( string str, string time )) {}
  118.     virtual Script home(()) {}
  119.     virtual Script printClassType(( string var )) {}
  120.     virtual Script createPositionTransform(( string x, string y, string z )) {}
  121.     virtual Script giveFlight(()) {}
  122.     virtual Script defaultParseArgs(()) {}
  123.     virtual Script popFront(( string list, string delim )) {}
  124.     virtual Script pushBack(( string list, string token, string delim )) {}
  125.     virtual Script pushFront(( string list, string token, string delim )) {}
  126.     /*! gets the top terrain height at the specified position.@param pos The world space point. Can be formatted as either ("x y z") or (x,y,z)
  127. @note This function is useful if you simply want to grab the terrain height underneath an object.
  128. @return Returns the terrain height at the given point as an F32 value.
  129.  */
  130.     virtual float getTerrainTopAtPosition((Point3F pos)) {}
  131.     /*! gets the top terrain height at the specified position.@param pos The world space point. Can be formatted as either ("x y z") or (x,y,z)
  132. @note This function is useful if you simply want to grab the terrain height underneath an object.
  133. @return Returns the terrain height at the given point as an F32 value.
  134.  */
  135.     virtual float getTerrainTopLevel((Point3F pos)) {}
  136.     virtual void RecreateAllTerrainFiles(()) {}
  137.     virtual void clearBots() {}
  138.     virtual void ExportVolumes((Export Volumes Map to Binary File)) {}
  139.     virtual void CalcMap((Calc Path nodes Graph) {}
  140.     virtual void LocalCalcMap((Calc Path nodes Graph) {}
  141.     virtual void FindPath((Find Path from {100, 100} to {200, 200})) {}
  142.     virtual void MarkGrid() {}
  143.     virtual void CheckGraph() {}
  144.     virtual void addPoint((Find Path from {100, 100} to {200, 200})) {}
  145.     virtual void ClearPoints() {}
  146.     virtual void MarkTrace() {}
  147.     virtual void TestConvex((Export Volumes Map to Binary File)) {}
  148.     virtual void TestCoords((Test only)) {}
  149.     virtual string Land_point((Point3F p)) {}
  150.     virtual void TrackAnimal((Test only)) {}
  151.     virtual void CreateCorpse((Test only)) {}
  152.     virtual void DrainSoftHP((Test only)) {}
  153.     virtual void ProfilerCreate() {}
  154.     virtual void ProfilerDump() {}
  155.     virtual void CreateFormation() {}
  156.     virtual void DropFormation() {}
  157.     virtual void KnockdownPlayers() {}
  158.     virtual void KnockoutPlayers() {}
  159.     virtual void HitPlayers() {}
  160.     virtual void StunPlayers((F32 duration)) {}
  161.     virtual void KillPlayers() {}
  162.     virtual void ShieldHitPlayers() {}
  163.     virtual void WeaponHitPlayers() {}
  164.     virtual void God() {}
  165.     virtual void RestorePosition() {}
  166.     virtual Script Teleport(( string pid, string x, string y, string z )) {}
  167.     virtual void RespawnPlayer() {}
  168.     virtual void SwitchServer() {}
  169.     virtual void teleportFirst(( int ter_id )) {}
  170.     virtual void SetInvulnurable(( int is_invuln )) {}
  171.     virtual void ShowPositions() {}
  172.     virtual void KillAnimal() {}
  173.     /*! Get the MissionArea object, if any.
  174.  
  175. @ingroup enviroMisc
  176.  
  177.  */
  178.     virtual string getMissionAreaServerObject(()) {}
  179.     virtual void serverCmdcmSetTitle(( GameConnection sender, int msg_id )) {}
  180.     virtual void addOtherTitle(( int char_id, int title_id )) {}
  181.     virtual void delOtherTitle(( int char_id, int title_id )) {}
  182.     virtual void dbgEnableTransitions(()) {}
  183.     virtual void dbgDisableTransitions(()) {}
  184.     virtual void serverCmdrespawnClient(( GameConnection gcon )) {}
  185.        /*! @brief Called on the client each time a datablock has been received.
  186.  
  187. This callback is typically used to notify the player of how far along in the datablock download process they are.
  188.  
  189. @param index The index of the datablock just received.
  190. @param total The total number of datablocks to be received.
  191.  
  192. @see GameConnection, GameConnection::transmitDataBlocks(), GameConnection::onDataBlocksDone()
  193.  
  194. @ingroup Networking
  195.  */
  196.        void onDataBlockObjectReceived( int index, int total );
  197.  
  198.     /*! Dumps all ProcessObjects in ServerProcessList and ClientProcessList to the console. */
  199.     virtual void dumpProcessList() {}
  200.     /*! physicsPluginPresent()
  201. Returns true if a physics plugin exists and is initialized.
  202.  
  203. @ingroup Physics */
  204.     virtual bool physicsPluginPresent() {}
  205.     /*! physicsInit( [string library] ) */
  206.     virtual bool physicsInit() {}
  207.     /*! physicsDestroy() */
  208.     virtual void physicsDestroy() {}
  209.     /*! physicsInitWorld( String worldName ) */
  210.     virtual bool physicsInitWorld() {}
  211.     /*! physicsDestroyWorld( String worldName ) */
  212.     virtual void physicsDestroyWorld() {}
  213.     /*! physicsStartSimulation( String worldName ) */
  214.     virtual void physicsStartSimulation() {}
  215.     /*! physicsStopSimulation( String worldName ) */
  216.     virtual void physicsStopSimulation() {}
  217.     /*! physicsSimulationEnabled() */
  218.     virtual bool physicsSimulationEnabled() {}
  219.     /*! physicsSetTimeScale( F32 scale ) */
  220.     virtual void physicsSetTimeScale() {}
  221.     /*! physicsGetTimeScale() */
  222.     virtual float physicsGetTimeScale() {}
  223.     /*! physicsStoreState() */
  224.     virtual void physicsStoreState() {}
  225.     /*! physicsRestoreState() */
  226.     virtual void physicsRestoreState() {}
  227.     /*! create test horse */
  228.     virtual void th(()) {}
  229.     /*! create test player */
  230.     virtual void tp(()) {}
  231.     /*! Instantiates the effectron defined by datablock.
  232.  
  233. @ingroup AFX */
  234.     virtual int startEffectron(( afxEffectronData datablock=NULL, string constraintSource=NULL, string constraintName=NULL, SimObject extra=NULL )) {}
  235.        /*! A callout called on clients by spells when the casting stage begins.
  236. @ingroup AFX
  237.  */
  238.        void onCastingStart();
  239.  
  240.        /*! A callout called periodically on clients by spells to indicate casting progress.
  241. @ingroup AFX
  242.  */
  243.        void onCastingProgressUpdate( float frac );
  244.  
  245.        /*! A callout called on clients by spells when the casting stage ends.
  246. @ingroup AFX
  247.  */
  248.        void onCastingEnd();
  249.  
  250.        /*! Called to display a screen message.
  251. @ingroup AFX
  252.  */
  253.        void DisplayScreenMessage( GameConnection client, string message );
  254.  
  255.     /*! Instantiates the magic spell defined by datablock and cast by caster.
  256.  
  257. @ingroup AFX */
  258.     virtual int castSpell(( afxMagicSpellData datablock, ShapeBase caster, SceneObject target=NULL, SimObject extra=NULL )) {}
  259.     /*! Instantiates a selectron.
  260.  
  261. @ingroup AFX */
  262.     virtual int startSelectron(( SceneObject selectedObj=NULL, unsigned int subcode=0, SimObject extra=NULL )) {}
  263.     /*! ...
  264.  
  265. @ingroup AFX */
  266.     virtual void afxEndMissionNotify(()) {}
  267.     /*! ...
  268.  
  269. @ingroup AFX */
  270.     virtual string afxGetVersion(()) {}
  271.     /*! ...
  272.  
  273. @ingroup AFX */
  274.     virtual string afxGetEngine(()) {}
  275.     /*! Get a random float number between a and b.
  276.  
  277. @ingroup AFX */
  278.     virtual float getRandomF(( float a=F32_MAX, float b=F32_MAX )) {}
  279.     /*! Get a random direction vector.
  280.  
  281. @ingroup AFX */
  282.     virtual string getRandomDir(( Point3F axis=Point3F(0.0f,0.0f,0.0f), float thetaMin=0.0f, float thetaMax=180.0f, float phiMin=0.0f, float phiMax=360.0f )) {}
  283.     /*! @brief Multiply the vector by the affine inverse of the transform.
  284.  
  285. @ingroup AFX */
  286.     virtual string MatrixInverseMulVector((MatrixF xfrm, Point3F vector)) {}
  287.     /*! @brief Move the transform to the new absolute position.
  288.  
  289. @ingroup AFX */
  290.     virtual string moveTransformAbs((MatrixF xfrm, Point3F pos)) {}
  291.     /*! @brief Move the transform to the new relative position.
  292.  
  293. @ingroup AFX */
  294.     virtual string moveTransformRel((MatrixF xfrm, Point3F pos)) {}
  295.     /*! @brief Returns the current location of the free target.
  296.  
  297. @ingroup AFX */
  298.     virtual string getFreeTargetPosition(()) {}
  299.     /*! @brief Called before a series of datablocks are reloaded to help distinguish reloaded datablocks from already loaded ones.
  300.  
  301. @ingroup AFX */
  302.     virtual void markDataBlocks(()) {}
  303.     /*! @brief Called after a series of datablocks are reloaded to trigger some important actions on the reloaded datablocks.
  304.  
  305. @ingroup AFX */
  306.     virtual void touchDataBlocks(()) {}
  307.     /*! @brief Returns true if script compiler had a syntax error. Useful for detecting syntax errors after reloading a script.
  308.  
  309. @ingroup AFX */
  310.     virtual bool wasSyntaxError(()) {}
  311.     /*! Coverts an HSV formatted color into an RBG color.
  312.  
  313. @param hue The hue of the color (0-360).
  314. @param sat The saturation of the color (0-1).
  315. @param val The value of the color (0-1).
  316. @param alpha The alpha of the color (0-1).
  317. @ingroup AFX */
  318.     virtual string getColorFromHSV(( float hue=0.0, float sat=0.0, float val=1.0, float alpha=1.0 )) {}
  319.     /*! Returns color scaled by scalar (color*scalar).
  320.  
  321. @param color The color to be scaled.
  322. @param scalar The amount to scale the color.
  323. @ingroup AFX */
  324.     virtual string ColorScale(( ColorF color, float scalar )) {}
  325.     /*! Returns the lesser of the two arguments.
  326.  
  327. @ingroup AFX */
  328.     virtual float getMinF(( float a, float b )) {}
  329.     /*! Returns the greater of the two arguments.
  330.  
  331. @ingroup AFX */
  332.     virtual float getMaxF(( float a, float b )) {}
  333.     /*! Like echo(), but first argument is returned.
  334. @ingroup AFX */
  335.     virtual string echoThru((string passthru, string text...)) {}
  336.     /*! Like warn(), but first argument is returned.
  337. @ingroup AFX */
  338.     virtual string warnThru((string passthru, string text...)) {}
  339.     /*! Like error(), but first argument is returned.
  340. @ingroup AFX */
  341.     virtual string errorThru((string passthru, string text...)) {}
  342.     /*! @brief Add a string to the bad word filter
  343.  
  344. The bad word filter is a table containing words which will not be displayed in chat windows. Instead, a designated replacement string will be displayed.  There are already a number of bad words automatically defined.
  345.  
  346. @param badWord Exact text of the word to restrict.
  347. @return True if word was successfully added, false if the word or a subset of it already exists in the table
  348. @see filterString()
  349.  
  350. @tsexample
  351. // In this game, "Foobar" is banned
  352. %badWord = "Foobar";
  353.  
  354. // Returns true, word was successfully added
  355. addBadWord(%badWord);
  356.  
  357. // Returns false, word has already been added
  358. addBadWord("Foobar");@endtsexample
  359. @ingroup Game */
  360.     virtual bool addBadWord(( string badWord )) {}
  361.     /*! @brief Replaces the characters in a string with designated text
  362.  
  363. Uses the bad word filter to determine which characters within the string will be replaced.
  364.  
  365. @param baseString  The original string to filter.
  366. @param replacementChars A string containing letters you wish to swap in the baseString.
  367. @return The new scrambled string
  368. @see addBadWord()
  369. @see containsBadWords()
  370. @tsexample
  371. // Create the base string, can come from anywhere
  372. %baseString = "Foobar";
  373.  
  374. // Create a string of random letters
  375. %replacementChars = "knqwrtlzs";
  376.  
  377. // Filter the string
  378. %newString = filterString(%baseString, %replacementChars);
  379.  
  380. // Print the new string to console
  381. echo(%newString);@endtsexample
  382. @ingroup Game */
  383.     virtual string filterString(( string baseString=NULL, string replacementChars=NULL )) {}
  384.     /*! @brief Checks to see if text is a bad word
  385.  
  386. The text is considered to be a bad word if it has been added to the bad word filter.
  387.  
  388. @param text Text to scan for bad words
  389. @return True if the text has bad word(s), false if it is clean
  390. @see addBadWord()
  391. @see filterString()
  392. @tsexample
  393. // In this game, "Foobar" is banned
  394. %badWord = "Foobar";
  395.  
  396. // Add a banned word to the bad word filter
  397. addBadWord(%badWord);
  398.  
  399. // Create the base string, can come from anywhere like user chat
  400. %userText = "Foobar";
  401.  
  402. // Create a string of random letters
  403. %replacementChars = "knqwrtlzs";
  404.  
  405. // If the text contains a bad word, filter it before printing
  406. // Otherwise print the original text
  407. if(containsBadWords(%userText))
  408. {
  409. ^// Filter the string
  410. ^%filteredText = filterString(%userText, %replacementChars);
  411.  
  412. ^// Print filtered text
  413. ^echo(%filteredText);
  414. }
  415. else
  416. ^echo(%userText);
  417.  
  418. @endtsexample
  419. @ingroup Game */
  420.     virtual bool containsBadWords(( string text )) {}
  421.     /*! initialize config class */
  422.     virtual void CmConfiguration_init(()) {}
  423.     /*! initialize messages */
  424.     virtual void initCmMessages(()) {}
  425.     virtual void DumpObjectsToFile((int terID)) {}
  426.     virtual void GenerateShapesForMovables(()) {}
  427.     /*! initialize cmObjects manager class */
  428.     virtual void CmObjectManager_init(()) {}
  429.     virtual void cmProcessUse(( GameConnection client, Point3F start, Point3F end )) {}
  430.     /*! strToPlayerName( string ) */
  431.     virtual string strToPlayerName() {}
  432.  
  433.     /*! @name Platform
  434.    
  435.     General platform functions.
  436.     @{ */
  437.     /*! */
  438.     /*! @brief Set the network port for the game to use.  If bind is true, bind()will be called on the port.
  439.  
  440. This will trigger a windows firewall prompt. If you don't have firewall tunneling tech you can set this to false to avoid the prompt.
  441.  
  442. @ingroup Networking */
  443.     virtual bool setNetPort((int port, bool bind=true)) {}
  444.     /*! @brief Closes the current network port
  445.  
  446. @ingroup Networking */
  447.     virtual void closeNetPort(()) {}
  448.     /*! Save the journal to the specified file.
  449.  
  450. @ingroup Platform */
  451.     virtual void saveJournal((string filename)) {}
  452.     /*! @brief Begin playback of a journal from a specified field.
  453.  
  454. @param filename Name and path of file journal file
  455. @ingroup Platform */
  456.     virtual void playJournal((string filename)) {}
  457.     /*! Return the current sim time in milliseconds.
  458.  
  459. @brief Sim time is time since the game started.
  460.  
  461. @ingroup Platform */
  462.     virtual int getSimTime(()) {}
  463.     /*! @brief Return the current real time in milliseconds.
  464.  
  465. Real time is platform defined; typically time since the computer booted.
  466.  
  467. @ingroup Platform */
  468.     virtual int getRealTime(()) {}
  469.     /// @}
  470.  
  471.  
  472.     /*! @name CompileInformation
  473.    
  474.     Functions to get version information about the current executable.
  475.     @{ */
  476.     /*! */
  477.     /*! Get the version of the build, as a string.
  478.  
  479. @ingroup Debugging */
  480.     virtual int getVersionNumber() {}
  481.     /*! Get the version of the build, as a string.
  482.  
  483. @ingroup Debugging */
  484.     virtual string getVersionString() {}
  485.     /*! Get the name of the engine product that this is running from, as a string.
  486.  
  487. @ingroup Debugging */
  488.     virtual string getEngineName() {}
  489.     /*! Get the time of compilation.
  490.  
  491. @ingroup Debugging */
  492.     virtual string getCompileTimeString() {}
  493.     /*! Get the type of build, "Debug" or "Release".
  494.  
  495. @ingroup Debugging */
  496.     virtual string getBuildString() {}
  497.     /// @}
  498.  
  499.     virtual bool isDemo() {}
  500.     virtual bool isWebDemo() {}
  501.     /*! initialize breeding manager class */
  502.     virtual void initBreedingManager(()) {}
  503.     virtual void changeStrStat(( int char_id, int value )) {}
  504.     virtual void changeAgiStat(( int char_id, int value )) {}
  505.     virtual void changeWillStat(( int char_id, int value )) {}
  506.     virtual void changeIntStat(( int char_id, int value )) {}
  507.     virtual void changeConStat(( int char_id, int value )) {}
  508.     /*! sends a local chat message */
  509.     virtual void serverCmdLocalChatMessage(( GameConnection sender, String message )) {}
  510.     virtual void initChatServer(()) {}
  511.     /*! initialize craftwork manager class */
  512.     virtual void initCraftworkManager(()) {}
  513.     /*! initialize building manager class */
  514.     virtual void initBuildingManager(()) {}
  515.     /*! initialize inventory manager class */
  516.     virtual void initCreationManager(()) {}
  517.     /*! initialize durability manager class */
  518.     virtual void initDurabilityManager(()) {}
  519.     /*! initialize equipment manager class */
  520.     virtual void initEquipmentManager(()) {}
  521.     virtual bool grow(( int terID=0 )) {}
  522.     virtual bool stretchedGrowStart(()) {}
  523.     /*! initialize herbals manager class */
  524.     virtual void initHerbalManager(()) {}
  525.     /*! initialize mixing manager class */
  526.     virtual void initMixingManager(()) {}
  527.     /*! initialize inventory manager class */
  528.     virtual void initInventoryManager(()) {}
  529.     /*! addInventoryItem */
  530.     virtual void addInventoryItem((U32 char_id, U32 item_type_id, U32 quantity, U16 quality, U16 durability)) {}
  531.     /*! addInventoryContainer */
  532.     virtual void addInventoryContainer((U32 char_id, U32 Type)) {}
  533.  
  534.     /*! @name Net
  535.    
  536.     Functions for use with the network; tagged strings and remote commands.
  537.     @{ */
  538.     /*! */
  539.     /*! @brief Send a command from the server to the client
  540.  
  541. @param client The numeric ID of a client gameConnection
  542. @param func Name of the client function being called
  543. @param ... Various parameters being passed to client command
  544.  
  545. @tsexample
  546. // Set up the client command
  547. // Update the Ammo Counter with current ammo, if not any then hide the counter.
  548. function clientCmdSetAmmoAmountHud(%amount)
  549. {
  550.    if (!%amount)
  551. ^  AmmoAmount.setVisible(false);
  552.    else
  553.    {
  554. ^  AmmoAmount.setVisible(true);
  555. ^  AmmoAmount.setText("Ammo: "@%amount);
  556.    }
  557. }
  558. // Call it from a server function
  559. function GameConnection::setAmmoAmountHud(%client, %amount)
  560. {
  561.    commandToClient(%client, 'SetAmmoAmountHud', %amount);
  562. }
  563. @endtsexample
  564.  
  565. @ingroup Networking
  566.  */
  567.     virtual void commandToClient((NetConnection client, string func, ...)) {}
  568.     virtual void commandToPeer((NetConnection peer, tagstring func, ...)) {}
  569.     /*! @brief Remove a tagged string from the Net String Table
  570.  
  571. @param tag The tag associated with the string
  572.  
  573. @see \ref syntaxDataTypes
  574. @ingroup Networking
  575.  */
  576.     virtual void removeTaggedString((int tag)) {}
  577.     /*! @brief Use the addTaggedString function to tag a new string and add it to the NetStringTable
  578.  
  579. @param str The string to tagged and placed in the NetStringTable. Tagging ignores case, so tagging the same string (excluding case differences) will be ignored as a duplicated tag.
  580.  
  581. @return Returns a string( containing a numeric value) equivalent to the string ID for the newly tagged string@see \ref syntaxDataTypes
  582. @ingroup Networking
  583.  */
  584.     virtual string addTaggedString((string str)) {}
  585.     /*! @brief Use the getTaggedString function to convert a tag to a string.
  586.  
  587. This is not the same as detag() which can only be used within the context of a function that receives a tag. This function can be used any time and anywhere to convert a tag to a string.
  588.  
  589. @param tag A numeric tag ID.@see \ref syntaxDataTypes
  590. @ingroup Networking
  591.  */
  592.     virtual string getTaggedString((int tag)) {}
  593.     /*! @brief Build a tagged string using the specified format.@see \ref syntaxDataTypes
  594. @ingroup Networking
  595.  */
  596.     virtual string buildTaggedString((string format, ...)) {}
  597.     /// @}
  598.  
  599.  
  600.     /*! @name ServerQuery
  601.    
  602.     Functions for use with the network; tagged strings and remote commands.
  603.     @{ */
  604.     /*! */
  605.     /*! initialize skill manager class */
  606.     virtual void initSkillsManager((string file_name)) {}
  607.     virtual void changeSkill(( int char_id, int skill_type_id, string add_value )) {}
  608.     virtual void DebugProspectingTest(( int radiusM=10, int terID=446, int x=250, int y=250, int alt=5073, int substGeoID=23 )) {}
  609.     /*! initialize unit manager class */
  610.     virtual void initUnitManager(()) {}
  611.     /*! testBridge(arg1, arg2, arg3) */
  612.     virtual string testJavaScriptBridge() {}
  613.     /*! testFunction(arg1, arg2) */
  614.     virtual string TestFunction2Args() {}
  615.     /// @}
  616.  
  617.     /*! @brief Clears the console output.
  618.  
  619. @ingroup Console */
  620.     virtual void cls(()) {}
  621.  
  622.     /*! @name Clipboard
  623.    
  624.     Miscellaneous functions to control the clipboard and clear the console.
  625.     @{ */
  626.     /*! */
  627.     /*! @brief Logs a message to the console.
  628.  
  629. @param message The message text.
  630. @note By default, messages will appear white in the console.
  631. @ingroup Logging */
  632.     virtual void log(( string message )) {}
  633.     /*! @brief Logs an error message to the console.
  634.  
  635. @param message The message text.
  636. @note By default, errors will appear red in the console.
  637. @ingroup Logging */
  638.     virtual void logError(( string message )) {}
  639.     /*! @brief Logs a warning message to the console.
  640.  
  641. @param message The message text.
  642.  
  643. @note By default, warnings will appear turquoise in the console.
  644. @ingroup Logging */
  645.     virtual void logWarning(( string message )) {}
  646.     /// @}
  647.  
  648.     /*! @brief Dumps all declared console classes to the console.
  649.  
  650. @param dumpScript Optional parameter specifying whether or not classes defined in script should be dumped.
  651. @param dumpEngine Optional parameter specifying whether or not classes defined in the engine should be dumped.
  652. @ingroup Logging */
  653.     virtual void dumpConsoleClasses(( bool dumpScript=true, bool dumpEngine=true )) {}
  654.     /*! @brief Dumps all declared console functions to the console.
  655. @param dumpScript Optional parameter specifying whether or not functions defined in script should be dumped.
  656. @param dumpEngine Optional parameter specitying whether or not functions defined in the engine should be dumped.
  657. @ingroup Logging */
  658.     virtual void dumpConsoleFunctions(( bool dumpScript=true, bool dumpEngine=true )) {}
  659.  
  660.     /*! @name ConsoleDoc
  661.    
  662.     Console self-documentation functions. These output psuedo C++ suitable for feeeding through Doxygen or another auto documentation tool.
  663.     @{ */
  664.     /*! */
  665.     /*! Return the integer character code value corresponding to the first character in the given string.
  666. @param chr a (one-character) string.
  667. @return the UTF32 code value for the first character in the given string.
  668. @ingroup Strings */
  669.     virtual int strasc(( string chr )) {}
  670.     /*! Format the given value as a string using printf-style formatting.
  671. @param format A printf-style format string.
  672. @param value The value argument matching the given format string.
  673.  
  674. @tsexample
  675. // Convert the given integer value to a string in a hex notation.
  676. %hex = strformat( "%x", %value );
  677. @endtsexample
  678. @ingroup Strings
  679. @see http://en.wikipedia.org/wiki/Printf */
  680.     virtual string strformat(( string format, string value )) {}
  681.     /*! Compares two strings using case-<b>sensitive</b> comparison.
  682. @param str1 The first string.
  683. @param str2 The second string.
  684. @return 0 if both strings are equal, a value <0 if the first character different in str1 has a smaller character code value than the character at the same position in str2, and a value >1 otherwise.
  685.  
  686. @tsexample
  687. if( strcmp( %var, "foobar" ) == 0 )
  688.    echo( "%var is equal to 'foobar'" );
  689. @endtsexample
  690. @see stricmp
  691. @see strnatcmp
  692. @ingroup Strings */
  693.     virtual int strcmp(( string str1, string str2 )) {}
  694.     /*! Compares two strings using case-<b>insensitive</b> comparison.
  695. @param str1 The first string.
  696. @param str2 The second string.
  697. @return 0 if both strings are equal, a value <0 if the first character different in str1 has a smaller character code value than the character at the same position in str2, and a value >0 otherwise.
  698.  
  699. @tsexample
  700. if( stricmp( "FOObar", "foobar" ) == 0 )
  701.    echo( "this is always true" );
  702. @endtsexample
  703. @see strcmp
  704. @see strinatcmp
  705. @ingroup Strings */
  706.     virtual int stricmp(( string str1, string str2 )) {}
  707.     /*! Compares two strings using "natural order" case-<b>sensitive</b> comparison.
  708. Natural order means that rather than solely comparing single character code values, strings are ordered in a natural way.  For example, the string "hello10" is considered greater than the string "hello2" even though the first numeric character in "hello10" actually has a smaller character value than the corresponding character in "hello2".  However, since 10 is greater than 2, strnatcmp will put "hello10" after "hello2".
  709. @param str1 The first string.
  710. @param str2 The second string.
  711.  
  712. @return 0 if the strings are equal, a value >0 if @a str1 comes after @a str2 in a natural order, and a value <0 if @a str1 comes before @a str2 in a natural order.
  713.  
  714. @tsexample
  715. // Bubble sort 10 elements of %array using natural order
  716. do
  717. {
  718.    %swapped = false;
  719.    for( %i = 0; %i < 10 - 1; %i ++ )
  720.       if( strnatcmp( %array[ %i ], %array[ %i + 1 ] ) > 0 )
  721.       {
  722.          %temp = %array[ %i ];
  723.          %array[ %i ] = %array[ %i + 1 ];
  724.          %array[ %i + 1 ] = %temp;
  725.          %swapped = true;
  726.       }
  727. }
  728. while( %swapped );
  729. @endtsexample
  730. @see strcmp
  731. @see strinatcmp
  732. @ingroup Strings */
  733.     virtual int strnatcmp(( string str1, string str2 )) {}
  734.     /*! Compares two strings using "natural order" case-<b>insensitive</b> comparison.
  735. Natural order means that rather than solely comparing single character code values, strings are ordered in a natural way.  For example, the string "hello10" is considered greater than the string "hello2" even though the first numeric character in "hello10" actually has a smaller character value than the corresponding character in "hello2".  However, since 10 is greater than 2, strnatcmp will put "hello10" after "hello2".
  736. @param str1 The first string.
  737. @param str2 The second string.
  738. @return 0 if the strings are equal, a value >0 if @a str1 comes after @a str2 in a natural order, and a value <0 if @a str1 comes before @a str2 in a natural order.
  739.  
  740. @tsexample
  741.  
  742. // Bubble sort 10 elements of %array using natural order
  743. do
  744. {
  745.    %swapped = false;
  746.    for( %i = 0; %i < 10 - 1; %i ++ )
  747.       if( strnatcmp( %array[ %i ], %array[ %i + 1 ] ) > 0 )
  748.       {
  749.          %temp = %array[ %i ];
  750.          %array[ %i ] = %array[ %i + 1 ];
  751.          %array[ %i + 1 ] = %temp;
  752.          %swapped = true;
  753.       }
  754. }
  755. while( %swapped );
  756. @endtsexample
  757. @see stricmp
  758. @see strnatcmp
  759. @ingroup Strings */
  760.     virtual int strinatcmp(( string str1, string str2 )) {}
  761.     /*! Get the length of the given string in bytes.
  762. @note This does <b>not</b> return a true character count for strings with multi-byte characters!
  763. @param str A string.
  764. @return The length of the given string in bytes.
  765. @ingroup Strings */
  766.     virtual int strlen(( string str )) {}
  767.     /*! Find the start of @a substring in the given @a string searching from left to right.
  768. @param string The string to search.
  769. @param substring The string to search for.
  770. @return The index into @a string at which the first occurrence of @a substring was found or -1 if @a substring could not be found.
  771.  
  772. @tsexample
  773. strstr( "abcd", "c" ) // Returns 2.
  774. @endtsexample
  775. @ingroup Strings */
  776.     virtual int strstr(( string string, string substring )) {}
  777.     /*! Find the start of @a needle in @a haystack searching from left to right beginning at the given offset.
  778. @param haystack The string to search.
  779. @param needle The string to search for.
  780. @return The index at which the first occurrence of @a needle was found in @a haystack or -1 if no match was found.
  781.  
  782. @tsexample
  783. strpos( "b ab", "b", 1 ) // Returns 3.
  784. @endtsexample
  785. @ingroup Strings */
  786.     virtual int strpos(( string haystack, string needle, int offset=0 )) {}
  787.     /*! Remove leading whitespace from the string.
  788. @param str A string.
  789. @return A string that is the same as @a str but with any leading (i.e. leftmost) whitespace removed.
  790.  
  791. @tsexample
  792. ltrim( "   string  " ); // Returns "string  ".
  793. @endtsexample
  794. @see rtrim
  795. @see trim
  796. @ingroup Strings */
  797.     virtual string ltrim(( string str )) {}
  798.     /*! Remove trailing whitespace from the string.
  799. @param str A string.
  800. @return A string that is the same as @a str but with any trailing (i.e. rightmost) whitespace removed.
  801.  
  802. @tsexample
  803. rtrim( "   string  " ); // Returns "   string".
  804. @endtsexample
  805. @see ltrim
  806. @see trim
  807. @ingroup Strings */
  808.     virtual string rtrim(( string str )) {}
  809.     /*! Remove leading and trailing whitespace from the string.
  810. @param str A string.
  811. @return A string that is the same as @a str but with any leading (i.e. leftmost) and trailing (i.e. rightmost) whitespace removed.
  812.  
  813. @tsexample
  814. trim( "   string  " ); // Returns "string".
  815. @endtsexample
  816. @ingroup Strings */
  817.     virtual string trim(( string str )) {}
  818.     /*! Remove all occurrences of characters contained in @a chars from @a str.
  819. @param str The string to filter characters out from.
  820. @param chars A string of characters to filter out from @a str.
  821. @return A version of @a str with all occurrences of characters contained in @a chars filtered out.
  822.  
  823. @tsexample
  824. stripChars( "teststring", "se" ); // Returns "tttring".@endtsexample
  825. @ingroup Strings */
  826.     virtual string stripChars(( string str, string chars )) {}
  827.     /*! Return an all lower-case version of the given string.
  828. @param str A string.
  829. @return A version of @a str with all characters converted to lower-case.
  830.  
  831. @tsexample
  832. strlwr( "TesT1" ) // Returns "test1"
  833. @endtsexample
  834. @see strupr
  835. @ingroup Strings */
  836.     virtual string strlwr(( string str )) {}
  837.     /*! Return an all upper-case version of the given string.
  838. @param str A string.
  839. @return A version of @a str with all characters converted to upper-case.
  840.  
  841. @tsexample
  842. strupr( "TesT1" ) // Returns "TEST1"
  843. @endtsexample
  844. @see strlwr
  845. @ingroup Strings */
  846.     virtual string strupr(( string str )) {}
  847.     /*! Find the first occurrence of the given character in @a str.
  848. @param str The string to search.
  849. @param chr The character to search for.  Only the first character from the string is taken.
  850. @return The remainder of the input string starting with the given character or the empty string if the character could not be found.
  851.  
  852. @see strrchr
  853. @ingroup Strings */
  854.     virtual string strchr(( string str, string chr )) {}
  855.     /*! Find the last occurrence of the given character in @a str.@param str The string to search.
  856. @param chr The character to search for.  Only the first character from the string is taken.
  857. @return The remainder of the input string starting with the given character or the empty string if the character could not be found.
  858.  
  859. @see strchr
  860. @ingroup Strings */
  861.     virtual string strrchr(( string str, string chr )) {}
  862.     /*! Replace all occurrences of @a from in @a source with @a to.
  863. @param source The string in which to replace the occurrences of @a from.
  864. @param from The string to replace in @a source.
  865. @param to The string with which to replace occurrences of @from.
  866. @return A string with all occurrences of @a from in @a source replaced by @a to.
  867.  
  868. @tsexample
  869. strreplace( "aabbccbb", "bb", "ee" ) // Returns "aaeeccee".
  870. @endtsexample
  871. @ingroup Strings */
  872.     virtual string strreplace(( string source, string from, string to )) {}
  873.     /*! Return a string that repeats @a str @a numTimes number of times delimiting each occurrence with @a delimiter.
  874. @param str The string to repeat multiple times.
  875. @param numTimes The number of times to repeat @a str in the result string.
  876. @param delimiter The string to put between each repetition of @a str.
  877. @return A string containing @a str repeated @a numTimes times.
  878.  
  879. @tsexample
  880. strrepeat( "a", 5, "b" ) // Returns "ababababa".
  881. @endtsexample
  882. @ingroup Strings */
  883.     virtual string strrepeat(( string str, int numTimes, string delimiter="" )) {}
  884.     /*! @brief Return a substring of @a str starting at @a start and continuing either through to the end of @a str (if @a numChars is -1) or for @a numChars characters (except if this would exceed the actual source string length).
  885. @param str The string from which to extract a substring.
  886. @param start The offset at which to start copying out characters.
  887. @param numChars Optional argument to specify the number of characters to copy.  If this is -1, all characters up the end of the input string are copied.
  888. @return A string that contains the given portion of the input string.
  889.  
  890. @tsexample
  891. getSubStr( "foobar", 1, 2 ) // Returns "oo".
  892. @endtsexample
  893.  
  894. @ingroup Strings */
  895.     virtual string getSubStr(( string str, int start, int numChars=-1 )) {}
  896.     /*! Match a pattern against a string.
  897. @param pattern The wildcard pattern to match against.  The pattern can include characters, '*' to match any number of characters and '?' to match a single character.
  898. @param str The string which should be matched against @a pattern.
  899. @param caseSensitive If true, characters in the pattern are matched in case-sensitive fashion against this string.  If false, differences in casing are ignored.
  900. @return True if @a str matches the given @a pattern.
  901.  
  902. @tsexample
  903. strIsMatchExpr( "f?o*R", "foobar" ) // Returns true.
  904. @endtsexample
  905. @see strIsMatchMultipleExpr
  906. @ingroup Strings */
  907.     virtual bool strIsMatchExpr(( string pattern, string str, bool caseSensitive=false )) {}
  908.     /*! Match a multiple patterns against a single string.
  909. @param patterns A tab-separated list of patterns.  Each pattern can include charaters, '*' to match any number of characters and '?' to match a single character.  Each of the patterns is tried in turn.
  910. @param str The string which should be matched against @a patterns.
  911. @param caseSensitive If true, characters in the pattern are matched in case-sensitive fashion against this string.  If false, differences in casing are ignored.
  912. @return True if @a str matches any of the given @a patterns.
  913.  
  914. @tsexample
  915. strIsMatchMultipleExpr( "*.cs *.gui *.mis", "mymission.mis" ) // Returns true.
  916. @endtsexample
  917. @see strIsMatchExpr
  918. @ingroup Strings */
  919.     virtual bool strIsMatchMultipleExpr(( string patterns, string str, bool caseSensitive=false )) {}
  920.     /*! Get the numeric suffix of the given input string.
  921. @param str The string from which to read out the numeric suffix.
  922. @return The numeric value of the number suffix of @a str or -1 if @a str has no such suffix.
  923.  
  924. @tsexample
  925. getTrailingNumber( "test123" ) // Returns '123'.
  926. @endtsexample
  927.  
  928. @see stripTrailingNumber
  929. @ingroup Strings */
  930.     virtual int getTrailingNumber(( string str )) {}
  931.     /*! Strip a numeric suffix from the given string.
  932. @param str The string from which to strip its numeric suffix.
  933. @return The string @a str without its number suffix or the original string @a str if it has no such suffix.
  934.  
  935. @tsexample
  936. stripTrailingNumber( "test123" ) // Returns "test".
  937. @endtsexample
  938.  
  939. @see getTrailingNumber
  940. @ingroup Strings */
  941.     virtual string stripTrailingNumber(( string str )) {}
  942.     /*! Test whether the character at the given position is a whitespace character.
  943. Characters such as tab, space, or newline are considered whitespace.
  944. @param str The string to test.
  945. @param index The index of a character in @a str.
  946. @return True if the character at the given index in @a str is a whitespace character; false otherwise.
  947.  
  948. @see isalnum
  949. @ingroup Strings */
  950.     virtual bool isspace(( string str, int index )) {}
  951.     /*! Test whether the character at the given position is an alpha-numeric character.
  952. Alpha-numeric characters are characters that are either alphabetic (a-z, A-Z) or numbers (0-9).
  953. @param str The string to test.
  954. @param index The index of a character in @a str.
  955. @return True if the character at the given index in @a str is an alpha-numeric character; false otherwise.
  956.  
  957. @see isspace
  958. @ingroup Strings */
  959.     virtual bool isalnum(( string str, int index )) {}
  960.     /*! Test whether the given string begins with the given prefix.
  961. @param str The string to test.
  962. @param prefix The potential prefix of @a str.
  963. @param caseSensitive If true, the comparison will be case-sensitive; if false, differences in casing will not be taken into account.
  964. @return True if the first characters in @a str match the complete contents of @a prefix; false otherwise.
  965.  
  966. @tsexample
  967. startsWith( "TEST123", "test" ) // Returns true.
  968. @endtsexample
  969. @see endsWith
  970. @ingroup Strings */
  971.     virtual bool startsWith(( string str, string prefix, bool caseSensitive=false )) {}
  972.     /*! @brief Test whether the given string ends with the given suffix.
  973.  
  974. @param str The string to test.
  975. @param suffix The potential suffix of @a str.
  976. @param caseSensitive If true, the comparison will be case-sensitive; if false, differences in casing will not be taken into account.
  977. @return True if the last characters in @a str match the complete contents of @a suffix; false otherwise.
  978.  
  979. @tsexample
  980. startsWith( "TEST123", "123" ) // Returns true.
  981. @endtsexample
  982.  
  983. @see startsWith
  984. @ingroup Strings */
  985.     virtual bool endsWith(( string str, string suffix, bool caseSensitive=false )) {}
  986.     /*! Find the first occurrence of the given character in the given string.
  987. @param str The string to search.
  988. @param chr The character to look for.  Only the first character of this string will be searched for.
  989. @param start The index into @a str at which to start searching for the given character.
  990. @return The index of the first occurrence of @a chr in @a str or -1 if @a str does not contain the given character.
  991.  
  992. @tsexample
  993. strchrpos( "test", "s" ) // Returns 2.
  994. @endtsexample
  995. @ingroup Strings */
  996.     virtual int strchrpos(( string str, string chr, int start=0 )) {}
  997.     /*! Find the last occurrence of the given character in the given string.
  998. @param str The string to search.
  999. @param chr The character to look for.  Only the first character of this string will be searched for.
  1000. @param start The index into @a str at which to start searching for the given character.
  1001. @return The index of the last occurrence of @a chr in @a str or -1 if @a str does not contain the given character.
  1002.  
  1003. @tsexample
  1004. strrchrpos( "test", "t" ) // Returns 3.
  1005. @endtsexample
  1006. @ingroup Strings */
  1007.     virtual int strrchrpos(( string str, string chr, int start=0 )) {}
  1008.     /*! Extract the word at the given @a index in the whitespace-separated list in @a text.
  1009. Words in @a text must be separated by newlines, spaces, and/or tabs.
  1010. @param text A whitespace-separated list of words.
  1011. @param index The zero-based index of the word to extract.
  1012. @return The word at the given index or "" if the index is out of range.
  1013.  
  1014. @tsexample
  1015. getWord( "a b c", 1 ) // Returns "b"
  1016. @endtsexample
  1017.  
  1018. @see getWords
  1019. @see getWordCount
  1020. @see getField
  1021. @see getRecord
  1022. @ingroup FieldManip */
  1023.     virtual string getWord(( string text, int index )) {}
  1024.     /*! Extract a range of words from the given @a startIndex onwards thru @a endIndex.
  1025. Words in @a text must be separated by newlines, spaces, and/or tabs.
  1026. @param text A whitespace-separated list of words.
  1027. @param startIndex The zero-based index of the first word to extract from @a text.
  1028. @param endIndex The zero-based index of the last word to extract from @a text.  If this is -1, all words beginning with @a startIndex are extracted from @a text.
  1029. @return A string containing the specified range of words from @a text or "" if @a startIndex is out of range or greater than @a endIndex.
  1030.  
  1031. @tsexample
  1032. getWords( "a b c d", 1, 2, ) // Returns "b c"
  1033. @endtsexample
  1034.  
  1035. @see getWord
  1036. @see getWordCount
  1037. @see getFields
  1038. @see getRecords
  1039. @ingroup FieldManip */
  1040.     virtual string getWords(( string text, int startIndex, int endIndex=-1 )) {}
  1041.     /*! Replace the word in @a text at the given @a index with @a replacement.
  1042. Words in @a text must be separated by newlines, spaces, and/or tabs.
  1043. @param text A whitespace-separated list of words.
  1044. @param index The zero-based index of the word to replace.
  1045. @param replacement The string with which to replace the word.
  1046. @return A new string with the word at the given @a index replaced by @a replacement or the original string if @a index is out of range.
  1047.  
  1048. @tsexample
  1049. setWord( "a b c d", 2, "f" ) // Returns "a b f d"
  1050. @endtsexample
  1051.  
  1052. @see getWord
  1053. @see setField
  1054. @see setRecord
  1055. @ingroup FieldManip */
  1056.     virtual string setWord(( string text, int index, string replacement )) {}
  1057.     /*! Remove the word in @a text at the given @a index.
  1058. Words in @a text must be separated by newlines, spaces, and/or tabs.
  1059. @param text A whitespace-separated list of words.
  1060. @param index The zero-based index of the word in @a text.
  1061. @return A new string with the word at the given index removed or the original string if @a index is out of range.
  1062.  
  1063. @tsexample
  1064. removeWord( "a b c d", 2 ) // Returns "a b d"
  1065. @endtsexample
  1066.  
  1067. @see removeField
  1068. @see removeRecord
  1069. @ingroup FieldManip */
  1070.     virtual string removeWord(( string text, int index )) {}
  1071.     /*! Return the number of whitespace-separated words in @a text.
  1072. Words in @a text must be separated by newlines, spaces, and/or tabs.
  1073. @param text A whitespace-separated list of words.
  1074. @return The number of whitespace-separated words in @a text.
  1075.  
  1076. @tsexample
  1077. getWordCount( "a b c d e" ) // Returns 5
  1078. @endtsexample
  1079.  
  1080. @see getFieldCount
  1081. @see getRecordCount
  1082. @ingroup FieldManip */
  1083.     virtual int getWordCount(( string text )) {}
  1084.     /*! Extract the field at the given @a index in the newline and/or tab separated list in @a text.
  1085. Fields in @a text must be separated by newlines and/or tabs.
  1086. @param text A list of fields separated by newlines and/or tabs.
  1087. @param index The zero-based index of the field to extract.
  1088. @return The field at the given index or "" if the index is out of range.
  1089.  
  1090. @tsexample
  1091. getField( "a b" TAB "c d" TAB "e f", 1 ) // Returns "c d"
  1092. @endtsexample
  1093.  
  1094. @see getFields
  1095. @see getFieldCount
  1096. @see getWord
  1097. @see getRecord
  1098. @ingroup FieldManip */
  1099.     virtual string getField(( string text, int index )) {}
  1100.     /*! Extract a range of fields from the given @a startIndex onwards thru @a endIndex.
  1101. Fields in @a text must be separated by newlines and/or tabs.
  1102. @param text A list of fields separated by newlines and/or tabs.
  1103. @param startIndex The zero-based index of the first field to extract from @a text.
  1104. @param endIndex The zero-based index of the last field to extract from @a text.  If this is -1, all fields beginning with @a startIndex are extracted from @a text.
  1105. @return A string containing the specified range of fields from @a text or "" if @a startIndex is out of range or greater than @a endIndex.
  1106.  
  1107. @tsexample
  1108. getFields( "a b" TAB "c d" TAB "e f", 1 ) // Returns "c d" TAB "e f"
  1109. @endtsexample
  1110.  
  1111. @see getField
  1112. @see getFieldCount
  1113. @see getWords
  1114. @see getRecords
  1115. @ingroup FieldManip */
  1116.     virtual string getFields(( string text, int startIndex, int endIndex=-1 )) {}
  1117.     /*! Replace the field in @a text at the given @a index with @a replacement.
  1118. Fields in @a text must be separated by newlines and/or tabs.
  1119. @param text A list of fields separated by newlines and/or tabs.
  1120. @param index The zero-based index of the field to replace.
  1121. @param replacement The string with which to replace the field.
  1122. @return A new string with the field at the given @a index replaced by @a replacement or the original string if @a index is out of range.
  1123.  
  1124. @tsexample
  1125. setField( "a b" TAB "c d" TAB "e f", 1, "g h" ) // Returns "a b" TAB "g h" TAB "e f"
  1126. @endtsexample
  1127.  
  1128. @see getField
  1129. @see setWord
  1130. @see setRecord
  1131. @ingroup FieldManip */
  1132.     virtual string setField(( string text, int index, string replacement )) {}
  1133.     /*! Remove the field in @a text at the given @a index.
  1134. Fields in @a text must be separated by newlines and/or tabs.
  1135. @param text A list of fields separated by newlines and/or tabs.
  1136. @param index The zero-based index of the field in @a text.
  1137. @return A new string with the field at the given index removed or the original string if @a index is out of range.
  1138.  
  1139. @tsexample
  1140. removeField( "a b" TAB "c d" TAB "e f", 1 ) // Returns "a b" TAB "e f"
  1141. @endtsexample
  1142.  
  1143. @see removeWord
  1144. @see removeRecord
  1145. @ingroup FieldManip */
  1146.     virtual string removeField(( string text, int index )) {}
  1147.     /*! Return the number of newline and/or tab separated fields in @a text.
  1148. @param text A list of fields separated by newlines and/or tabs.
  1149. @return The number of newline and/or tab sepearated elements in @a text.
  1150.  
  1151. @tsexample
  1152. getFieldCount( "a b" TAB "c d" TAB "e f" ) // Returns 3
  1153. @endtsexample
  1154.  
  1155. @see getWordCount
  1156. @see getRecordCount
  1157. @ingroup FieldManip */
  1158.     virtual int getFieldCount(( string text )) {}
  1159.     /*! Extract the record at the given @a index in the newline-separated list in @a text.
  1160. Records in @a text must be separated by newlines.
  1161. @param text A list of records separated by newlines.
  1162. @param index The zero-based index of the record to extract.
  1163. @return The record at the given index or "" if @a index is out of range.
  1164.  
  1165. @tsexample
  1166. getRecord( "a b" NL "c d" NL "e f", 1 ) // Returns "c d"
  1167. @endtsexample
  1168.  
  1169. @see getRecords
  1170. @see getRecordCount
  1171. @see getWord
  1172. @see getField
  1173. @ingroup FieldManip */
  1174.     virtual string getRecord(( string text, int index )) {}
  1175.     /*! Extract a range of records from the given @a startIndex onwards thru @a endIndex.
  1176. Records in @a text must be separated by newlines.
  1177. @param text A list of records separated by newlines.
  1178. @param startIndex The zero-based index of the first record to extract from @a text.
  1179. @param endIndex The zero-based index of the last record to extract from @a text.  If this is -1, all records beginning with @a startIndex are extracted from @a text.
  1180. @return A string containing the specified range of records from @a text or "" if @a startIndex is out of range or greater than @a endIndex.
  1181.  
  1182. @tsexample
  1183. getRecords( "a b" NL "c d" NL "e f", 1 ) // Returns "c d" NL "e f"
  1184. @endtsexample
  1185.  
  1186. @see getRecord
  1187. @see getRecordCount
  1188. @see getWords
  1189. @see getFields
  1190. @ingroup FieldManip */
  1191.     virtual string getRecords(( string text, int startIndex, int endIndex=-1 )) {}
  1192.     /*! Replace the record in @a text at the given @a index with @a replacement.
  1193. Records in @a text must be separated by newlines.
  1194. @param text A list of records separated by newlines.
  1195. @param index The zero-based index of the record to replace.
  1196. @param replacement The string with which to replace the record.
  1197. @return A new string with the record at the given @a index replaced by @a replacement or the original string if @a index is out of range.
  1198.  
  1199. @tsexample
  1200. setRecord( "a b" NL "c d" NL "e f", 1, "g h" ) // Returns "a b" NL "g h" NL "e f"
  1201. @endtsexample
  1202.  
  1203. @see getRecord
  1204. @see setWord
  1205. @see setField
  1206. @ingroup FieldManip */
  1207.     virtual string setRecord(( string text, int index, string replacement )) {}
  1208.     /*! Remove the record in @a text at the given @a index.
  1209. Records in @a text must be separated by newlines.
  1210. @param text A list of records separated by newlines.
  1211. @param index The zero-based index of the record in @a text.
  1212. @return A new string with the record at the given @a index removed or the original string if @a index is out of range.
  1213.  
  1214. @tsexample
  1215. removeRecord( "a b" NL "c d" NL "e f", 1 ) // Returns "a b" NL "e f"
  1216. @endtsexample
  1217.  
  1218. @see removeWord
  1219. @see removeField
  1220. @ingroup FieldManip */
  1221.     virtual string removeRecord(( string text, int index )) {}
  1222.     /*! Return the number of newline-separated records in @a text.
  1223. @param text A list of records separated by newlines.
  1224. @return The number of newline-sepearated elements in @a text.
  1225.  
  1226. @tsexample
  1227. getRecordCount( "a b" NL "c d" NL "e f" ) // Returns 3
  1228. @endtsexample
  1229.  
  1230. @see getWordCount
  1231. @see getFieldCount
  1232. @ingroup FieldManip */
  1233.     virtual int getRecordCount(( string text )) {}
  1234.     /*! Return the first word in @a text.
  1235. @param text A list of words separated by newlines, spaces, and/or tabs.
  1236. @return The word at index 0 in @a text or "" if @a text is empty.
  1237.  
  1238. @note This is equal to
  1239. @tsexample_nopar
  1240. getWord( text, 0 )
  1241. @endtsexample
  1242.  
  1243. @see getWord
  1244. @ingroup FieldManip */
  1245.     virtual string firstWord(( string text )) {}
  1246.     /*! Return all but the first word in @a text.
  1247. @param text A list of words separated by newlines, spaces, and/or tabs.
  1248. @return @a text with the first word removed.
  1249.  
  1250. @note This is equal to
  1251. @tsexample_nopar
  1252. getWords( text, 1 )
  1253. @endtsexample
  1254.  
  1255. @see getWords
  1256. @ingroup FieldManip */
  1257.     virtual string restWords(( string text )) {}
  1258.     /*! Tokenize a string using a set of delimiting characters.
  1259. This function first skips all leading charaters in @a str that are contained in @a delimiters. From that position, it then scans for the next character in @a str that is contained in @a delimiters and stores all characters from the starting position up to the first delimiter in a variable in the current scope called @a token.  Finally, it skips all characters in @a delimiters after the token and then returns the remaining string contents in @a str.
  1260.  
  1261. To scan out all tokens in a string, call this function repeatedly by passing the result it returns each time as the new @a str until the function returns "".
  1262.  
  1263. @param str A string.
  1264. @param token The name of the variable in which to store the current token.  This variable is set in the scope in which nextToken is called.
  1265. @param delimiters A string of characters.  Each character is considered a delimiter.
  1266. @return The remainder of @a str after the token has been parsed out or "" if no more tokens were found in @a str.
  1267.  
  1268. @tsexample
  1269. // Prints:
  1270. // a
  1271. // b
  1272. // c
  1273. %str = "a   b c";
  1274. while ( %str !$= "" )
  1275. {
  1276.    // First time, stores "a" in the variable %token and sets %str to "b c".
  1277.    %str = nextToken( %str, "token", " " );
  1278.    echo( %token );
  1279. }
  1280. @endtsexample
  1281.  
  1282. @ingroup Strings */
  1283.     virtual string nextToken(( string str, string token, string delimiters )) {}
  1284.     /*! @brief Returns the string from a tag string.
  1285. @see \ref syntaxDataTypes
  1286. @ingroup Networking */
  1287.     virtual string detag(( string str )) {}
  1288.     /*! @brief Extracts the tag from a tagged string
  1289. @see \ref syntaxDataTypes
  1290. @ingroup Networking */
  1291.     virtual string getTag((string textTagString)) {}
  1292.     /*! @brief Logs a message to the console.
  1293.  
  1294. Concatenates all given arguments to a single string and prints the string to the console. A newline is added automatically after the text.
  1295.  
  1296. @param message Any number of string arguments.
  1297.  
  1298. @ingroup Logging */
  1299.     virtual void echo(( string message... )) {}
  1300.     /*! @brief Logs a warning message to the console.
  1301.  
  1302. Concatenates all given arguments to a single string and prints the string to the console as a warning message (in the in-game console, these will show up using a turquoise font by default). A newline is added automatically after the text.
  1303.  
  1304. @param message Any number of string arguments.
  1305.  
  1306. @ingroup Logging */
  1307.     virtual void warn(( string message... )) {}
  1308.     /*! @brief Logs an error message to the console.
  1309.  
  1310. Concatenates all given arguments to a single string and prints the string to the console as an error message (in the in-game console, these will show up using a red font by default). A newline is added automatically after the text.
  1311.  
  1312. @param message Any number of string arguments.
  1313.  
  1314. @ingroup Logging */
  1315.     virtual void error(( string message... )) {}
  1316.     /*! @brief Logs an hack message to the console.
  1317.  
  1318. Concatenates all given arguments to a single string and prints the string to the console as an hack message (in the in-game console, these will show up using a green font by default). A newline is added automatically after the text.
  1319.  
  1320. @param message Any number of string arguments.
  1321.  
  1322. @ingroup Logging */
  1323.     virtual void hack(( string message... )) {}
  1324.     virtual bool launchExternalApplication((string filename, string cmdline)) {}
  1325.     virtual bool launchExternalApplicationThreaded((filename, cmdParams, callback, object)) {}
  1326.     virtual bool killProcess((U32 id)) {}
  1327.     /*! @brief Logs the value of the given variable to the console.
  1328.  
  1329. Prints a string of the form "<variableName> = <variable value>" to the console.
  1330.  
  1331. @param variableName Name of the local or global variable to print.
  1332.  
  1333. @tsexample
  1334. %var = 1;
  1335. debugv( "%var" ); // Prints "%var = 1"
  1336. @endtsexample
  1337.  
  1338. @ingroup Debugging */
  1339.     virtual void debugv(( string variableName )) {}
  1340.     /*! @brief Replace all characters in @a text that need to be escaped for the string to be a valid string literal with their respective escape sequences.
  1341.  
  1342. All characters in @a text that cannot appear in a string literal will be replaced by an escape sequence (\\n, \\t, etc).
  1343.  
  1344. The primary use of this function is for converting strings suitable for being passed as string literals to the TorqueScript compiler.
  1345.  
  1346. @param text A string
  1347. @return A duplicate of the text parameter with all unescaped characters that cannot appear in string literals replaced by their respective escape sequences.
  1348.  
  1349. @tsxample
  1350. expandEscape( "str" NL "ing" ) // Returns "str\ning".
  1351. @endtsxample
  1352.  
  1353. @see collapseEscape
  1354. @ingroup Strings */
  1355.     virtual string expandEscape(( string text )) {}
  1356.     /*! Replace all escape sequences in @a text with their respective character codes.
  1357.  
  1358. This function replaces all escape sequences (\\n, \\t, etc) in the given string with the respective characters they represent.
  1359.  
  1360. The primary use of this function is for converting strings from their literal form into their compiled/translated form, as is normally done by the TorqueScript compiler.
  1361.  
  1362. @param text A string.
  1363. @return A duplicate of @a text with all escape sequences replaced by their respective character codes.
  1364.  
  1365. @tsexample
  1366. // Print:
  1367. //
  1368. //    str
  1369. //    ing
  1370. //
  1371. // to the console.  Note how the backslash in the string must be escaped here
  1372. // in order to prevent the TorqueScript compiler from collapsing the escape
  1373. // sequence in the resulting string.
  1374. echo( collapseEscape( "str\ning" ) );
  1375. @endtsexample
  1376.  
  1377. @see expandEscape
  1378.  
  1379. @ingroup Strings */
  1380.     virtual string collapseEscape(( string text )) {}
  1381.     /*! @brief Determines how log files are written.
  1382.  
  1383. Sets the operational mode of the console logging system.
  1384.  
  1385. @param mode Parameter specifying the logging mode.  This can be:
  1386. - 1: Open and close the console log file for each seperate string of output.  This will ensure that all parts get written out to disk and that no parts remain in intermediate buffers even if the process crashes.
  1387. - 2: Keep the log file open and write to it continuously.  This will make the system operate faster but if the process crashes, parts of the output may not have been written to disk yet and will be missing from the log.
  1388.  
  1389. Additionally, when changing the log mode and thus opening a new log file, either of the two mode values may be combined by binary OR with 0x4 to cause the logging system to flush all console log messages that had already been issued to the console system into the newly created log file.
  1390.  
  1391. @note Xbox 360 does not support logging to a file. Use Platform::OutputDebugStr in C++ instead.@ingroup Logging */
  1392.     virtual void setLogMode(( int mode )) {}
  1393.     /*! Shut down the engine and exit its process.
  1394. This function cleanly uninitializes the engine and then exits back to the system with a process exit status indicating a clean exit.
  1395.  
  1396. @see quitWithErrorMessage
  1397.  
  1398. @ingroup Platform */
  1399.     virtual void quit(()) {}
  1400.     virtual bool isQuitRequested(()) {}
  1401.     /*! Display an error message box showing the given @a message and then shut down the engine and exit its process.
  1402. This function cleanly uninitialized the engine and then exits back to the system with a process exit status indicating an error.
  1403.  
  1404. @param message The message to log to the console and show in an error message box.
  1405.  
  1406. @see quit
  1407.  
  1408. @ingroup Platform */
  1409.     virtual void quitWithErrorMessage(( string message )) {}
  1410.     /*! Open the given URL or file in the user's web browser.
  1411.  
  1412. @param address The address to open.  If this is not prefixed by a protocol specifier ("...://"), then the function checks whether the address refers to a file or directory and if so, prepends "file://" to @a adress; if the file check fails, "http://" is prepended to @a address.
  1413.  
  1414. @tsexample
  1415. gotoWebPage( "http://www.garagegames.com" );
  1416. @endtsexample
  1417.  
  1418. @ingroup Platform */
  1419.     virtual void gotoWebPage(( string address )) {}
  1420.     /*! Test whether Torque is running in web-deployment mode.
  1421. In this mode, Torque will usually run within a browser and certain restrictions apply (e.g. Torque will not be able to enter fullscreen exclusive mode).
  1422. @return True if Torque is running in web-deployment mode.
  1423. @ingroup Platform */
  1424.     virtual bool getWebDeployment(()) {}
  1425.     /*! Count the number of bits that are set in the given 32 bit integer.
  1426. @param v An integer value.
  1427.  
  1428. @return The number of bits that are set in @a v.
  1429.  
  1430. @ingroup Utilities */
  1431.     virtual int countBits(( int v )) {}
  1432.     /*! Generate a new universally unique identifier (UUID).
  1433.  
  1434. @return A newly generated UUID.
  1435.  
  1436. @ingroup Utilities */
  1437.     virtual string generateUUID(()) {}
  1438.     /*! Apply the given arguments to the specified global function and return the result of the call.
  1439.  
  1440. @param functionName The name of the function to call.  This function must be in the global namespace, i.e. you cannot call a function in a namespace through #call.  Use eval() for that.
  1441. @return The result of the function call.
  1442.  
  1443. @tsexample
  1444. function myFunction( %arg )
  1445. {
  1446.   return ( %arg SPC "World!" );
  1447. }
  1448.  
  1449. echo( call( "myFunction", "Hello" ) ); // Prints "Hello World!" to the console.
  1450. @endtsexample
  1451.  
  1452. @ingroup Scripting */
  1453.     virtual string call(( string functionName, string args... )) {}
  1454.     /*! Get the absolute path to the file in which the compiled code for the given script file will be stored.
  1455. @param scriptFileName %Path to the .cs script file.
  1456. @return The absolute path to the .dso file for the given script file.
  1457.  
  1458. @note The compiler will store newly compiled DSOs in the prefs path but pre-existing DSOs will be loaded from the current paths.
  1459.  
  1460. @see compile
  1461. @see getPrefsPath
  1462. @ingroup Scripting */
  1463.     virtual string getDSOPath(( string scriptFileName )) {}
  1464.     /*! Compile a file to bytecode.
  1465.  
  1466. This function will read the TorqueScript code in the specified file, compile it to internal bytecode, and, if DSO generation is enabled or @a overrideNoDDSO is true, will store the compiled code in a .dso file in the current DSO path mirrorring the path of @a fileName.
  1467.  
  1468. @param fileName Path to the file to compile to bytecode.
  1469. @param overrideNoDSO If true, force generation of DSOs even if the engine is compiled to not generate write compiled code to DSO files.
  1470.  
  1471. @return True if the file was successfully compiled, false if not.
  1472.  
  1473. @note The definitions contained in the given file will not be made available and no code will actually be executed.  Use exec() for that.
  1474.  
  1475. @see getDSOPath
  1476. @see exec
  1477. @ingroup Scripting */
  1478.     virtual bool compile(( string fileName, bool overrideNoDSO=false )) {}
  1479.     /*! Execute the given script file.
  1480. @param fileName Path to the file to execute
  1481. @param noCalls Deprecated
  1482. @param journalScript Deprecated
  1483. @return True if the script was successfully executed, false if not.
  1484.  
  1485. @tsexample
  1486. // Execute the init.cs script file found in the same directory as the current script file.
  1487. exec( "./init.cs" );
  1488. @endtsexample
  1489.  
  1490. @see compile
  1491. @see eval
  1492. @ingroup Scripting */
  1493.     virtual bool exec(( string fileName, bool noCalls=false, bool journalScript=false )) {}
  1494.     /*! eval(consoleString) */
  1495.     virtual string eval() {}
  1496.     /*! @brief Returns the value of the named variable or an empty string if not found.
  1497.  
  1498. @varName Name of the variable to search for
  1499. @return Value contained by varName, "" if the variable does not exist
  1500. @ingroup Scripting */
  1501.     virtual string getVariable((string varName)) {}
  1502.     /*! @brief Sets the value of the named variable.
  1503.  
  1504. @param varName Name of the variable to locate
  1505. @param value New value of the variable
  1506. @return True if variable was successfully found and set
  1507. @ingroup Scripting */
  1508.     virtual void setVariable((string varName, string value)) {}
  1509.     /*! @brief Determines if a function exists or not
  1510.  
  1511. @param funcName String containing name of the function
  1512. @return True if the function exists, false if not
  1513. @ingroup Scripting */
  1514.     virtual bool isFunction((string funcName)) {}
  1515.     /*! @brief Provides the name of the package the function belongs to
  1516.  
  1517. @param funcName String containing name of the function
  1518. @return The name of the function's package
  1519. @ingroup Packages */
  1520.     virtual string getFunctionPackage((string funcName)) {}
  1521.     /*! @brief Determines if a class/namespace method exists
  1522.  
  1523. @param namespace Class or namespace, such as Player
  1524. @param method Name of the function to search for
  1525. @return True if the method exists, false if not
  1526. @ingroup Scripting
  1527.  */
  1528.     virtual bool isMethod((string namespace, string method)) {}
  1529.     /*! @brief Provides the name of the package the method belongs to
  1530.  
  1531. @param namespace Class or namespace, such as Player
  1532. @param method Name of the funciton to search for
  1533. @return The name of the method's package
  1534. @ingroup Packages */
  1535.     virtual string getMethodPackage((string namespace, string method)) {}
  1536.     /*! @brief Determines if a variable exists and contains a value
  1537. @param varName Name of the variable to search for
  1538. @return True if the variable was defined in script, false if not
  1539. @tsexample
  1540. isDefined( "$myVar" );
  1541. @endtsexample
  1542.  
  1543. @ingroup Scripting */
  1544.     virtual bool isDefined((string varName)) {}
  1545.     /*! Returns true if the calling script is a tools script.
  1546. @hide */
  1547.     virtual bool isCurrentScriptToolScript(()) {}
  1548.     /*! @brief Attempts to extract a mod directory from path. Returns empty string on failure.
  1549.  
  1550. @param File path of mod folder
  1551. @note This is no longer relevant in Torque 3D (which does not use mod folders), should be deprecated
  1552. @internal */
  1553.     virtual string getModNameFromPath((string path)) {}
  1554.     /*! @brief Pushes the current $instantGroup on a stack and sets it to the given value (or clears it).
  1555.  
  1556. @note Currently only used for editors
  1557. @ingroup Editors
  1558. @internal */
  1559.     virtual void pushInstantGroup(([group])) {}
  1560.     /*! @brief Pop and restore the last setting of $instantGroup off the stack.
  1561.  
  1562. @note Currently only used for editors
  1563.  
  1564. @ingroup Editors
  1565. @internal */
  1566.     virtual void popInstantGroup(()) {}
  1567.     /*! @note Appears to be useless in Torque 3D, should be deprecated
  1568. @internal */
  1569.     virtual string getPrefsPath(([relativeFileName])) {}
  1570.     /*! @brief Manually execute a special script file that contains game or editor preferences
  1571.  
  1572. @param relativeFileName Name and path to file from project folder
  1573. @param noCalls Deprecated
  1574. @param journalScript Deprecated
  1575. @return True if script was successfully executed
  1576. @note Appears to be useless in Torque 3D, should be deprecated
  1577. @ingroup Scripting */
  1578.     virtual bool execPrefs(( string relativeFileName, bool noCalls=false, bool journalScript=false )) {}
  1579.     /*! Write out the definitions of all global variables matching the given name @a pattern.
  1580. If @a fileName is not "", the variable definitions are written to the specified file.  Otherwise the definitions will be printed to the console.
  1581.  
  1582. The output are valid TorqueScript statements that can be executed to restore the global variable values.
  1583.  
  1584. @param pattern A global variable name pattern.  Must begin with '$'.
  1585. @param filename %Path of the file to which to write the definitions or "" to write the definitions to the console.
  1586. @param append If true and @a fileName is not "", then the definitions are appended to the specified file. Otherwise existing contents of the file (if any) will be overwritten.
  1587.  
  1588. @tsexample
  1589. // Write out all preference variables to a prefs.cs file.
  1590. export( "$prefs::*", "prefs.cs" );
  1591. @endtsexample
  1592.  
  1593. @ingroup Scripting */
  1594.     virtual void export(( string pattern, string filename="", bool append=false )) {}
  1595.     /*! Undefine all global variables matching the given name @a pattern.
  1596. @param pattern A global variable name pattern.  Must begin with '$'.
  1597. @tsexample
  1598. // Define a global variable in the "My" namespace.
  1599. $My::Variable = "value";
  1600.  
  1601. // Undefine all variable in the "My" namespace.
  1602. deleteVariables( "$My::*" );
  1603. @endtsexample
  1604.  
  1605. @see strIsMatchExpr
  1606. @ingroup Scripting */
  1607.     virtual void deleteVariables(( string pattern )) {}
  1608.     /*! Enable or disable tracing in the script code VM.
  1609.  
  1610. When enabled, the script code runtime will trace the invocation and returns from all functions that are called and log them to the console. This is helpful in observing the flow of the script program.
  1611.  
  1612. @param enable New setting for script trace execution, on by default.
  1613. @ingroup Debugging */
  1614.     virtual void trace(( bool enable=true )) {}
  1615.     /*! Enable or disable step tracing in the script code VM.
  1616.  
  1617. When tracing is on, the script code runtime will trace how deep it in code and log with '#' symbol the current depth to the console.  This is helpful in finding what the script program flow is.
  1618.  
  1619. @param enable New setting for script step trace execution.
  1620. @ingroup Debugging */
  1621.     virtual void stepTrace(( bool enable=true )) {}
  1622.     /*! Drops the engine into the native C++ debugger.
  1623.  
  1624. This function triggers a debug break and drops the process into the IDE's debugger.  If the process is not running with a debugger attached it will generate a runtime error on most platforms.
  1625.  
  1626. @note This function is not available in shipping builds.@ingroup Debugging */
  1627.     virtual void debug(()) {}
  1628.     /*! Test whether the engine has been compiled with TORQUE_SHIPPING, i.e. in a form meant for final release.
  1629.  
  1630. @return True if this is a shipping build; false otherwise.
  1631.  
  1632. @ingroup Platform */
  1633.     virtual bool isShippingBuild(()) {}
  1634.     /*! Test whether the engine has been compiled with TORQUE_DEBUG, i.e. if it includes debugging functionality.
  1635.  
  1636. @return True if this is a debug build; false otherwise.
  1637.  
  1638. @ingroup Platform */
  1639.     virtual bool isDebugBuild(()) {}
  1640.     /*! Test whether the engine has been compiled with TORQUE_TOOLS, i.e. if it includes tool-related functionality.
  1641.  
  1642. @return True if this is a tool build; false otherwise.
  1643.  
  1644. @ingroup Platform */
  1645.     virtual bool isToolBuild(()) {}
  1646.     /*! @brief Prints the scripting call stack to the console log.
  1647.  
  1648. Used to trace functions called from within functions. Can help discover what functions were called (and not yet exited) before the current point in scripts.
  1649.  
  1650. @ingroup Debugging */
  1651.     virtual void backtrace(()) {}
  1652.     virtual void dumpScope(()) {}
  1653.     virtual void DEPRECATED() {}
  1654.     /*! return the script scope name, either current or parental */
  1655.     virtual string getScopeName() {}
  1656.     /*! @brief Returns true if the identifier is the name of a declared package.
  1657.  
  1658. @ingroup Packages
  1659.  */
  1660.     virtual bool isPackage(( String identifier )) {}
  1661.     /*! @brief Activates an existing package.
  1662.  
  1663. The activation occurs by updating the namespace linkage of existing functions and methods. If the package is already activated the function does nothing.
  1664. @ingroup Packages
  1665.  */
  1666.     virtual void activatePackage(( String packageName )) {}
  1667.     /*! @brief Deactivates a previously activated package.
  1668.  
  1669. The package is deactivated by removing its namespace linkages to any function or method. If there are any packages above this one in the stack they are deactivated as well. If the package is not on the stack this function does nothing.
  1670. @ingroup Packages
  1671.  */
  1672.     virtual void deactivatePackage(( String packageName )) {}
  1673.     /*! @brief Returns a space delimited list of the active packages in stack order.
  1674.  
  1675. @ingroup Packages
  1676.  */
  1677.     virtual string getPackageList(()) {}
  1678.     /*! @brief Returns true if the passed identifier is the name of a declared class.
  1679.  
  1680. @ingroup Console */
  1681.     virtual bool isClass(( string identifier )) {}
  1682.     /*! @brief Returns true if the class is derived from the super class.
  1683.  
  1684. If either class doesn't exist this returns false.
  1685. @param className The class name.
  1686. @param superClassName The super class to look for.
  1687. @ingroup Console */
  1688.     virtual bool isMemberOfClass(( string className, string superClassName )) {}
  1689.     /*! @brief Returns the description string for the named class.
  1690.  
  1691. @param className The name of the class.
  1692. @return The class description in string format.
  1693. @ingroup Console */
  1694.     virtual string getDescriptionOfClass(( string className )) {}
  1695.     /*! @brief Returns the category of the given class.
  1696.  
  1697. @param className The name of the class.
  1698. @ingroup Console */
  1699.     virtual string getCategoryOfClass(( string className )) {}
  1700.     /*! @brief Returns a list of classes that derive from the named class.
  1701.  
  1702. If the named class is omitted this dumps all the classes.
  1703. @param className The optional base class name.
  1704. @return A tab delimited list of classes.
  1705. @ingroup Editors
  1706. @internal */
  1707.     virtual string enumerateConsoleClasses(( string className="" )) {}
  1708.     /*! @brief Provide a list of classes that belong to the given category.
  1709.  
  1710. @param category The category name.
  1711. @return A tab delimited list of classes.
  1712. @ingroup Editors
  1713. @internal */
  1714.     virtual string enumerateConsoleClassesByCategory(( String category )) {}
  1715.     /*! @brief Dumps network statistics for each class to the console.
  1716.  
  1717. The returned <i>avg</i>, <i>min</i> and <i>max</i> values are in bits sent per update.  The <i>num</i> value is the total number of events collected.
  1718. @note This method only works when TORQUE_NET_STATS is defined in torqueConfig.h.
  1719. @ingroup Networking
  1720.  */
  1721.     virtual void dumpNetStats(()) {}
  1722.     /*! @brief Determines the memory consumption of a class or object.
  1723.  
  1724. @param objectOrClass The object or class being measured.
  1725. @return Returns the total size of an object in bytes.
  1726. @ingroup Debugging
  1727.  */
  1728.     virtual int sizeof(( string objectOrClass )) {}
  1729.     /*! Dumps the engine scripting documentation to the specified file overwriting any existing content.
  1730. @param outputFile The relative or absolute output file path and name.
  1731. @return Returns true if successful.
  1732. @ingroup Console */
  1733.     virtual bool dumpEngineDocs(( string outputFile )) {}
  1734.     virtual int getEnumTypeID((const char* typeName)) {}
  1735.     virtual int getEnumItemCount((S32 typeId)) {}
  1736.     virtual string getEnumItemName((S32 typeId, S32 valueId)) {}
  1737.     virtual int getEnumItemValue((S32 typeId, S32 valueId)) {}
  1738.     /*! @brief Returns the first file in the directory system matching the given pattern.
  1739.  
  1740. Use the corresponding findNextFile() to step through the results.  If you're only interested in the number of files returned by the pattern match, use getFileCount().
  1741.  
  1742. This function differs from findFirstFileMultiExpr() in that it supports a single search pattern being passed in.
  1743.  
  1744. @note You cannot run multiple simultaneous file system searches with these functions.  Each call to findFirstFile() and findFirstFileMultiExpr() initiates a new search and renders a previous search invalid.
  1745.  
  1746. @param pattern The path and file name pattern to match against.
  1747. @param recurse If true, the search will exhaustively recurse into subdirectories of the given path and match the given filename pattern.
  1748. @return The path of the first file matched by the search or an empty string if no matching file could be found.
  1749.  
  1750. @tsexample
  1751. // Execute all .cs files in a subdirectory and its subdirectories.
  1752. for( %file = findFirstFile( "subdirectory/*.cs" ); %file !$= ""; %file = findNextFile() )
  1753.    exec( %file );
  1754. @endtsexample
  1755.  
  1756. @see findNextFile()@see getFileCount()@see findFirstFileMultiExpr()@ingroup FileSearches */
  1757.     virtual string findFirstFile(( string pattern, bool recurse=true )) {}
  1758.     /*! @brief Returns the next file matching a search begun in findFirstFile().
  1759.  
  1760. @param pattern The path and file name pattern to match against.  This is optional and may be left out as it is not used by the code.  It is here for legacy reasons.
  1761. @return The path of the next filename matched by the search or an empty string if no more files match.
  1762.  
  1763. @tsexample
  1764. // Execute all .cs files in a subdirectory and its subdirectories.
  1765. for( %file = findFirstFile( "subdirectory/*.cs" ); %file !$= ""; %file = findNextFile() )
  1766.    exec( %file );
  1767. @endtsexample
  1768.  
  1769. @see findFirstFile()@ingroup FileSearches */
  1770.     virtual string findNextFile(( string pattern="" )) {}
  1771.     /*! @brief Returns the number of files in the directory tree that match the given patterns
  1772.  
  1773. This function differs from getFileCountMultiExpr() in that it supports a single search pattern being passed in.
  1774.  
  1775. If you're interested in a list of files that match the given pattern and not just the number of files, use findFirstFile() and findNextFile().
  1776.  
  1777. @param pattern The path and file name pattern to match against.
  1778. @param recurse If true, the search will exhaustively recurse into subdirectories of the given path and match the given filename pattern counting files in subdirectories.
  1779. @return Number of files located using the pattern
  1780.  
  1781. @tsexample
  1782. // Count the number of .cs files in a subdirectory and its subdirectories.
  1783. getFileCount( "subdirectory/*.cs" );
  1784. @endtsexample
  1785.  
  1786. @see findFirstFile()@see findNextFile()@see getFileCountMultiExpr()@ingroup FileSearches */
  1787.     virtual int getFileCount(( string pattern, bool recurse=true )) {}
  1788.     /*! @brief Returns the first file in the directory system matching the given patterns.
  1789.  
  1790. Use the corresponding findNextFileMultiExpr() to step through the results.  If you're only interested in the number of files returned by the pattern match, use getFileCountMultiExpr().
  1791.  
  1792. This function differs from findFirstFile() in that it supports multiple search patterns to be passed in.
  1793.  
  1794. @note You cannot run multiple simultaneous file system searches with these functions.  Each call to findFirstFile() and findFirstFileMultiExpr() initiates a new search and renders a previous search invalid.
  1795.  
  1796. @param pattern The path and file name pattern to match against, such as *.cs.  Separate multiple patterns with TABs.  For example: "*.cs" TAB "*.dso"
  1797. @param recurse If true, the search will exhaustively recurse into subdirectories of the given path and match the given filename patterns.
  1798. @return String of the first matching file path, or an empty string if no matching files were found.
  1799.  
  1800. @tsexample
  1801. // Find all DTS or Collada models
  1802. %filePatterns = "*.dts" TAB "*.dae";
  1803. %fullPath = findFirstFileMultiExpr( %filePatterns );
  1804. while ( %fullPath !$= "" )
  1805. {
  1806.    echo( %fullPath );
  1807.    %fullPath = findNextFileMultiExpr( %filePatterns );
  1808. }
  1809. @endtsexample
  1810.  
  1811. @see findNextFileMultiExpr()@see getFileCountMultiExpr()@see findFirstFile()@ingroup FileSearches */
  1812.     virtual string findFirstFileMultiExpr(( string pattern, bool recurse=true )) {}
  1813.     /*! @brief Returns the next file matching a search begun in findFirstFileMultiExpr().
  1814.  
  1815. @param pattern The path and file name pattern to match against.  This is optional and may be left out as it is not used by the code.  It is here for legacy reasons.
  1816. @return String of the next matching file path, or an empty string if no matching files were found.
  1817.  
  1818. @tsexample
  1819. // Find all DTS or Collada models
  1820. %filePatterns = "*.dts" TAB "*.dae";
  1821. %fullPath = findFirstFileMultiExpr( %filePatterns );
  1822. while ( %fullPath !$= "" )
  1823. {
  1824.    echo( %fullPath );
  1825.    %fullPath = findNextFileMultiExpr( %filePatterns );
  1826. }
  1827. @endtsexample
  1828.  
  1829. @see findFirstFileMultiExpr()@ingroup FileSearches */
  1830.     virtual string findNextFileMultiExpr(( string pattern="" )) {}
  1831.     /*! @brief Returns the number of files in the directory tree that match the given patterns
  1832.  
  1833. If you're interested in a list of files that match the given patterns and not just the number of files, use findFirstFileMultiExpr() and findNextFileMultiExpr().
  1834.  
  1835. @param pattern The path and file name pattern to match against, such as *.cs.  Separate multiple patterns with TABs.  For example: "*.cs" TAB "*.dso"
  1836. @param recurse If true, the search will exhaustively recurse into subdirectories of the given path and match the given filename pattern.
  1837. @return Number of files located using the patterns
  1838.  
  1839. @tsexample
  1840. // Count all DTS or Collada models
  1841. %filePatterns = "*.dts" TAB "*.dae";
  1842. echo( "Nunmer of shape files:" SPC getFileCountMultiExpr( %filePatterns ) );
  1843. @endtsexample
  1844.  
  1845. @see findFirstFileMultiExpr()@see findNextFileMultiExpr()@ingroup FileSearches */
  1846.     virtual int getFileCountMultiExpr(( string pattern, bool recurse=true )) {}
  1847.     /*! @brief Provides the CRC checksum of the given file.
  1848.  
  1849. @param fileName The path to the file.
  1850. @return The calculated CRC checksum of the file, or -1 if the file could not be found.
  1851. @ingroup FileSystem */
  1852.     virtual int getFileCRC(( string fileName )) {}
  1853.     /*! @brief Determines if the specified file exists or not
  1854.  
  1855. @param fileName The path to the file.
  1856. @return Returns true if the file was found.
  1857. @ingroup FileSystem */
  1858.     virtual bool isFile(( string fileName )) {}
  1859.     /*! @brief Determines if a specified directory exists or not
  1860.  
  1861. @param directory String containing path in the form of "foo/bar"
  1862. @return Returns true if the directory was found.
  1863. @note Do not include a trailing slash '/'.
  1864. @ingroup FileSystem */
  1865.     virtual bool IsDirectory(( string directory )) {}
  1866.     /*! @brief Determines if a file name can be written to using File I/O
  1867.  
  1868. @param fileName Name and path of file to check
  1869. @return Returns true if the file can be written to.
  1870. @ingroup FileSystem */
  1871.     virtual bool isWriteableFileName(( string fileName )) {}
  1872.     /*! @brief Start watching resources for file changes
  1873.  
  1874. Typically this is called during initializeCore().
  1875.  
  1876. @see stopFileChangeNotifications()
  1877. @ingroup FileSystem */
  1878.     virtual void startFileChangeNotifications(()) {}
  1879.     /*! @brief Stop watching resources for file changes
  1880.  
  1881. Typically this is called during shutdownCore().
  1882.  
  1883. @see startFileChangeNotifications()
  1884. @ingroup FileSystem */
  1885.     virtual void stopFileChangeNotifications(()) {}
  1886.     /*! @brief Gathers a list of directories starting at the given path.
  1887.  
  1888. @param path String containing the path of the directory
  1889. @param depth Depth of search, as in how many subdirectories to parse through
  1890. @return Tab delimited string containing list of directories found during search, "" if no files were found
  1891. @ingroup FileSystem */
  1892.     virtual string getDirectoryList(( string path, int depth=0 )) {}
  1893.     /*! @brief Determines the size of a file on disk
  1894.  
  1895. @param fileName Name and path of the file to check
  1896. @return Returns filesize in KB, or -1 if no file
  1897. @ingroup FileSystem */
  1898.     virtual int fileSize(( string fileName )) {}
  1899.     /*! @brief Returns a platform specific formatted string with the last modified time for the file.
  1900.  
  1901. @param fileName Name and path of file to check
  1902. @return Formatted string (OS specific) containing modified time, "9/3/2010 12:33:47 PM" for example
  1903. @ingroup FileSystem */
  1904.     virtual string fileModifiedTime(( string fileName )) {}
  1905.     /*! @brief Returns a platform specific formatted string with the creation time for the file.@param fileName Name and path of file to check
  1906. @return Formatted string (OS specific) containing created time, "9/3/2010 12:33:47 PM" for example
  1907. @ingroup FileSystem */
  1908.     virtual string fileCreatedTime(( string fileName )) {}
  1909.     /*! @brief Delete a file from the hard drive
  1910.  
  1911. @param path Name and path of the file to delete
  1912. @note THERE IS NO RECOVERY FROM THIS. Deleted file is gone for good.
  1913. @return True if file was successfully deleted
  1914. @ingroup FileSystem */
  1915.     virtual bool fileDelete(( string path )) {}
  1916.     /*! @brief Get the extension of a file
  1917.  
  1918. @param fileName Name and path of file
  1919. @return String containing the extension, such as ".exe" or ".cs"
  1920. @ingroup FileSystem */
  1921.     virtual string fileExt(( string fileName )) {}
  1922.     /*! @brief Get the base of a file name (removes extension)
  1923.  
  1924. @param fileName Name and path of file to check
  1925. @return String containing the file name, minus extension
  1926. @ingroup FileSystem */
  1927.     virtual string fileBase(( string fileName )) {}
  1928.     /*! @brief Get the file name of a file (removes extension and path)
  1929.  
  1930. @param fileName Name and path of file to check
  1931. @return String containing the file name, minus extension and path
  1932. @ingroup FileSystem */
  1933.     virtual string fileName(( string fileName )) {}
  1934.     /*! @brief Get the path of a file (removes name and extension)
  1935.  
  1936. @param fileName Name and path of file to check
  1937. @return String containing the path, minus name and extension
  1938. @ingroup FileSystem */
  1939.     virtual string filePath(( string fileName )) {}
  1940.     /*! @brief Reports the current directory
  1941.  
  1942. @return String containing full file path of working directory
  1943. @ingroup FileSystem */
  1944.     virtual string getWorkingDirectory(()) {}
  1945.     /*! @brief Converts a relative file path to a full path
  1946.  
  1947. For example, "./console.log" becomes "C:/Torque/t3d/examples/FPS Example/game/console.log"
  1948. @param path Name of file or path to check
  1949. @param cwd Optional current working directory from which to build the full path.
  1950. @return String containing non-relative directory of path
  1951. @ingroup FileSystem */
  1952.     virtual string makeFullPath(( string path, string cwd="" )) {}
  1953.     /*! @brief Turns a full or local path to a relative one
  1954.  
  1955. For example, "./game/art" becomes "game/art"
  1956. @param path Full path (may include a file) to convert
  1957. @param to Optional base path used for the conversion.  If not supplied the current working directory is used.
  1958. @returns String containing relative path
  1959. @ingroup FileSystem */
  1960.     virtual string makeRelativePath(( string path, string to="" )) {}
  1961.     /*! @brief Combines two separate strings containing a file path and file name together into a single string
  1962.  
  1963. @param path String containing file path
  1964. @param file String containing file name
  1965. @return String containing concatenated file name and path
  1966. @ingroup FileSystem */
  1967.     virtual string pathConcat(( string path, string file )) {}
  1968.     /*! @brief Gets the name of the game's executable
  1969.  
  1970. @return String containing this game's executable name
  1971. @ingroup FileSystem */
  1972.     virtual string getExecutableName(()) {}
  1973.     /*! @brief Get the absolute path to the directory that contains the main.cs script from which the engine was started.
  1974.  
  1975. This directory will usually contain all the game assets and, in a user-side game installation, will usually be read-only.
  1976.  
  1977. @return The path to the main game assets.
  1978.  
  1979. @ingroup FileSystem
  1980.  */
  1981.     virtual string getMainDotCsDir(()) {}
  1982.     /*! @brief Copy a file to a new location.
  1983. @param fromFile %Path of the file to copy.
  1984. @param toFile %Path where to copy @a fromFile to.
  1985. @param noOverwrite If true, then @a fromFile will not overwrite a file that may already exist at @a toFile.
  1986. @return True if the file was successfully copied, false otherwise.
  1987. @note Only present in a Tools build of Torque.
  1988. @ingroup FileSystem */
  1989.     virtual bool pathCopy(( string fromFile, string toFile, bool noOverwrite=true )) {}
  1990.     /*! @brief Return the current working directory.
  1991.  
  1992. @return The absolute path of the current working directory.
  1993.  
  1994. @note Only present in a Tools build of Torque.
  1995. @see getWorkingDirectory()@ingroup FileSystem */
  1996.     virtual string getCurrentDirectory(()) {}
  1997.     /*! @brief Set the current working directory.
  1998.  
  1999. @param path The absolute or relative (to the current working directory) path of the directory which should be made the new working directory.
  2000.  
  2001. @return True if the working directory was successfully changed to @a path, false otherwise.
  2002.  
  2003. @note Only present in a Tools build of Torque.
  2004. @ingroup FileSystem */
  2005.     virtual bool setCurrentDirectory(( string path )) {}
  2006.     /*! @brief Create the given directory or the path leading to the given filename.
  2007.  
  2008. If @a path ends in a trailing slash, then all components in the given path will be created as directories (if not already in place).  If @a path, does @b not end in a trailing slash, then the last component of the path is taken to be a file name and only the directory components of the path will be created.
  2009.  
  2010. @param path The path to create.
  2011.  
  2012. @note Only present in a Tools build of Torque.
  2013. @ingroup FileSystem */
  2014.     virtual bool createPath(( string path )) {}
  2015.     /*! @brief Grabs the full path of a specified file
  2016.  
  2017. @param filename Name of the local file to locate
  2018. @return String containing the full filepath on disk
  2019. @ingroup FileSystem */
  2020.     virtual string expandFilename((string filename)) {}
  2021.     /*! @brief Retrofits a filepath that uses old Torque style
  2022.  
  2023. @return String containing filepath with new formatting
  2024. @ingroup FileSystem */
  2025.     virtual string expandOldFilename((string filename)) {}
  2026.     /*! @internal Editor use only */
  2027.     virtual string collapseFilename((string filename)) {}
  2028.     /*! @internal Editor use only */
  2029.     virtual void setScriptPathExpando((string expando, string path[, bool toolsOnly])) {}
  2030.     /*! @internal Editor use only */
  2031.     virtual void removeScriptPathExpando((string expando)) {}
  2032.     /*! @internal Editor use only */
  2033.     virtual bool isScriptPathExpando((string expando)) {}
  2034.     /// @}
  2035.  
  2036.     /*! nameToID(object) */
  2037.     virtual int nameToID() {}
  2038.     /*! isObject(object) */
  2039.     virtual bool isObject() {}
  2040.     /*! spawnObject(class [, dataBlock, name, properties, script])@hide */
  2041.     virtual int spawnObject() {}
  2042.     /*! cancel(eventId) */
  2043.     virtual void cancel() {}
  2044.     /*! cancelAll(objectId): cancel pending events on the specified object.  Events will be automatically cancelled if object is deleted. */
  2045.     virtual void cancelAll() {}
  2046.     /*! isEventPending(%scheduleId); */
  2047.     virtual bool isEventPending() {}
  2048.     /*! getEventTimeLeft(scheduleId) Get the time left in ms until this event will trigger. */
  2049.     virtual int getEventTimeLeft() {}
  2050.     /*! getScheduleDuration(%scheduleId); */
  2051.     virtual int getScheduleDuration() {}
  2052.     /*! getTimeSinceStart(%scheduleId); */
  2053.     virtual int getTimeSinceStart() {}
  2054.     /*! schedule(time, refobject|0, command, <arg1...argN>) */
  2055.     virtual int schedule() {}
  2056.     /*! @brief Returns a unique unused SimObject name based on a given base name.
  2057.  
  2058. @baseName Name to conver to a unique string if another instance exists
  2059. @note Currently only used by editors
  2060. @ingroup Editors
  2061. @internal */
  2062.     virtual string getUniqueName(( String baseName )) {}
  2063.     /*! @brief Returns a unique unused internal name within the SimSet/Group based on a given base name.
  2064.  
  2065. @note Currently only used by editors
  2066. @ingroup Editors
  2067. @internal */
  2068.     virtual string getUniqueInternalName(( String baseName, SimSet set, bool searchChildren )) {}
  2069.     /*! @brief Return true if the given name makes for a valid object name.
  2070.  
  2071. @param name Name of object
  2072. @return True if name is allowed, false if denied (usually because it starts with a number, _, or invalid character@ingroup Console */
  2073.     virtual bool isValidObjectName(( string name )) {}
  2074.  
  2075.     /*! @name SimFunctions
  2076.    
  2077.     Functions relating to Sim.
  2078.     @{ */
  2079.     /*! */
  2080.     /*! Delete all the datablocks we've downloaded.
  2081.  
  2082. This is usually done in preparation of downloading a new set of datablocks, such as occurs on a mission change, but it's also good post-mission cleanup. */
  2083.     virtual void deleteDataBlocks(()) {}
  2084.     /*! @brief Serialize the object to a file.
  2085.  
  2086. @param object The object to serialize.
  2087. @param filename The file name and path.
  2088. @ingroup Console
  2089.  */
  2090.     virtual bool saveObject(( SimObject  object, string filename )) {}
  2091.     /*! @brief Loads a serialized object from a file.
  2092.  
  2093. @param Name and path to text file containing the object
  2094. @ingroup Console
  2095.  */
  2096.     virtual string loadObject(( string filename )) {}
  2097.     /*! @brief Initializes and open the telnet console.
  2098.  
  2099. @param port        Port to listen on for console connections (0 will shut down listening).
  2100. @param consolePass Password for read/write access to console.
  2101. @param listenPass  Password for read access to console.
  2102. @param remoteEcho  [optional] Enable echoing back to the client, off by default.
  2103.  
  2104. @ingroup Debugging */
  2105.     virtual void telnetSetParameters(( int port, string consolePass, string listenPass, bool remoteEcho=false )) {}
  2106.     /*! Open a debug server port on the specified port, requiring the specified password, and optionally waiting for the debug client to connect.
  2107. @internal Primarily used for Torsion and other debugging tools */
  2108.     virtual void dbgSetParameters((int port, string password, bool waitForClient)) {}
  2109.     /*! Returns true if a script debugging client is connected else return false.
  2110. @internal Primarily used for Torsion and other debugging tools */
  2111.     virtual bool dbgIsConnected(()) {}
  2112.     /*! Forcibly disconnects any attached script debugging client.
  2113. @internal Primarily used for Torsion and other debugging tools */
  2114.     virtual void dbgDisconnect(()) {}
  2115.     /*! @brief Enables logging of the connection protocols
  2116.  
  2117. @param enabled True to enable, false to disable
  2118. @ingroup Networking */
  2119.     virtual void DNetSetLogging((bool enabled)) {}
  2120.     /// @}
  2121.  
  2122.  
  2123.     /*! @name ResourceManagerFunctions
  2124.    
  2125.     Resource management functions.
  2126.     @{ */
  2127.     /*! */
  2128.     virtual void SendGameDateTime(( NetConnection client )) {}
  2129.     /*! getGameTimeScale() */
  2130.     virtual string getGameTime() {}
  2131.     /*! initialize CmWeather manager class */
  2132.     virtual void CmWeatherInit() {}
  2133.     virtual void SendWeather(( NetConnection client )) {}
  2134.     virtual void forceSetWeather(( string weather )) {}
  2135.     virtual string getCurrentWeather(()) {}
  2136.     virtual void printCurrentWeather(()) {}
  2137.     virtual void Forest_TestFindTree(( int valForestKey )) {}
  2138.     /*! Performs a stretched maintenance for all forests */
  2139.     virtual void forestStretchedMaintenance(( int addedTime=1 )) {}
  2140.     virtual void performMaintenanceForAllForests(( int days )) {}
  2141.     virtual void create450Forests(()) {}
  2142.     virtual void cmForestAddTreeType(( int forestType, int youngTime, int matureTime, float mediumScale, float majorScale, float matureScale, bool isHardwood )) {}
  2143.     virtual void cmForestAddTreeKindGrowth(( String kind, int objectType, int objectsCount )) {}
  2144.     /*! Add two vectors.
  2145. @param a The first vector.
  2146. @param b The second vector.
  2147. @return The vector @a a + @a b.
  2148.  
  2149. @tsexample
  2150. //-----------------------------------------------------------------------------
  2151. //
  2152. // VectorAdd( %a, %b );
  2153. //
  2154. // The sum of vector a, (ax, ay, az), and vector b, (bx, by, bz) is:
  2155. //
  2156. //     a + b = ( ax + bx, ay + by, az + bz )
  2157. //
  2158. //-----------------------------------------------------------------------------
  2159. %a = "1 0 0";
  2160. %b = "0 1 0";
  2161.  
  2162. // %r = "( 1 + 0, 0 + 1, 0 + 0 )";
  2163. // %r = "1 1 0";
  2164. %r = VectorAdd( %a, %b );
  2165. @endtsexample
  2166.  
  2167. @ingroup Vectors */
  2168.     virtual string VectorAdd(( VectorF a, VectorF b )) {}
  2169.     /*! Subtract two vectors.
  2170. @param a The first vector.
  2171. @param b The second vector.
  2172. @return The vector @a a - @a b.
  2173.  
  2174. @tsexample
  2175. //-----------------------------------------------------------------------------
  2176. //
  2177. // VectorSub( %a, %b );
  2178. //
  2179. // The difference of vector a, (ax, ay, az), and vector b, (bx, by, bz) is:
  2180. //
  2181. //     a - b = ( ax - bx, ay - by, az - bz )
  2182. //
  2183. //-----------------------------------------------------------------------------
  2184.  
  2185. %a = "1 0 0";
  2186. %b = "0 1 0";
  2187.  
  2188. // %r = "( 1 - 0, 0 - 1, 0 - 0 )";
  2189. // %r = "1 -1 0";
  2190. %r = VectorSub( %a, %b );
  2191. @endtsexample
  2192.  
  2193. @ingroup Vectors */
  2194.     virtual string VectorSub(( VectorF a, VectorF b )) {}
  2195.     /*! Scales a vector by a scalar.
  2196. @param a The vector to scale.
  2197. @param scalar The scale factor.
  2198. @return The vector @a a * @a scalar.
  2199.  
  2200. @tsexample
  2201. //-----------------------------------------------------------------------------
  2202. //
  2203. // VectorScale( %a, %v );
  2204. //
  2205. // Scaling vector a, (ax, ay, az), but the scalar, v, is:
  2206. //
  2207. //     a * v = ( ax * v, ay * v, az * v )
  2208. //
  2209. //-----------------------------------------------------------------------------
  2210.  
  2211. %a = "1 1 0";
  2212. %v = "2";
  2213.  
  2214. // %r = "( 1 * 2, 1 * 2, 0 * 2 )";
  2215. // %r = "2 2 0";
  2216. %r = VectorScale( %a, %v );
  2217. @endtsexample
  2218.  
  2219. @ingroup Vectors */
  2220.     virtual string VectorScale(( VectorF a, float scalar )) {}
  2221.     /*! Brings a vector into its unit form, i.e. such that it has the magnitute 1.
  2222. @param v The vector to normalize.
  2223. @return The vector @a v scaled to length 1.
  2224.  
  2225. @tsexample
  2226. //-----------------------------------------------------------------------------
  2227. //
  2228. // VectorNormalize( %a );
  2229. //
  2230. // The normalized vector a, (ax, ay, az), is:
  2231. //
  2232. //     a^ = a / ||a||
  2233. //        = ( ax / ||a||, ay / ||a||, az / ||a|| )
  2234. //
  2235. //-----------------------------------------------------------------------------
  2236.  
  2237. %a = "1 1 0";
  2238. %l = 1.414;
  2239.  
  2240. // %r = "( 1 / 1.141, 1 / 1.141, 0 / 1.141 )";
  2241. // %r = "0.707 0.707 0";
  2242. %r = VectorNormalize( %a );
  2243. @endtsexample
  2244.  
  2245. @ingroup Vectors */
  2246.     virtual string VectorNormalize(( VectorF v )) {}
  2247.     /*! Compute the dot product of two vectors.
  2248. @param a The first vector.
  2249. @param b The second vector.
  2250. @return The dot product @a a * @a b.
  2251.  
  2252. @tsexample
  2253. //-----------------------------------------------------------------------------
  2254. //
  2255. // VectorDot( %a, %b );
  2256. //
  2257. // The dot product between vector a, (ax, ay, az), and vector b, (bx, by, bz), is:
  2258. //
  2259. //     a . b = ( ax * bx + ay * by + az * bz )
  2260. //
  2261. //-----------------------------------------------------------------------------
  2262.  
  2263. %a = "1 1 0";
  2264. %b = "2 0 1";
  2265.  
  2266. // %r = "( 1 * 2 + 1 * 0 + 0 * 1 )";
  2267. // %r = 2;
  2268. %r = VectorDot( %a, %b );
  2269. @endtsexample
  2270.  
  2271. @ingroup Vectors */
  2272.     virtual float VectorDot(( VectorF a, VectorF b )) {}
  2273.     /*! Calculcate the cross product of two vectors.
  2274. @param a The first vector.
  2275. @param b The second vector.
  2276. @return The cross product @a x @a b.
  2277.  
  2278. @tsexample
  2279. //-----------------------------------------------------------------------------
  2280. //
  2281. // VectorCross( %a, %b );
  2282. //
  2283. // The cross product of vector a, (ax, ay, az), and vector b, (bx, by, bz), is
  2284. //
  2285. //     a x b = ( ( ay * bz ) - ( az * by ), ( az * bx ) - ( ax * bz ), ( ax * by ) - ( ay * bx ) )
  2286. //
  2287. //-----------------------------------------------------------------------------
  2288.  
  2289. %a = "1 1 0";
  2290. %b = "2 0 1";
  2291.  
  2292. // %r = "( ( 1 * 1 ) - ( 0 * 0 ), ( 0 * 2 ) - ( 1 * 1 ), ( 1 * 0 ) - ( 1 * 2 ) )";
  2293. // %r = "1 -1 -2";
  2294. %r = VectorCross( %a, %b );
  2295. @endtsexample
  2296.  
  2297. @ingroup Vectors */
  2298.     virtual string VectorCross(( VectorF a, VectorF b )) {}
  2299.     /*! Compute the distance between two vectors.
  2300. @param a The first vector.
  2301. @param b The second vector.
  2302. @return The length( @a b - @a a ).
  2303.  
  2304. @tsexample
  2305. //-----------------------------------------------------------------------------
  2306. //
  2307. // VectorDist( %a, %b );
  2308. //
  2309. // The distance between vector a, (ax, ay, az), and vector b, (bx, by, bz), is
  2310. //
  2311. //     a -> b = ||( b - a )||
  2312. //            = ||( bx - ax, by - ay, bz - az )||
  2313. //            = mSqrt( ( bx - ax ) * ( bx - ax ) + ( by - ay ) * ( by - ay ) + ( bz - az ) * ( bz - az ) )
  2314. //
  2315. //-----------------------------------------------------------------------------
  2316.  
  2317. %a = "1 1 0";
  2318. %b = "2 0 1";
  2319.  
  2320. // %r = mSqrt( ( 2 - 1 ) * ( 2 - 1) + ( 0 - 1 ) * ( 0 - 1 ) + ( 1 - 0 ) * ( 1 - 0 ) );
  2321. // %r = mSqrt( 3 );
  2322. %r = VectorDist( %a, %b );
  2323. @endtsexample
  2324.  
  2325. @ingroup Vectors */
  2326.     virtual float VectorDist(( VectorF a, VectorF b )) {}
  2327.     /*! Calculate the magnitude of the given vector.
  2328. @param v A vector.
  2329. @return The length of vector @a v.
  2330.  
  2331. @tsexample
  2332. //-----------------------------------------------------------------------------
  2333. //
  2334. // VectorLen( %a );
  2335. //
  2336. // The length or magnitude of  vector a, (ax, ay, az), is:
  2337. //
  2338. //     ||a|| = Sqrt( ax * ax + ay * ay + az * az )
  2339. //
  2340. //-----------------------------------------------------------------------------
  2341.  
  2342. %a = "1 1 0";
  2343.  
  2344. // %r = mSqrt( 1 * 1 + 1 * 1 + 0 * 0 );
  2345. // %r = mSqrt( 2 );
  2346. // %r = 1.414;
  2347. %r = VectorLen( %a );
  2348. @endtsexample
  2349.  
  2350. @ingroup Vectors */
  2351.     virtual float VectorLen(( VectorF v )) {}
  2352.     /*! Create an orthogonal basis from the given vector.
  2353. @param aaf The vector to create the orthogonal basis from.
  2354. @return A matrix representing the orthogonal basis.
  2355. @ingroup Vectors */
  2356.     virtual string VectorOrthoBasis(( AngAxisF aa )) {}
  2357.     /*! Linearly interpolate between two vectors by @a t.
  2358. @param a Vector to start interpolation from.
  2359. @param b Vector to interpolate to.
  2360. @param t Interpolation factor (0-1).  At zero, @a a is returned and at one, @a b is returned.  In between, an interpolated vector between @a a and @a b is returned.
  2361. @return An interpolated vector between @a a and @a b.
  2362.  
  2363. @tsexample
  2364. //-----------------------------------------------------------------------------
  2365. //
  2366. // VectorLerp( %a, %b );
  2367. //
  2368. // The point between vector a, (ax, ay, az), and vector b, (bx, by, bz), which is
  2369. // weighted by the interpolation factor, t, is
  2370. //
  2371. //     r = a + t * ( b - a )
  2372. //       = ( ax + t * ( bx - ax ), ay + t * ( by - ay ), az + t * ( bz - az ) )
  2373. //
  2374. //-----------------------------------------------------------------------------
  2375.  
  2376. %a = "1 1 0";
  2377. %b = "2 0 1";
  2378. %v = "0.25";
  2379.  
  2380. // %r = "( 1 + 0.25 * ( 2 - 1 ), 1 + 0.25 * ( 0 - 1 ), 0 + 0.25 * ( 1 - 0 ) )";
  2381. // %r = "1.25 0.75 0.25";
  2382. %r = VectorLerp( %a, %b );
  2383. @endtsexample
  2384.  
  2385. @ingroup Vectors */
  2386.     virtual string VectorLerp(( VectorF a, VectorF b, float t )) {}
  2387.     /*! Create a transform from the given translation and orientation.
  2388. @param position The translation vector for the transform.
  2389. @param orientation The axis and rotation that orients the transform.
  2390. @return A transform based on the given position and orientation.
  2391. @ingroup Matrices */
  2392.     virtual string MatrixCreate(( VectorF position, AngAxisF orientation )) {}
  2393.     /*! @Create a matrix from the given rotations.
  2394.  
  2395. @param Vector3F X, Y, and Z rotation in *radians*.
  2396. @return A transform based on the given orientation.
  2397. @ingroup Matrices */
  2398.     virtual string MatrixCreateFromEuler(( Point3F angles )) {}
  2399.     /*! @brief Multiply the two matrices.
  2400.  
  2401. @param left First transform.
  2402. @param right Right transform.
  2403. @return Concatenation of the two transforms.
  2404. @ingroup Matrices */
  2405.     virtual string MatrixMultiply(( TransformF left, TransformF right )) {}
  2406.     /*! @brief Multiply the vector by the transform assuming that w=0.
  2407.  
  2408. This function will multiply the given vector by the given transform such that translation will not affect the vector.
  2409.  
  2410. @param transform A transform.
  2411. @param vector A vector.
  2412. @return The transformed vector.
  2413. @ingroup Matrices */
  2414.     virtual string MatrixMulVector(( TransformF transform, VectorF vector )) {}
  2415.     /*! @brief Multiply the given point by the given transform assuming that w=1.
  2416.  
  2417. This function will multiply the given vector such that translation with take effect.
  2418. @param transform A transform.
  2419. @param point A vector.
  2420. @return The transformed vector.
  2421. @ingroup Matrices */
  2422.     virtual string MatrixMulPoint(( TransformF transform, Point3F point )) {}
  2423.     /// @}
  2424.  
  2425.     /*! Get the center point of an axis-aligned box.
  2426.  
  2427. @param b A Box3F, in string format using "minExtentX minExtentY minExtentZ maxExtentX maxExtentY maxExtentZ"
  2428. @return Center of the box.
  2429. @ingroup Math */
  2430.     virtual string getBoxCenter(( Box3F box )) {}
  2431.     /*! Set the current seed for the random number generator.
  2432. Based on this seed, a repeatable sequence of numbers will be produced by getRandom().
  2433. @param seed The seed with which to initialize the randon number generator with.  The same seed will always leed tothe same sequence of pseudo-random numbers.
  2434. If -1, the current timestamp will be used as the seed which is a good basis for randomization.
  2435. @ingroup Random */
  2436.     virtual void setRandomSeed(( int seed=-1 )) {}
  2437.     /*! Get the current seed used by the random number generator.
  2438. @return The current random number generator seed value.
  2439. @ingroup Random */
  2440.     virtual int getRandomSeed(()) {}
  2441.     /*! Get a random number between @a a and @a b.
  2442. @param a Lower bound on the random number.  The random number will be >= @a a.
  2443. @param b Upper bound on the random number.  The random number will be <= @a b.
  2444. @return A pseudo-random number between @a a and @a b.
  2445. @see setRandomSeed
  2446. @ingroup Random */
  2447.     virtual float getRandom(( int a=1, int b=0 )) {}
  2448.     /*! Solve a quadratic equation (2nd degree polynomial) of form a*x^2 + b*x + c = 0.
  2449. @param a First Coefficient.@param b Second Coefficient.@param c Third Coefficient.@returns A triple, containing: (sol x0 x1). (sol) is the number of solutions(being 0, 1, or 2), and (x0) and (x1) are the solutions, if any.@ingroup Math */
  2450.     virtual string mSolveQuadratic(( float a, float b, float c )) {}
  2451.     /*! Solve a cubic equation (3rd degree polynomial) of form a*x^3 + b*x^2 + c*x + d = 0.
  2452. @param a First Coefficient.@param b Second Coefficient.@param c Third Coefficient.@param d Fourth Coefficient.@returns A 4-tuple, containing: (sol x0 x1 x2). (sol) is the number of solutions(being 0, 1, 2 or 3), and (x0), (x1) and (x2) are the solutions, if any.@ingroup Math */
  2453.     virtual string mSolveCubic(( float a, float b, float c, float d )) {}
  2454.     /*! Solve a quartic equation (4th degree polynomial) of form a*x^4 + b*x^3 + c*x^2 + d*x + e = 0.
  2455. @param a First Coefficient.@param b Second Coefficient.@param c Third Coefficient.@param d Fourth Coefficient.@param e Fifth Coefficient.@returns A 5-tuple, containing: (sol x0 x1 x2 c3). (sol) is the number of solutions(being 0, 1, 2, 3 or 4), and (x0), (x1), (x2) and (x3) are the solutions, if any.@ingroup Math */
  2456.     virtual string mSolveQuartic(( float a, float b, float c, float d, float e )) {}
  2457.     /*! Round v down to the nearest integer.
  2458. @param v Number to convert to integer.@returns Number converted to integer.@ingroup Math */
  2459.     virtual int mFloor(( float v )) {}
  2460.     /*! Round v to the nearest integer.
  2461. @param v Number to convert to integer.@returns Number converted to integer.@ingroup Math */
  2462.     virtual int mRound(( float v )) {}
  2463.     /*! Round v up to the nearest integer.
  2464. @param v Number to convert to integer.@returns Number converted to integer.@ingroup Math */
  2465.     virtual int mCeil(( float v )) {}
  2466.     /*! Formats the specified number to the given number of decimal places.
  2467. @param v Number to format.@param precision Number of decimal places to format to (1-9).@returns Number formatted to the specified number of decimal places.@ingroup Math */
  2468.     virtual string mFloatLength(( float v, int precision )) {}
  2469.     /*! Calculate absolute value of specified value.
  2470. @param v Input Value.@returns Absolute value of specified value.@ingroup Math */
  2471.     virtual float mAbs(( float v )) {}
  2472.     /*! Calculate the remainder of v/d.
  2473. @param v Input Value.@param d Divisor Value.@returns The remainder of v/d.@ingroup Math */
  2474.     virtual float mFMod(( float v, float d )) {}
  2475.     /*! Calculate the square-root of v.
  2476. @param v Input Value.@returns The square-root of the input value.@ingroup Math */
  2477.     virtual float mSqrt(( float v )) {}
  2478.     /*! Calculate b raised to the p-th power.
  2479. @param v Input Value.@param p Power to raise value by.@returns v raised to the p-th power.@ingroup Math */
  2480.     virtual float mPow(( float v, float p )) {}
  2481.     /*! Calculate the natural logarithm of v.
  2482. @param v Input Value.@returns The natural logarithm of the input value.@ingroup Math */
  2483.     virtual float mLog(( float v )) {}
  2484.     /*! Calculate the sine of v.
  2485. @param v Input Value (in radians).@returns The sine of the input value.@ingroup Math */
  2486.     virtual float mSin(( float v )) {}
  2487.     /*! Calculate the cosine of v.
  2488. @param v Input Value (in radians).@returns The cosine of the input value.@ingroup Math */
  2489.     virtual float mCos(( float v )) {}
  2490.     /*! Calculate the tangent of v.
  2491. @param v Input Value (in radians).@returns The tangent of the input value.@ingroup Math */
  2492.     virtual float mTan(( float v )) {}
  2493.     /*! Calculate the arc-sine of v.
  2494. @param v Input Value (in radians).@returns The arc-sine of the input value.@ingroup Math */
  2495.     virtual float mAsin(( float v )) {}
  2496.     /*! Calculate the arc-cosine of v.
  2497. @param v Input Value (in radians).@returns The arc-cosine of the input value.@ingroup Math */
  2498.     virtual float mAcos(( float v )) {}
  2499.     /*! Calculate the arc-tangent (slope) of a line defined by rise and run.
  2500. @param rise of line.@param run of line.@returns The arc-tangent (slope) of a line defined by rise and run.@ingroup Math */
  2501.     virtual float mAtan(( float rise, float run )) {}
  2502.     /*! Convert specified radians into degrees.
  2503. @param radians Input Value (in radians).@returns The specified radians value converted to degrees.@ingroup Math */
  2504.     virtual float mRadToDeg(( float radians )) {}
  2505.     /*! Convert specified degrees into radians.
  2506. @param degrees Input Value (in degrees).@returns The specified degrees value converted to radians.@ingroup Math */
  2507.     virtual float mDegToRad(( float degrees )) {}
  2508.     /*! Clamp the specified value between two bounds.
  2509. @param v Input value.@param min Minimum Bound.@param max Maximum Bound.@returns The specified value clamped to the specified bounds.@ingroup Math */
  2510.     virtual float mClamp(( float v, float min, float max )) {}
  2511.     /*! Clamp the specified value between 0 and 1 (inclusive).
  2512. @param v Input value.@returns The specified value clamped between 0 and 1 (inclusive).@ingroup Math */
  2513.     virtual float mSaturate(( float v )) {}
  2514.     /*! Calculate the greater of two specified numbers.
  2515. @param v1 Input value.@param v2 Input value.@returns The greater value of the two specified values.@ingroup Math */
  2516.     virtual float getMax(( float v1, float v2 )) {}
  2517.     /*! Calculate the lesser of two specified numbers.
  2518. @param v1 Input value.@param v2 Input value.@returns The lesser value of the two specified values.@ingroup Math */
  2519.     virtual float getMin(( float v1, float v2 )) {}
  2520.     /*! Calculate linearly interpolated value between two specified numbers using specified normalized time.
  2521. @param v1 Interpolate From Input value.@param v2 Interpolate To Input value.@param time Normalized time used to interpolate values (0-1).@returns The interpolated value between the two specified values at normalized time t.@ingroup Math */
  2522.     virtual float mLerp(( float v1, float v2, float time )) {}
  2523.     /*! Return the value of PI (half-circle in radians).
  2524. @returns The value of PI.@ingroup Math */
  2525.     virtual float mPi(()) {}
  2526.     /*! Return the value of 2*PI (full-circle in radians).
  2527. @returns The value of 2*PI.@ingroup Math */
  2528.     virtual float m2Pi(()) {}
  2529.     /*! Returns whether the value is an exact power of two.
  2530. @param v Input value.@returns Whether the specified value is an exact power of two.@ingroup Math */
  2531.     virtual bool mIsPow2(( int v )) {}
  2532.     /*! initialize CmObjEffectTemplates */
  2533.     virtual void CmObjEffectsInit(()) {}
  2534.     /*! Inform Content Server about our terrains and versions. */
  2535.     virtual void attachToContentServer(( TCPConnection cs )) {}
  2536.     virtual void detachFromContentServer(()) {}
  2537.     /*! maintenance(bool isStretched); */
  2538.     virtual bool maintenance(( bool isStretched=false )) {}
  2539.     virtual string getTerFilePath(( int terID, string basePath=nullptr )) {}
  2540.     virtual string getTer2FilePath_Server_Index(( int terID, string basePath=nullptr )) {}
  2541.     virtual string getTer2FilePath_Server_Data(( int terID, string basePath=nullptr )) {}
  2542.     virtual string getTer2FilePath_Client_Index(( int terID, string basePath=nullptr )) {}
  2543.     virtual string getTer2FilePath_Client_Data(( int terID, string basePath=nullptr )) {}
  2544.     virtual void SendDayNumber(( NetConnection client )) {}
  2545.     virtual void initCmPatch() {}
  2546.     virtual void setDayNumber(( int dayNumber )) {}
  2547.     virtual int getDayNumber() {}
  2548.     virtual bool yoCsAttachClient(( TCPConnection con, int charID )) {}
  2549.     virtual bool yoCsDetachClient(( int charID )) {}
  2550.     /*! restartInstance() */
  2551.     virtual void restartInstance() {}
  2552.     virtual int getCurrentProcessId() {}
  2553.     virtual string getComputerName() {}
  2554.     /*! @brief Returns the OS temporary directory, "C:/Users/Mich/AppData/Local/Temp" for example
  2555.  
  2556. @note This can be useful to adhering to OS standards and practices, but not really used in Torque 3D right now.
  2557. @note Be very careful when getting into OS level File I/O.@return String containing path to OS temp directory
  2558. @note This is legacy function brought over from TGB, and does not appear to have much use. Possibly deprecate?
  2559. @ingroup FileSystem
  2560. @internal */
  2561.     virtual string getTemporaryDirectory(()) {}
  2562.     /*! @brief Creates a name and extension for a potential temporary file
  2563.  
  2564. This does not create the actual file. It simply creates a random name for a file that does not exist.
  2565.  
  2566. @note This is legacy function brought over from TGB, and does not appear to have much use. Possibly deprecate?
  2567. @ingroup FileSystem
  2568. @internal */
  2569.     virtual string getTemporaryFileName(()) {}
  2570.     /*! getUserDataDirectory() */
  2571.     virtual string getUserDataDirectory() {}
  2572.     /*! getUserHomeDirectory() */
  2573.     virtual string getUserHomeDirectory() {}
  2574.  
  2575.     /*! @name Memory
  2576.    
  2577.     Memory manager utility functions.
  2578.     @{ */
  2579.     /*! */
  2580.     /*! @brief Dumps some useful statistics regarding free memory.
  2581.  
  2582. Dumps an analysis of 'free chunks' of memory. Does not print how much memory is free.
  2583.  
  2584. @ingroup Debugging */
  2585.     virtual void freeMemoryDump(()) {}
  2586.     /// @}
  2587.  
  2588.     virtual string getIPLocal() {}
  2589.     /*! startPrecisionTimer() - Create and start a high resolution platform timer. Returns the timer id. */
  2590.     virtual int startPrecisionTimer() {}
  2591.     /*! stopPrecisionTimer( S32 id ) - Stop and destroy timer with the passed id.  Returns the elapsed milliseconds. */
  2592.     virtual int stopPrecisionTimer() {}
  2593.     /*! @brief Initializes variables that track device and vendor information/IDs
  2594.  
  2595. @ingroup Rendering */
  2596.     virtual void initDisplayDeviceInfo(()) {}
  2597.     /*! enableWinConsole(bool); */
  2598.     virtual void enableWinConsole() {}
  2599.     /*! @brief Launches an outside executable or batch file
  2600.  
  2601. @param executable Name of the executable or batch file
  2602. @param args Optional list of arguments, in string format, to pass to the executable
  2603. @param directory Optional string containing path to output or shell
  2604. @ingroup Platform */
  2605.     virtual bool shellExecute((string executable, string args, string directory)) {}
  2606.     /*! @brief Install the math library with specified extensions.
  2607.  
  2608. Possible parameters are:
  2609.  
  2610.     - 'DETECT' Autodetect math lib settings.
  2611.  
  2612.     - 'C' Enable the C math routines. C routines are always enabled.
  2613.  
  2614.     - 'FPU' Enable floating point unit routines.
  2615.  
  2616.     - 'MMX' Enable MMX math routines.
  2617.  
  2618.     - '3DNOW' Enable 3dNow! math routines.
  2619.  
  2620.     - 'SSE' Enable SSE math routines.
  2621.  
  2622. @ingroup Math */
  2623.     virtual void mathInit(( ... )) {}
  2624.     virtual void crtEnableDebug() {}
  2625.     virtual void crtCheckMemory() {}
  2626.     /*! isKoreanBuild() */
  2627.     virtual bool isKoreanBuild() {}
  2628.  
  2629.     /*! @name Containers
  2630.    
  2631.     Functions for ray casting and spatial queries.
  2632.  
  2633.  
  2634.     @{ */
  2635.     /*! */
  2636.     /*! @brief See if any objects of the given types are present in box of given extent.
  2637.  
  2638. @note Extent parameter is last since only one radius is often needed.  If one radius is provided, the yRadius and zRadius are assumed to be the same.  Unfortunately, if you need to use the client container, you'll need to set all of the radius parameters.  Fortunately, this function is mostly used on the server.
  2639. @param  mask   Indicates the type of objects we are checking against.
  2640. @param  center Center of box.
  2641. @param  xRadius Search radius in the x-axis. See note above.
  2642. @param  yRadius Search radius in the y-axis. See note above.
  2643. @param  zRadius Search radius in the z-axis. See note above.
  2644. @param useClientContainer Optionally indicates the search should be within the client container.
  2645. @return true if the box is empty, false if any object is found.
  2646. @ingroup Game */
  2647.     virtual bool containerBoxEmpty(( int mask, Point3F center, float xRadius, float yRadius=-1, float zRadius=-1, bool useClientContainer=false )) {}
  2648.     /*! @brief Start a search for items at the given position and within the given radius, filtering by mask.
  2649.  
  2650. @param pos Center position for the search
  2651. @param radius Search radius
  2652. @param mask Bitmask of object types to include in the search
  2653. @param useClientContainer Optionally indicates the search should be within the client container.
  2654. @see containerSearchNext
  2655. @ingroup Game */
  2656.     virtual void initContainerRadiusSearch(( Point3F pos, float radius, int mask, bool useClientContainer=false )) {}
  2657.     /*! @brief Start a search for all items of the types specified by the bitset mask.
  2658.  
  2659. @param mask Bitmask of object types to include in the search
  2660. @param useClientContainer Optionally indicates the search should be within the client container.
  2661. @see containerSearchNext
  2662. @ingroup Game */
  2663.     virtual void initContainerTypeSearch(( int mask, bool useClientContainer=false )) {}
  2664.     /*! @brief Get next item from a search started with initContainerRadiusSearch() or initContainerTypeSearch().
  2665.  
  2666. @param useClientContainer Optionally indicates the search should be within the client container.
  2667. @return the next object found in the search, or null if no more
  2668. @tsexample
  2669. // print the names of all nearby ShapeBase derived objects
  2670. %position = %obj.getPosition;
  2671. %radius = 20;
  2672. %mask = $TypeMasks::ShapeBaseObjectType;
  2673. initContainerRadiusSearch( %position, %radius, %mask );
  2674. while ( (%targetObject = containerSearchNext()) != 0 )
  2675. {
  2676.    echo( "Found: " @ %targetObject.getName() );
  2677. }
  2678. @endtsexample
  2679. @see initContainerRadiusSearch()
  2680. @see initContainerTypeSearch()
  2681. @ingroup Game */
  2682.     virtual string containerSearchNext(( bool useClientContainer=false )) {}
  2683.     /*! @brief Get distance of the center of the current item from the center of the current initContainerRadiusSearch.
  2684.  
  2685. @param useClientContainer Optionally indicates the search should be within the client container.
  2686. @return distance from the center of the current object to the center of the search
  2687. @see containerSearchNext
  2688. @ingroup Game */
  2689.     virtual float containerSearchCurrDist(( bool useClientContainer=false )) {}
  2690.     /*! @brief Get the distance of the closest point of the current item from the center of the current initContainerRadiusSearch.
  2691.  
  2692. @param useClientContainer Optionally indicates the search should be within the client container.
  2693. @return distance from the closest point of the current object to the center of the search
  2694. @see containerSearchNext
  2695. @ingroup Game */
  2696.     virtual float containerSearchCurrRadiusDist(( bool useClientContainer=false )) {}
  2697.     virtual void listObjects(()) {}
  2698.     /*! @brief Cast a ray from start to end, checking for collision against items matching mask.
  2699.  
  2700. If pExempt is specified, then it is temporarily excluded from collision checks (For instance, you might want to exclude the player if said player was firing a weapon.)
  2701. @param start An XYZ vector containing the tail position of the ray.
  2702. @param end An XYZ vector containing the head position of the ray
  2703. @param mask A bitmask corresponding to the type of objects to check for
  2704. @param pExempt An optional ID for a single object that ignored for this raycast
  2705. @param useClientContainer Optionally indicates the search should be within the client container.
  2706. @returns A string containing either null, if nothing was struck, or these fields:
  2707. <ul><li>The ID of the object that was struck.</li><li>The x, y, z position that it was struck.</li><li>The x, y, z of the normal of the face that was struck.</li></ul>@ingroup Game */
  2708.     virtual string containerRayCast(( Point3F start, Point3F end, int mask, SceneObject  pExempt=NULL, bool useClientContainer=false )) {}
  2709.     /// @}
  2710.  
  2711.     virtual void setVisibleDistance(( float dist )) {}
  2712.  
  2713.     /*! @name NetInterface
  2714.    
  2715.     Global control functions for the netInterfaces.
  2716.     @{ */
  2717.     /*! */
  2718.     /*! allowConnections(bool); */
  2719.     virtual void allowConnections() {}
  2720.     /// @}
  2721.  
  2722.     /*! initialize cm database manager class */
  2723.     virtual void CmDatabase_init(()) {}
  2724.     /*! Encodes string for using within SQL-expressions */
  2725.     virtual string dbEncode(( string inStr )) {}
  2726.     /*! In milliseconds. -1 == all queries */
  2727.     virtual void CmDatabaseSetSlowQueryLogDurationMs(( int ms )) {}
  2728.     /*! In milliseconds. -1 == all queries */
  2729.     virtual int CmDatabaseGetSlowQueryLogDurationMs(()) {}
  2730.     virtual bool U32CmDbTableIDRangeInit(( U32CmDbTableIDRangeEnum rangeType, string spName, int idMaxPoolSize=sgDefaultIdMaxPoolSize, int idMinPoolSize=sgDefaultIdMinPoolSize )) {}
  2731.     virtual bool U64CmDbTableIDRangeInit(( U64CmDbTableIDRangeEnum rangeType, string spName, int idMaxPoolSize=sgDefaultIdMaxPoolSize, int idMinPoolSize=sgDefaultIdMinPoolSize )) {}
  2732.     virtual void DebugDumpAllCmDbIDRanges(()) {}
  2733.     virtual int Query((%sqlStatement, %callback, %pQueryRef)) {}
  2734.     virtual int sqlQuery((%sqlStatement, %callback, %pQueryRef)) {}
  2735.     virtual int sqlUpdate((%sqlStatement[, %callback[, %pQueryRef]])) {}
  2736.     /*! calcSha1(string) */
  2737.     virtual string calcSha1() {}
  2738.     virtual bool registerSteamServer(( int gamePort )) {}
  2739.     virtual bool DebugSteamInvite(( string steamIDStr, string ip, int port )) {}
  2740.     /*! initialize substance manager class */
  2741.     virtual void SubstanceManager_init(()) {}
  2742.     /*! clears any substance info from SubstanceManager class */
  2743.     virtual void SubstanceManager_clear(()) {}
  2744.     virtual void decay() {}
  2745.     virtual int GetServerCentralTer(( int serverID )) {}
  2746.     virtual string GetServerTerIDList(( int serverID, bool includeSideTers=false )) {}
  2747.     /*! update internal terrain list */
  2748.     virtual void InitTerrainList(( string dataMirrorPath=nullptr )) {}
  2749.     virtual void detachTerrains() {}
  2750.     virtual void GenerateAndSmoothTer2FromTer((Round terrain heights; do falls on terrain; smooth whole terrain; generate ter2 file. Do not forget to remove ter2 files before call it)) {}
  2751.     virtual void GenerateAndSmoothSingleTer2FromTer((Round terrain heights; do falls on terrain; smooth whole terrain; generate ter2 file. Do not forget to remove ter2 files before call it)) {}
  2752.     virtual void GenerateTer2FromTer((Round terrain heights; do falls on terrain; smooth whole terrain; generate ter2 file. Do not forget to remove ter2 files before call it)) {}
  2753.     virtual void SetTer2SubstancesFromTer((update substances within ter2 according to current terrain materials)) {}
  2754.     virtual void GenerateTerFromTer2(()) {}
  2755.     virtual void SetTerrainMaterialsFromTer2((update terrian materials according to ter2 info)) {}
  2756.     virtual void CheckTerMaterialsUsing((calculates materials references count for terrains)) {}
  2757.     virtual void CheckTerMaterialsTotalUsing((calculates materials references count overall for terrains)) {}
  2758.     virtual void ConvertServerGeoFileToClient((converts server's ter2 files to client's ones)) {}
  2759.     /*! Converts server's ter2 files to client's ones in range [start, end]. Using: (startTerID, endTerID) */
  2760.     virtual void ConvertServerGeoFileToClientRange() {}
  2761.     virtual void ResetAllGeoFilesDataVersion((set data version of all geo files (server+client) to 1)) {}
  2762.     virtual void ReduceTerrainWidth() {}
  2763.     virtual void SmoothTerrainsTwinPointsWithFallByCenterTer() {}
  2764.     virtual void SmoothTerTwinPoints() {}
  2765.     /*! @brief Takes a string informing the backend where to store sample data and optionally a name of the specific logging backend to use.  The default is the CSV backend. In most cases, the logging store will be a file name.@tsexample
  2766. beginSampling( "mysamples.csv" );
  2767. @endtsexample
  2768.  
  2769. @ingroup Rendering */
  2770.     virtual void beginSampling((location, [backend])) {}
  2771.     /*! @brief Stops the rendering sampler
  2772.  
  2773. @ingroup Rendering
  2774.  */
  2775.     virtual void stopSampling(()) {}
  2776.     /*! @brief Enable sampling for all keys that match the given name pattern. Slashes are treated as separators.
  2777.  
  2778. @ingroup Rendering */
  2779.     virtual void enableSamples((pattern, [state])) {}
  2780.     /*! getCmVersion() */
  2781.     virtual string getCmVersionString() {}
  2782.  };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement