A class used in map generation.
LuaMapGenerator:stood_world_map_tile () | Gets the world map tile the player was standing on when they entered the map being generated. |
LuaMapGenerator:is_first_generation () | Returns true if the map is being generated for the first time, across all regenerations. |
LuaMapGenerator:is_deepest_level () | Returns true if the current dungeon level is the deepest in this map. |
LuaMapGenerator:create (width, height) | Creates a blank map of the specified size. |
LuaMapGenerator:load_custom (map_name) | Loads a custom map with the given name. |
LuaMapGenerator:generate_nefia () | Generates a random nefia (dungeon). |
LuaMapGenerator:set_name (name) | Sets the created map's name. |
LuaMapGenerator:set_tileset (tileset_id) | Initializes the created map's tileset. |
LuaMapGenerator:set_stair_up_pos (x, y) | Sets the position of the stairs up in the created map. |
LuaMapGenerator:set_stair_down_pos (x, y) | Sets the position of the stairs down in the created map. |
LuaMapGenerator:set_entrance_type (type) | Sets the created map's entrance type. |
LuaMapGenerator:set_no_aggro_refresh (flag) | Sets the created map's no aggro refresh flag. |
LuaMapGenerator:place_player () | Sets the position of the player based on the entrance type. |
LuaMapGenerator:place_player_xy (x, y) | Sets the position of the player to the given coordinates and updates the entrance type accordingly. |
LuaMapGenerator:update_quests_in_map () | Creates new quests for the characters in the created map if necessary. |
LuaMapGenerator:mark_quest_targets () | Marks all characters in this map as being enemies and quest targets. |
LuaMapGenerator:initialize_world_map () | Initializes this map as a world map, |
Gets the world map tile the player was standing on when they entered the map being generated.
Returns:
Returns true if the map is being generated for the first time, across all regenerations.
Returns:
Returns true if the current dungeon level is the deepest in this map.
Returns:
Creates a blank map of the specified size.
Parameters:
Loads a custom map with the given name.
Parameters:
Generates a random nefia (dungeon).
Sets the created map's name.
Parameters:
Initializes the created map's tileset.
Parameters:
Sets the position of the stairs up in the created map.
Parameters:
Sets the position of the stairs down in the created map.
Parameters:
Sets the created map's entrance type.
Parameters:
Sets the created map's no aggro refresh flag.
If true, characters will not have their enemyid and hate reset after map initialization. Set this flag to true if you change the "enemyid" or "hate" fields of any characters in the generation function.
Parameters:Sets the position of the player based on the entrance type.
Sets the position of the player to the given coordinates and updates the entrance type accordingly.
Parameters:
Creates new quests for the characters in the created map if necessary.
Marks all characters in this map as being enemies and quest targets.
Initializes this map as a world map,