I'm using Delphi, Firebird and Zeos to create my first game. I've got a query that I have posted below, but the one thing I would like to change (if there is any possibility and without too complex and long code) is to increase the chances of a certain result appearing in the Order by Rand().
At the moment I am using S.Nation = ''Sweden'', but what I would like is for the Order by Rand() to pick Sweden say 70% of the times and pick other nations (ie removing the S.Nation) the remaining 30%. (approx).
Also, the nation will not always be Sweden (in the end it will be determined by what nation is declared in player_nation.caption).
Any ideas, or if its even possible?
Spelare.sql.add('select First 1 S.*, L.* from Lag L join Spelare S on L.Klubb = S.Klubb');
Spelare.Sql.add('where S.Off+S.Def+S.Potential > 20 and S.Off+S.Def+S.Potential < 25 and');
Spelare.SQL.add('S.Nation = ''Sweden'' and S.Alder < 21 and NOT L.Division = ''NHL''');
spelare.sql.add('ORDER BY rand()');