Anybody interested, this is what I did, and it works: (for me)
Code:
// Mod - start
// $discount = ($order_total - $gift_vouchers) * $group_discount->fields['group_percentage'] / 100;
$normals = $db->Execute("select sum(p.products_price*b.customers_basket_quantity) as sum from zen_customers_basket b, zen_products p where b.products_id in (select ba.products_id from zen_customers_basket_attributes ba where ba.customers_id='" . (int)$_SESSION['customer_id'] . "' and ba.products_options_id=1 and ba.products_options_value_id=1) and p.products_id=substring_index(b.products_id,':',1);");
$discount = ($normals->fields['sum'] - $gift_vouchers) * $group_discount->fields['group_percentage'] / 100;
// Mod - end
What I wanted, is 10% discount given on products, which have certain attribute name and certain attribute value.
Above hardcoded mod inserted into ot_group_pricing.php and users in discount group, which has that 10% discount gives the desired results.
This effectively disables normal group discount system and may break something else as well ...
But serves the purpose for me