graphical meta data - Printable Version +- Ludii Forum (https://ludii.games/forums) +-- Forum: Questions (https://ludii.games/forums/forumdisplay.php?fid=13) +--- Forum: About the Ludii Grammar (https://ludii.games/forums/forumdisplay.php?fid=15) +--- Thread: graphical meta data (/showthread.php?tid=302) |
graphical meta data - slimy_asparagus - 11-28-2020 With my new found understanding that states are associate with pieces I am trying to rationalize my code. I want the state to display how a piece is displayed. I am not getting this to work. I attach a test file. Each player should have a cross on the left and a square on the right. Also I am not sure why there is something behind, an "A" I suspect. RE: graphical meta data - slimy_asparagus - 11-29-2020 I made a small amount of progress. I realised it would make sense for me to make use of the Background and Foreground. So I would want the Background to be definedĀ by the piece type and the Foreground to be defined by the state. I have attempted to do that in test2.lud. It clearly is not working. Also you can now clearly see the "A". I have no idea where that comes from and how to turn it off. Okay I have found one more piece of information. If I change "place Stack" to just "place" it works and I get the cross on the left and square on the right. This looks like a bug to me. I still don't know where the "A" comes from though. RE: graphical meta data - slimy_asparagus - 11-29-2020 So I tried adding Code: (show Symbol false) RE: graphical meta data - MatthewStephenson - 11-30-2020 Hi, The issue with the Letter being shown is that we are trying to find a suitable svg image for the piece name "head" (which does not exist) Instead of setting a background image, you should rename the head pieces to the image you want. I.e. Change (piece Background "Head" image:"square") to (piece Rename piece:"Head" "square") Cheers, Matthew RE: graphical meta data - Eric Piette - 11-30-2020 Hi, About the starting rules in your description in which you use (place Stack ... state:...). I just looked and I saw that the state: parameter was not correctly implemented so I just fix it. But for the moment, it seems you do not add stack to the hand but just normal piece. Consequently in waiting the next release with that fix, I advice you to just use (place .... state:...) rather than (place Stack ... state:...) Regards, Eric RE: graphical meta data - slimy_asparagus - 11-30-2020 Eric, Matthew, The combination of the new version and the Rename idea seem to work. I was not expecting the Rename bit to work actually but it even picks up my custom SVG (albeit still upside down as I am still stuck on that as described in the other thread.) Nicholas |