wesnoth.terrain_types?

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

Moderators: Forum Moderators, Developers

wesnoth.terrain_types?

Postby 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
Smok
 
Posts: 49
Joined: June 14th, 2016, 11:52 am

Re: wesnoth.terrain_types?

Postby 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.
gfgtdf
Developer
 
Posts: 910
Joined: February 10th, 2013, 2:25 pm

Re: wesnoth.terrain_types?

Postby 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.
User avatar
zookeeper
WML Wizard
 
Posts: 9613
Joined: September 11th, 2004, 10:40 pm
Location: Finland


Return to Lua Labs

Who is online

Users browsing this forum: No registered users and 1 guest