The art of modelling player behaviour (rapid fire example)

Titan Two general support. Questions, firmware update, feature request.

The art of modelling player behaviour (rapid fire example)

Postby pablosscripts » Sat May 26, 2018 5:56 pm

Since we don't have a feedback loop to work with (well, we do via detecting rumble, but that's not always available), as script writers we need to try our best to model natural player behaviour. I wanted to share with you some examples of how this can be achieved.

Example 1: Rapid Fire in Rainbow Six Siege

Scenario - you are using your pistol with rapid fire enabled. The round ends. Most script writers will toggle rapid fire on and off via the swap weapon button, but because the round has ended, the player forgets to manually switch off rapid fire. In the next round, you have rapid fire turned on but your primary weapon is a full automatic weapon. You know where this is headed - you end up in a fire fight, you're caught with your pants down, and more likely than not you're going to lose.

So I got to work studying player behaviour and how to preempt this as much as possible. How?

1) Firstly I display quite prominently whether you're in Primary Mode (denoted by a P on the LCD display), or Secondary Mode (denoted by an S). But when you're in the moment, it can be easy to miss if you're not regularly looking down at your Titan Two...so I needed more.

2) After 40 seconds of inactivity the LCD screen will start blinking wildly. I chose 40 seconds because this is how long it takes on average between one round ending and the next one starting. During this time, the only button that will disable this blinking notification is R2. Why did I choose this button? Because it is not used between rounds. As you're choosing your operator, customising your loadout...this button is never used, so you're prevented from inadvertently disabling the notification.

3) As mentioned, once the round starts - 40 seconds later - R2 will disable this notification. Why? Because this is the shoot button. The assumption here is that if you shoot your gun you will realise what mode you're in, at which point you are able to decide whether to leave rapid fire enabled or not. Even if you have missed the "S" on the LCD display it should be quite obvious to you that something is wrong.

4) For the next 45 seconds you are able to disable this notification using X as well (or A on Xbox), because at this point the game has definitely started. But if it isn't disabled via X or shooting (R2), then the script assumes you have accidentally enabled rapid fire and then it disables it automatically. Why did I choose 45 seconds? Because this is precisely how long the prep phase is!

By modelling the way players interact with the game, this predictive logic is designed to anticipate player mistakes and correct them before they find themselves in trouble!

Example 2: For Honor

In For Honor, I had some logic that only applied in game, and was interfering with menu navigation. Again, I studied how players interacted with the menu and I solved it - I found that players would only ever use the left stick in the menu, OR the right stick...never both at once. However when the player exited out of the menu and back into the game, they were almost certainly going to use both sticks at once. So I programmed it so that when you move BOTH the right and left stick simultaneously, it would deactivate this particular bit of code. Perfect. I used a similar technique in my GTA V script to prevent Easy Sprint from interfering with the menus.

Example 3: Another Rapid Fire Example in Rainbow Six Siege

I designed it so rapid fire would be disabled automatically if the shoot button was tapped twice in quick succession. When players panic after realising they're in the wrong mode, they begin frantically mashing the shoot button. Again, I was putting myself in the mind of a player - what would he or she do in this situation? What would I do? And thus I designed it to match this behaviour.


When I design my scripts I always try my best to model realistic player behaviour to make them as intuitive as possible, as the above examples demonstrate. Hopefully these techniques / examples will help you in designing your scripts.
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR

My R6 script: https://youtu.be/x-9NtxyySVM
User avatar
pablosscripts
Brigadier General
Brigadier General
 
Posts: 1976
Joined: Tue Nov 24, 2015 6:27 am

Re: The art of modelling player behaviour (rapid fire exampl

Postby bonefisher » Sat May 26, 2018 6:49 pm

Code: Select all
 
if(is_active(BUTTON_14) && time_release(BUTTON_14) <= 300) {
    if(is_active(BUTTON_14) && time_active(BUTTON_14) <= 300)set_val(BUTTON_14, 0.0);
    if(rapid == 0) {
        rapid = 1;
        display (1);
        ffb_set(FFB_1, 100.0, 500);
        ColorLED('R');
    }else if(rapid == 1) {
        rapid = 0;
        display (0);
        ffb_set(FFB_1, 100.0, 250);
        ColorLED('B');
    }
    }
 

Here this is what I'm using in COD and Battlefield now for personnel script. When switching you can run what ever after getting use to it. Go back and fourth between automatic to rapid fire by double tap and second tap don't show up so it don't switch back. If using automatics just switch by single tap or if semi-autos after making rapid on. :smile0517:
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: The art of modelling player behaviour (rapid fire exampl

Postby J2Kbr » Tue May 29, 2018 12:23 pm

Very interesting and elucidating reading here. When the script have weapon tracking there are many situations where the script can get out of sync with the game, very nice read about the solutions you found for this. :)
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: The art of modelling player behaviour (rapid fire exampl

Postby pablosscripts » Wed May 30, 2018 3:18 pm

Thanks:)

The one I'm most proud of is For Honor. It's actually an idea that is applicable to many games, because very few games require you to use both sticks in the game menu, so it's a great way to tell whether a player is in a menu or not.
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR

My R6 script: https://youtu.be/x-9NtxyySVM
User avatar
pablosscripts
Brigadier General
Brigadier General
 
Posts: 1976
Joined: Tue Nov 24, 2015 6:27 am


Return to Titan Two Device

Who is online

Users browsing this forum: No registered users and 102 guests