wesnoth.terrain_types?
Moderator: Forum Moderators
wesnoth.terrain_types?
Is there any wesnoth.unit_types equivalent for terrains? I want to make dialog like here, but with terrains instead of units: https://wiki.wesnoth.org/LuaWML/Display ... how_dialog
Re: wesnoth.terrain_types?
afaik there isn't, whta you could do however is to first get all terrain code used in the curent map with wesnoth.get_terrain and wesnoth.get_map_size. end then get information about those ces with wesnoth.get_terrain_info
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
Re: wesnoth.terrain_types?
If you don't need to include terrains from campaigns and/or add-ons but only need core terrains, then you could include the core terrain.cfg into some container, using [set_variables], which would then give you all the core terrain definitions as a simple WML array.