Picked up the game recently and having a fun time, but I am a bit confused on how some of the stats work and don't want to be suddenly caught lacking. For now I have two main questions and would appreciate some clarifications on them or pointers to a reliable guide I could use for reference. For context, I'm currently playing rifle, but may try some melee weapons when I feel I can afford resources to play around with them (considering spear, longsword or naginata).
Question 1: defense and elemental resistances. How do they interact with each other and how far should I be focusing on either?
Question 2: attack, element and dexterity. From what I understand, dexterity is a stat affecting critical hit chance, but if I understand the damage formula correctly, crit chance also scales inversely with attack and element. When do I prioritize dexterity over attack/element? How do physical and elemental damage interact and are there any caveats involved with them depending on weapon class?