This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Sourcemod for Dota 2?


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
Matheus28
Senior Member
Join Date: Aug 2009
Old 03-04-2013 , 18:20   Re: Sourcemod for Dota 2?
#1

By the way, I assume I'll have to extract everything from the .vpk? Or does the newest srcds.exe looks into the .vpk files too?
Matheus28 is offline
psychonic

BAFFLED
Join Date: May 2008
Old 03-04-2013 , 18:21   Re: Sourcemod for Dota 2?
#2

Quote:
Originally Posted by Matheus28 View Post
By the way, I assume I'll have to extract everything from the .vpk? Or does the newest srcds.exe looks into the .vpk files too?
You do not need to extract files from the vpk pack.
psychonic is offline
Tetl
Member
Join Date: Nov 2009
Old 03-04-2013 , 20:14   Re: Sourcemod for Dota 2?
#3

Tested some things:
Players are able to play together over whatever network (even the INTERNET)!
After ~10 minutes once the match has been decided, SRCDS closes entirely with "Closing after Match"

Last edited by Tetl; 03-04-2013 at 20:17. Reason: clarity
Tetl is offline
Matheus28
Senior Member
Join Date: Aug 2009
Old 03-04-2013 , 21:45   Re: Sourcemod for Dota 2?
#4

Me and Tetl were able to modify files in the vpk, since the server gives priority for files in the .vpk when searching for files. So now you can change heroes abilities using:

Quote:
<whatever>\steamapps\common\dota 2 beta\dota>"../../alien swarm/bin/vpk.exe" -M -v a pak01 scripts/npc/npc_abilities.txt

Last edited by Matheus28; 03-04-2013 at 21:48.
Matheus28 is offline
humbugtheman
Member
Join Date: Jan 2012
Old 03-06-2013 , 12:01   Re: Sourcemod for Dota 2?
#5

Quote:
Originally Posted by Matheus28 View Post
Me and Tetl were able to modify files in the vpk, since the server gives priority for files in the .vpk when searching for files. So now you can change heroes abilities using:
Do you think you could explain this a little further please?
humbugtheman is offline
Tetl
Member
Join Date: Nov 2009
Old 03-06-2013 , 12:21   Re: Sourcemod for Dota 2?
#6

Sure. As a client, you can modify your game's files easily, since Dota 2 itself supports the --override_vpk launch option. This means that if you want to replace the file pak01_dir/scripts/npcs/npc_abilities.txt for listen-server play, you place your own npc_abilities.txt in dota 2 beta/dota/scripts/npcs. With --override_vpk, your file will be chosen instead of the real npc_abilities.txt.

Our SRCDS does not support --override_vpk. GCFScape etc. does not yet support convenient editing of VPKs, so we had to do that using the VPK.EXE utility. This program seems strange when it comes to paths. I found mine in Alien Swarm/bin. I'm not really sure, but it seems if you try to give it a full directory path, it'll add that PATH to the VPK. That may or may not make sense, but hopefully this example is enough:

D:\Program Files\Steam\steamapps\common\dota 2 beta\dota\> "D:\Program Files\Steam\steamapps\common\alien swarm\bin\vpk.exe" -M -v a pak01 scripts\npc\npc_abilities.txt

So, as I understand it, you need to place the files in the directory structure inside Dota 2 which mirrors the internals of your desired location in pak01_dir... AS IF you were using --override_vpk. If not, you'll get stuff like this:
http://dl.dropbox.com/u/234933/0745PCZ.png
Which contain this:
http://dl.dropbox.com/u/234933/0746PCZ.png
Instead of your desired VPK being edited. If -v doesn't echo "...has been updated", you did it wrong.

Last edited by Tetl; 03-06-2013 at 12:22.
Tetl is offline
Terin
Junior Member
Join Date: Mar 2013
Old 03-06-2013 , 13:44   Re: Sourcemod for Dota 2?
#7

Quote:
Originally Posted by Tetl View Post
Sure. As a client, you can modify your game's files easily, since Dota 2 itself supports the --override_vpk launch option. This means that if you want to replace the file pak01_dir/scripts/npcs/npc_abilities.txt for listen-server play, you place your own npc_abilities.txt in dota 2 beta/dota/scripts/npcs. With --override_vpk, your file will be chosen instead of the real npc_abilities.txt.

Our SRCDS does not support --override_vpk. GCFScape etc. does not yet support convenient editing of VPKs, so we had to do that using the VPK.EXE utility. This program seems strange when it comes to paths. I found mine in Alien Swarm/bin. I'm not really sure, but it seems if you try to give it a full directory path, it'll add that PATH to the VPK. That may or may not make sense, but hopefully this example is enough:

D:\Program Files\Steam\steamapps\common\dota 2 beta\dota\> "D:\Program Files\Steam\steamapps\common\alien swarm\bin\vpk.exe" -M -v a pak01 scripts\npc\npc_abilities.txt

So, as I understand it, you need to place the files in the directory structure inside Dota 2 which mirrors the internals of your desired location in pak01_dir... AS IF you were using --override_vpk. If not, you'll get stuff like this:
http://dl.dropbox.com/u/234933/0745PCZ.png
Which contain this:
http://dl.dropbox.com/u/234933/0746PCZ.png
Instead of your desired VPK being edited. If -v doesn't echo "...has been updated", you did it wrong.
An easier method, for me at least, is to just extract all the files from the VPKs for Dota 2, put them in ...\Steam\steamapps\common\dota 2 beta\dota\ directory, and just move the VPK files to a temporary directory. The files you extracted will then be the only files that srcds can see, and it'll obey whatever edits you want to make.

You'd have to move the VPKs back in the Dota folder when there's an update, and possibly re-extract some data, but I think the main things that would be updated, for a server, are the server.dll and the dota.bsp, which don't need to be extracted. I prefer this over having to rip into VPKs and change them.
Terin is offline
AlphaRage
Junior Member
Join Date: Jul 2013
Old 07-10-2013 , 18:42   Re: Sourcemod for Dota 2?
#8

Quote:
Originally Posted by Tetl View Post
Our SRCDS does not support --override_vpk. GCFScape etc. does not yet support convenient editing of VPKs, so we had to do that using the VPK.EXE utility. This program seems strange when it comes to paths. I found mine in Alien Swarm/bin. I'm not really sure, but it seems if you try to give it a full directory path, it'll add that PATH to the VPK. That may or may not make sense, but hopefully this example is enough:

D:\Program Files\Steam\steamapps\common\dota 2 beta\dota\> "D:\Program Files\Steam\steamapps\common\alien swarm\bin\vpk.exe" -M -v a pak01 scripts\npc\npc_abilities.txt
I cannot get this to work. I downloaded the L4D2 Authority Tools where VPK.exe is included. After that I copied VPK.exe and both necessary *.dll files to my dotaserver directory
(...dotaserver\dota). With npc_abilites.txt being in the right directory I made a link to VPK.exe using these paramters:
G:\dotaserver\dota\vpk.exe a pak01 @G:\dotaserver\dota\scripts\npc\npc_abilities .txt
However it will only return "CComandLine::AddArgument: exceeded 256 parameters. Any workaround?

Quote:
Originally Posted by Terin View Post
An easier method, for me at least, is to just extract all the files from the VPKs for Dota 2, put them in ...\Steam\steamapps\common\dota 2 beta\dota\ directory, and just move the VPK files to a temporary directory. The files you extracted will then be the only files that srcds can see, and it'll obey whatever edits you want to make.
This does not work. It gives me tons of various errors when trying to start the server.

Last edited by AlphaRage; 07-10-2013 at 18:44.
AlphaRage is offline
Tetl
Member
Join Date: Nov 2009
Old 07-16-2013 , 14:16   Re: Sourcemod for Dota 2?
#9

Quote:
Originally Posted by AlphaRage View Post
I cannot get this to work. I downloaded the L4D2 Authority Tools where VPK.exe is included. After that I copied VPK.exe and both necessary *.dll files to my dotaserver directory
(...dotaserver\dota). With npc_abilites.txt being in the right directory I made a link to VPK.exe using these paramters:
G:\dotaserver\dota\vpk.exe a pak01 @G:\dotaserver\dota\scripts\npc\npc_abilities .txt
However it will only return "CComandLine::AddArgument: exceeded 256 parameters. Any workaround?



This does not work. It gives me tons of various errors when trying to start the server.
I am not sure if that vpk.exe is going to work, but I think it should. Look closely at the command line args in my quote - I don't bother moving files to the dota folder - I cd to \dotaserver\dota, invoke the vpk.exe from its folder in Alien Swarm, and pass the other args normally.
Tetl is offline
Matheus28
Senior Member
Join Date: Aug 2009
Old 03-05-2013 , 18:04   Re: Sourcemod for Dota 2?
#10

Fun times. The server only crashed once or twice, and it was probably because of the modifications I made to the abilities. Seems really stable.

Last edited by Matheus28; 03-05-2013 at 18:36.
Matheus28 is offline
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:52.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode