jigrael - Reptilian Sanctuary, Sea Drake.Players without a custom race associated with them will return an empty string. player Player - The player with a custom race.Hopefully, you aren't silly enough to name your custom races identically.įunction GetPlayerCustomRaceName takes player Player returns string
If you need to get the custom race of a player, GetPlayerCustomRaceName will return a name string of the custom race.
Method addWorkerType takes integer WorkerId, integer Priority, integer Quantity returns nothing integer TownHallId - The rawcode of the race's Townhall (eg 'ogre' for Orc Great Hall).Method setTownHall takes integer TownHallId returns nothing You can do it by using the following methods: Once created, you still need to register its townhall, the workers types (you can have more than one type of worker) and hero(es). Method register takes race Race, real Handicap returns nothing
You can extend the registration of a custom race to more than one handicap with: Static method createAll takes string Name, race Race returns CustomRace You can also create and register a custom race for all handicaps of a single race with: Accpetable values are 0.5, 0.6, onwards up to 1.0 (which means you can overwrite the standard races too) real Handicap - The handicap value users need to set so they can pick the race.race Race - The standard race it will be based on (eg, RACE_HUMAN).Static method create takes string Name, race Race, real Handicap returns CustomRaceĮach of the parameters are described below: You create a struct of type CustomRace, with the following constructor: