How to draw straight lines and perspective grids
Painting Guides in Paint by Zaweba place rulers, ellipses and 1, 2 and 3-point perspective that your brush strokes snap to, with Shift to break free.

Perfect straight lines and accurate perspective come from the Painting Guides tool in Paint by Zaweba. It places rulers, ellipses and 1, 2 and 3-point perspective guides on the canvas, and your brush strokes snap to them as you paint. Hold Shift whenever you want a stroke to break free and go its own way.
The point is that you keep painting with your normal brushes. The guide doesn't draw a line for you; it steers your hand, so the stroke keeps its pressure, texture and taper while following a perfectly straight or perfectly curved path.
The guides you can place
There's more than a plain ruler. You get a ruler, an infinite ruler and a parallel ruler, an ellipse and concentric ellipses, 1, 2 and 3-point perspective, a vanishing point guide, a fisheye guide and a spline guide for a free curve of your own. Strokes snap to the nearest shape, or you can limit them to one chosen family so that, say, only the left vanishing point catches your strokes.
A parallel ruler is the quick way to hatch shading or draw floorboards, since every stroke runs at the same angle wherever you start it. Concentric ellipses suit wheels, plates and round towers, where several rings need to share a centre. The fisheye guide bends lines the way a very wide lens does, which is good for dramatic comic panels.
Setting up a perspective scene
For a street or a room, start with 2-point perspective. Place the horizon at the viewer's eye level, then drag the two vanishing points out along it. Put them well apart, often off the edges of the canvas, or the scene will look distorted, as if seen through a very wide lens. Every horizontal edge of a building will now run to one point or the other, and vertical edges stay straight up and down.
Use 1-point perspective for a view straight down a corridor or a road, where everything recedes to a single point in the middle. Use 3-point when you are looking steeply up at a tower or down from a height, so the verticals converge too.
Block out the big shapes first with a thin brush on a sketch layer, letting the guide do the work. Then add a new layer above for clean line work. Hold Shift for anything that isn't architecture, such as trees, people or clouds, so those strokes stay loose.
Guides and the stabiliser together
Guides take care of geometry; the stroke stabiliser takes care of shaky hands. They work well side by side. Turn the stabiliser up for the hand drawn curves in a scene and leave the guides on for the edges, and a mouse drawing starts to look like it came from a steady tablet.
If you need lines that stay editable as objects, rather than painted strokes, the Line tool among the Shape tools draws a vector line with a weight and optional arrowheads at either end. That suits diagrams and annotations. For artwork, the painted line from a guide usually looks more natural.
Things to know before you start
Guides are saved in the .ptx file, so you can close a big perspective drawing and come back to it with the vanishing points exactly where you left them. They are never exported, so you don't need to hide them before saving a PNG or JPEG.
The usual mistake is putting the vanishing points too close together. If boxes in your scene look stretched at the corners, drag the points further apart. Another is forgetting that snapping is on when you switch to colouring; if your shading strokes keep jumping into straight lines, hold Shift or switch the guide off for that layer of work.
Paint by Zaweba is free and runs offline, and the Painting Guides are part of the same brush engine you use for everything else, so there is nothing extra to set up.