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

Captain Mode Game Logic Update. #89

Open
ArcherWayne opened this issue May 28, 2023 · 5 comments
Open

Captain Mode Game Logic Update. #89

ArcherWayne opened this issue May 28, 2023 · 5 comments

Comments

@ArcherWayne
Copy link
Collaborator

The ban/pick in captain mode needs to be updated.

Now there are 7 bans, instead of 5 bans.

@ArcherWayne
Copy link
Collaborator Author

I think there is a problem in the condition of if-elseif-else-end logic in captain mode.

The original script cannot ban or pick any hero.

A preliminary fix is underway.

The debug console information goes too fast and I can't read any thing, is there any way to stop the console information during the strategy phase?

@JoshdanG
Copy link
Collaborator

JoshdanG commented Jun 25, 2023

You can disable various channels if they aren't interesting to you. You can tell which channel a log message is from because it will be in brackets at the beginning E.g. "[Server] Invalid action (42)". Assuming you are looking for your own print messages, they will be on the [VScript] channel, so don't disable that. Anything without a listed channel is on General.

// Important, but we get a lot of errors which could be overwhelming
log_flags Developer +donotecho

// Probably not important
log_flags "HLTV Server" +donotecho
log_flags Particles +donotecho
log_flags GCClient +donotecho
log_flags ResourceSystem +donotecho
log_flags "Entity System" +donotecho
log_flags SteamNetSockets +donotecho
log_flags RenderSystem +donotecho
log_flags SndOperators +donotecho

// Sometimes have useful information, sometimes noise
log_flags General +donotecho
log_flags Server +donotecho

@JoshdanG
Copy link
Collaborator

The other option would be to slow down time.

sv_cheats true
host_timescale 1.0

Set host_timescale < 1 to go slower than realtime. You can also use dota_pause in the console or DebugPause() in the code to completely stop and give yourself a chance to catch up.

@JoshdanG
Copy link
Collaborator

JoshdanG commented Jun 25, 2023

Finally, if it's your own messages that are flooding things, and managing the ebb and flow of the time tides is likewise overwhelming, you may want to throttle printing. One way to do that would be to only print on certain frames. E.g. the code below will only print messages when the frame is exactly at the second and exactly 0.5 seconds afterward. There are 30 logic frames per game second, and they are properly aligned with seconds (i.e. they don't drift). The code below probably has some rounding issues for different numbers.

function utilityModule.SecondsPrint(message)
	local fps = 2
	if (DotaTime()*fps) == math.floor(DotaTime()*fps) then
		print(message)
	end
end

@ArcherWayne
Copy link
Collaborator Author

thanks alot, that helps!

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

When branches are created from issues, their pull requests are automatically linked.

2 participants