For this he was nominated by Louis IV the Bavarian to become duke of Lucca .
After they won , Castracani was named `` Duke of Lucca '' by Louis IV the Bavarian .