Inkscape tips

From Warzone Wiki
Revision as of 11:41, 14 October 2011 by Grzechooo (talk | contribs)
Jump to navigation Jump to search

This page gives tips on how to perform common tasks in Inkscape related to WarLight map development.

Unioning

It's possible to have one player-controllable territory that spans several objects in Inkscape. This can create islands off the coast of a territory, which is used in several WarLight maps.

To accomplish this, first make all of the objects as individual territories. Then select them all at once, and select Path -> Union.

Fixing small territories

The union feature can also be used to ensure players can click on small territories. Take, for example, Baja from the Earth map. In its raw form, it's way too small to fit an army number or be clickable:

Baja1.png

To rectify this, we draw a circle on top of it:

Baja2.png

Then select both the new circle and the Baja territory behind it at the same time. Select Path -> Union, and observe the resulting territory:

Baja3.png

Cutting holes

This section is a stub. You can help by expanding it.

Sometimes maps call for having territories inside of other territories. It may be logical to just make both territories and put the outer one behind the inner one, but this doesn't work since in WarLight, player-controllable territories should never overlap.

Instead, a hole should be cut in the bigger territory so the smaller one can persist in the hole.

Simplify

Sometimes territories can contain way more data than they need. One example is after drawing territories with the pencil tool, if you view the vertices (F2) you'll see it has an excessive amount.

This is easy to fix simply by selecting Path -> Simplify (Ctrl+L). This reduces the number of vertices drastically, and in most cases, doesn't alter the appearance of the object at all:

Simplify.png

Not only does this make the object easier to work with and increase the performance of Inkscape, it also reduces the size of your resulting WarLight map which makes it load faster and allows you to fit more objects into your map.

Cut Path

This section is a stub. You can help by expanding it.

One way of building WarLight maps is to make the continents out of large territories, then use the Cut Path feature to split it up into territories.

Fix transforms

Unfortunately there are a few kinds of transformations that SVG supports that WarLight does not. These can cause objects to appear at a different location within WarLight than they should.

Fortunately, these are easy to fix. In Inkscape, open the XML Editor (on the top toolbar, it's the 4th button from the right).

Select the offending object. The XML Editor will show you the attributes on it. If you see an attribute named transform with a value that starts with matrix, delete it. This will cause the object to move in Inkscape - now just drag it back to its correct position and your map should work normally.