Giter Site home page Giter Site logo

groups's Introduction

Info for mod authors

If you want to use the GroupsAPI.dll in your own mod, to add group features to your mod, follow this short tutorial. This is only used, if you want a soft dependency on Groups, meaning that your mod will still work, even without Groups.

If your mod shouldn't work without Groups, then simply reference the Groups.dll in your project, set a hard dependency on Groups and ignore the tutorial.

Download the API

In the release section on the right side, you can download the GroupsAPI.dll. Download the file and add it to your mods project. Set the "Copy to output directory" setting to "Copy if newer" in the files properties.

Merge the DLL

Add the NuGet package ILRepack.Lib.MSBuild.Task to your project. Add a file with the name ILRepack.targets to your mod and paste the following content into this file.

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <Target Name="ILRepacker" AfterTargets="Build">
        <ItemGroup>
            <InputAssemblies Include="$(TargetPath)"/>
            <InputAssemblies Include="$(OutputPath)GroupsAPI.dll"/>
        </ItemGroup>
        <ILRepack Parallel="true" DebugInfo="true" Internalize="true" InputAssemblies="@(InputAssemblies)" OutputFile="$(TargetPath)" TargetKind="SameAsPrimaryAssembly" LibraryPath="$(OutputPath)"/>
    </Target>
</Project>

Reference Groups

Add a reference to the GroupsAPI.dll. Then set a soft dependency on Groups, to make sure your mod is loaded after Groups, like this:

[BepInDependency("org.bepinex.plugins.groups", BepInDependency.DependencyFlags.SoftDependency)]

Use the API

In your code, you can use the PlayerReference struct, which is used to describe Players and the API class, to access the different methods available to your mod via the Groups API.

Keep in mind that you will receive default values from the API, if Groups isn't loaded for the client. You can also check, if Groups is loaded via the API.

groups's People

Contributors

blaxxun-boop avatar

Watchers

 avatar  avatar  avatar

groups's Issues

Update needed with Valheim Patch 0.214.2

Hey Blaxxun,

Groups broke with recent valheim patch 0.214.2 as we probably expected :)

Here is the error log and screenshot of a group.

image

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
Groups.Interface+UpdateGroupDisplay.Postfix () (at <90b173be03694f81a1783c47442965b2>:0)
(wrapper dynamic-method) Hud.DMD<Hud::Update>(Hud)

Feature suggestion

The mod works very well, I would like to leave some suggestions.

- Invite with first 3 letters charaters /invite blax~
- Permanent groups /group save

Invite while using Auga

If one receives an invite while using the Auga mod, the box pops up asking the user if they want to quit the game. If you click "No", nothing happens and the box remains on the screen. You can't ESC out of it either, you're forced to press "Yes" and close the game.

Project Auga

When you send a group invite it asks to quit game then won't let you say no, and if you click yes it quits the game. Only while using project auga.

[Enhancement] Guilds

I've stumbled across this Plugin/Mod while searching for a Mod that Handles Guild

  • Guild Members with Ranks
  • Guild Wards (can only be created by Guild Leader and Co Leader) (is to guildmembers like if they are permitted to the ward (they cant destroy the ward))
  • Guild Portals (portals that can only be used by the Guild members (portals with same tag of diffrent guilds wont make problems))
  • Guild Capes and Banners

I've found some Mods, but they where outdated and didnt have more then 1 feature.

I myself know some C# and did work with Unity before. I've read that you guys allready started working on a guild feature, can I join in and help?

Mod doesnt seem to be loaded on dedicated server

We have EpicMMO and wants to use the Group feature, but it seems like that your mod doesnt get loaded, we also cant use the chat commands.

Got connection SteamID 7656119797xxxx
Sending PlantEverything version 1.14.0 and minimum version 1.14.0 to the client.
Sending Recycle_N_Reclaim version 1.2.0 and minimum version 1.2.0 to the client.
Sending BoatAdditions version 1.1.9 and minimum version 1.1.9 to the client.
Sending RenegadeVikings version 1.1.9 and minimum version 1.1.9 to the client.
Sending TeleportEverything version 2.5.1 and minimum version 2.5.1 to the client.
Sending OdinsTraps version 1.1.11 and minimum version 1.1.11 to the client.
Sending com.odinplus.odinstraps PieceManager version 1.1.11 and minimum version 0.0.0 to the client.
Sending com.odinplus.odinstraps ItemManager version 1.1.11 and minimum version 0.0.0 to the client.
Sending FishChum version 0.0.7 and minimum version 0.0.7 to the client.
Sending RustyMods.FishChum ItemManager version 0.0.7 and minimum version 0.0.0 to the client.
Sending Warfare version 1.5.4 and minimum version 1.5.4 to the client.
Sending Therzie.Warfare PieceManager version 1.5.4 and minimum version 0.0.0 to the client.
Sending Therzie.Warfare ItemManager version 1.5.4 and minimum version 0.0.0 to the client.
Sending Therzie.Warfare SkillManager version 1.5.4 and minimum version 0.0.0 to the client.
Sending Armory version 1.0.8 and minimum version 1.0.8 to the client.
Sending Therzie.Armory ItemManager version 1.0.8 and minimum version 0.0.0 to the client.
Sending WarfareFireAndIce version 1.0.5 and minimum version 1.0.5 to the client.
Sending Therzie.WarfareFireAndIce PieceManager version 1.0.5 and minimum version 0.0.0 to the client.
Sending Therzie.WarfareFireAndIce ItemManager version 1.0.5 and minimum version 0.0.0 to the client.
Sending Adventure Backpacks version 1.6.29 and minimum version 1.6.29 to the client.
Sending vapok.mods.adventurebackpacks ItemManager version 1.6.29 and minimum version 0.0.0 to the client.
Sending EpicMMOSystem version 1.8.0 and minimum version 1.8.0 to the client.
Sending WackyMole.EpicMMOSystem ItemManager version 1.8.0 and minimum version 0.0.0 to the client.
Sending WackyMole.EpicMMOSystem PieceManager version 1.8.0 and minimum version 0.0.0 to the client.
Sending RRRCore version 3.1.3 and minimum version 3.1.3 to the client.
Sending Valheim Plus version 0.9.10.0 and minimum version 0.9.10.0 to the client.
Received BoatAdditions version 1.1.9 and minimum version 1.1.9 from the client.
Received RenegadeVikings version 1.1.9 and minimum version 1.1.9 from the client.
Received Warfare version 1.5.4 and minimum version 1.5.4 from the client.
Received Armory version 1.0.8 and minimum version 1.0.8 from the client.
Received WarfareFireAndIce version 1.0.5 and minimum version 1.0.5 from the client.
Received Valheim Plus version 0.9.10.0 and minimum version 0.9.10.0 from the client.
Got handshake from client 7656119797xxxx

thats the connection part of the log and "Groups" isnt listed bit its installed

grafik
but theres no config - is that normal?

Death in Group

If you are in a group and die, you get this error and you can't log in.

Version 1.1.6

[Error  : Unity Log] InvalidOperationException: Sequence contains no matching element
Stack trace:
System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
Groups.PlayerReference.fromPlayerId (System.Int64 id) (at <61ad793404304e679b8980f9cb1eee60>:0)
Groups.Interface.onUpdateHealth (System.Int64 senderId, System.Single health, System.Single maxHealth) (at <61ad793404304e679b8980f9cb1eee60>:0)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Delegate.DynamicInvokeImpl (System.Object[] args) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Delegate.DynamicInvoke (System.Object[] args) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
RoutedMethod`2[T,U].Invoke (System.Int64 rpc, ZPackage pkg) (at <843a49d5cb48439fa5a62a7bcd81c2a9>:0)
ZRoutedRpc.HandleRoutedRPC (ZRoutedRpc+RoutedRPCData data) (at <843a49d5cb48439fa5a62a7bcd81c2a9>:0)
ZRoutedRpc.InvokeRoutedRPC (System.Int64 targetPeerID, ZDOID targetZDO, System.String methodName, System.Object[] parameters) (at <843a49d5cb48439fa5a62a7bcd81c2a9>:0)
ZRoutedRpc.InvokeRoutedRPC (System.Int64 targetPeerID, System.String methodName, System.Object[] parameters) (at <843a49d5cb48439fa5a62a7bcd81c2a9>:0)
Groups.Interface+BroadcastHealth.Postfix (Character __instance) (at <61ad793404304e679b8980f9cb1eee60>:0)
(wrapper dynamic-method) Character.DMD<Character::SetMaxHealth>(Character,single)
Player.SetMaxHealth (System.Single health, System.Boolean flashBar) (at <843a49d5cb48439fa5a62a7bcd81c2a9>:0)
(wrapper dynamic-method) Player.DMD<Player::Load>(Player,ZPackage)
PlayerProfile.LoadPlayerData (Player player) (at <843a49d5cb48439fa5a62a7bcd81c2a9>:0)
(wrapper dynamic-method) Game.DMD<Game::SpawnPlayer>(Game,UnityEngine.Vector3)
(wrapper dynamic-method) Game.DMD<Game::UpdateRespawn>(Game,single)
Game.FixedUpdate () (at <843a49d5cb48439fa5a62a7bcd81c2a9>:0)

Unable to have more than 5 in group

Unsure if this is an intended feature, but I'm unable to add a 6th person to our group. No api/bepinex errors, 6th person still gets the invite popup and can click yes/no but nothing happens.

invite issue - pops up game exit prompt

          There was an issue with some windowed resolutions. Should fixed in v1.1.5 now, thanks.

Originally posted by @blaxxun-boop in #2 (comment)

Any chance you can have a look at this issue again please?

I have two friends, I invite one and it works fine, I invite the other and she gets the same exit game prompt.
We have tried changing her from fullscreen to windowed but still no good.

We are all using the same 1.1.14 through Thunderstore (and with all the same other plugins)

Anything I can check/debug/fix?

Questions

Man, congratulations, excellent work, it's something very relevant to the game.

  • I did a little test and when typing only /invite without informing the player name an error appears in the console.
[Error  : Unity Log] ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
Parameter name: startIndex
Stack trace:
System.String.Substring (System.Int32 startIndex, System.Int32 length) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.String.Substring (System.Int32 startIndex) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
Groups.ChatCommands+AddChatCommands+<>c.<Postfix>b__0_0 (Terminal+ConsoleEventArgs args) (at <a57a1e4744334aa1a9e03dbf8a67b1bd>:0)
Terminal+ConsoleCommand.RunAction (Terminal+ConsoleEventArgs args) (at <843a49d5cb48439fa5a62a7bcd81c2a9>:0)
(wrapper dynamic-method) Terminal.DMD<Terminal::TryRunCommand>(Terminal,string,bool,bool)
(wrapper dynamic-method) Chat.DMD<Chat::InputText>(Chat)
Terminal.SendInput () (at <843a49d5cb48439fa5a62a7bcd81c2a9>:0)
Terminal.UpdateInput () (at <843a49d5cb48439fa5a62a7bcd81c2a9>:0)
Terminal.Update () (at <843a49d5cb48439fa5a62a7bcd81c2a9>:0)
(wrapper dynamic-method) Chat.DMD<Chat::Update>(Chat)

[Error  : Unity Log] NullReferenceException
Stack trace:
UnityEngine.EventSystems.UIBehaviour.IsActive () (at <5abdc278a459476dabe36f8ad65ea091>:0)
UnityEngine.UI.Graphic.SetMaterialDirty () (at <5abdc278a459476dabe36f8ad65ea091>:0)
UnityEngine.UI.Graphic.SetAllDirty () (at <5abdc278a459476dabe36f8ad65ea091>:0)
UnityEngine.UI.Image.set_sprite (UnityEngine.Sprite value) (at <5abdc278a459476dabe36f8ad65ea091>:0)
Groups.Map+ChangeGroupMemberPin.Postfix (Minimap __instance) (at <a57a1e4744334aa1a9e03dbf8a67b1bd>:0)
(wrapper dynamic-method) Minimap.DMD<Minimap::UpdatePlayerPins>(Minimap,single)
(wrapper dynamic-method) Minimap.DMD<Minimap::UpdateDynamicPins>(Minimap,single)
(wrapper dynamic-method) Minimap.DMD<Minimap::Update>(Minimap)
  • Another issue is the F2 is moving the players.

ezgif com-gif-maker (1)

Group Left onDeath

When dying, he is leaving the Group. Is it a bug? Do you think it's possible to keep the player in the Group?

Unable to use the chat box to send messages when used in conjunction with mods that alter chat box features

Hello!

I've noticed that when Groups is installed players are unable to send messages if they are using RandyKnapp' Agua or ComfyMod's Chatter chat mods.

[Info : Unity Log] TMP_Input can't handle null eventData in curren package. Can be ignored atm though. Exception: Object reference not set to an instance of an object
[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
Groups.ChatCommands.get_groupChatActive () (at :0)
Groups.ChatCommands+SendMessageToGroup.Prefix (Chat __instance) (at :0)
(wrapper dynamic-method) Chat.DMDChat::InputText(Chat)
Terminal.SendInput () (at <37016fb1154444bda541f76782d9fa64>:0)
(wrapper dynamic-method) Chat.DMDChat::SendInput(Chat)
Chatter.Chatter+<>c.b__24_2 (System.String _) (at <7ce56ec2653b4c89b8da510144b2a037>:0)
UnityEngine.Events.InvokableCall1[T1].Invoke (T1 args0) (at <e8ad740a36e94573bdfd43b460604777>:0) UnityEngine.Events.UnityEvent1[T0].Invoke (T0 arg0) (at :0)
TMPro.TMP_InputField.SendOnSubmit () (at <4e234b0d12b44dcb9d7a3e0cb826edff>:0)
TMPro.TMP_InputField.OnUpdateSelected (UnityEngine.EventSystems.BaseEventData eventData) (at <4e234b0d12b44dcb9d7a3e0cb826edff>:0)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IUpdateSelectedHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at :0)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at :0)
UnityEngine.EventSystems.EventSystem:Update()

When either are disabled, it will function as normal.

Thank you for the mod!

Error on invite

Hi,

When I invite anyone with /invite, the window to exit the game pops up and you can only click Yes, then it kicks you out of the game. If you click no, it does nothing.

The same thing happens all the time I try to invite.

Skills

When you are in a group and you die, there is a good chance of losing all skills (reset to zero), as well as resetting the character and flying valkyrie again. I had to remove the mod from the server. The test was on the 1.6 version. There are a minimum of mods on the server. There is no ValheimPlus or similar.

Groups mod blocks healing AOE

I am using Staff of Healing from MagicPlugin mod, when joining in a group, I can't even heal myself nor teammates, because according to others, groups mod consider that is an attack, is there any way to fix this, thanks.
image

Support for ValheimPlus (Please)

I understand ValheimPlus official branch hasn't been updated in a while, but I am trying to use the latest branch/fork by Grantapher with this Groups 1.2.6 mod. I get the following error when the server tries to load:

๐ŸŸฅ [Error : BenInEx] Could not load [Groups 1.2.6] because it is incompatible with: org.bepinex.plugins.valheim_plus

ValheimPlus_Grantapher_Temporary v9.12.0 by Grantapher

is there any suggestions on getting this to work? (downgrading version of either mod is what I am thinking but not sure which pairs with what version)

New feature: Hide HP plate display for players not in current group

It would be nice (mostly for game immersion) if mod would allow (optional) hiding of nameplates (incl. names, HP, other info that's displayed there) for players that are not members of my party.

If hiding of same information for mobs would be possible that would be great.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.