Charging

Rules for charging are on DMG 66. Note that encumbered creatures cannot charge. Charging is a type E action in the combat procedure.

Outdoors

MV bonus when charging outdoors is only 33.33%, compared to the 100% bonus when indoors. Quadrupeds get a 50% bonus outdoors instead.1) DMG 66.

Failing due to engagement

If a combatant declares a charge (E) but ends up unable to charge due to becoming engaged in melee before the charge, the charge does not happen at all (no attack on this round from charge, no +2, no AC penalty).

From within melee

Can be done, but has the same downsides as disengage-retreat – enemies in melee each get a free rear+stunned attack against the charger, since the charger is breaking melee recklessly.

Without intent to strike

A charge can be performed to obtain the once-per-turn extra movement even if the charger will not end up engaged or attack at the end of the movement.

Interaction with WvAC

Since WvAC is a modifier to the target's AC, if the WvAC sets the target's AC to 10, the target will suffer no penalty from charging since no penalty is applied to chargers with AC 10.2) DMG 66, “Armor Class of Charging Creatures”. To see that WvAC is a modifier to AC and not a modifier on the to-hit roll, look at the top of the table on PHB 38.

Long explanation of attack order and setting weapons

When a charge brings a charger into melee range (1“), attacks are resolved in order of weapon length only. At this point, before attacks are rolled, creatures who were brought into melee by the charge can, at their option, use one of their attack routines to attack a charger. Counterattacking a charge is NOT a free attack in the same way attacking a disengage-retreating or fleeing enemy is. The creatures who were brought into melee by the charge must have an unused attack routine in order to spend it. Furthermore, they must have a weapon ready – they can't be surprised, casting a spell, stabilizing a 0-HP'd ally, using a wand of conjuration, or similar. Ranged weapons always fire first when being charged into, because the “length” of ranged weapons is always longer than melee weapons. The full RoF of the weapon is allowed vs the charge.3) At our table, we allow the full RoF for these missile weapons for simplicity, though I know some tables only allow one shot every 2 segments, or treat a shot as a full attack routine, and at these tables the shooter may not be able to get their full RoF off before melee is joined.

In the DMG's list of actions, strike blows is G. Set weapon vs charge is F. They are two separate actions. A character attempting F must win initiative vs a charge (E) in order to be set against it. On a tie, the weapon will not be set because charge is E, which resolves before F. Receiving the charge with F procs the special abilities certain weapons have, such as the spear and glaive, as indicated by footnotes on the weapon table. If initiative is lost, the target(s) of the charge can still counterattack as above, at their option. But the weapon's special abilities provided by F will not proc.