I hope someone on here can give me a detailed and simple breakdown on how to do the changed Im trying to make...
There is no simple answer, because this isn't a simple issue.
You can very easily add a ranged attack to a unit; just add entries in the <RangedCombat> and <Range> fields. Voila, your melee unit has a ranged attack. However, this leads to lots of other issues:
1> You'd also have to add UNITAI_RANGED to the list of AITypes for that unit, and you'd have to decide whether the unit should primarily use its ranged attack or use its melee. It's not difficult, but you'd need to make this decision intelligently since it's how the AI would decide which attack to use first. For instance, if a unit is melee strength 10 and ranged strength 2 then obviously the melee AI should still be the dominant one, but if they're both 10, then it'd be stupid to use the melee attack the most often, and you'd need to make sure the Ranged AI is the default.
1a> You'd probably also want to adjust the Flavor values for the unit to make the AI value it more for ranged warfare, but that's not really critical.
2> A human player would have a hard time using the unit. If a unit has a ranged attack then the default right-click action is to use that ranged attack, even if the melee attack is much stronger. You CAN force a melee attack using the Attack command icon on the left-hand side, though. My own mods include several units with both melee and ranged attacks, and it works okay once you get used to the interface, but it's hard for new folks. It's especially problematic if you consider issue #1; if several units have both melee and ranged attacks, and some are intended to prefer melee and some ranged, then the player has to constantly decide which is better for the unit he's using.
3> The unit would have no animation for a ranged attack. This isn't just an aesthetics issue; when units try to use missing animations, it either ends the combat instantly (which is somewhat handy if you don't like watching long animations), or occasionally causes the game to crash. A lot of this depends on other circumstances; adding a ranged attack to a Warrior would just finish the combat instantly. Adding a ranged attack to a Carrier, however, would crash the game if it tried to attack while it was carrying planes.
4> This wouldn't change the actual Combat Class of the unit, despite the name of this thread. Your Warrior would still be a Melee unit, even if it has a ranged attack, and so would have access to only those promotions available to Melee units (which does NOT include the Accuracy or Barrage promotions, or any of the ranged-specific promotions that depend on them). The Shock and Drill promotions available to Melee units do not boost ranged attacks... unless you're using my own mods, where I merged these promotion lines to allow for units with both attack types. (Merging these two is NOT a simple process, at all. I do not recommend it if you're not an experienced modder.)
To change a unit's combat class, you'd just need to do an Update on the CombatClass field, but that causes all sorts of other issues. For instance, all animations are tied to both unit and combat class, so using a Warrior graphic on a unit in UNITCOMBAT_ARCHER would cause all animations to stop working. See #3 for why that's a problem. And, of course, you'd get all sorts of issues with promotion types or abilities that key off of combat class (like a policy that boosts production of Melee units).