Stephen has already provided a great answer above, but to add, a good rule of thumb to ensure that you are following your modifier with what is being modified is to take a moment and consider how they are related. In the example you've provided, the modifier is separated from the noun it is modifying, which has the potential to create some confusion. For example, your sentence;
"Having sent troops to the remote base, the battle committed the United States..."
In your example, context lends me to believe that you mean to say the United states sent troops to the remote base. However, your word order suggests that the battle sent the troops to the remote base, rather than the United States. That doesn't sound right, does it? Ask yourself, who or what carried out the action in the modifier, and does that subject follow the modifier?
To express the intent of your original sentence (as I understand it), you might want to say;
"With the battle having forced them to send troops to the remote base, the United committed itself to a long war"
Here, you make it clear that the battle is not the subject of the main sentence, while also making retaining it's relation to the circumstances discussed in the main clause.
Depending on the language you are studying, modifiers such as "having sent" are sometimes called circumstantial participles, and I think that term may help clarify the purpose they serve for you. They're describing the circumstances in which the action in the main clause occurred.
That is, "[as a result] of the battle having forced them to send troops... [under these circumstances] the United States committed..."
Or simply "This being being the circumstances... this happened"
In inflected languages, like Latin or Greek, it's common for circumstantial participle to share characteristics of the noun it is modifying to make it easier to identify them.
In English, we rely on word order, which is why it's so important to follow your modifier with what it's modifying, otherwise it will largely be assumed it goes with something else. Other modifiers, like adjectives, follow similar rules regarding word order, i.e. "the brown dog" and not "brown the dog". With modifiers like in your example, sometimes context is enough for a reader to determine what you meant, as above, but that isn't always the case, so you want to be careful.