ports to 1.7: random map generator
Moderator: Forum Moderators
ports to 1.7: random map generator
I don't know if this is the right place to post about it, but seems fit.
I am trying to port World Conquest to 1.7 and met some issues. Some I have been able to fix, some others waiting for my ignorance to be filled.
My main problem is to clear the labels on the map. The map generator places random labels for villages and groups of hexes like forests, lakes, etc. Those are unwanted, adding noise to the manually set labels.
So far I have been unable to get rid of those labels, any help would be appreciated.
Thank you,
Natasiel.
I am trying to port World Conquest to 1.7 and met some issues. Some I have been able to fix, some others waiting for my ignorance to be filled.
My main problem is to clear the labels on the map. The map generator places random labels for villages and groups of hexes like forests, lakes, etc. Those are unwanted, adding noise to the manually set labels.
So far I have been unable to get rid of those labels, any help would be appreciated.
Thank you,
Natasiel.
Re: ports to 1.7: random map generator
I saw your post yesterday, and had a quick look at the code
there is no way to easily remove the labels at this point
i'll try to add something before final 1.8, but no promises.
there is no way to easily remove the labels at this point
i'll try to add something before final 1.8, but no promises.
Fight key loggers: write some perl using vim
Re: ports to 1.7: random map generator
This should clear the map at prestart.
Code: Select all
[event]
name=prestart
[lua]
code=<<
local w, h, b = wesnoth.get_map_size()
for y1 = 1 - b, h + b do
for x1 = 1 - b, w + b do
wesnoth.fire("label",{x=x1,y=y1,text=""})
end
end
>>
[/lua]
[/event]
Re: ports to 1.7: random map generator
Thanks to both of you. the lua snippet did the trick.