Discussion of Lua and LuaWML support, development, and ideas.

Moderators: Forum Moderators, Developers

Post Reply
Posts: 53
Joined: June 14th, 2016, 11:52 am


Post by Smok » June 14th, 2016, 12:04 pm

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

Posts: 1190
Joined: February 10th, 2013, 2:25 pm

Re: wesnoth.terrain_types?

Post by gfgtdf » June 14th, 2016, 12:48 pm

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.

User avatar
WML Wizard
Posts: 9740
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: wesnoth.terrain_types?

Post by zookeeper » June 14th, 2016, 2:13 pm

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.

Post Reply