NPC Conf File
The confNPC.xml file is an XML configuration file used to set various parameters for the Non-Player Characters (NPCs) in the game. The file is structured as follows:
Elements
<confNPC>: The root element of the document. All other elements are nested within this element.<speed>: The speed at which the NPC moves. The value is a floating-point number.<distanceDetection>: The distance at which the NPC can detect obstacles such as walls or the edge of a platform. The value is a floating-point number.<changeDirectionProbability>: The probability that the NPC will change direction at any given moment. The value is a floating-point number between 0 and 1, where 0 means the NPC will never change direction on its own, and 1 means the NPC will always change direction.<delayBeforeStopMin>and<delayBeforeStopMax>: The minimum and maximum amount of time, respectively, that the NPC will wait before stopping. The values are floating-point numbers. The time is in second.<delayDuringStopMin>and<delayDuringStopMax>: The minimum and maximum amount of time, respectively, that the NPC will remain stationary once it has stopped. The values are floating-point numbers. The time is in second.
Usage
This file is read by the ConfReaderNpc class in the Script namespace. The class reads the values of the elements and stores them in private fields. These values can then be retrieved using the class's getter methods.