1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  1. KaNe 3

    KaNe 3 Naked Wanderer


    i just finishes my scripts for RoK and trying to make some for 7 days, but stuck at the beginning :D
    which namespace i have to bind with "using" to make the abstract class cl006 available?
    the only that works is the message at "Init()" ;) chat cmd and console cmd also dont work.

    At RoK it was much easier because on this website are a lot of scripts wich helps you to find the correct methods, classes and so on. but there are no scripts for 7 days for noobs like me ;) in rok i have an script like McEdit in minecraft but im not able to run a simple chat command for 7 days ^^

    thx for help
    Code (C):
    using System;
    using System.Collections.Generic;
    using System.Collections;
    using System.Collections.ObjectModel;
    using System.Timers;
    using i_love_codeoManager;
    using Legacy;
    using System.IO;
    using UnityEngine;
    using Oxide.Core;

    namespace Oxide.Plugins
      [Info("Test7", "Oxide Team", 1.0)]
      [Description("This example illustrates how to create a console command.")]
      public class Test7: SevenDaysPlugin
      private void test7hi(string[] args)
      PrintToChat("testing the console cmd!");
           int temp = Convert.ToInt32(args[0]);
         void Init()
           Puts("plugin started!");        

      private void SaveCommand(string command, string[] args)
      PrintToChat("TEsting the Chat cmd!");
         void OnPlayerConnected(EntityPlayer player)
           Puts("Player: " + player.ToString() + "OnPlayerConnected works!");
          public override BlockPlacement.Result OnPlaceBlock(cl0006 _world, BlockValue _blockValue, HitInfoDetails _hitInfo, Vector3 _entityPos)
           BlockPlacement.Result result = new BlockPlacement.Result(_blockValue, _hitInfo);
           switch (_hitInfo.blockFace)
            case BlockFace.North:
             //result.blockValue.rotation = (byte) 0;
            case BlockFace.West:
             //result.blockValue.rotation = (byte) 3;
            case BlockFace.South:
             //result.blockValue.rotation = (byte) 2;
            case BlockFace.East:
             //result.blockValue.rotation = (byte) 1;
             //result.blockValue.rotation = (byte) 4;
           return result;
    here is a little video from our ZKEdit Script for Reign of Kings:

  2. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    I'm not sure about the class you are looking for in 7 Days to Die, but I'd recommend finding a good decompiler such as JustDecompile and taking a look at the deobfuscated Assembly-CSharp.dll that comes with the 7DaysToDie Oxide bundle.
  3. KaNe 3

    KaNe 3 Naked Wanderer

    thx, i tried to find something usefull ;)
    thin i got the correct namespace, its called simply "A" ^^ i try to find sonmething out where are some hooks to "override" oder other classes / functions i need. i simply need to override block placement, so when i place a block ingame, my script does something, set position 1 or 2 or something else like fill between 1 and 2 with material X or load/save file from hdd or finally place this prefab here.

    in our rok script its similar, you enter a command, place a block and the script do what we want ;) here i cant find anything until now. its not as easy as codehatch do it for us.
  4. DeeJayh

    DeeJayh Naked Wanderer

    Sorry to necro this thread, but what he was saying is he's trying to use 3 commands. Let's call these commands fill, position1 and position2. You stand on one block and call position1, then move 5 steps diagonally and call position2, then you call fill and those 25 blocks get filled in with say steel walls, creating a 5x5 steel foundation.

    ^ THIS would be WONDERFUL for 7DTD by the way...
    What he's asking is pretty simple.


    Oxide is a fantastic API all around, but I don't even know where to begin with it. I think to myself "Oh just copy the 7DaysToDieServer_Data folder and done", but then I see a CSharpCompiler.exe, oxide.root.json, etc. What do I do with these files? What's the install process? Where do we put our plugins files? Etc Etc.... So much is missing from the 7DTD version.... Even the download link has reference to documentation that doesn't exist anymore...

    Code (Text):

    @ http://oxidemod.org/downloads/oxide-for-7-days-to-die.813/

    What hooks are currently available?
    See Oxide API for 7 Days to Die

    take you to: http://docs.oxidemod.org/sdtd

    but the docs are actually at http://docs.oxidemod.org/7-days-to-die
    So in short:

    1. How do you do what he's asking above in OP
    2. Where's the installation notes
    3. Where do we save our plugins to use them

  5. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    The Docs link was recently changed, and may not have been updated everywhere yet. The install is pretty straightforward, it is the same setup as the other mods we support which involves extracting the zip, overwriting the existing files, and starting the server as you normally would. The layout of the zip is the layout of your server folder. Plugins go under Data/oxide/plugins.
  6. DeeJayh

    DeeJayh Naked Wanderer

    Excellent, thank you for your speedy reply! So after I install it to the server directory (simple enough) I can just start my server as usual and it's good to go? I dont need to run anything special, exe's, batch files, command line parameters for the server, nothing? I can just run the exe through 7 Days to Die Server manager like I always have and oxide is ready to go?
  7. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Nothing special, just run your server as you normally would.
  8. DeeJayh

    DeeJayh Naked Wanderer

    Amazing, looking forward to getting some things done this week then.

    Final question, in the Data/oxide/plugins folder, can we just use the source files then? For example if I write a plugin in Python I'll have a Script.py in there, or c-sharp Script.cs? Thanks again!
  9. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Yes, they should not be pre-compiled in any way.
  10. {QaD}Lurch

    {QaD}Lurch Naked Wanderer

    That above reply was the single item that had me confused for a few hours looking for answers. C# is not a scripting language and must be compiled into MSIL, so not having this little 'tidbit' mentioned explicitly in the doc had me scratching my head for awhile. Certainly simplifies the entire process - especially for those of us with hosted servers. Going to have to run Telerik's JustDecompileIt against the assembly you speak of tonight. I take it they'd originally dot-fus-cated it? I need to find methods and members for all of the important game-engine classes since there's no intellisense available.
  11. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    IntelliSense is available if you setup a project, I use it daily for all Oxide supported games. 7 Days to Die does obfuscate their DLL, but the one we bundle is deobfuscated. All of Oxide's plugins are drop-in, they are compiled by Oxide if needed during runtime.