Jump to content

XLib and XSkills


Xandu

Recommended Posts

2 hours ago, AstralVoid said:

I've been looking into this mod a bit and wanted to know - does it currently support the ability to check worn armor types? Digging around the XML I see options to check DamageSource as well as the amount.

Wanting to add in an armor skill (or set of skills - depending on the armor type) and perks that could be specialized to improving light/heavy armor, or even no armor, but wasn't sure if it was possible just yet.

This is more a vanilla api question than related to the mod. But you should be able to get the worn armor with something like this: 

InventoryCharacter inv = byPlayer.InventoryManager.GetOwnInventory("character") as InventoryCharacter;

ItemWearable head = inv[12].Itemstack?.Item as ItemWearable;
ItemWearable body = inv[13].Itemstack?.Item as ItemWearable;
ItemWearable legs = inv[14].Itemstack?.Item as ItemWearable;

 

Link to comment
Share on other sites

5 minutes ago, Xandu said:

This is more a vanilla api question than related to the mod. But you should be able to get the worn armor with something like this: 



InventoryCharacter inv = byPlayer.InventoryManager.GetOwnInventory("character") as InventoryCharacter;

ItemWearable head = inv[12].Itemstack?.Item as ItemWearable;
ItemWearable body = inv[13].Itemstack?.Item as ItemWearable;
ItemWearable legs = inv[14].Itemstack?.Item as ItemWearable;

 

Got it - thank you!

I'm still poking around at deciding what sort of mods I want to make, and figured this may be good as an example to figure out the APIs. Love the potential that XSkills/XLib adds to it so far!

Link to comment
Share on other sites

10 hours ago, Tech_Rabbit said:

Would be nice to be able to reset all players for the bigger servers.

You can reset all players by simply delete the save file, since the mod uses its own save files. You should find it here: "VintagestoryData\Saves\XLeveling\[World Name]"

7 hours ago, Tech_Rabbit said:

Server crashing bug:

image.thumb.png.f3c8adcca391d6dc9ee6b5619cf81d7a.png

I will investigate this.

5 hours ago, an unknown player said:

How does gaining Xp for skills work? I cooked some bread in my game but wasn't gaining any cooking experience. 

The cooking skill only applies to meals. You will only get experience from cooking meals and the abilities only affect meals. So the simple cooking recipes are currently not affected. The reason for this is that the meals are technically implemented than the other cooking recipes.

Link to comment
Share on other sites

17 hours ago, l33tmaan said:

I posted about this in the Bugs section because I didn't realize mead was an XSkills item, but... mead breaks my game.
 

Hey, for me everything seems to work fine. Do you have any other mods installed that maybe change how the bucket works or add other liquids or something like that? Cause the bug report is not very helpful unfortunately. The crash doesn't seem to happen in one of my functions.

I know mead is a little bit weird. I wanted to created a way to 'forget' abilities and this is the one i came up with. :D

 

Link to comment
Share on other sites

Personally I use Primitive Survival alongside XSkills and XLib with no issue on a server, along with a handful of other mods on 1.14.5.

 

The Vinegar mod appears to be last updated for 1.13.4, while your crash report indicates 1.14.2. I would recommend going through your mod list to ensure they are updated to at least the current major version of the game (1.14.x) before trying to play with them, and disabling this or any other pre-1.14 mods to confirm which causes the behavior.

 

Link to comment
Share on other sites

2 hours ago, l33tmaan said:

I've got a lot of mods, but the only two that I can think of that do those are Primitive Survival (adds metal buckets) and Vinegar (lets you turn berries into vinegar). If there's a convenient way to get a full list of my mods, I'll be happy to post them. 

I tested it with both mods and had no issues at all. Vinegar is only an asset mod and it shouldn't affect this. But i tested it nevertheless. So i don't know why your game crashes. 

Make sure to use the newest version of the game and of the mods you use like @AstralVoid mentioned. When i upload a new version i always compile it with the newest version of the game. So it can cause issues with older game versions.

Edited by Xandu
Link to comment
Share on other sites

Running on 64 bit Windows with 16 GB RAM
Version: v1.14.5 (Stable)16.01.2021 09:48:49: Critical error occurred
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei XLib.XLeveling.XLevelingClient.MessageHandler(CommandPackage package)
   bei Vintagestory.Client.NoObf.NetworkChannel.<>c__DisplayClass12_0`1.<SetMessageHandler>b__0(_GbM4CoNlFVTll1RhBGqzZA5sDe3 p)
   bei Vintagestory.Client.NoObf.NetworkAPI.HandleCustomPacket(_GD9ciVuaLSuqhaQHk9gF8TzYyWl packet)
   bei Vintagestory.Client.NoObf.ClientMain.ExecuteMainThreadTasks(Single deltaTime)
   bei _3N75KjamhBm5aOdc4GCpNSbCM3S._df3GxtG5OOiD7YZvbaraCiLbckx(Single )
   bei _7KGTxxuvfNubJZCLAMEMJZBkPDeA._07k4LSTgxALpYbS1S6K07SItFcH(Single )
   bei _7KGTxxuvfNubJZCLAMEMJZBkPDeA._aysJzMcCvicDqo8MC3TmjcDsfdZ(Single )
   bei Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(Object sender, FrameEventArgs e)
   bei System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   bei OpenTK.GameWindow.RaiseRenderFrame(Double elapsed, Double& timestamp)
   bei OpenTK.GameWindow.DispatchRenderFrame()
   bei OpenTK.GameWindow.Run(Double updates_per_second, Double frames_per_second)
   bei _4eRDDOqtbaPbgjN2dJ1zzD1FCRy._ExJp6VhLWG4xQoHsVn72tgyNbeG(_bWl72q5sGuTQypu8W8r7cRXUcRF , String[] )
   bei _XKAWv6MyciUiZmECUonQCwPaCwE._ExJp6VhLWG4xQoHsVn72tgyNbeG(ThreadStart )
-------------------------------

Event Log, last 3 entries
==================================
{ TimeGenerated = 14.01.2021 09:03:01, Site = , Source = .NET Runtime, Message = Anwendung: Vintagestory.exe
Frameworkversion: v4.0.30319
Beschreibung: Der Prozess wurde aufgrund einer unbehandelten Ausnahme beendet.
Ausnahmeinformationen: Ausnahmecode c0020001, Ausnahmeadresse 00007FF84A68D759
Stapel:
 }
{ TimeGenerated = 19.12.2020 00:17:25, Site = , Source = .NET Runtime, Message = Anwendung: Vintagestory.exe
Frameworkversion: v4.0.30319
Beschreibung: Der Prozess wurde aufgrund einer unbehandelten Ausnahme beendet.
Ausnahmeinformationen: System.NullReferenceException
   bei Vintagestory.Client.NoObf.ClientWorldMap.MarkChunkDirty(Int32, Int32, Int32, Boolean, Boolean, Vintagestory.API.Common.Action, Boolean)
   bei Vintagestory.Client.NoObf.ClientWorldMap.loadChunkMT(_dZKT5htC7TsF6hecyrNHONKYFvBA, Vintagestory.Client.NoObf.ClientChunk)
   bei Vintagestory.Client.NoObf.ClientWorldMap+<>c__DisplayClass94_0.<LoadChunkFromPacket>b__0()
   bei Vintagestory.Client.NoObf.ClientMain.ExecuteMainThreadTasks(Single)
   bei _dUwwv9Q3M6hPimkiHEIazbxLr9g._X2niSFpb8ndF6zWsCcobp5QBcvO(Single)
   bei _ydpin5JFjepNgd3JOZRb2z5I5Fg._LvRZFcsDWyPwKLB1F2UK7fQ2N6d(Single)
   bei _ydpin5JFjepNgd3JOZRb2z5I5Fg._GO2qaUrk9dl0IceTLiA7P4LcpAB(Single)
   bei Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(System.Object, OpenTK.FrameEventArgs)
   bei System.EventHandler`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Invoke(System.Object, System.__Canon)
   bei OpenTK.GameWindow.RaiseRenderFrame(Double, Double ByRef)
   bei OpenTK.GameWindow.DispatchRenderFrame()
   bei OpenTK.GameWindow.Run(Double, Double)
   bei _Ine8FeGTtDXciSIfaZMHMwCLKGBA._8puLW8J44fiq3A5hthQTfB8WNxc(_SbVlAI6dJIZ4JRt0da0lu23DF14, System.String[])
   bei _lErb0L2e9E9htuT2VVnAsXIZqc7A._8puLW8J44fiq3A5hthQTfB8WNxc(System.Threading.ThreadStart)

 }
{ TimeGenerated = 19.12.2020 00:07:35, Site = , Source = .NET Runtime, Message = Anwendung: Vintagestory.exe
Frameworkversion: v4.0.30319
Beschreibung: Der Prozess wurde aufgrund einer unbehandelten Ausnahme beendet.
Ausnahmeinformationen: System.NullReferenceException
   bei Vintagestory.Client.NoObf.ClientWorldMap.MarkChunkDirty(Int32, Int32, Int32, Boolean, Boolean, Vintagestory.API.Common.Action, Boolean)
   bei Vintagestory.Client.NoObf.ClientWorldMap.loadChunkMT(_dZKT5htC7TsF6hecyrNHONKYFvBA, Vintagestory.Client.NoObf.ClientChunk)
   bei Vintagestory.Client.NoObf.ClientWorldMap+<>c__DisplayClass94_0.<LoadChunkFromPacket>b__0()
   bei Vintagestory.Client.NoObf.ClientMain.ExecuteMainThreadTasks(Single)
   bei _dUwwv9Q3M6hPimkiHEIazbxLr9g._X2niSFpb8ndF6zWsCcobp5QBcvO(Single)
   bei _ydpin5JFjepNgd3JOZRb2z5I5Fg._LvRZFcsDWyPwKLB1F2UK7fQ2N6d(Single)
   bei _ydpin5JFjepNgd3JOZRb2z5I5Fg._GO2qaUrk9dl0IceTLiA7P4LcpAB(Single)
   bei Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(System.Object, OpenTK.FrameEventArgs)
   bei System.EventHandler`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Invoke(System.Object, System.__Canon)
   bei OpenTK.GameWindow.RaiseRenderFrame(Double, Double ByRef)
   bei OpenTK.GameWindow.DispatchRenderFrame()
   bei OpenTK.GameWindow.Run(Double, Double)
   bei _Ine8FeGTtDXciSIfaZMHMwCLKGBA._8puLW8J44fiq3A5hthQTfB8WNxc(_SbVlAI6dJIZ4JRt0da0lu23DF14, System.String[])
   bei _lErb0L2e9E9htuT2VVnAsXIZqc7A._8puLW8J44fiq3A5hthQTfB8WNxc(System.Threading.ThreadStart)

 }

Link to comment
Share on other sites

1 hour ago, Kai Effelsberg said:

Running on 64 bit Windows with 16 GB RAM
Version: v1.14.5 (Stable)16.01.2021 09:48:49: Critical error occurred
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei XLib.XLeveling.XLevelingClient.MessageHandler(CommandPackage package)
   bei Vintagestory.Client.NoObf.NetworkChannel.<>c__DisplayClass12_0`1.<SetMessageHandler>b__0(_GbM4CoNlFVTll1RhBGqzZA5sDe3 p)
   bei Vintagestory.Client.NoObf.NetworkAPI.HandleCustomPacket(_GD9ciVuaLSuqhaQHk9gF8TzYyWl packet)
   bei Vintagestory.Client.NoObf.ClientMain.ExecuteMainThreadTasks(Single deltaTime)
   bei _3N75KjamhBm5aOdc4GCpNSbCM3S._df3GxtG5OOiD7YZvbaraCiLbckx(Single )
   bei _7KGTxxuvfNubJZCLAMEMJZBkPDeA._07k4LSTgxALpYbS1S6K07SItFcH(Single )
   bei _7KGTxxuvfNubJZCLAMEMJZBkPDeA._aysJzMcCvicDqo8MC3TmjcDsfdZ(Single )
   bei Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(Object sender, FrameEventArgs e)
   bei System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   bei OpenTK.GameWindow.RaiseRenderFrame(Double elapsed, Double& timestamp)
   bei OpenTK.GameWindow.DispatchRenderFrame()
   bei OpenTK.GameWindow.Run(Double updates_per_second, Double frames_per_second)
   bei _4eRDDOqtbaPbgjN2dJ1zzD1FCRy._ExJp6VhLWG4xQoHsVn72tgyNbeG(_bWl72q5sGuTQypu8W8r7cRXUcRF , String[] )
   bei _XKAWv6MyciUiZmECUonQCwPaCwE._ExJp6VhLWG4xQoHsVn72tgyNbeG(ThreadStart )
-------------------------------

Event Log, last 3 entries
==================================
{ TimeGenerated = 14.01.2021 09:03:01, Site = , Source = .NET Runtime, Message = Anwendung: Vintagestory.exe
Frameworkversion: v4.0.30319
Beschreibung: Der Prozess wurde aufgrund einer unbehandelten Ausnahme beendet.
Ausnahmeinformationen: Ausnahmecode c0020001, Ausnahmeadresse 00007FF84A68D759
Stapel:
 }
{ TimeGenerated = 19.12.2020 00:17:25, Site = , Source = .NET Runtime, Message = Anwendung: Vintagestory.exe
Frameworkversion: v4.0.30319
Beschreibung: Der Prozess wurde aufgrund einer unbehandelten Ausnahme beendet.
Ausnahmeinformationen: System.NullReferenceException
   bei Vintagestory.Client.NoObf.ClientWorldMap.MarkChunkDirty(Int32, Int32, Int32, Boolean, Boolean, Vintagestory.API.Common.Action, Boolean)
   bei Vintagestory.Client.NoObf.ClientWorldMap.loadChunkMT(_dZKT5htC7TsF6hecyrNHONKYFvBA, Vintagestory.Client.NoObf.ClientChunk)
   bei Vintagestory.Client.NoObf.ClientWorldMap+<>c__DisplayClass94_0.<LoadChunkFromPacket>b__0()
   bei Vintagestory.Client.NoObf.ClientMain.ExecuteMainThreadTasks(Single)
   bei _dUwwv9Q3M6hPimkiHEIazbxLr9g._X2niSFpb8ndF6zWsCcobp5QBcvO(Single)
   bei _ydpin5JFjepNgd3JOZRb2z5I5Fg._LvRZFcsDWyPwKLB1F2UK7fQ2N6d(Single)
   bei _ydpin5JFjepNgd3JOZRb2z5I5Fg._GO2qaUrk9dl0IceTLiA7P4LcpAB(Single)
   bei Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(System.Object, OpenTK.FrameEventArgs)
   bei System.EventHandler`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Invoke(System.Object, System.__Canon)
   bei OpenTK.GameWindow.RaiseRenderFrame(Double, Double ByRef)
   bei OpenTK.GameWindow.DispatchRenderFrame()
   bei OpenTK.GameWindow.Run(Double, Double)
   bei _Ine8FeGTtDXciSIfaZMHMwCLKGBA._8puLW8J44fiq3A5hthQTfB8WNxc(_SbVlAI6dJIZ4JRt0da0lu23DF14, System.String[])
   bei _lErb0L2e9E9htuT2VVnAsXIZqc7A._8puLW8J44fiq3A5hthQTfB8WNxc(System.Threading.ThreadStart)

 }
{ TimeGenerated = 19.12.2020 00:07:35, Site = , Source = .NET Runtime, Message = Anwendung: Vintagestory.exe
Frameworkversion: v4.0.30319
Beschreibung: Der Prozess wurde aufgrund einer unbehandelten Ausnahme beendet.
Ausnahmeinformationen: System.NullReferenceException
   bei Vintagestory.Client.NoObf.ClientWorldMap.MarkChunkDirty(Int32, Int32, Int32, Boolean, Boolean, Vintagestory.API.Common.Action, Boolean)
   bei Vintagestory.Client.NoObf.ClientWorldMap.loadChunkMT(_dZKT5htC7TsF6hecyrNHONKYFvBA, Vintagestory.Client.NoObf.ClientChunk)
   bei Vintagestory.Client.NoObf.ClientWorldMap+<>c__DisplayClass94_0.<LoadChunkFromPacket>b__0()
   bei Vintagestory.Client.NoObf.ClientMain.ExecuteMainThreadTasks(Single)
   bei _dUwwv9Q3M6hPimkiHEIazbxLr9g._X2niSFpb8ndF6zWsCcobp5QBcvO(Single)
   bei _ydpin5JFjepNgd3JOZRb2z5I5Fg._LvRZFcsDWyPwKLB1F2UK7fQ2N6d(Single)
   bei _ydpin5JFjepNgd3JOZRb2z5I5Fg._GO2qaUrk9dl0IceTLiA7P4LcpAB(Single)
   bei Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(System.Object, OpenTK.FrameEventArgs)
   bei System.EventHandler`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Invoke(System.Object, System.__Canon)
   bei OpenTK.GameWindow.RaiseRenderFrame(Double, Double ByRef)
   bei OpenTK.GameWindow.DispatchRenderFrame()
   bei OpenTK.GameWindow.Run(Double, Double)
   bei _Ine8FeGTtDXciSIfaZMHMwCLKGBA._8puLW8J44fiq3A5hthQTfB8WNxc(_SbVlAI6dJIZ4JRt0da0lu23DF14, System.String[])
   bei _lErb0L2e9E9htuT2VVnAsXIZqc7A._8puLW8J44fiq3A5hthQTfB8WNxc(System.Threading.ThreadStart)

 }

Can you give some additional information about when this happened?

Link to comment
Share on other sites

I have a bug, not sure if it's related to xskills as there's other mods, but it seems likely : With Long life 2, health will flicker up and down by a few points, for example going from 9.5 to 9.8, both in the Character screen and the life bar. This is with a health-reducing class.

  • Thanks 1
Link to comment
Share on other sites

Hi, i uploaded a new update for the game version 1.14.7. It mainly adds some functionality to the level command and fixes some bugs. At least my tests do not show any health flickering. If anybody still expereince this or finds any other issue, pleases contact me again. 😄

 

-Changes:
    -reworked the level command
        -setting a level now sets the experience to zero
        -you can now set the player and the skill to 'all' to affect all players or skills
        -you can now use a 'skill' command as a synonym for the 'level' command
        -Note that 'all' statements can cause some lag especially on populated servers
        -if you use the reset command with a level it will also set the skill level to this level
        -so the command 'level reset all all 1' will reset all skills of all players and sets all level to 1
        -Warning: this cannot be reversed
    -the long life ability uses now the stats system of the game instead of the maxhealth modifiers of the health behavior.
        -i hope this will fix the life bar flickering
    -You can no longer get better soil from the recycler ability than originally used.

-Fixes:
    -fixed a crash when you run xlib without xskills or any other mod that actually adds skills
    -improved the stability of some cooking related functions. I hope that will prevent crashes. 
    -fixed: the photosynthesis skill skyrocketing your health into the infinity
    -shift left clicking items into cooking pots should now work better with the cooking skill

Link to comment
Share on other sites

6 hours ago, Tech_Rabbit said:

"got alot of crashes while smithing an anvil
hitting some specific bits just closed out my game"

All I have for you. 

I made a few tests and tried to cause this crash even with metal recovery enabled, but wasn't able to. Are you sure you have no other mods that alter the anvil? You mentioned 'hitting some specific bits'. What bits do you mean? I would assume it would caused by bits at the very edge. Is this correct? Does this happen with every recipe or only with specific ones? 

 

Does anybody else encounter this issue?

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.