The Galaxy API Documentation is growing. Here is a quick recap of useful functions.
TriggerAddEventChatMessage
You want to do an action when the player says a specific string like "-next" or "-difficulty 5". It is possible using the function TriggerAddEventChatMessage. It let you bind a trigger when a specific player chat message contains a certain string.
Basic Type Operations
In order to manipulation basic types (int, fixed and string) there are many functions to convert from one type to another.
You also have the possibility to do operations on these types:
- Numbers: MaxF, AbsI, RandomInt
- Strings: StringEqual, StringWord
If you are not pleased with this basic functions, I've written two libs that gives more functions.
- Basic Mathematic Functions: (cos, sin, tan), (DegToRad, RadToDeg), (round, ceil, floor), (mod, isInt), (PointX, PointY)
- Debug Utilities: BoolToString, FixedToString, PointToString, OrderToString, UnitToString, PlayerToString
CatalogFieldValueGet
The Galaxy API allows you to interact with the XML data files with the function CatalogFieldValueGet. In order to do it you have to know the xml file id and the path to access the value. It automatically handles for you all the inheritance through the parent attribute.
In order to get material to use it, or make your own data modifications we have documented the files UnitData.xml and AchievementData.xml
Comments