{"action":"created","issue":{"url":"https://api.github.com/repos/wesnoth/wesnoth/issues/629","repository_url":"https://api.github.com/repos/wesnoth/wesnoth","labels_url":"https://api.github.com/repos/wesnoth/wesnoth/issues/629/labels{/name}","comments_url":"https://api.github.com/repos/wesnoth/wesnoth/issues/629/comments","events_url":"https://api.github.com/repos/wesnoth/wesnoth/issues/629/events","html_url":"https://github.com/wesnoth/wesnoth/pull/629","id":141409752,"number":629,"title":"Easier portrait variants","user":{"login":"CelticMinstrel","id":578731,"avatar_url":"https://avatars.githubusercontent.com/u/578731?v=3","gravatar_id":"","url":"https://api.github.com/users/CelticMinstrel","html_url":"https://github.com/CelticMinstrel","followers_url":"https://api.github.com/users/CelticMinstrel/followers","following_url":"https://api.github.com/users/CelticMinstrel/following{/other_user}","gists_url":"https://api.github.com/users/CelticMinstrel/gists{/gist_id}","starred_url":"https://api.github.com/users/CelticMinstrel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CelticMinstrel/subscriptions","organizations_url":"https://api.github.com/users/CelticMinstrel/orgs","repos_url":"https://api.github.com/users/CelticMinstrel/repos","events_url":"https://api.github.com/users/CelticMinstrel/events{/privacy}","received_events_url":"https://api.github.com/users/CelticMinstrel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-16T21:39:59Z","updated_at":"2016-05-25T04:25:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/wesnoth/wesnoth/pulls/629","html_url":"https://github.com/wesnoth/wesnoth/pull/629","diff_url":"https://github.com/wesnoth/wesnoth/pull/629.diff","patch_url":"https://github.com/wesnoth/wesnoth/pull/629.patch"},"body":"It's common in campaigns for major characters to have several different portraits, eg for different emotions. Often these are named things like \"leader.png\", \"leader-mad.png\", etc. This is an idea to make it simpler to select a portrait variant without needing to repeat the entire file path.\r\n\r\nHere's how it works: Suppose the base portrait is \"leader.png\", and you want the \"mad\" variant which is at \"leader-mad.png\". You write your message tag like this:\r\n\r\n```wml\r\n[message]\r\n   speaker=leader\r\n   image_variant=mad\r\n   message=_\"I'm really mad right now!\"\r\n[/message]\r\n```\r\n\r\nAnd the `[message]` tag automatically inserts the string \"-mad\" right before the file extension. (It currently assumes the file extension is \".png\".)\r\n\r\nBut what if you have a similar situation, but the base portrait is called \"leader-neutral.png\"? This is easy too. Instead of setting `profile=leader-neutral.png`, you set `profile=leader-%neutral%.png`, and write your message tag just like above. The string between the two percent signs will be replaced with the image variant, resulting in \"leader-mad.png\". If no image variant is specified, the percent signs are removed."},"comment":{"url":"https://api.github.com/repos/wesnoth/wesnoth/issues/comments/221469917","html_url":"https://github.com/wesnoth/wesnoth/pull/629#issuecomment-221469917","issue_url":"https://api.github.com/repos/wesnoth/wesnoth/issues/629","id":221469917,"user":{"login":"CelticMinstrel","id":578731,"avatar_url":"https://avatars.githubusercontent.com/u/578731?v=3","gravatar_id":"","url":"https://api.github.com/users/CelticMinstrel","html_url":"https://github.com/CelticMinstrel","followers_url":"https://api.github.com/users/CelticMinstrel/followers","following_url":"https://api.github.com/users/CelticMinstrel/following{/other_user}","gists_url":"https://api.github.com/users/CelticMinstrel/gists{/gist_id}","starred_url":"https://api.github.com/users/CelticMinstrel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CelticMinstrel/subscriptions","organizations_url":"https://api.github.com/users/CelticMinstrel/orgs","repos_url":"https://api.github.com/users/CelticMinstrel/repos","events_url":"https://api.github.com/users/CelticMinstrel/events{/privacy}","received_events_url":"https://api.github.com/users/CelticMinstrel/received_events","type":"User","site_admin":false},"created_at":"2016-05-25T04:25:02Z","updated_at":"2016-05-25T04:25:02Z","body":"Closing because a) it was a quick thing I whipped up in an hour or two, b) there have been decent arguments against it, and c) it's cluttering up the PR list."}}
{"actor":{"display_login":"CelticMinstrel"}}