how to calculate the inputs to raw transactions? I'm wanting to send a raw TX, but i don't know how to come up with some of the parameters to the commands. What goes into the commands, what commands get used, and how to calculate anything that needs calculating. I know this needs to be done in the bitcoin command-line/console.
The structure of a transaction is documented in the tx section of the Bitcoin protocol specification.  To make the inputs, you need to find outputs from previous transactions that have not been spent yet, and you need to write a little script to unlock each output.

The script that you write will run first, and it will put some data on the stack in the script's execution environment.  Then the script that was embedded into the transaction's output will run, and it will evaluate whether your script supplied the right data.  The scripts of the outputs generally are pretty simple and only follow a couple of standard forms, so if you can recognize which form it is then you should be able to come up with an input script that satisfies it.  You might look at the isStandard function in Bitcoin Core to understand what scripts are standard.  The Solver class used there is problably the class that generates an input script for an output script; essentially it solves the puzzle of producing data that will be accepted by the output script.

I think if you follow the links above and look into it you should be able to figure out what is going on.