Routes

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
tribes55
Posts: 99
Joined: June 10th, 2012, 4:29 am

Routes

Post by tribes55 » July 15th, 2018, 4:48 pm

I'm trying to make routes for my campaign, but I'm not sure how to identify the pixel numbers of the map. I looked into a campaign template, and here's an example of what I mean:

Code: Select all

[story]
  [part]
    background=Campaign_Map.png
    show_title=yes
    {DOT 280 290}
    {DOT 310 330}
    {DOT 340 370}
    {DOT 370 410}
    {DOT 400 450}
    {DOT 430 490}
    {DOT 460 530}
    {CROSS 490 570}
  [/part]
I don't know how I'm supposed to know which pixel is where I want the dot to go to. Is there software you guys use? For example, if I wanted to find the location of Estmark hills in the attached map, how would I go about that?

Thanks
Attachments
httt.png
Last edited by Pentarctagon on July 15th, 2018, 5:37 pm, edited 1 time in total.
Reason: [c] -> [code]

User avatar
Sapient
Inactive Developer
Posts: 4446
Joined: November 26th, 2005, 7:41 am
Contact:

Re: Routes

Post by Sapient » July 16th, 2018, 1:26 pm

There is a trackplacer tool written in python which is available in the wesnoth\data\tools directory.

You can read more about it here: https://wiki.wesnoth.org/Authoring_tools
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."

User avatar
Celtic_Minstrel
Developer
Posts: 1184
Joined: August 3rd, 2012, 11:26 pm
Contact:

Re: Routes

Post by Celtic_Minstrel » July 17th, 2018, 3:16 am

If I recall correctly, when I made my maps I just used GIMP or similar software to figure out the coordinates of the target location. That can certainly get tedious when plotting out a long track, mind you.
Author of The Black Cross of Aleron campaign and Default++ era.
Maintainer of Steelhive.

User avatar
zookeeper
WML Wizard
Posts: 9726
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Routes

Post by zookeeper » July 17th, 2018, 8:40 am

Yes, any image editing software will do, such as GIMP or Paint. They'll all show you the pixel coordinates of where the cursor is, somewhere.

User avatar
Elvish_Hunter
Developer
Posts: 1371
Joined: September 4th, 2009, 2:39 pm
Location: Lintanir Forest...

Re: Routes

Post by Elvish_Hunter » July 17th, 2018, 8:50 pm

Sapient wrote:
July 16th, 2018, 1:26 pm
There is a trackplacer tool written in python which is available in the wesnoth\data\tools directory.
The problem is that trackplacer is outdated (it requires the obsolete PyGTK toolkit, which doesn't run on Python 3) and terribly bugged (it doesn't run at all on Windows, for example). I originally planned to rewrite it with Tkinter/ttk, but I never found the time to do so and now there's even the problem with HiDPI screens; because from October/November I'll be busy again, I might just wait for Qt for Python (formerly PySide2) to be officially released without the Tech Preview flag before attempting again to work on it.
For these reasons, I suggest that you don't even bother trying trackplacer; do what Celtic_Minstrel and zookeeper said, instead.
Current maintainer of these add-ons:
1.14: The Sojournings of Grog, A Rough Life, The White Troll (co-author)
1.12: Children of Dragons, Wesnoth Lua Pack
Active again until mid-October

User avatar
Sapient
Inactive Developer
Posts: 4446
Joined: November 26th, 2005, 7:41 am
Contact:

Re: Routes

Post by Sapient » July 18th, 2018, 7:24 pm

Elvish_Hunter wrote:
July 17th, 2018, 8:50 pm
The problem is that trackplacer is outdated (it requires the obsolete PyGTK toolkit, which doesn't run on Python 3) and terribly bugged (it doesn't run at all on Windows, for example).
That is great information, thanks. I have updated the wiki, so that others who find that page will know it as well.
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."

User avatar
zookeeper
WML Wizard
Posts: 9726
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Routes

Post by zookeeper » July 18th, 2018, 8:12 pm

I once wrote a little GIMP script that I've used for plotting a lot of journey markers. However, I've never bothered to properly finalize it, so it's kind of hacky, clumsy and undocumented and I don't promise to provide any kind of support for it, should one choose to try and use it.

I think this is how it works:

1. Open up a map.
2. Draw paths on a single path layer called "journey", wherever you want the journey paths to be. You can make only one stroke per path!
3. Make a new non-background layer and select it.
4. Run the script (Filters->Wesnoth->Journey Helper).
5. Each path should now have a text layer next to it with the coordinates of each dot on that path; copy-paste the contents and use as you wish.

The black dots get drawn using the current pencil/brush size, so you may want to adjust that before (re)running the script.
Attachments
wesnoth-journey-helper.zip
Unpack to wherever your GIMP scripts are; works on GIMP 2.8, haven't tried it on newer versions.
(1.24 KiB) Downloaded 17 times

Post Reply