Raised This Month: $51 Target: $400
 12% 

Sourcemod for Dota 2?


Post New Thread Closed Thread   
 
Thread Tools Display Modes
humbugtheman
Member
Join Date: Jan 2012
Old 03-06-2013 , 12:01   Re: Sourcemod for Dota 2?
#31

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?
#32

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?
#33

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
Regis
Member
Join Date: Sep 2009
Old 03-06-2013 , 15:08   Re: Sourcemod for Dota 2?
#34

Anyone know how to enable cheats on the dedicated server? I mean the way the lobby does as sv_cheats doesn't actually allow commands like -lvlup, gold or -wtf to work.
Regis is offline
Matheus28
Senior Member
Join Date: Aug 2009
Old 03-06-2013 , 16:08   Re: Sourcemod for Dota 2?
#35

Quote:
Originally Posted by Regis View Post
Anyone know how to enable cheats on the dedicated server? I mean the way the lobby does as sv_cheats doesn't actually allow commands like -lvlup, gold or -wtf to work.
See post #6: http://dev.dota2.com/showthread.php?t=20397
Matheus28 is offline
humbugtheman
Member
Join Date: Jan 2012
Old 03-06-2013 , 17:41   Re: Sourcemod for Dota 2?
#36

@Terin and @Tetl, thank you both for your answers, it's good to know both of those ways.
humbugtheman is offline
psychonic

BAFFLED
Join Date: May 2008
Old 03-06-2013 , 22:58   Re: Sourcemod for Dota 2?
#37

Datamap dump.
Attached Files
File Type: zip datamaps.zip (138.3 KB, 351 views)
psychonic is offline
ash47
Junior Member
Join Date: Aug 2009
Old 03-07-2013 , 00:15   Re: Sourcemod for Dota 2?
#38

Is there any way to get bots to work on a dedicated server? I managed to get them to spawn, and they buy items, aside from that, they just idle, sometimes the enemies come out and play if I go inside their base area as well...

Amazing work here btw, very greatful!
ash47 is offline
Regis
Member
Join Date: Sep 2009
Old 03-07-2013 , 02:18   Re: Sourcemod for Dota 2?
#39

Quote:
Originally Posted by ash47 View Post
Is there any way to get bots to work on a dedicated server? I managed to get them to spawn, and they buy items, aside from that, they just idle, sometimes the enemies come out and play if I go inside their base area as well...

Amazing work here btw, very greatful!
Have everyone join a team and then do dota_bot_populate on the server console and it'll spawn functioning bots. If you do it too late into the game the bots don't do anything, it has to be around 30 seconds after creeps spawn at the latest.

Also big thing I figured out is you can't modify the skillsets of heroes the bots are coded to be able to use, even if you set botimplemented to 0 in their script file. For some reason if you have one of those heroes modded they'll crash the game every time the bots are spawned. I learned this after I kept crashing after modding death prophet then again after modding skeleton king and earthshaker. As soon as I copy/pasted their skillsets to tusk and centaur instead they worked fine.
Regis is offline
Supersuper2
Member
Join Date: Jan 2010
Old 03-07-2013 , 09:35   Re: Sourcemod for Dota 2?
#40

Can you help me to launch it in main client?
I downloaded latest fix, that psychonic has been uploaded here.

Everything works fine on dota 2 test client.
I copied all files to main client, like addons and cfg folder, server.bat and srcds.exe.

Server is loading, but it seems, that problem in the map or something else. Here is the screenshot of errors attached to this message. I do not understand what is wrong.
Attached Thumbnails
Click image for larger version

Name:	error.jpg
Views:	779
Size:	60.6 KB
ID:	116744  

Last edited by Supersuper2; 03-07-2013 at 09:35.
Supersuper2 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 19:22.


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