#4029: master wzscript list --------------------+------------------------------------- Reporter: vexed | Owner: Type: task | Status: new Priority: normal | Milestone: unspecified Component: other | Version: git/master Keywords: | Blocked By: Blocking: | Operating System: All/Non-Specific --------------------+------------------------------------- {{{ bool structHasModule(STRUCTURE *psStruct); static DROID_TEMPLATE *scrCheckTemplateExists(SDWORD player, DROID_TEMPLATE *psTempl); bool scriptOperatorEquals(INTERP_VAL const &v1, INTERP_VAL const &v2) void scriptSetStartPos(int position, int x, int y) void scriptSetDerrickPos(int x, int y) bool scriptInit() bool scrScavengersActive() bool scrGetDifficulty() bool scrGetPlayer() bool scrGetDerrick() Vector2i getPlayerStartPosition(int player) bool scrSetSunPosition(void) bool scrSetSunIntensity(void) bool scrSafeDest(void) bool scrThreatAt(void) bool scrGetPlayerStartPosition(void) //check for a base object being in range of a point bool objectInRange(BASE_OBJECT *psList, SDWORD x, SDWORD y, SDWORD range)
//Check for any player object being within a certain range of a position bool scrObjectInRange(void) //Check for a droid being within a certain range of a position bool scrDroidInRange(void) //Check for a struct being within a certain range of a position bool scrStructInRange(void) bool scrPlayerPower(void) //check for a base object being in an areastatic bool objectInArea(BASE_OBJECT *psList, SDWORD x1, SDWORD y1, SDWORD x2, SDWORD y2) //Check for any player object being within a certain area bool scrObjectInArea(void) //Check for a droid being within a certain area bool scrDroidInArea(void) //Check for a struct being within a certain Area of a position bool scrStructInArea(void) bool scrSeenStructInArea(void) //Check for a players structures but no walls being within a certain area bool scrStructButNoWallsInArea(void) //check for the number of base objects in an areastatic SDWORD numObjectsInArea(BASE_OBJECT *psList, SDWORD x1, SDWORD y1, SDWORD x2, SDWORD y2) //Count the number of player objects within a certain area bool scrNumObjectsInArea(void) //Count the number of player droids within a certain area bool scrNumDroidsInArea(void) //Count the number of player structures within a certain area bool scrNumStructsInArea(void) //Count the number of player structures but not walls within a certain area bool scrNumStructsButNotWallsInArea(void) //Count the number of structures in an area of a certain type bool scrNumStructsByTypeInArea(void) //Check for a droid having seen a certain object bool scrDroidHasSeen(void) //Enable a component to be researched bool scrEnableComponent(void) //Make a component available bool scrMakeComponentAvailable(void) //Add a droid bool scrAddDroidToMissionList(void) //Add a droid bool scrAddDroid(void) //Add droid to transporter bool scrAddDroidToTransporter(void) //check for a building to have been destroyed bool scrBuildingDestroyed(void) //Enable a structure to be built bool scrEnableStructure(void) //Check if a structure can be built. //currently PC skirmish only. bool scrIsStructureAvailable(void) //make the droid with the matching id the currently selected droid bool scrSelectDroidByID(void) //Pop up a message box with a number value in it bool scrNumMB(void) //Do an approximation to a square root bool scrApproxRoot(void) //Add a reticule button to the interface bool scrAddReticuleButton(void) //Remove a reticule button from the interface bool scrRemoveReticuleButton(void) //add a message to the Intelligence Display bool scrAddMessage(void) //remove a message from the Intelligence Display bool scrRemoveMessage(void) /*builds a droid in the specified factory*/ bool scrBuildDroid(void) //for a specified structure, set the assembly point droids go to when built bool scrSetAssemblyPoint(void) //test for structure is idle or not bool scrStructureIdle(void) //sends a players droids to a location to attack bool scrAttackLocation(void) //Destroy a feature bool scrDestroyFeature(void) //Init enum visible features. May use player==-1 to ignore visibility check. bool scrInitGetFeature(void) //get next visible feature of required type //notes: can't rely on just using the feature list, since it may change// between calls, Use an index into list instead.// Doesn't return Features sharing a tile with a structure.// Skirmish Only, dunno if kev uses this? bool scrGetFeature(void) /* Faster implementation of scrGetFeature - assumes no features are deleted between calls */ bool scrGetFeatureB(void) //Add a feature bool scrAddFeature(void) //Add a structure bool scrAddStructure(void) //Destroy a structure bool scrDestroyStructure(void) //NEXT 2 FUNCS ONLY USED IN MULTIPLAYER AS FAR AS I KNOW (25 AUG98) alexl. //init enum visible structures. bool scrInitEnumStruct(void) bool scrEnumStruct(void) //init enum visible structures - takes bucket as additional parameter bool scrInitEnumStructB(void) //Similar to scrEnumStruct, but uses bucket bool scrEnumStructB(void) /*looks to see if a structure (specified by type) exists and is being built*/ bool scrStructureBeingBuilt(void) //multiplayer skirmish only for now. //returns true if a specific struct is complete. I know it's like the previous func, bool scrStructureComplete(void) /*looks to see if a structure (specified by type) exists and built*/ bool scrStructureBuilt(void) /*centre the view on an object - can be droid/structure or feature */ bool scrCentreView(void) /*centre the view on a position */ bool scrCentreViewPos(void) bool scrEnumUnbuilt(void) bool scrIterateUnbuilt(void) //Get a pointer to a structure based on a stat - returns NULL if cannot find one bool scrGetStructure(void) //Get a pointer to a template based on a component stat - returns NULL if cannot find one bool scrGetTemplate(void) //Get a pointer to a droid based on a component stat - returns NULL if cannot find one bool scrGetDroid(void) //Sets all the scroll params for the map bool scrSetScrollParams(void) //Sets the scroll minX separately for the map bool scrSetScrollMinX(void) //Sets the scroll minY separately for the map bool scrSetScrollMinY(void) //Sets the scroll maxX separately for the map bool scrSetScrollMaxX(void) //Sets the scroll maxY separately for the map bool scrSetScrollMaxY(void) //Sets which sensor will be used as the default for a player bool scrSetDefaultSensor(void) //Sets which ECM will be used as the default for a player bool scrSetDefaultECM(void) //Sets which RepairUnit will be used as the default for a player bool scrSetDefaultRepair(void) //Sets the structure limits for a player bool scrSetStructureLimits(void) //multiplayer limit handler. bool scrApplyLimitSet(void) //plays a sound for the specified player - only plays the sound if the //specified player = selectedPlayer bool scrPlaySound(void) //plays a sound for the specified player - only plays the sound if the //specified player = selectedPlayer - saves position bool scrPlaySoundPos(void) /* add a text message to the top of the screen for the selected player*/ bool scrShowConsoleText(void) /* add a text message to the top of the screen for the selected player*/ bool scrAddConsoleText(void) /* add a text message to the top of the screen for the selected player - without clearing whats there*/ bool scrTagConsoleText(void) bool scrClearConsole(void) //demo functions for turning the power on bool scrTurnPowerOff(void) //demo functions for turning the power off bool scrTurnPowerOn(void) //flags when the tutorial is over so that console messages can be turned on again bool scrTutorialEnd(void) //function to play a full-screen video in the middle of the game for the selected player bool scrPlayVideo(void) //checks to see if there are any droids for the specified player bool scrAnyDroidsLeft(void) //function to call when the game is over, plays a message then does game over stuff.// bool scrGameOverMessage(void) //function to call when the game is over bool scrGameOver(void) bool scrAnyFactoriesLeft(void) //checks to see if there are any structures (except walls) for the specified player bool scrAnyStructButWallsLeft(void) //defines the background audio to play bool scrPlayBackgroundAudio(void) bool scrPlayIngameCDAudio(void) bool scrStopCDAudio(void) bool scrPauseCDAudio(void) bool scrResumeCDAudio(void) //set the retreat point for a player bool scrSetRetreatPoint(void) //set the retreat force level bool scrSetRetreatForce(void) //set the retreat leadership bool scrSetRetreatLeadership(void) //set the retreat point for a group bool scrSetGroupRetreatPoint(void) bool scrSetGroupRetreatForce(void) //set the retreat health level bool scrSetRetreatHealth(void) bool scrSetGroupRetreatHealth(void) //set the retreat leadership bool scrSetGroupRetreatLeadership(void) //start a Mission - the missionType is ignored now - gets it from the level data *********** bool scrStartMission(void) //set Snow (enable disable snow) bool scrSetSnow(void) //set Rain (enable disable Rain) bool scrSetRain(void) //set Background Fog (replace fade out with fog) bool scrSetBackgroundFog(void) //set Depth Fog (gradual fog from mid range to edge of world) bool scrSetDepthFog(void) //set Mission Fog colour, may be modified by weather effects bool scrSetFogColour(void) //test function to test variable references bool scrRefTest(void) //is player a human or computer player? (multiplayer only) bool scrIsHumanPlayer(void) //Set an alliance between two players bool scrCreateAlliance(void) //offer an alliance bool scrOfferAlliance(void) //Break an alliance between two players bool scrBreakAlliance(void) //Multiplayer relevant scriptfuncs //returns true if 2 or more players are in alliance. bool scrAllianceExists(void) bool scrAllianceExistsBetween(void) bool scrPlayerInAlliance(void) //returns true if a single alliance is dominant. bool scrDominatingAlliance(void) bool scrMyResponsibility(void) /** bool scrStructureBuiltInRange(void) //generate a random number bool scrRandom(void) //randomise the random number seed bool scrRandomiseSeed(void) //explicitly enables a research topic bool scrEnableResearch(void) //acts as if the research topic was completed - used to jump into the tree bool scrCompleteResearch(void) //This routine used to start just a reticule button flashing // .. now it starts any button flashing (awaiting implmentation from widget library) bool scrFlashOn(void) //stop a generic button flashing bool scrFlashOff(void) //set the initial power level settings for a player bool scrSetPowerLevel(void) //add some power for a player bool scrAddPower(void) /*set the landing Zone position for the map - this is for player 0. Can be bool scrSetLandingZone(void) /*set the landing Zone position for the Limbo droids and adds the Limbo droids bool scrSetLimboLanding(void) //initialises all the no go areas bool scrInitAllNoGoAreas(void) //set a no go area for the map - landing zones for the enemy, or player 0 bool scrSetNoGoArea(void) //set the zoom level for the radar bool scrSetRadarZoom(void) //set how long an offworld mission can last -1 = no limit bool scrSetMissionTime(void) //this returns how long is left for the current mission time is 1/100th sec - same units as passed in bool scrMissionTimeRemaining(void) //set the time delay for reinforcements for an offworld mission bool scrSetReinforcementTime(void) //Sets all structure limits for a player to a specified value bool scrSetAllStructureLimits(void) //clear all the console messages bool scrFlushConsoleMessages(void) //Establishes the distance between two points - uses an approximation bool scrDistanceTwoPts(void) //Returns whether two objects can see each other bool scrLOSTwoBaseObjects(void) //Destroys all structures within a certain bounding area. bool scrDestroyStructuresInArea(void) //Returns a value representing the threat from droids in a given area bool scrThreatInArea(void) //returns the nearest gateway bottleneck to a specified point bool scrGetNearestGateway(void) bool scrSetWaterTile(void) bool scrSetRubbleTile(void) bool scrSetCampaignNumber(void) //Tests whether a structure has a certain module for a player. Tests whether any structure //has this module if structure is null bool scrTestStructureModule(void) bool scrForceDamage(void) //Kills of a droid without spawning any explosion effects. bool scrDestroyUnitsInArea(void) bool scrRemoveDroid(void) static bool structHasModule(STRUCTURE *psStruct) //give player a template belonging to another. bool scrAddTemplate(void) //additional structure check bool structDoubleCheck(BASE_STATS *psStat, UDWORD xx, UDWORD yy, SDWORD maxBlockingTiles) static bool pickStructLocation(DROID *psDroid, int index, int *pX, int *pY, int player, int maxBlockingTiles) //pick a structure location(only used in skirmish game at 27Aug) ajl. bool scrPickStructLocation(void) //pick a structure location and check that we can build there (duh!) bool scrPickStructLocationC(void) //pick a structure location(only used in skirmish game at 27Aug) ajl. //Max number of blocking tiles is passed as parameter for this one bool scrPickStructLocationB(void) //Sets the transporter entry and exit points for the map bool scrSetTransporterExit(void) //Fly transporters in at start of map bool scrFlyTransporterIn(void) /* bool scrGetGameStatus(void) //get the colour number used by a player bool scrGetPlayerColour(void) //get the colour name of the player ("green", "black" etc) bool scrGetPlayerColourName(void) //set the colour number to use for a player bool scrSetPlayerColour(void) //set all droids in an area to belong to a different player - returns the number of droids changed bool scrTakeOverDroidsInArea(void) /*this takes over a single droid and passes a pointer back to the new one*/ bool scrTakeOverSingleDroid(void) //set all droids in an area of a certain experience level or less to belong to //a different player - returns the number of droids changed bool scrTakeOverDroidsInAreaExp(void) /*this takes over a single structure and passes a pointer back to the new one*/ bool scrTakeOverSingleStructure(void) //set all structures in an area to belong to a different player - returns the number of droids changed//will not work on factories for the selectedPlayer bool scrTakeOverStructsInArea(void) //set Flag for defining what happens to the droids in a Transporter bool scrSetDroidsToSafetyFlag(void) //set Flag for defining whether the coded countDown is called bool scrSetPlayCountDown(void) //get the number of droids currently onthe map for a player bool scrGetDroidCount(void) //fire a weapon stat at an object bool scrFireWeaponAtObj(void) //fire a weapon stat at a location bool scrFireWeaponAtLoc(void) //set the number of kills for a droid bool scrSetDroidKills(void) //get the number of kills for a droid bool scrGetDroidKills(void) //reset the visibility for a player bool scrResetPlayerVisibility(void) //set the vtol return pos for a player bool scrSetVTOLReturnPos(void) //called via the script in a Limbo Expand level to set the level to plain ol' expand bool scrResetLimboMission(void) //skirmish only. bool scrIsVtol(void) //Fix the tutorial's template list(s). //DO NOT MODIFY THIS WITHOUT KNOWING WHAT YOU ARE DOING. You will break the tutorial! //In short, we want to design a ViperLtMGWheels, but it is already available to make, so we must delete it. bool scrTutorialTemplates(void)/ /-----------------------------------------//New functions//----------------------------------------- //compare two strings (0 means they are different) bool scrStrcmp(void) /* Output a string to console */ bool scrConsole(void) //was bool (int) ** see warning about conversion//turn on debug messages bool scrDbgMsgOn(void) bool scrMsg(void) bool scrDbg(void) bool scrDebugFile(void) /* Prepare the droid iteration */ bool scrInitEnumDroids(void) /* Get next droid */ bool scrEnumDroid(void) //Return the template factory is currently building bool scrFactoryGetTemplate(void) bool scrNumTemplatesInProduction(void) //Returns number of units based on a component a certain player has bool scrNumDroidsByComponent(void) bool scrGetStructureLimit(void) //Returns true if limit for the passed structurestat is reached, otherwise returns false bool scrStructureLimitReached(void) //How many structures of a given type a player has bool scrGetNumStructures(void) //Return player's unit limit bool scrGetUnitLimit(void) //Return minimum of 2 vals bool scrMin(void) //Return maximum of 2 vals bool scrMax(void) bool scrFMin(void) //Return maximum of 2 floats bool scrFMax(void) bool ThreatInRange(SDWORD player, SDWORD range, SDWORD rangeX, SDWORD rangeY, bool bVTOLs) //find unrevealed tile closest to pwLooker within the range of wRange bool scrFogTileInRange(void) bool scrMapRevealedInRange(void) /* Returns true if a certain map tile was revealed, ie fog of war was removed */ bool scrMapTileVisible(void) //return number of reserach topics that are left to be researched//for a certain technology to become available bool scrNumResearchLeft(void) //check if any of the ally is researching this topic bool beingResearchedByAlly(SDWORD resIndex, SDWORD player) //true if player has completed this research bool scrResearchCompleted(void) //true if player has already started researching it bool scrResearchStarted(void) //returns true if location is dangerous bool scrThreatInRange(void) bool scrNumEnemyWeapObjInRange(void) /* Calculates the total cost of enemy weapon objects in a certain area */ bool scrEnemyWeapObjCostInRange(void) /* Calculates the total cost of ally (+ looking player) bool scrFriendlyWeapObjCostInRange(void) /**s static UDWORD costOrAmountInRange(SDWORD player, SDWORD lookingPlayer, SDWORD range, SDWORD rangeX, SDWORD rangeY, bool bVTOLs, bool justCount) UDWORD numPlayerWeapDroidsInRange(SDWORD player, SDWORD lookingPlayer, SDWORD range, SDWORD rangeX, SDWORD rangeY, bool bVTOLs) UDWORD playerWeapDroidsCostInRange(SDWORD player, SDWORD lookingPlayer, SDWORD range, SDWORD rangeX, SDWORD rangeY, bool bVTOLs) UDWORD numPlayerWeapStructsInRange(SDWORD player, SDWORD lookingPlayer, SDWORD range, SDWORD rangeX, SDWORD rangeY, bool bFinished) UDWORD playerWeapStructsCostInRange(SDWORD player, SDWORD lookingPlayer, SDWORD range, SDWORD rangeX, SDWORD rangeY, bool bFinished) bool scrNumEnemyWeapDroidsInRange(void) bool scrNumEnemyWeapStructsInRange(void) bool scrNumFriendlyWeapObjInRange(void) bool scrNumFriendlyWeapDroidsInRange(void) bool scrNumFriendlyWeapStructsInRange(void) bool scrNumPlayerWeapDroidsInRange(void) bool scrNumPlayerWeapStructsInRange(void) bool scrNumPlayerWeapObjInRange(void) bool scrNumEnemyObjInRange(void) UDWORD numEnemyObjInRange(SDWORD player, SDWORD range, SDWORD rangeX, SDWORD rangeY, bool bVTOLs, bool bFinished) /* Similar to structureBuiltInRange(), but also returns true if structure is not finished */ bool scrNumStructsByStatInRange(void) bool scrNumStructsByStatInArea(void) bool scrNumStructsByTypeInRange(void) bool scrNumFeatByTypeInRange(void) //returns num of visible structures of a certain player in range (only visible ones) bool scrNumStructsButNotWallsInRangeVis(void) //Only returns structure if it is visible bool scrGetStructureVis(void) //returns num of visible structures of a certain player in range bool scrChooseValidLoc(void) //returns closest enemy object bool scrGetClosestEnemy(void) //How many droids can it still fit? bool scrTransporterCapacity(void) //is it? bool scrTransporterFlying(void) bool scrUnloadTransporter(void) //return true if droid is a member of any group bool scrHasGroup(void) /* Range is in world units! */ bool scrObjWeaponMaxRange(void) bool scrObjHasWeapon(void) bool scrObjectHasIndirectWeapon(void) //returns closest droid by type bool scrGetClosestEnemyDroidByType(void) //returns closest structure by type bool scrGetClosestEnemyStructByType(void) //Approx point of intersection of a circle and a line with start loc being circle's center point bool scrCirclePerimPoint(void) //send my vision to AI bool scrGiftRadar(void) bool scrNumAllies(void) //num aa defenses in range bool scrNumAAinRange(void) //select droid bool scrSelectDroid(void) //select droid group bool scrSelectGroup(void) bool scrModulo(void) bool scrPlayerLoaded(void) /* Add a beacon (blip) */ bool addBeaconBlip(SDWORD locX, SDWORD locY, SDWORD forPlayer, SDWORD sender, const char *textMsg) bool sendBeaconToPlayer(SDWORD locX, SDWORD locY, SDWORD forPlayer, SDWORD sender, const char *beaconMsg) //prepare viewdata for help blip VIEWDATA *CreateBeaconViewData(SDWORD sender, UDWORD LocX, UDWORD LocY) /* Looks through the players list of messages to find VIEW_BEACON (one per player!) pointer */MESSAGE *findBeaconMsg(UDWORD player, SDWORD sender) /* Add beacon (radar blip) */ bool scrDropBeacon(void) /* Remove beacon from the map */ bool scrRemoveBeacon(void) bool scrClosestDamagedGroupDroid(void) SDWORD getNumRepairedBy(DROID *psDroidToCheck, SDWORD player) /* Uses debug_console() for console debug output right now */ bool scrMsgBox(void) //Check for a struct being within a certain range of a position (must be visible) bool scrStructInRangeVis(void) //Check for a droid being within a certain range of a position (must be visible) bool scrDroidInRangeVis(void) //check for a base object being in range of a point bool objectInRangeVis(BASE_OBJECT *psList, SDWORD x, SDWORD y, SDWORD range, SDWORD lookingPlayer) /* Go after a certain research */ bool scrPursueResearch(void) bool scrGetStructureType(void) /* Get player name from index */ bool scrGetPlayerName(void) /* Set player name */ bool scrSetPlayerName(void) SDWORD getPlayerFromString(char *playerName) /* Checks if a particular bit is set in an integer */ bool scrGetBit(void) /* Sets a particular bit in an integer */ bool scrSetBit(void) /* Can we create and break alliances? */ bool scrAlliancesLocked(void) bool scrASSERT(void) /* Visualize radius at position */ bool scrShowRangeAtPos(void) bool scrToPow(void) /* Exponential function */ bool scrExp(void) /* Square root */ bool scrSqrt(void) /* Natural logarithm */ bool scrLog(void) bool scrDebugMenu() //no-op{ bool scrSetDebugMenuEntry() //no-op{ /* Parse chat message and return number of commands that could be extracted */ bool scrProcessChatMsg(void) /* Returns number of command arguments for a certain bool scrGetNumArgsInCmd(void) /* Returns a string representing a certain chat command, bool scrGetChatCmdDescription(void) /* Returns a certain parameter of a certain chat command bool scrGetChatCmdParam(void) /* Returns true if a certain command was addressed to a certain player */ bool scrChatCmdIsPlayerAddressed(void) /* Modifies height of a tile */ bool scrSetTileHeight(void) /* Returns structure which placed on provided coordinates. bool scrGetTileStructure(void) /* Outputs script call stack bool scrPrintCallStack(void) /* bool scrDebugModeEnabled(void) /* bool scrCalcDroidPower(void) /* bool scrGetDroidLevel(void) /* Assembles a template from components and returns it */ bool scrAssembleWeaponTemplate(void) /* Checks if template already exists, returns it if yes */ static DROID_TEMPLATE *scrCheckTemplateExists(SDWORD player, DROID_TEMPLATE *psTempl) //deprecated bool scrWeaponLongHitUpgrade(void) //deprecated bool scrWeaponDamageUpgrade(void) //deprecated bool scrWeaponFirePauseUpgrade(void) bool scrIsComponentAvailable(void) bool scrGetBodySize(void) bool scrGettext() bool scrGettext_noop() bool scrPgettext() bool scrPgettext_expr() bool scrPgettext_noop() }}} -- Ticket URL: <http://developer.wz2100.net/ticket/4029> Warzone 2100 Trac <http://developer.wz2100.net/> The Warzone 2100 Project ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Warzone2100-project mailing list Warzone2100-project@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/warzone2100-project