Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

queue blocker. slightly unrelated, but need some ideas #7

Open
Geczy opened this issue Jul 13, 2023 · 12 comments
Open

queue blocker. slightly unrelated, but need some ideas #7

Geczy opened this issue Jul 13, 2023 · 12 comments

Comments

@Geczy
Copy link

Geczy commented Jul 13, 2023

do you have discord btw?

i’m looking for a way to hide queue timer for popular streamers to stop stream snipers

i can overlay an image ontop of the queue timer which is what i’m doing now. but through console, can i recognize when the streamer is on the main menu vs on some other page where the queue isn’t showing? is there some key that updates with what page they are currently on? if so, then i can show different images to block the queue timer so it looks more fluid and clean

or, if there’s like a vpk mod i can try to hide some of the queue assets? like changing queue minutes to a large number, or removing the snow or dust particles of queue that show. or changing the color to be transparent of it.

also to mute the queue clicking sound, or music that changes if you queue up, and anything else that may hint to an ongoing queue

what do you think? saw you had some sick vpk mods in the past so thought you’d be the best person to ask

@Geczy Geczy changed the title slightly unrelated, but need some ideas queue blocker. slightly unrelated, but need some ideas Jul 13, 2023
@Geczy
Copy link
Author

Geczy commented Jul 13, 2023

unfortunately just learned that valve denied the queue sound or other graphic alterations to their files "mods" idea when asked a few hours ago. so just knowing which screen they are on at any point would be useful

@AveYo
Copy link
Owner

AveYo commented Jul 13, 2023

Learned that from where?

It would be trivial to add at the end of panorama/styles/play.css to remove timer:

 DOTAPlay.FindingMatch #SearchingTime{

  visibility: collapse;
 }

I do recall some grievances with the stinger (the game found sound)

Btw you can detect these from the recording overlay side, for example with:
https://obsproject.com/forum/resources/pixel-match-switcher.1202/

@Geczy
Copy link
Author

Geczy commented Jul 14, 2023

learned from a contact at valve.

but got it, i would love to add that to play.css . maybe its different than the sound mod i was asking valve about. im going to ask them again about css changes in main menu for streamers

with the obs pixel detector, can we run a console command when a certain pixel is detected and the scene is switched? the best i can come up with is executing an autohotkey script when a scene is switched using an obs command plugin, and then the ahk script would type console shortcut, type a command and hit enter

is there a better way?

@AveYo
Copy link
Owner

AveYo commented Jul 14, 2023

gamestate integration does not expose those non-playing ui stuff - it's biggest oversight
client-side mod would require communicating via a file and is clumsy (like in ShowMMR)
ahk is the least overhead and the most responsive (and a coupling standalone vscript might simplify it)
if you lay out a more specific scenario I can try it out

@Geczy
Copy link
Author

Geczy commented Jul 15, 2023

background

we're hoping to disable the particle drawing during queue finding. that way the smoke / particles are hidden and we can better hide it with a browser overlay and not worry about the animations beneath our overlay. we dont want a HUGE overlay because that hides a lot of the dota ui. more on that below.

this would only be used if valve denies the css change idea you posted. cause modifying css would be most optimal.

prereqs

  1. https://github.com/marklagendijk/obs-scene-execute-command-script/
  2. autohotkey
  3. dotabod obs scenes setting enabled

usage

either script.ahk true or script.ahk false depending on the two different scenes (ingame, or disconnected from game)

how it works

dotabod automatically detects game events (gsi) > scene switch > execute ahk script

this assumes your dota 2 console hotkey is set to tilde `

the script

#NoEnv
SendMode Input

; Retrieve command-line argument
CommandLine := Trim(A_Args)

SetDrawParticles(enable) {
    ; Determine the value to set for r_drawparticles
    if (enable = "true")
        drawParticlesValue := "true"
    else
        drawParticlesValue := "false"
    
    ; Send ` key
    Send ``
    Sleep 50 ; Wait for the keypress to take effect
    
    ; Send command to set r_drawparticles value
    SendInput r_drawparticles %drawParticlesValue%{Enter}
    Sleep 50 ; Wait for the command to be processed
    
    ; Send ` key again
    Send ``
}

; Call the function with the command-line argument
SetDrawParticles(CommandLine)

current overlay

https://www.twitch.tv/videos/1871650040?t=5h11m2s

you can see it blocks a lot of the client as he moves around. but looks blended from the main menu screen. it has to be large to block the particles / smoke of the finding match animations so queue snipers can't see if he is or not

proposed overlay

https://www.youtube.com/watch?v=ITps34RzgN8

with the particles hidden + a finding match image instead of the button in the link above ^. this allows the image to be much smaller so it doesn't block more of the client as he shows graphs of matches and things.

you'll see ahk open the console and type the commands. its necessary to type it after each match, and type it again when you found a match to turn it back on (otherwise it messes with the gameplay graphics like spells cast projectiles etc if you leave it on)

another proposition

to show an empty bottom right corner image, so snipers wont know if he's queueing or not queueing, itll just be blank. same as your css solution setting visibility to false. no mock up for this one yet

questions

  1. can you provide detailed steps to apply the css changes? is it packing vpk files again? how are those modified and repacked exactly? feel free to post a link to some similar mod you've done in the past that does that and i can just follow your methods, rather than to provide details.
  2. is there anything we can do to automatically set the console size to smallest? or set the transparency of the console? the dota client remembers if you resize console to be tiny and the window position as well. im guessing this is stored in some config file on your pc. so maybe the ahk file can change that for streamers to smallest before running any commands

misc

agree about valve gsi missing tons of stuff, i even wrote a list of them some time ago: dotabod/backend#181

hopefully they see this one day 🤞

@AveYo
Copy link
Owner

AveYo commented Jul 15, 2023

console window x|y|width|height can be preset via launch option:
+@console_position_and_size "0|0|800|600"
or without + prefix in autoexec.cfg and console (it does not update without relaunch)

attached mods.zip containing:
1_ShowMMR - mod builder + resources + precompiled release
is this project

2_find_match_particles - mod builder + resources + precompiled release
is passive resource replacement of all ui_find_match_*.vpcf_c embers with empty
should facilitate overlay pixel detection

3_find_match_hide_timer - mod builder + resources + precompiled release
the play.css addition I've mentioned
idk what communication you had with valve, tho I personally think it's overkill

can obviously combine them into a single mod, the builder script I've made is versatile

basically,

  • make a folder for the mod you need to author
  • drop dota_mod_builder.bat script inside
  • add all resources into a dota subfolder, just like the layout in the game
  • run the script, it will generate a release folder with the game/dota_mods/pak01_dir.vpk
    if you are doing multiple mods can prevent override of default pak01_dir.vpk
    by renaming the script, example dota_mod_builder 3.bat to output pak03_dir.vpk
    any resources that need compiling (css, xml, vpcf) require Workshop Tools to be installed
    the final vpk archiving is done by the script via self-compiling vpkmod
    ValveResourceFormat (VRF) is your modding friend - it can browse the game pak01_dir.vpk, preview resources, decompile and export resources

users can use your pre-made release vpk's, don't need to have Workshop Tools installed

to be fair, the goal of preventing stream sniping for colluding / dodging on finding match is ambitious
it would have been stupidly easy with a gamestateintegration support for ui state
with the stuff above at least you can address the timer syncing
but it does not help when match is found and the ui pops up the accept dialog
unless you are using something to auto-accept?

guess I could try making a mod to pass the actual ui state into a cfg file but it would be clumsy
there's one other option, enabling the console log and parsing it for finding match event
let me know if you need a proof-of-concept for that

@Geczy
Copy link
Author

Geczy commented Jul 16, 2023

image

giving this a try, it's looking super good. really appreciate your support with this, you're an immense help with clearly a ton of knowledge about the modding aspects.

thought of another idea. maybe the sidebar can be transparent? when u click find match so that it doesnt show anything, just invisible. the little slide that happens that shows you're opening the queue options. and we would click the invisbile button @ the bottom to start queuing, which then closes the panel. any css exist for that?

or a console way to queue a match? or maybe an ahk script that clicks so fast we wont see the sliding animation

i can parse console log for find match event, is it still just the condebug flag to save it to a file?

but it does not help when match is found and the ui pops up the accept dialog

wait why not? what do stream snipers do when the pop up is shown? they can no longer snipe at that point, unless the streamer is returned to queue if someone doesn't ready up i'm guessing

guess I could try making a mod to pass the actual ui state into a cfg file

like it would pass which screen on the ui they're sitting in? profile, main menu, hero stats page, etc? or what's the purpose of this part, i must be missing something

@AveYo
Copy link
Owner

AveYo commented Jul 16, 2023

So you're saying that the match found popup does not matter much.
Then the little slide when you click find match should not matter much either.
But both are a point of queue syncing for determined assholes.

Could detect searching for match state, and the match found popup.
Probably could auto-accept it too.

How are you interacting with the client game? GSI is one, but are you also automating steam with a custom command-line client?

@Geczy
Copy link
Author

Geczy commented Jul 16, 2023

the slider matters because if snipers see him slide, they'll queue up too. a queue can take 0-3 minutes sometimes, so in that time if the slider is visible at least once, they'll all queue up and potentially match with him.

the popup that says accept match does not matter, because of the reasons i stated earlier. they're unable to join the queue anymore once that popup is shown. unless its declined by someone which rarely happens. so in those rare cases we can ignore the queue syncing for now. auto accepting matches is a bit much i think. even though its doable

i'm interacting with GSI and also the steam dota protobuff just to get his match details. i don't have protobuff on streamers machines or with their credentials, its just my demo dotabod steam account to get extra details like medals and profiles

so we're hearing the go-ahead for the mods! this is great news. just a few questions left to try and perfect this

  1. the queue clicking find match sound (stinger?)
  2. the sliding animation? is that possible to hide? it looks like grayscale and a blur is applied, maybe that's just css? i'm on macos so i can't explore the vpk files right now sadly. any ideas?
  3. i'm hoping to be able to hide the entire slider, except for maybe the bottom button cause the streamer needs to know where to click 😂 . so somehow transparency to the top half of that entire panel or just the whole thing and we can mod a button in there? idk, im raelly good with css so can help here, just need to know what html / css we're working with so i can build something

@AveYo
Copy link
Owner

AveYo commented Jul 17, 2023

The accept match mattered if you wanted to hurt the determined asshole,
not knowing for sure if queue is in sync and accepting the wrong match ;)

That aside,
I have in mind a more dynamic solution
Don't like hard-coding frequently modified files because it would break on dota updates
Will do some tests later today, stay tuned!

@Geczy
Copy link
Author

Geczy commented Jul 17, 2023

not knowing for sure if queue is in sync and accepting the wrong match

ohh yeah, good point 😂 i like that idea actually. ahk to auto accept then? by doing pixel scanning in the middle of the screen, could be possible. something like

#NoEnv
SetBatchLines, -1
CoordMode, Pixel, Screen

Loop
{
    PixelSearch, FoundX, FoundY, 500, 350, 800, 450, 0xFFFFFF, 1, Fast RGB

    if (ErrorLevel = 0)
    {
        MouseClick, left, %FoundX%, %FoundY%
        Sleep 5000  ; Wait for Dota 2 to process the click
    }
    
    Sleep 1000  ; Wait for 1 second before scanning again
}

Will do some tests later today, stay tuned!

pog D: sounds exciting!

also i did just find out that the slider is virtually eliminated by using ahk to double click the find match coordinates super quickly, within 50ms. so assigning it to a hotkey or something to queue up. but a mod would be better cause ahk can definitely fail if streamer forgets or doesnt want a hotkey etc

@deadspyexx
Copy link

Why stats without rank are not displayed in ranked games?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants