lifelike / hexmapextension

Inkscape extension for creating hex grids suitable for boardgame maps.
126 stars 16 forks source link

Allow an arbitrary object to be the hex center marker #27

Open jrvjrv opened 5 years ago

jrvjrv commented 5 years ago

Currently the hex center is always a circle, and is sized according to the stroke width. As an enhancement, allow the user to identify an arbitrary object by its id to be used as the hex center marker. This object will be duplicated and centered on each hex center. It will not be resized. The original object should be left in the layer and position it was in.

Some games use plus symbols or stars as hex centers rather than dots. Creating a set of these can currently be done in inkscape by creating an object and cloning, but it takes a fair amount of trial-and-error to get the positioning right unless you figure out the math.

lifelike commented 5 years ago

This is an interesting idea, but it might be a lot of work to get right, remembering all the bugs the countersheets extension had because of transforms and other SVG stuff. Maybe if copying some of that code from the other extension it could be made good enough, but not sure I want to go there. Interested in giving it a try? :)

jrvjrv commented 5 years ago

Interested in giving it a try? :)

I'm afraid that my knowledge of python is nearly none, and about inkscape's api I know nothing. In a previous version of the hex map extension I made a slight modification, but it was not fundamental, and I have since forgotten everything I know about how I did it.

As part of the user guide I came up with a "procedure" to create a tiled clone by had that gets the job done. My interest is primarily in creating "bullseye" hex centers, e.g. a black circle around a white center. That allows the hex center to show up clearly both when the underlying artwork is dark and when it is light. A single color hex center won't. After creating the procedure I realized I can take your hex centers and convert them to have a fill and a stroke of appropriate thickness, and I am done. I left the instructions in anyway because I imagine there are games that use shapes other than circles. The procedure will work for any shape, but is pretty arithmetic intensive. For that reason I made the suggestion of a feature in the hex map extension. I can repeat the steps, and probably you can, but I don't have as much hope for the general public.

The other problem I encountered is that the board game I am interested in, Advanced Squad Leader, I mentioned in the user's guide. The hex shapes on the printed maps are not "perfect." I don't know how common that is, and I don't know how often people are printing maps that have to be compatible with existing maps that are not perfect hexes. Again I have a procedure for that, but if it is a common enough problem you might consider being able to scale to match existing maps as a new feature too.

lifelike commented 4 years ago

Very old versions of this extension actually allowed asymmetric hexes. There used to be a checkbox to force symmetry. But I thought that was pretty useless as I did not expect anyone to want to make them asymmetric. Perhaps should bring that back? But I think that belongs as part of the solution for #20.