Use both.
Stick with classes for the weapons and use components to add extra functionality to the classes representing them.
Components are best used as reusable, modular blocks of script one can add/remove to/from any actor (during run-time, too!). This allows you not to cram all potential functionality that weapons may have into a single blueprint.
For example, you could create a Jamming Component; initially no weapon has it but when a gun gets dirty, the component is added to the weapon. Whenever a dirty gun is fired, it checks whether the Jamming Component is present. This component contains logic responsible for handling the jammed scenarios and returns values representing what happens when jamming occurs.
Cleaning the gun (also contained in the component) = destroying the component and freeing the memory it occupied.
This allows you to avoid overhead of including the jamming code in the base class, that is all the guns. It makes maintenance a bit easier further down the line as well.
Depending on the scope of what you’re creating, components are not a must but can be a great tool when generating actors with random or very specific functionality. Think weapons the players modify themselves.
Temporary de/buffs are also a great way to utilise components. Projectiles hitting target can spawn a Bleeding Component which will gradually reduce hit points of any eligible owner and destroy itself once its timer is up. Or even destroy the unlucky owner…
Components are much lighter than actors but have limitations, they cannot house other components - so no static mesh, no timelines…
More info here, a great intro to components and how to use them:
I then stocked the variables inside a
single Structure, most of the time (I
don’t know if it’s efficient
performance wise, but at least it’s
orderly)
Definitely the way to go. You will need the structs to save data anyway and they mesh well with Data Tables.
Also, if you plan to use components, consider looking into Event Dispatchers - it’s a solid communication solution for actors and their components.