This is a quick and easy way to make a battery pack that will allow you to use a Ryobi 18V tool for four times as long as with one battery. Sometimes a tool will die in the middle of an operation, this can mess up what you're trying to do and is dangerous in some cases. Speaking of dangerous! I get the impression that my little project is dangerous, so watch your back and don't get hurt, I believe in you.
Step 1: Layout
First of all, find a board that you like. It needs to be wide enough that it is at least an inch taller than your battery when stood up on its side. It needs to be as long as all four batteries lined up like in the picture. This is the space saving method of placing the batteries.
Step 2: Drill action
Figure out where all the +/- connectors line up with the board and drill holes there. Do this again on another board, but mirrored.
Step 3: Ensemble
Cut these two boards and another to the same length, and then two shorter boards for the ends. Screw it all together, as if it were some sort of bird house.
Step 4: Place the batteries., then screw it!
Put the batteries that sit upright in first, then drive screws into the holes that correspond to them until the screws touch the leads on the battery. You can use the screws to help hold the batteries in place by tightening them a little more after they touch the leads.
Step 5: Testing
It's difficult to see if the screws hit their mark for the upside down batteries, this is a good time to have a tester. Lacking that you could run wires from each of the two screws that run to a battery and touch them together briefly to see if it arcs, don't hurt yourself. 19.80V? What sort of 18V battery are you?