dbc17 hacks: fearsome tweak v1.51

My Ama will be the shortest ever;

‘Dutch how did you join Planet C?’

‘Go stick your bollards in bleach and shove ‘em in the sandwichmaker.....’

I think I will call my ama an amfa...
Ask me feck all.....

Back on topic; nice beard Franky me old tangerine.....
 
I'm finding a worrying trend that you can make batsmen score more runs if they just slog. There doesn't seem to be much punishment for going big with the AI. Going to have to force myself to tone AI slogging down before I sim anything proper.

yes, runrateball makes a drastic change. Probably was better to do what spoobir suggested, to set the variable runrateover to a very high value, and let the AI choose what to do.
Tomorrow i will update it. About the batsmen scoring easily, they usually do if they have high skill and confidence. I tried with some average team and i was losing wickets.

@zimrahil i dont like the sound of that

@Dutch definetely makes me look older
 
Last edited:
yes, runrateball makes a drastic change. Probably was better to do what spoobir suggested, to set the variable runrateover to a very high value, and let the AI choose what to do.
Tomorrow i will update it. About the batsmen scoring easily, they usually do if they have high skill and confidence. I tried with some average team and i was losing wickets.

@zimrahil i dont like the sound of that

@Dutch definetely makes me look older


I meant with the shots. I had Bairstow play no conservative shots, only front foot attacking, and he belted 112 not out. Root and Vince didn't get out doing that either. That's a fault with the game not your mod, where the AI going for big shots doesn't result in field changes in test matches, and there is not enough chance to get the AI bowled when they hit out.

I'm starting a proper Ashes playthrough where I don't use such extreme sliders, but a more subtle change.
 
I meant with the shots. I had Bairstow play no conservative shots, only front foot attacking, and he belted 112 not out. Root and Vince didn't get out doing that either. That's a fault with the game not your mod, where the AI going for big shots doesn't result in field changes in test matches, and there is not enough chance to get the AI bowled when they hit out.

I'm starting a proper Ashes playthrough where I don't use such extreme sliders, but a more subtle change.

i noticed that when Kane Williamson (one of the strongest player in the game) has full confidence, he becomes almost impossible for me to dismiss (bowling on pro).
Tried also a game AI vs AI between Scotland and Zimbabwe, where i was controlling the batsmen (Scotland), and it was difficult to score. I was 30-2 after 10 over i think,
with lots of edges, most fun i have had in a long time ^^
Certainly looks that players values are important.
 
updated the Lua Consoles to fix a bug with long lines of code.

Now a cool thing, a Lua script that will allow to set a custom run rate for both the batsmen (they will use their own run rate). It
doesnt require any external mod, you need only to put the code in the console window. I post it just in case someone is interested,
so he can create his own code or even an AI (could be possible soon).

First run this part in the spoiler to initialize it (you dont need to understand this part).

FearsomeTweakCreateEvent=true

Striker1Id= 0-1
Striker2Id= 0-1


function InitStrikers()

gtable=getfenv(_G.import)
gtable=gtable.REGISTERED["ai.reflexservice.reflexblend_action"]
gtable=gtable.dropball.control_helper.id_helper


Striker1Id=gtable.getStrikerId(IdHelperTable)
Striker2Id=gtable.getNonStrikerId(IdHelperTable)

end


gtable=getfenv(_G.import)
gtable=gtable.REGISTERED["ai.batting.striking_ai"]
gtable=gtable.striking_ai_phases

PhaseFunc1=gtable.PhaseFunctions[1]

function temp(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13)

IdHelperTable=arg4

if (FearsomeTweakCreateEvent==true) then

FearsomeTweakCreateEvent=false

InitStrikers()

end



tempret=PhaseFunc1(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13)

return tempret

end

gtable.PhaseFunctions[1]=temp


RunRateOverForThisBatsman=0
RunRateBallForThisBatsman=0

OriginalRunRateOverFunc=native.RunRateCalculator.getDesiredRunsForThisOver
OriginalRunRateBallFunc=native.RunRateCalculator.getDesiredRunRateForThisBall



function CustomRunRateOverFunc()

return RunRateOverForThisBatsman

end

function CustomRunRateBallFunc()

return RunRateBallForThisBatsman

end


gtable=getfenv(_G.import)
gtable=gtable.REGISTERED["ai.batting.striking_ai"]
gtable=gtable.striking_ai_phases.playermentality


CurrentMentalStateFunc=gtable.getCurrentMentalState

function gtable.getCurrentMentalState(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9)

StrikerCreaseId=gtable.getStrikerId(IdHelperTable)

if (StrikerCreaseId==Striker1Id) then

Striker1CustomScript()


end

if (StrikerCreaseId==Striker2Id) then

Striker2CustomScript()

end


tempret=CurrentMentalStateFunc(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9)


native.RunRateCalculator.getDesiredRunsForThisOver=OriginalRunRateOverFunc
native.RunRateCalculator.getDesiredRunRateForThisBall=OriginalRunRateBallFunc

return tempret

end

Then, everytime you want update the run rate, first use this script:
InitStrikers()

now the striker at the crease will be considered Striker1, the other Striker2.
Then create/update these scripts. In this case, striker1 will use a custom run rate
for the over, and the default run rate for the ball. The striker2 will use default run
rate for both (so the only effective change is for striker1 run rate per over).
Hope it's not too complicated.

function Striker1CustomScript()

RunRateOverForThisBatsman=100
RunRateBallForThisBatsman=6

native.RunRateCalculator.getDesiredRunsForThisOver=CustomRunRateOverFunc
native.RunRateCalculator.getDesiredRunRateForThisBall=OriginalRunRateBallFunc
end

function Striker2CustomScript()

RunRateOverForThisBatsman=3
RunRateBallForThisBatsman=0

native.RunRateCalculator.getDesiredRunsForThisOver=OriginalRunRateOverFunc
native.RunRateCalculator.getDesiredRunRateForThisBall=OriginalRunRateBallFunc
end
 
version 0.21 (link in the first post)

started to merge the 2 main mods.

Currently only the AI shot selection and the Lua console work. However you can use it
with the main Fearsome Tweak mod.
Now you can activate/set a custom run rate (for over and ball) for both batsman.
You should use mostly "run rate over" because it is used to calculate the "run rate ball".
Use "run rate ball" only if you want to affect the batsman mentality for the current delivery.

USAGE:
select a batsman (1 or 2), activate the button that you want to use (run rate over and run rate ball or both), insert the run rate values in the 2 fields and press "set run rate".
 
Last edited:
I'm going to have a play with the run rate mod. Right now, try as i might, i cannot make the AI batsmen get 100. It is almost scripted that they nick off at about 70 odd, it's infuriating!

Have just tried the run rate mod and it still seems the value for the over gets stuck as the same for both batsmen.
 
Last edited:
I'm going to have a play with the run rate mod. Right now, try as i might, i cannot make the AI batsmen get 100. It is almost scripted that they nick off at about 70 odd, it's infuriating!

Have just tried the run rate mod and it still seems the value for the over gets stuck as the same for both batsmen.

i will make a video on how to use it, will edit this.

By the way this is an example:
-press "batsman 1"
-select "use custom run rate over"
-deselect "use custom run rate ball" (so it's not used).
-insert the value for "run rate over", for example 4. It means that the batsman will try to get that RR. No need to insert a value for "run rate ball" because is not used.
-press "set run rate"

then press "batsman 2" and do the same (with other settings for RR).

To test it, i suggest to select "use custom run rate ball" for one of the batsman, set "run rate ball" to 6 and press "set run rate".
Now one of the two batsman will try to slog, the other will not be aggressive.
 
i will make a video on how to use it, will edit this.

By the way this is an example:
-press "batsman 1"
-select "use custom run rate over"
-deselect "use custom run rate ball" (so it's not used).
-insert the value for "run rate over", for example 4. It means that the batsman will try to get that RR. No need to insert a value for "run rate ball" because is not used.
-press "set run rate"
Edit
then press "batsman 2" and do the same (with other settings for RR).

To test it, i suggest to select "use custom run rate ball" for one of the batsman, set "run rate ball" to 6 and press "set run rate".
Now one of the two batsman will try to slog, the other will not be aggressive.

Yeah sorry I have followed it to a T and whenever is set a number batsman 1 in the number box carries over to batsman 2. Then click "set run rate" And then I set a different number into 2, click "set run rate", and that number carries across to batsman 1. I don't want to be a hassle so I will await the video :)
 
Last edited:
Yeah sorry I have followed it to a T and whenever is set a number batsman 1 in the number box carries over to batsman 2. Then click "set run rate" And then I set a different number into 2, click "set run rate", and that number carries across to batsman 1. I don't want to be a hassle so I will await the video :)

first batsman has "run rate over" to 1, the second has "run rate ball" to 6. They have all the shots avalaible.
 
first batsman has "run rate over" to 1, the second has "run rate ball" to 6. They have all the shots avalaible.

Well it clearly works then. Is it possible to have both batsmen with differing "run rate per over"?

Sorry if I am being excessively demanding. I also noticed that the stroke editor picks up the identities of the two batsmen immediately. Mine takes a few deliveries to.
 
In terms of being able to tell ai to go for it in limited over final overs this is great! Stupid we have to trick them and it is a mystery why ba cant just code this in but this tool is invaluable
 
Well it clearly works then. Is it possible to have both batsmen with differing "run rate per over"?

Sorry if I am being excessively demanding. I also noticed that the stroke editor picks up the identities of the two batsmen immediately. Mine takes a few deliveries to.

yes you can already do that (press batsman 1, select custom run rate over, press batsman 2, select custom run rate over). Remember to press
the "set value" button after you change the value.
If it looks that is not working, try to activate/deactivate the various option, in case they are stuck for some bugs (like when you reboot your computer).
 
@Langeveldt forgot to say that in the latest update (0.21) the batsmen are identified immediately. Also, the separate run rate
is only for this update (in case you were using the old).
 

Users who are viewing this thread

Top