Problem with adding overlay- please help.

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
rubberduck
Posts: 40
Joined: August 25th, 2013, 12:50 pm

Problem with adding overlay- please help.

Post by rubberduck »

i have a problem, i want to add graphics to the game they won't draw in editor or game.

my graphics-files are named ice-parts1, ice-parts2 ... until ice-parts6
they are in a folder named frozen (i tried to rename it to frozen2, because frozen is used by mainline but i still have the problem)

in terrain.cfg i used this code

Code: Select all

[terrain_type]
    symbol_image=frozen/ice-parts1
    editor_image=frozen/ice-parts1
    id=icechasm
    editor_name= _ "Iceparts"
    string=^Aip
    aliasof=At,_bas
    submerge=0
    editor_group=testgraphics
[/terrain_type]
and in terrain_graphics.cfg i used this code

Code: Select all

{OVERLAY_RANDOM_L        *^Aip                                             -1       frozen/ice-parts}
(i copied the code from mainline and changed it a bit)

have you an idea, why it doesn't draw in editor?

User avatar
Dugi
Posts: 4955
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Problem with adding overlay- please help.

Post by Dugi »

By coincidence, I was working on a similar terrain about a year ago, and I got it working without issues. Here is my code:

Code: Select all

{OVERLAY_RANDOM          *^Xis                                                      frozen/ice-shards}

Code: Select all

[terrain_type]
    symbol_image=frozen/ice-shards4
    id=ice_shards
    editor_name= _ "Ice Crystals"
    string=^Xis
    aliasof=_bas
    editor_group=wesnoth-UMC-LotI
[/terrain_type]
Pictures I used were frozen/ice-shards.png , frozen/ice-shards-2.png etc to frozen/ice-shards-7.png . I don't know what is exactly your problem, but coding it like I did should work.

rubberduck
Posts: 40
Joined: August 25th, 2013, 12:50 pm

Re: Problem with adding overlay- please help.

Post by rubberduck »

i tried it but it didn't help

when i start the editor, i can see the graphics in the side-menu, then i select it and i want to place it somewhere on the map.

but there is nothing what i can see, (similar to an village- or castle-overlay, i still see the grass, but when i go over this field with the mouse, i can see "iceparts" in the right edge on the top.

User avatar
rmj
Posts: 253
Joined: July 4th, 2010, 5:21 am

Re: Problem with adding overlay- please help.

Post by rmj »

rmj

rubberduck
Posts: 40
Joined: August 25th, 2013, 12:50 pm

Re: Problem with adding overlay- please help.

Post by rubberduck »

i tried it but it doesn't help

Post Reply