Important Pluton for Experimental Branch

Discussion in 'News & Announcements' started by mikec, Jul 29, 2014.

By mikec on Jul 29, 2014 at 12:44 AM
  1. mikec

    mikec Master Of All That I Survey Administrator

    Jul 12, 2014
    Likes Received:
    Code (C#):

    On_Chat(Chat msg)
    On_ClientAuth(AuthEvent ae)
    On_Command(Command c)
    On_CorpseDropped(CorpseInitEvent cie)
    On_CorpseAttacked(CorpseHurtEvent che)
    On_BuildingComplete(BuildingPart bp)
    On_BuildingUpdate(BuildingEvent be)
    On_BuildingPartAttacked(BuildingHurtEvent bhe)
    On_BuildingPartDestroyed(BuildingHurtEvent bhe)
    On_FrameDeployed(BuildingPart bp)
    On_NPCAttacked(NPCHurtEvent nhe)
    On_NPCKilled(NPCDeathEvent nde)
    On_LootingEntity(EntityLootEvent ele)
    On_LootingPlayer(PlayerLootEvent ple)
    On_LootingItem(ItemLootEvent ile)
    On_PlayerConnected(Player p)
    On_PlayerDisconnected(Player p)
    On_PlayerGathering(GatherEvent ge)
    On_PlayerAttacked(PlayerHurtEvent phe)
    On_PlayerDied(PlayerDeathEvent pde)
    On_PlayerTakeDamage(PlayerTakeDmgEvent ptd)
    On_PlayerTakeRadiation(PlayerTakeRadsEvent ptr)
    Code (C#):

    Pluton.BuildingPart(BuildingBlock bb)
        .FindSocket(string name):Construction.Socket
        .X .Y .Z :float

    Pluton.Chat(Pluton.Player player, ConsoleSystem.Arg args)

    Pluton.Command(Pluton.Player player, string[] args)
        .GetQuotedStringArr(string[] sArr):string[]

    Pluton.Entity(BaseEntity entity)
        .X .Y .Z :float

    Pluton.Inv(PlayerInventory inv)
        .Add(Pluton.InvItem item):bool
        .Add(Pluton.InvItem item, ItemContainer con):bool
        .Add(int itemID):bool
        .Add(int itemID, int amoun):bool

    Pluton.InvItem(string Name, int Amount) (string Name) (Item item)
        .CanStack(Pluton.InvItem item):bool
        .Drop(Vector3 position, Vector3 offset):void
        .GetContainerPreference(string category):enum
        .GetItemID(string itemName):int
        .Instantiate(Vector3 position):Pluton.Entity
        .Instantiate(Vector3 position, Quaternion rotation):Pluton.Entity

    Pluton.LoadOut(string Name)
        .Add(Pluton.InvItem item):bool
        .Add(Pluton.LoadOutItem item):bool
        .Remove(int Item):bool
        .ToInv(Pluton.Inv inv):void
        .items:Dictionary<int, Pluton.LoadOutItem>

    Pluton.LoadOutItem(string Name) (string Name, int Amount)

    Pluton.NPC(BaseAnimal animal)
        .X .Y .Z :float

    Pluton.OfflinePlayer(Pluton.Player player) // you shouldn't ever call this constructor manually
        .Get(ulong steamid):Plutom.OfflinePlayer
        .Get(string steamid):Pluton.OfflinePlayer
        .X .Y .Z :float

    Pluton.Player(BasePlayer player)
        .Find(string nameOrsteamidOrip):Pluton.Player
        .FindByGameID(ulong steamid):Pluton.Player
        .FindBySteamID(string steamid):Pluton.Player
        .Ban(string reason*):void
        .Kick(string reason*):void
        .Reject(string reason*):void
        .MakeNone(string reason*):void
        .MakeModerator(string reason*):void
        .MakeOwner(string reason*):void
        .Message(string msg):void
        .MessageFrom(string nameFrom, string msg).void
        .X .Y .Z :float

    Pluton.PlayerStats(string steamid)
        .Kills            |
        .Deaths            |
        .PlayerKills    |
        .PlayerDeaths    |
        .NPCKills        |
        .NPCDeaths        |:uint
        .TotalDamageTaken    |
        .TotalDamageDone    |
        .DamageToPlayers    |
        .DamageFromPlayers    |
        .DamageToNPCs        |
        .DamageFromNPCs        |
        .DamageToEntities    |

        .Broadcast(string msg):void
        .Broadcast(string nameFrom, string msg):void
        .FindPlayer(string something):Pluton.Player
        .Players:Dictionary<ulong, Pluton.Player>

        .CreateLoadOut(string Name):LoadOut
        .GetVectorsDistance(Vector3 p1, Vector3 p2):float
        .IsNull(object obj):bool
        .Log(string str):void
        .Regex(string input, string match):Match
        .RotateX(Quaternion q, float angle):Quaternion
        .RotateY(Quaternion q, float angle):Quaternion
        .RotateZ(Quaternion q, float angle):Quaternion
        .TryFindType(string typeName, out System.Type t):bool
        .TryFindReturnType(string typeName):System.Type
    Code (C#):

    Pluton.Events.AuthEvent(Connection connection)
        .Reject(string reason*):void

    Pluton.Events.BuildingEvent(BuildingPart bp, Player, float prof)

    Pluton.Events.BuildingHurtEvent(BuildingPart bp, HitInfo info):HurtEvent

    Pluton.Events.CorpseHurtEvent(BaseCorpse corpse, HitInfo info):HurtEvent

    Pluton.Events.CorpseInitEvent(BaseCorpse corpse, BaseEntity parent)

    Pluton.Events.DeathEvent(HitInfo info)

    Pluton.Events.EntityLootEvent(PlayerLoot pl, Player looter, Entity looted):LootEvent

    Pluton.Events.GatherEvent(BaseResource res, HitInfo info)

    Pluton.Events.HurEvent(HitInfo info)

    Pluton.Events.ItemLootEvent(PlayerLoot pl, Pluton.Player player, Item looted):LootEvent

    Pluton.Events.LootEvent(PlayerLoot pl, Pluton.Player player)

    Pluton.Events.NPCDeathEventh(Pluton.NPC npc, HitInfo info):DeathEvent

    Pluton.Events.NPCHurtEvent(Pluton.NPC npc, HitInfo info):HurtEvent

    Pluton.Events.PlayerDeathEvent(Pluton.Player player, HitInfo info):DeathEvent

    Pluton.Events.PlayerHurtEvent(Pluton.Player player, HitInfo info):HurtEvent

    Pluton.Events.PlayerLootEvent(PlayerLoot pl, Pluton.Player player, Pluton.Player looted):LootEvent

    Pluton.Events.PlayerTakedmgEvent(Player p, float amount, Rust.DamageType type)

    Pluton.Events.PlayerTakeRadsEvent(Player p, float amount)
    * optional
    Last edited: Oct 2, 2014
    • Like Like x 4


Discussion in 'News & Announcements' started by mikec, Jul 29, 2014.

  • Thread Status:
    Not open for further replies.
    1. mikec
      Pluton builds, patches, and runs on Windows and Linux. Some hooks are only partially implemented in the game, and so do not do anything useful yet.

      Special recognition to balu92 for taking the initiative, working out patching into the new assembly, and being able to reuse a lot of code from Fougerite and Magma. Viproz has contributed as well. I've done almost nothing but let the team use a private repo I had on Github to get it put together.

      Pluton's only plugin support right now is IronPython.

      A binary ZIP will be posted after we've gotten some feedback and hopefully contributions from other coders who are attracted to a mod for Experimental branch and who can build it themselves.
    2. mikec
    3. DreTaX
      Next magazine was loaded to keep the rivals away. Great work.

      Sent from my Samsung Galaxy S4
    4. xEnt
      well done. with the iron python thing, thats just temp right? will you keep JS?
    5. balu92
      Thanks! We plan to have both, @mikec said he wants to write a custom type converter first for the new jint, since using a dictionary and such in it is a big pain and ugly.
    6. DreTaX
      Wuts wrong with Py ;-;

      Sent from my Samsung Galaxy S4
    7. balu92
      Example hello world plugin for pluton in python:
      Code (Python):
      import clr
      import Pluton
      from System import String

      class HelloWorld:
        def On_PlayerConnected(self, player):
          player.Message("Welcome " + player.Name + "!")
          player.Message(String.Format("This server is powered by Pluton[{0}]", Pluton.Bootstrap.Version))
    8. DreTaX
      I just realised that I was also added to the repo and didn't commit crap.
    9. Jakkee
      im probably doing something wrong but these are the errors I get when I build the solution
    10. balu92
      should be fixed now, sry
    11. sendjes
      Nice job, I ran your Legacy version for awhile, can't wait to try this out, too bad I'm no VS wizard though, gonna have to wait for the binaries.
    12. CorrosionX
      Code (Text):
      ReflectionTypeLoadException: The classes in the module cannot be loaded.
        at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)

        at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0

        at ConsoleSystem+Index.Build () [0x00000] in <filename unknown>:0

        at ConsoleSystem+Index.Find (System.String strName) [0x00000] in <filename unknown>:0

        at ConsoleSystem+Arg.BuildCommand (System.String command) [0x00000] in <filename unknown>:0

        at ConsoleSystem+Arg..ctor (System.String rconCommand) [0x00000] in <filename unknown>:0

        at ConsoleSystem.RunUnrestricted (System.String strCommand, Boolean WantsFeedback) [0x00000] in <filename unknown>:0

        at ConsoleSystem.UpdateValuesFromCommandLine () [0x00000] in <filename unknown>:0

        at Bootstrap.Initialization () [0x00000] in <filename unknown>:0

        at Bootstrap.Start () [0x00000] in <filename unknown>:0
      (Filename:  Line: -1)
      Code (Text):
      ReflectionTypeLoadException: The classes in the module cannot be loaded.</h3><pre>System.Reflection.Assembly.GetTypes ()
      ConsoleSystem+Index.Build ()
      ConsoleSystem+Index.Find (System.String strName)
      ConsoleSystem+Arg.BuildCommand (System.String command)
      ConsoleSystem+Arg..ctor (System.String rconCommand)
      ConsoleSystem.RunUnrestricted (System.String strCommand, Boolean WantsFeedback)
      ConsoleSystem.UpdateValuesFromCommandLine ()
      Bootstrap.Initialization ()
      Bootstrap.Start ()
    13. mikec
      Did you copy IronPython.Deps.dll and System.Reactive.dll to the Managed/ folder?
    14. CorrosionX
      forgot ironpython.deps.dll XD TY!
    15. jeff
      Hi, I've got my server running with Pluton but when I try to connect to the server I get this in my console:
      Code (Text):
      Could not load type 'Pluton.Server' from assembly 'Pluton, Vesion=, Culture=neutral, PublicKeyToken=null'.
      What can I do about this?
    16. balu92
      do you have pluton.dll in the managed folder?
    17. jeff
      Yes it's in there..
    18. jeff
      This is the exact thing I'm getting in my console..

      Code (Text):
      [EAC] Registering 'steamidhere'
      Exception in Server.ReceivedMessage: 0 -> 2
      TypeloadException: Could not load type 'Pluton.Server' from assembly 'Pluton, Version=, Culture=neutral, PublicKeyToken=null'.
      (name) has left
      Server Network Exception
      I also removed the entire server folder and installed again and then followed the exact same steps as described on GitHub
    19. xEnt
      yeah i just tried to take it for a quick spin, got the same errors as above

      [EAC] Registering 'ID'
      Exception in Server.ReceivedMessage: 0 -> 2
      TypeLoadException: A type load exception has occurred.
      xEnt has left
      Server Network Exception
      TypeLoadException: Could not load type 'Pluton.Server' from assembly 'Pluton, Ve
      rsion=, Culture=neutral, PublicKeyToken=null'.

      tried to compile both patcher and pluton with 4.0 and 4.5 (mono) no same errors. what version do you guys use?.

      steps i did.

      grabbed latest zip from github
      added both to Xamarin Studio, copied rust dll's to <project>/refs folder. changed patcher and pluton to reference from that folder (if it hadn't already)
      compiled. dropped patcher and mono.cecil into Managed folder, also copied IronPython & System.Reactive to Managed, same with Pluton.dll.
      ran the launcher, seemed to patch fine.
      server started fine, upon joining i got kicked with that error.
    Thread Status:
    Not open for further replies.

Share This Page