Actually, thanks to the new variable definitions in the Plugin version 4.x, you don't even need to modify the plugin code. However, you have to write the rules a bit different: Instead of writing rules, you are writing variable definitions (with conditions), that modify the same variable over and over. And at the end you have one final rule that gives that variable as the shipping cost.
Definition=myship; Value=0
Definition=myship; 1 in Categories; Value=myship+4
Definition=myship; 2 in Categories; Value=myship+12345
Name="Shipping costs summed up"; Shipping=myship
This will add 4€ to the shipping costs if any article from category 1 is in the order and 12345€ if any article from category 2 is in the order.
HOWEVER, it appears that you want 5€ shipping for each article in category 1. Unfortunately, it is currently NOT possible to find out how many articles from a given category are in the order! I'm working on this, but adding a function "value_for_category(Articles, 1)" requires a complete change of how the plugin evaluates the expressions... I cannot give any predictions when I will have a proper solution, so please don't count on the plugin getting that functionality in the near future.
Best regards,
Reinhold