[RELEASED] Valiance Admin Mod



  • <strong>Update:</strong> The 06/25/13 patch has rendered this mod inoperable until updated to work with the patch. Update coming within 1 or 2 days.<br /><br />––A few days ago I made <a href=“http://www.chivalrythegame.com/forums/viewtopic.php?f=5&t=14167” target="_blank">this thread</a> as a sort of make-a-wish effort to help the needy and lesser privileged (peasants). Here we are today and lo! I have made your dreams and wishes reality with only a very minimal amount of sacrificial black magic!<br /><br /><strong>Update:</strong> Post all suggestions and feature requests in <a href=“http://www.chivalrythegame.com/forums/viewtopic.php?f=5&t=14167” target="_blank">this thread</a>. My next project is on that thread which will support persistent changes and more advanced server features. These commands are mostly transient and are for more impulsive usage. The server mod will feature the ability to configure most of these as server variables.<br /><br /><img src=“http://i.imgur.com/Z5E0BnG.png” /><span style=“font-size:7px”><strong>Valiance Admin Mod</strong></span><img src=“http://i.imgur.com/Z5E0BnG.png” /><br /><br />––This is a fairly straight forward server mod that gives admins a series of useful chat commands to enhance some people’s experiences and de-enhance others.<br /><br /><span style=“font-size:7px”><strong>Commands List</strong></span><br /><ul><li><strong>!hp</strong> <playername//@> <amount OR 0 to reset> - Set player’s health (persistent between respawns)</li><br /><li><strong>!slay</strong> <playername//@> - end someone’s pathetic life</li><br /><li><strong>!explode</strong> <playername//@> - blow someone to pieces… you lunatic</li><br /><li><strong>!slap</strong> <playername//@> <damage> [force] - Slap someone in the face. It’s all in the wrist</li><br /><li><strong>!ban</strong> <playername> <duration(minutes)/0 for perma> [reason] - Get rid of that douchebag</li><br /><li><strong>!gravity</strong> gravity:def=520 - It’s ok, Newton isn’t looking</li><br /><li><strong>!jump</strong> <playername/@/> <height:def=380/0 to reset> [reason] - Set player’s jump height</li><br /><li><strong>!nextmap</strong> <mapname> - Set the next map</li><br /><li><strong>!roundtime</strong> <time in minutes> - Set the remaining time left in the round</li><br /><li><strong>!spawntime</strong> <time in seconds> - Set the spawn wave interval</li><br /><li><strong>!restartround</strong> <anything> - Restarts the current round without resetting the map</li><br /><li><strong>!say</strong> <…> - Anonymous admin chat</li><br /><li><strong>!refill</strong> <playername//@> - Refill a player’s ammo</li><br /><li><strong>!infiniteammo</strong> <playername//@> [enable:def=true] - Something about too much of a good thing</li><br /><li><strong>!infinitehealth</strong> <playername//@> [enable:def=true] - Do you really want to live forever?</li><br /><li><strong>!infinitestamina</strong> <playername//@> [enable:def=true]- Run forest run!</li><br /><li><strong>!noclip</strong> <playername//@> [enable:def=true] - Fly like an eagle</li><br /><li><strong>!peasant</strong> <playername//@> [enable:def=true] - The only good peasant is a filthy peasant</li><br /><li><strong>!fistsonly</strong> <playername//@> [enable:def=true] - You’re all out of gum</li></ul><br /><span style=“font-size:7px”><strong>Notes</strong></span><br />This syntax <playername/*/@> is a target argument that takes either a single player, * for all players, or @ for yourself.<br /><br />To list all players use “” (blank string) for the player name.<br /><br />All arguments may be surrounded with quotes ("") if needed (ex. for player names with spaces).<br /><br />Right now, when targeting a single player by name or partial name the system will give you a list of players containing those characters you entered, similar to how the votekick works. In future versions I plan to add a command that lets individual admins toggle this feature on/off in case it gets annoying.<br /><br />I also plan to add a !r command that repeats the last command you executed.<br /><br />All actions are broadcasted to all players when executed.<br /><br /><span style=“font-size:7px”><strong>Download/Installation</strong></span><br /><br /><strong>Prerequisites:</strong><br /><ul><li><a href=“http://www.microsoft.com/en-us/download/details.aspx?id=17718” target="_blank">.NET framework 4</a></li><br /><li>Chivalry dedicated server (Steam->Tools->Chivalry Dedicated Server)</li></ul><br /><strong>Instructions:</strong><br /><ol><li>Unzip to the desired installation folder</li><br /><li>Run CMW_ServerMod.exe</li><br /><li>Go through the few simple dialogs to setup</li><br /><li>Use shortcut to launch server</li></ol><br />As with my other release, there is no source code provided as the dll uses my hooking framework that could be used by the forces of evil.<br /><br /><strong>–--------------------------------------------</strong><br />[attachment=0:2fis8wrh]CMW_ValianceAdminMod.rar[/attachment:2fis8wrh]<br /><strong>–--------------------------------------------</strong><br /><br /><span style=“font-size:7px”><strong>Change Log</strong></span><br /><br /><strong>v0.2.1-v0.2.2 Fix</strong><br /><ul><li>Fixed server crash caused by certain commands (Make peasant, slap, ect)</li><br /><li>Fixed confirm command not printing all matching players</li><br /><li>Fixed confirm command entering infinite loop</li><br /><li>Server launcher/injector now supports multiple instances and makes manual configuration of udk directory easier</li></ul><br /><strong>v0.1-v0.2</strong><br /><ul><li>Initial release</li></ul><br /><span style=“font-size:7px”><strong>Known Bugs</strong></span><br /><br /><img src=“http://i.imgur.com/5gSs69F.png” /> - Fixed next release<br /><img src=“http://i.imgur.com/ezyKS13.png” /> - Being worked on/looked at<br /><img src=“http://i.imgur.com/r0gNNLb.png” /> - Not likely to be fixed<br /><strong>–--------------</strong><br /><ul><li><img src=“http://i.imgur.com/r0gNNLb.png” />Jumping with infinite stamina still reduces stamina and halts regen. This is a clientside issue that TB needs to fix and I cannot fix it serverside. I’ve tried a few different methods of ensuring stamina remains full/preventing loss all with the same result.</li><br /><li><img src=“http://i.imgur.com/5gSs69F.png” />Player leaves noclip when swinging and dies a horrible horrible death.</li><br /><li><img src=“http://i.imgur.com/ezyKS13.png” />Respawn time doesn’t work on FFA</li></ul><br />Report bugs you encounter in this thread. On the off-chance your server crashes and you think its my mod, open up windows event viewer and on the left click Windows Logs -> Application and report the error information (not the “Information” bubble). Remember, it helps if you can reproduce the issue.<br /><br /><strong>Virus Total Scans</strong><br /><ul><li><a href=“https://www.virustotal.com/en/file/f486cdc61f8170bb823dc8c6deaba2bfe29f92be6353a7120bff686197e15184/analysis/1371440772/” target="_blank">CMW_Logging_SvrMod.dll</a></li><br /><li><a href=“https://www.virustotal.com/en/file/c1e5f56d97609c65e49c607bb18ae1acf9ec176f09fad23ab47021b16b7b0577/analysis/1371440917/” target="_blank">CMW_SvrMod.dll</a></li><br /><li><a href=“https://www.virustotal.com/en/file/51b386f393639e5f8671f33cf8a7fa9329a986aadc43050f64e368e290041714/analysis/1371440944/” target="_blank">CMW_ServerMod.exe</a></li></ul><br /><br />Anyways enjoy guys, hope this helps. I was thinking about taking requests in this thread but probably better to keep those in my other thread (link at the top).



  • Hey, could you tell how exactly you got this to work on the dedicated server in live?



  • you do put open messages to everyone when an admin changes health or stamina right?



  • @NabsterHax:

    Hey, could you tell how exactly you got this to work on the dedicated server in live?

    It doesn’t use the SDK, it uses a hook written in C++ which modifies the server’s memory.

    @CRUSHED:

    you do put open messages to everyone when an admin changes health or stamina right?

    That’s right.



  • Very cool… but I don’t think I would be able to run this on my rented service. I’ll have to inquire.



  • which is y i run a dedicated, i dnt think u can mod shit on a rented server.

    slight u are the fucking man, and here i was thinking how we were gna always have to respawn at 8 secs, tb needs to hire you brotha, u whipped this thing out so dam fast.

    u are my hero!!!

    –----------------------------------------------------------------------------------------------------------------------

    lets say u type in !peasant so&so
    next where it asks for an interger, do u enter !c0 or !c 0 or what?
    pls explain

    the round time and respawn time worked fine, but after each round its resets.
    is it possible to make it so it stays at what u set it at, rather then having to set it every map?



  • Good job on the mod I will try it out soon :-)

    EDIT
    When i try to launch it crashes at what appears to be the AttemptFindUDKDDir function. Object reference not set to an instance of an object.

    my install is in D:\Steam\Chivalry if that helps any



  • @WARSAW:

    lets say u type in !peasant so&so
    next where it asks for an interger, do u enter !c0 or !c 0 or what?
    pls explain

    You may already know this, but if you type any command without arguments it’ll show help text. This is the help text for that command: “Usage: !c <integer>”. So to answer your question, its “!c 0” to select the person at index 0 on the list.

    @WARSAW:

    the round time and respawn time worked fine, but after each round its resets.
    is it possible to make it so it stays at what u set it at, rather then having to set it every map?

    Yeah that command was mainly for people who wanted to temporarily change the round respawn times but not globally change it.

    My full server mod, which is my next project that should be coming out this week, will have persistent variables that last forever. Things like gravity, respawn time, round times, fist only, ect.

    Also did you resolve that problem you were having with two admins being on at once? I had no issues with it in my tests.

    @[??:

    E1]
    EDIT
    When i try to launch it crashes at what appears to be the AttemptFindUDKDDir function. Object reference not set to an instance of an object.

    my install is in D:\Steam\Chivalry if that helps any

    Could you post the stack trace that appears in the console? Are you sure you have .Net 4 installed?</integer>



  • ! Application: CMW_ServerMod.exe
    ! Framework Version: v4.0.30319
    ! Description: The process was terminated due to an unhandled exception.
    ! Exception Info: System.NullReferenceException
    ! Stack:
    ! at CMW_ServerMod.Program.AttemptFindUDKDir()
    ! at CMW_ServerMod.Program.Main(System.String[])[/spoiler:1nmpavh2]
    !
    ! I just installed .NET Framework 4 for this mod. I’m trying Windows update to patch up .NET framework, will probably report back tomorrow once server is patched.



  • @[??:

    E1]

    ! Application: CMW_ServerMod.exe
    ! Framework Version: v4.0.30319
    ! Description: The process was terminated due to an unhandled exception.
    ! Exception Info: System.NullReferenceException
    ! Stack:
    ! at CMW_ServerMod.Program.AttemptFindUDKDir()
    ! at CMW_ServerMod.Program.Main(System.String[])[/spoiler:1xlmfgnl]
    !
    ! I just installed .NET Framework 4 for this mod. I’m trying Windows update to patch up .NET framework, will probably report back tomorrow once server is patched.
    ! I just posted what I believe should fix this, redownload it when you get a chance.



  • @Slight:

    @[??:

    E1]

    ! Application: CMW_ServerMod.exe
    ! Framework Version: v4.0.30319
    ! Description: The process was terminated due to an unhandled exception.
    ! Exception Info: System.NullReferenceException
    ! Stack:
    ! at CMW_ServerMod.Program.AttemptFindUDKDir()
    ! at CMW_ServerMod.Program.Main(System.String[])[/spoiler:1wongxyk]
    !
    ! I just installed .NET Framework 4 for this mod. I’m trying Windows update to patch up .NET framework, will probably report back tomorrow once server is patched.
    ! I just posted what I believe should fix this, redownload it when you get a chance.
    !
    ! Working! thanks!
    !
    ! EDIT
    !
    ! Ran peasant command on myself and server seemed to crash or kick me out and was unable to join after. Tried restarting server but can’t see it in server browser or join with open command now. Similar to the other poster.



  • @Slight
    i dnt think it was the duel admins,it was the same bug as he described,i think entering the comand is what caused the disconect sumhow

    @[??] E1 »
    if u look for it in the servers section where u find ur friends list tab by clicking on the steam icon on the btm right of ur screen,there is a servers tab also, click that.
    if u host it u, always have access regardless of the buggy browser
    just search lan servers and it should show up, now mind u its just like joining off a buddy on steam, your game has to be closed for it to work.



  • The server is indeed crashing for you so if you can open event viewer and post the crash log that’d help. Seems odd though, I’ll look into this. You guys are running the actual dedicated server from the tools list and not the normal game’s dedicated server right?



  • @Slight:

    The server is indeed crashing for you. Odd though, I’ll look into this. You guys are running the actual dedicated server from the tools list and not the normal game’s dedicated server right?

    I used steamcmd to download the dedicated files. Not sure if there is a difference, I wouldn’t think so.



  • Right I’ve identified the problem as stack corruption with that particular function, hence why it happens randomly and only in my release code as opposed to debug. A very fun problem to fix… I’ll have it fixed within a day or so, for now added to the bug list.



  • Slight, do the settings save for a server or do i have to set respawntime everytime?

    Anyway thanks for the mod slight, we are proud of you



  • Tried to get this working for SimRai clients.
    Sadly it only currently supports a single instance.

    I guess in the future you’ll be able to detect which PID the UDK.exe has?
    I know my clients would love this function and I am more than glad to help them set it up.

    Rai
    -SimRai



  • @Slight
    im running it from the icon the mod put on my desktop
    is that not the right way for the mod to work?

    (later today)
    ok we got it to run but, that same thing crashes the server, comands where u have to do a
    !c 0 is what seems to do it

    <another bug="" found="">
    also found out that when you do a slo motion round the respawn timer change does not work,even though it anounces that it does.
    i was really hoping that it would as we do slo mo rounds about 4 of 13 maps and the respawn time is a killer in them, if this was fixed it would be a dream come true.
    im aware that the normal spawn time is linked to the game speed which is fine, as i will adjust it accordingly.
    8 second spawns @ 60% speed isnt fun lol

    <another bug="" found="">
    if u spell !spawntime wrong it wont let u change it the whole match after misspelling it
    dnt know if its the same for all comands but ill check and edit this if so

    1 more ?
    would it be possible to implement a comand into this for ppl that come in and try and troll my server, admins could type in !sickem <playersname>and all the bots on the server would go after just that person, that would be cool to see them get getting pummeled by my terminator bots, even the regulars on my server said that would be sick if its possible
    i am the only admin on my server so no 1 is going to abuse it, every1 that plays there knows i run a fair/fun server, this would just add to the awesomeness, even if just for 1 kill on him/her thats good enough for me,best case scenario it has an on and off comand

    thanks alot for the awesome effort and hard work u are doing for us and the cmw comunity slight
    i know alot of us were very close to giving up hope on this whole train wreck, i mean ride, lol</playersname></another></another>



  • @Slight:

    Right I’ve identified the problem as stack corruption with that particular function, hence why it happens randomly and only in my release code as opposed to debug. A very fun problem to fix… I’ll have it fixed within a day or so, for now added to the bug list.

    Haha the one command I try is the one that screws up. I will keep playing with the mod tonight, just gave it a go for a few minutes last night. Is avoiding the !peasant command enough to keep it from crashing or is there a subfunction that other commands have as well and should be avoided?

    I’m assuming the HP command lets you assign any amount of health say even 5,000? That would be kinda fun. Could do some improvised game modes with that.

    Also I assume this will not trigger VAC at all as its all installed server side correct?



  • @Slight

    Bugs aside, this is a great day for the community thanks to you. The tool is awesome and covers some of the most essential missing functions of this game. I think Chivalry as a whole will be better off with admins running this software.

    What we really need are a pair of lists to set for banned language. My buddy tries to run his server where you don’t cuss, none of this racist name calling stuff, and the responses from most people are very positive. We would like it if there were two definable lists: one for extreme language resulting in an auto ban and one for lesser offenses (like cussing) resulting in an auto slap. Keep cussing, you kill yourself. It would be very helpful if you could implement this.

    Finally, if you don’t mind sharing, I am a very junior C++ programmer. Could you tell me a little about your methodology? When we were talking about changing timers or MOTD, I was thinking track down the memory address and then use an injector to point some simple code there. I see here you have dlls and several folders of files. Where was I off in my approach or if that is too specific, could you suggest what I should be looking at in terms of materials to learn this type of approach? I definitely was not thinking about multiple file creation or making dlls…

    Even if you do not share your wisdom, thanks for this awesome mod!


Log in to reply