{"action":"created","issue":{"url":"https://api.github.com/repos/Marqt/ViZDoom/issues/78","repository_url":"https://api.github.com/repos/Marqt/ViZDoom","labels_url":"https://api.github.com/repos/Marqt/ViZDoom/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/Marqt/ViZDoom/issues/78/comments","events_url":"https://api.github.com/repos/Marqt/ViZDoom/issues/78/events","html_url":"https://github.com/Marqt/ViZDoom/issues/78","id":158408977,"number":78,"title":"Resolve paths in config files relative to the files rather than the working directory","user":{"login":"danijar","id":2111293,"avatar_url":"https://avatars.githubusercontent.com/u/2111293?v=3","gravatar_id":"","url":"https://api.github.com/users/danijar","html_url":"https://github.com/danijar","followers_url":"https://api.github.com/users/danijar/followers","following_url":"https://api.github.com/users/danijar/following{/other_user}","gists_url":"https://api.github.com/users/danijar/gists{/gist_id}","starred_url":"https://api.github.com/users/danijar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danijar/subscriptions","organizations_url":"https://api.github.com/users/danijar/orgs","repos_url":"https://api.github.com/users/danijar/repos","events_url":"https://api.github.com/users/danijar/events{/privacy}","received_events_url":"https://api.github.com/users/danijar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-06-03T16:50:04Z","updated_at":"2016-06-07T23:57:40Z","closed_at":null,"body":"My bot lives in its own repository rather than in the examples directory. For this to work, I symlinked `<path-to-vizdoom>/bin/python/vizdoom.so` into the directory of my bot.\r\n\r\nNow it would be nice if I could use the config files that come with VizDoom directly, i.e. just load them by absolute paths in `game.load_config()`. However, the configs contain some file paths:\r\n\r\n```cfg\r\nvizdoom_path = ../../bin/vizdoom\r\ndoom_game_path = ../../scenarios/freedoom2.wad\r\ndoom_scenario_path = ../../scenarios/basic.wad\r\n```\r\n\r\nThe problem is that those paths are resolved relative to my working directory (the directory of my bot) rather than the directory of the config. Is this hard to fix? I might be able to provide some help to fix this."},"comment":{"url":"https://api.github.com/repos/Marqt/ViZDoom/issues/comments/224449449","html_url":"https://github.com/Marqt/ViZDoom/issues/78#issuecomment-224449449","issue_url":"https://api.github.com/repos/Marqt/ViZDoom/issues/78","id":224449449,"user":{"login":"danijar","id":2111293,"avatar_url":"https://avatars.githubusercontent.com/u/2111293?v=3","gravatar_id":"","url":"https://api.github.com/users/danijar","html_url":"https://github.com/danijar","followers_url":"https://api.github.com/users/danijar/followers","following_url":"https://api.github.com/users/danijar/following{/other_user}","gists_url":"https://api.github.com/users/danijar/gists{/gist_id}","starred_url":"https://api.github.com/users/danijar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danijar/subscriptions","organizations_url":"https://api.github.com/users/danijar/orgs","repos_url":"https://api.github.com/users/danijar/repos","events_url":"https://api.github.com/users/danijar/events{/privacy}","received_events_url":"https://api.github.com/users/danijar/received_events","type":"User","site_admin":false},"created_at":"2016-06-07T23:57:40Z","updated_at":"2016-06-07T23:57:40Z","body":"I think most Linux tools look in `~/.config/<tool-name>/` and `/etc/<tool-name>/` with the home directory taking preference over the system-wide location if a file exists in both paths. I'll try and find an official convention if there is but it seems reasonable to me."}}
{"actor":{"display_login":"danijar"}}