1.17 - Reading Elevation

Discussion of all aspects of multiplayer development: unit balancing, map development, server development, and so forth.

Moderator: Forum Moderators

Post Reply
User avatar
doofus-01
Art Director
Posts: 4132
Joined: January 6th, 2008, 9:27 pm
Location: USA

1.17 - Reading Elevation

Post by doofus-01 »

(This isn't really an MP thing, but it uses MP maps for demos and it should work with MP anyways, so here we are.)
Screenshot_20230611_.jpg
Screenshot_20230611_.jpg (101.84 KiB) Viewed 6117 times
There is a cosmetic feature in 1.17 terrain graphics that has elevation, where there can be five levels (two lower, normal, two higher). It doesn't work like usual terrain graphics, so the usual filtering doesn't work. This add-on allows a UMC author to access the elevation data (which level a hex is) via some WML variables. There is currently (in version 0.1.0) just one, simple example, but I plan to add at least one or two more.

As a "resource", it requires you add

Code: Select all

    [load_resource]
        id=reading_elevation
    [/load_resource]
at [campaign], [multiplayer], etc level

The actual usage is

Code: Select all

    [elevation_score_map]
        high_border = <terrain code> (default *^Qhh*)
        low_border = <terrain code> (default *^Qhu*)
        test_labels = <boolean> ( default false )
    [/elevation_score_map]
in an event for a scenario with a map that has the elevation markers

The output is

Code: Select all

# one per marker
[elevation_area]
    type=<marker type>
    x=<comma separated x-values>
    y=<comma separated y-values>
[/elevation_area]
# just one summary, counts each marker type
[elevation_data]
    default=#
    high=#
    high_high=#
    low=#
    low_low=#
[/elevation_data]
TO DOs include (as of v 0.1.1):
1. More examples There are three usage examples now, probably enough
2. Better error handling
3. Some of the hexes currently get assigned to the wrong [elevation_area] (though correct type)
4. May cause a pause in some situations (optimization issue)
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
User avatar
doofus-01
Art Director
Posts: 4132
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: 1.17 - Reading Elevation

Post by doofus-01 »

I just uploaded version 0.18.0 to the BfW 1.18 add-on server. No real changes, but it still seems to work on the current stable Wesnoth.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
Post Reply