**
When optimizing a character, it is key to identify what you will be spending most of your time doing.
**
In this case, it seems like you want to make a melee character who fights in melee. The problem is, as a Magus, you will be combining spell use with melee attacks, and relying on spells to do your damage or to attach Saving Throw based effects. However, your melee attacks still need to hit to apply these spells. So we need to optimize two things - your to hit and your spell effects.
Why not rely more on melee damage? As a non-Fighter and non-Barbarian and non-Rogue, your melee damage is low. You can't easily use PA to increase your damage as your to-hit is key. Ergo, relying on pure melee damage is a bad idea with this build.
To-Hit
To Hit is made of three parts -
- Stat added to to-hit
- spell bonuses and gear bonuses to hit
- feat bonuses to hit
Spell and gear bonuses are simple - you select spells (such as Haste and Cat's Grace) that give you bonuses to hit and try to have them cast before combat goes up. Additionally, you buy or steal or barter or trade or select items (gloves of dexterity, magical swords, banners, duelist's gauntlets, sashes etc) that increase your to-hit. It's usually fairly binary, and choices between say, a great save or die to apply via sword hits or a spell that increases the chance of hitting, can be decided upon by comparing the great spell to your pre-existing spells, thinking about how often you hit currently, etc.
Stat added to hit is also fairly simple. You want more of the stat that adds itself to your to-hit, within reason, again, by comparing it to other things you might get with the same money.
Feat bonuses are slightly more complex, as some feat chains offer debuffs which can affect to-hit, and computing the result is non-trivial. However, as you aren't a Fighter, you can't afford enough feats to make the Improved Trip line worthwhile (Expertise, Trip 1, Trip 2, Fury's Fall), as you aren't a rogue the Shatter Defenses line isn't worth it, and most of the others aren't great shakes. Weapon Focus is an okay choice as it pays off immediately, doesn't require anything else, and is easy to use with your weapon choice of 'always scimitars'. The Two-Weapon Fighting chain is mandatory. That leaves you with very few feats, so the only real 'bang for buck' feat choice is Dazing Assault. Daze is a great status effect and worth applying.
Spell Effects
Here we start to run into problems. In the proposed build, you have 4 lost caster levels. In a partial casting class like the Magus, that's effectively suicide. Unless there are some vastly powerful low level spells in the Magus list that you are going to be able to rely on, and you're taking the levels in those classes later - which there is no sign that you are, as they appear to be low level dex and BAB boosting classes.
Unless you are going to dual-wield scimitars and take power attack/twf chain etc, I recommend you only take one level instead of four. Taking a second level later might be workable, but 4 levels of delayed casting as a Magus will suck.
If you have 3.5e backwards compatibility, things like the Abjurant Champion prestige class might help you out in getting a better BAB while maintaining your casting progression (although you still lose out on arcane pool and arcana - the only worthwhile things about advancing pure magus).
Now, as for advancing your spell effects, we have two main things to worry about - save DC and damage.
Save DC is increased by int and various feats, none of them amazingly good. Spell Specialization is a good choice, as is spell Focus in a school you have multiple good options in (like Conjuration or Transmutation).
Damage is increased by CL and metamagic feats. The Gifted Adept and Metamagic Master traits are key to increasing the power of a spell you'll use a lot, such as Shocking Grasp. Otherwise Spell Focus, Mage's Tattoo (Varisian Tattoo), Spell Specialization, can all increase your CL. At lower levels, an Empowered Shocking Grasp for 5d6 x 1.5 damage is crazy at level 4 or whatever. At higher levels, an Intensified Empowered Shocking Grasp out of a 2nd level spell slot for 10d6 x 1.5 damage is great in addition to a full attack.
Taking a level in Crossblooded Sorcerer (Draconic/Orc, or anything else that boosts damage) can greatly increase the damage of touch spells you use also.
Once you have all that handled, damage, status effects, how you are applying them, then you can think about ratios of int to dex.
And in this case, mathematically speaking, you want 2 more points of Int than Dex at any one time, but both are important.
You can say you're a duelist without being a duelist
It's entirely possible that it's the idea of a duelist that's appealing not the what the prestige class duelist actually does. You might be imagining Captain Blood, Robin Hood, or the Dread Pirate Roberts (or Prince Humperdinck who's probably actually a ranger).1 Maybe the character you're imagining when fighting leaps around the battlefield, quipping and stabbing, and when not fighting scouts, tracks, and investigates like a boss.
That's laudable, and that can be pursued as a ranger without any need for the duelist prestige class. The character's ability scores even support that. Most characters don't take the feats Power Attack (with its Str 13 prerequisite) and Weapon Finesse. This character can, and the feat Power Attack will make your damage competitive (although you probably won't hit very often). Add to that things like the typical ranger benefits of bigger favored enemy and terrain bonuses, appropriate magic weapons, wands of ranger spells, and the feat Boon Companion to get your bird up to par, and you can have a perfectly serviceable guy-who-calls-himself-a-duelist without looking at the duelist class at all. Most rangers aren't toting a Charisma of 16, and duelist does nothing with that, but a ranger can. You can play this character for fun, worrying about things like optimizing your damage per round or whatever when you've a better feel for the game.
But it's possible there's something about the duelist prestige class that you must have. If that's a thing:
Going from ranger to duelist is unpleasant...
The prestige class duelist has as requirements a base attack bonus of +6, 2 ranks in each of the skills Acrobatics and Perform, and the feats Dodge, Mobility, and Weapon Finesse. Only the ranger's base attack bonus encourages him to enter duelist; literally everything else discourages a ranger taking levels in duelist: the skills aren't ranger class skills and the feats aren't available as ranger bonus feats.2,3
This is especially true of the character described above. The feat Weapon Finesse, while a requirement for duelist, gets the character but a +1 bonus on attack rolls, enabling the use of his Dex 15 instead of his Str 13 but thereafter vastly limiting the character's weapon choices. The combat style two-weapon fighting doesn't mesh with the duelist class feature precise strike, which mandates the duelist not attack with a weapon in his off-hand.4 Further, The character's precise strike damage is limited by his Intelligence score. A ranger even gets medium armor proficiency and shield proficiency while duelist mandates he use neither medium armor nor a shield to get the benefit of the class feature canny defense.
This doesn't mean this character can't go duelist, but it does mean a ranger like this just isn't that good at being what the game imagines the duelist represents.
Also, be aware that you'll never see the best abilities the duelist gets if the campaign ends at level 12.5
...But you can make it work if you must
If duelist is important, there's nothing the character can do to enter before character level 7. There's just no way to increase base attack bonus faster. At level 3 take the feat Dodge and at level 5 Mobility. Stay ranger through those levels, at level 4 taking the companion hunter's bond rather than the animal companion (the companion bond is terrible but the animal companion is worse after multiclassing even with the feat Boon Companion), at level 5 getting a 2nd favored enemy, and at level 6 probably reluctantly taking the two-weapon fighting combat style bonus feat Two-weapon Fighting. At level 7 take the feat Power Attack; it'll make your damage-per-round competitive.6
After that, get a keen rapier as soon as you can and start crit fishing—i.e. bombarding your foe with a series of small attacks in hopes of critical hits that will often burden him with status conditions instead of killing him outright. Take at level 9 the feat Critical Focus, at level 11 Destroy Identity if you can, at level 13 the feat Amateur Swashbuckler and add to your weapon the weapon special ability skewering, and at level 15 Blinding Critical because Pathfinder makes getting alternate senses like blindsight or tremorsense difficult, and protecting oneself from getting one's eyes gouged out is really hard to do.
Alternatively, take at level 9 the feat Improved Critical, at level 11 Critical Focus, at level 13 Destroy Identity if you can, and at level 15 Blinding Critical. Confirm critical hits against evil creatures automatically using lots of oil of bless weapon (1st-level spell at caster level 2) (100 gp; 0 lbs.), skipping the keen, skewering rapier.7
Either way, you're essentially playing to the duelist's 10th-level class feature crippling critical, which this character may not even see and which goes unsupported by the rest of the prestige class unless counting the abilities combat reflexes (not the feat but the feat's benefits—sigh), parry, and riposte which, when combined, sometimes maybe lets you protect an ally while simultaneously stabbing a foe when it's not your turn... by skipping some of your attacks.
Finally, note that this is not flashy. Almost any character with a good base attack bonus could go this route. The warrior NPC class does this as well as this ranger. The reason the sample duelists start as fighters and rogues is that those classes have archetypes and class features that support becoming duelists. The fighter and rogue foundation is just firmer than the ranger one.
It's not too late to do something else
I really believe a player shouldn't be stuck with a disappointing character. I don't think games should tell players that it's okay for a character to suck now and be awesome later when another character gets to be awesome now and later. Given how frequently games collapse, dissolve, and implode, playing a character who's no fun to play because he can't contribute mechanically shouldn't even be an option, and all too frequently it is.8
Thus the best option would be to start over and pick things that will enable your character to do what you wanted your character to do in the first place. Honestly, the character's race, class, ability scores, and feats have very little synergy—you can try to hit hard, but you'll never hit as hard or as often as those folks whose jobs are to hit hard and often, even if (maybe especially if) your next feat is Power Attack. If hitting hard was your goal—if that's how you expected to have fun in this campaign with this character—that's probably just not going to happen.
Despite that, this character can still be entertaining and interesting in different ways. Below are two.
- Focus on the skill Diplomacy. At level 3 take the feat Additional Traits. Use one to get the Diplomacy skill as a class skill (I like the trait Extremely Fashionable.) Use the other trait for something awesome like Anatomist (the bonus isn't great but it works with advice above), Finding Haleen, Reactionary, or Second Chance. Also ask the DM if the character can change Skill Focus (Survival) to Skill Focus (Diplomacy), maybe by using the rules for retraining. This puts the character's high Charisma score to good use. The Diplomacy skill makes some GMs angry, though, because the character befriends creatures he's supposed to be killing.
- Focus on the special ability wild empathy. Pathfinder made the special ability wild empathy interesting... if a character's willing to invest in it. At level 3 the character can take the feat Fast Empathy, cutting the time to use wild empathy from 1 min. to 1 standard action. The feats Greater Wild Empathy and Vermin Heart (or a scarab of Khepri (Pyramid of the Sky Pharaoh 61) (7,800 gp; 0 lbs.)) expand the kinds of creatures wild empathy can affect. Then, when able, get a circlet of persuasion (4,500 gp; 0 lbs.). While not useful all the time, when wild empathy is useful, the character will likely win the day.
Seriously, though, my real recommendation is to have fun in this campaign. You can't really do the hobby wrong. Experiment and take risks. Worry about wacky and weird optimization stuff in the next campaign, keeping track of errors, omissions, house rules, likes, and dislikes during this one.
1 According to Buttercup, Humperdinck can track a falcon on a cloudy day. I'm not entirely sure how anyone does that, but that's badass.
2 The ranger combat style faithful (Inner Sea Combat 11) for the deities
Besmara, Calistria, Cayden Cailean, Desna, Norgorber, and Zon-Kuthon permit as a bonus feat the feat Weapon Finesse; the deity Sarenrae permits as a bonus feat the feat Mobility. None permit both, and none permit the feat Dodge.
3 The class does nothing with the Perform skill. The character can put 2 ranks into Perform (keyboard instruments) or Perform (percussion instruments) to meet the requirement. When I think duelist, I think Elton John and Phil Collins.
4 It is the subject some debate whether one can still attack with a weapon that doesn't occupy the off-hand (e.g. spiked armor, unarmed strike). This is something about which you should ask the GM.
5 Whether the duelist's best abilities are also good abilities is another topic entirely.
6 While D&D 3.5 prohibited the feat Power Attack from being used with light weapons, Pathfinder doesn't. Even in Pathfinder, though, an off-hand weapon still doesn't reap the full benefits of the feat Power Attack.
7 Using oil of bless weapon in such a way means not adding to one's weapon any effects that trigger on a critical hit: "In addition, all critical hit rolls against evil foes are automatically successful, so every threat is a critical hit. This last effect does not apply to any weapon that already has a magical effect related to critical hits...."
8 Read that carefully. A character can totally be fun to play even if he only contributes narratively, and a character can be absolutely no fun to play while contributing massively mechanically. However, a character is often most fun to play when he can contribute both ways.
Best Answer
Dipping 3 levels into Warlock, a Sorcerer can get Shillelagh via Pact of the Tome. Because it's acquired via a Warlock feature, Shillelagh will use Charisma instead of Wisdom for attack and damage.
With 20 Cha, your reaction (melee weapon) attack will be as good as any class except Rogue (unless I'm missing something).
Warlock will provide other sweet Cha-casting advantages, thereby having more overall synergy (though less damage output than Rogue in this specific department).