#programming
1 messages Β· Page 1 of 1 (latest)
I will take the third message
Giggety
In this channel, I'd argue that it was the zeroth message.
fair
7th message here
i'll claim the 8th one then
so I am cool too I guess? (9th)
in binary the second is mine (10[th]) π
i programmed the 11th message here
Im composing the 12th message :)
13 is mine
Y'all bad programmers because you're indexing from 1 and not zero π
z0ppa got it right.
And I'm bad at reading because I completely missed that message and thought I was being clever π
Doesn't Lua index from 1
Some languages do, yes. And they are wrong.
Ill take the 19th message and my best wishes goes to you developers trying to fix this those hackers are something else.
C has rotten the brains of multiple generations of developers
Interpreted and higher level languages have rotted the brains of current developers π So many that don't understand at even a passing level what allocation is and what is actually happening with resources and why...
like I said, the fact that in C arrays are aliases for pointer arithmetic instead of being mathematical arrays has rotten the brains of multiple generations of developers, who now see that as the norm
I don't even know what is mathematical array.
an array in math is arrangement of numbers in rows or columns where elements can be identified by index (index not offset)
Why even mentioning rows or columns? I think the proper definition would be ordered set...
because of the connection they have with matrices but that's getting too much into details
That's not technically true, that pointers are aliases for arrays, even in C. Arrays do degrade to pointers so effectively they are identical in almost all cases and treating them as pointers almost never causes any problems (besides what problems pointers already cause).
"When everything is void* pointer, nothing is" π€£
30th
hello Im a programmer looking for a job, Im under the water please help me
@ Derek Kermit is a C programmer, in case you were confused π
I hear underwater welding pays really well but have never tried underwater programming.
I'd say flush, to clear the high-water mark?
yo gamers i need some professional help
Therapy is always a good thing (I kid I kid about kidding not about therapy being a good thing)
in college for cs and i graduate soon but ive got NOTHING under my belt, what do i focus on first?
i mean no in depth knowledge of programming or personal projects
Find something that interests you and make it, doesn't need to be a huge project. If you have a hobby make a website for displaying your work, etc
depends on what your goals are I suppose. Do you seek higher education still or do you want to start a career. If its the latter you would probably start looking for an internship in some company, or even a permanent position if you're lucky? Programming is a skill you learn by doing, so obviously you want to do it as much as possible. Contribute to open source projects, make a personal project if you find something that interests you
make valheim mods fr
I do woodworking as a hobby and one of the things on my whishlist is making a sort of shelf for all our USB chargers/cables.
Fascinated by hexagons, I'd like to make it like honeycomb, but as organic and irregular in shape as possible.
So, I've written a (first version of a) tool to randomly generate me some hex patterns to choose from.
The result is an SVG file of the pattern.
I always feel like I am not fluent enough in unit testing, so my self emposed rule for this tool was to approach it test driven and 100% my code.
Next is going to be a web-app, that uses this tool to generate the patterns and then visualises them.
Because I have no convenient way of opening and managing all the generated SVG files.
You could also do something like https://play.battlesnake.com/
A friend of mine used to participate in yearly programming contests with a team of a couple ppl.
More electronics oriented, but you could look into a small robot to program and drive around your home, implement pathing logic etc.
this channel is filled with great mind, donβt fear failure, thatβs how you learn
I'm a seasoned and battle-tested HTML programmer. Sometimes I even dare myself with CSS!
/ask me anything.
how do you align something in the middle
With position: absolute
impossible
Amateurs dont use this, this is my secret
To be more complete:
position: absolute !important
left: 50% !important
transform: translateX(-50%)! important```
To be more !important add z-index: 9999
right, so you tell the css engine its not important to align and they do it properly. Makes sense
I second this. 25 years I've worked as a tech generalist- probably 1/3 IT. 2/3 software development/related.
The advice I'd give new grads - try doing your own thing first. These skills you've learned are very useful, don't chain yourself to the first decent offer you get. You have power. Building your own thingbis a good way to start that
ALSO - remember that no single human has ever done anything.
You're more powerful cooperating with others.
Tldr find some like minded folks and do what Oriana said - build something you think is cool and exciting.
And send me a link when ya do cuz I love seeing peoples work and giving feedback.
I'd like justified text π
It literally took me 5 tries to learn C because my brain was broken by pointers and unions.
Not sure if this is the right place to ask, but does anyone here know how one would go about setting up a channel in a similar format to the servers-and-lfg channel? The boxed off threads, and the most-recent sorting particularly
Just create channel "forum", not all servers could do this, idk requirements, but you could google them.
Any networking folks in here? Looking for some answers, any help is appreciated
If I have a guest network, that is completely separate from my actual intranet/lan right?
And then my follow up is, if I have a device that is streaming as the client on the guest SSID and and the server is on my Intranet, will the devices go onto the external network to communicate?
And then the next question is, do guest networks have an intranet of their own? If both the client and server are on the guest network, do they need to reach the external network to communicate?
You need to enable the community feature to enable forum posts!
- yes it is segmented from the actual network.
- normally the only thing that would be similar for both would be dns servers. Like 8.8.8.8(google) but the ip would be that of your own dns server , or it could be Google I guess to..this would help them communicate with the outside world, but unless you have inter lan routing they wonβt be able to communicate with each other. Itβs like house number 52 trying to knock on house 5βs door when there is a giant wall between.
- if by intranet you mean internal network then yes. All guests can communicate with each other inside the subnet they are in
thank you so much!
I like to create a separate VLAN for those things. It having a separate SSID doesn't necessarily guarantee its a separate network segment.
I posted this question in the dedicated servers channel but it received 0 response. If i try to run a Valheim server, it ends up taking down my internet every few minutes. I also cannot connect to it via its private IP on the same LAN. it is only connectable in the short window the internet stays up via external IP. Also it will only connect if the server is run in crossplay mode. Public 0 or Public 1 dont let anyone connect period. Firewall on the server has been completely disabled. Any clue? I'm just looking to run a LAN only server to play with my kids. Im running several other dedicated servers on the same box without issues. I've tried running the valheim server from several different devices to the same effect. I've used the steam dedicated server download, used the option within the regular game, and i've downloaded it via steamcmd, all behave the same way.
Im guessing there is some sort of looping traffic causing the router to crash, that is my theory anyways, as the server will only connect via external IP, the internal LAN systems are having to go out and right back in creating a loop.
If you turn on crossplay it makes the traffic external. If everyone playing is doing so on steam then I would advise you to turn off crossplay. If you remove the crossplay flag then you'll need to "forget" the ip address if you favorited it and add it back when trying to connect in the main menu. Swapping from crossplay to local like that can cause connection issues for a bit until the server is released from crossplay (or whatever happens, I'm not an expert, just know it causes issues).
Routers should handle that situation without issue. If you just need it LAN accessible, I run the same.
I'm happy to assist if ya need. Lemme know.
I'm away from home at the moment, but I may hit you up once I'm home and have a moment.
It kinda sounds like you have an IP Address conflict.
Feel free to DM me, im always down to help when "kids playing Valheim" is at stake lol. Everyone should have that joy.
Hey i am getting a issue where when i launch the game and try to connect to a hosted server i get the error "retreving failed" and it does not connect me the server. I tried connecting with another account and it works completely fine.
tis a steam issue
Soooo, Valheim is Unity game and uses BepinEx to run compiled C#(managed code) mods
If I write something unmanaged(like C/C++), can I integrate it into mod? Or is only managed code permitted?
Like say, using a particular lib
yes, you can call unmanaged code from C# and mods are no exception
Can anyone guide me, as to where i can go to learn how to config mods on a dedicated server, server side?
probably in some mods channel
I havent played in months so I decided to start a new character and world with no mods. For some reason after 5 mins the game stops responding. If I use Vulkan, 1 to 2 mins. I have redownloaded and verified files with no errors. I have no idea what is causing this...PLEASE ANY HELP IS APPRECIATED
For those running a server that crashes occasionally, I whipped up a script that checks if the server is running every 30 seconds and if it is not it starts it up again.
`@ECHO off
SET VALHEIM_DIRECTORY="%ProgramFiles(x86)%\Steam\steamapps\common\Valheim dedicated server"
SET _PollingInterval=30 > nul:Start
START cmd.exe /k "cd "%VALHEIM_DIRECTORY%" & .\start_headless_server.bat"
TIMEOUT 5 > nul:Loop
ECHO %date% %time%
TIMEOUT /T %_PollingInterval% > nulSET PID=
FOR /F "tokens=2 delims= " %%i IN ('TASKLIST ^| FINDSTR /i "valheim_server"') DO SET PID=%%i
IF [%PID%]==[] (
ECHO Application was not running. Restarting script.
GOTO Start
)
GOTO LoopGOTO:EOF`
Just copy the above text into a text file and rename it to 'valheim_server.bat' and double click to run. You can Ctrl-C to escape out of it or close the window to stop it. I should also mention this was written for Windows, I'm not sure if it will work on Linux or Mac systems.
Has anyone tried to MOD in NPC for your base (Terraria Style)? I found https://www.nexusmods.com/valheim/mods/1964 but source form github was removed.
that sound amazing
``
boolean isSorted = false;
String tempString = "";
int fakeItCounter = 0;
while (!isSorted){
for (int i = 0; i<sRay.length-1; i++){
if(sRay[i].compareTo(sRay[i+1]) > 0){
tempString = sRay[i];
sRay[i] = sRay[i+1];
sRay[i+1] = tempString;
}
else{
fakeItCounter ++;
}
}
if (fakeItCounter > 90000){
isSorted = true;
}
}
``
Forgot how to check if a bubble sort is done so I made an arbitrary counter instead π
Basically you want to set isSorted to true at the top of the while loop, before the for, and in the if statement inside the for you will set it to false because you changed something so it's not sorted. It will be sorted when you go through the for loop and nothing is modified.
But since bubble sort's worst-case complexity is O(n^2), you could have checked to see if fakeItCounter was less than sRay.length * sRay.length and been safe instead of an arbitrarily large number.
And that is the difference between programming and computer science π
Right that's what it is. I was blanking. Thx
No worries, happens to the best of us. Work on understanding the logic and memorization becomes less important π
may I introduce you to the glory of the triple " ` " when you share code. Your code would look like this : ```c
boolean isSorted = false;
String tempString = "";
int fakeItCounter = 0;
while (!isSorted){
for (int i = 0; i<sRay.length-1; i++){
if(sRay[i].compareTo(sRay[i+1]) > 0){
tempString = sRay[i];
sRay[i] = sRay[i+1];
sRay[i+1] = tempString;
}
else{
fakeItCounter ++;
}
}
if (fakeItCounter > 90000){
isSorted = true;
}
}```
and you add the language after the triple " ` " to have the fancy colors
Holay molay
You can also add the language right after the opening three back ticks like so.
Can u add that u can give admin to players
Players can already be admin via the adminlist.text file but they're limited mostly to save and similar commands.
hi can someone help with setting up vhserver on headless linux, im following this post https://www.reddit.com/r/valheim/comments/16rwz7x/install_bepinex_on_dedicated_ubuntu_server_with/ but the step Edit lgsm-valheim-file sudo nano /home/vhserver/lgsm/config-lgsm/vhserver/vhserver-3.cfgand add executable="./start_server_bepinex.sh" cause ./vhserver-2 start
[ FAIL ] Starting vhserver-2: Unable to start LinuxGSM
This is a better question for #dedicated-server , it's not really a programming question
What kind of device? Im hosting on my pi which requires x86 and x84 emulation.
thats a drastically different process than what I did sorry.
what engine is valheim made in?
Valhiem is Unity based
ok so its is made in c# i gues
yes
Manage to get mods working?
never tried mods
Ya tried but it fought me and I wasn't about to try too hard lol pretty sure i need to add wine
Both unity based and based at the same time
x84?
I have a question regarding some architecture, don't know if anyone can enlighten me on this.
But how does Valheim handle world edits? I get that the world is made from some sort of seeded world generator. And then a client just needs to generate with the same seed.
But once I make an edit, I need to store those height changes as well as texture changes. I'm wondering how to this work architecturally.
How does a new player entering an old world get all the updates that differ from the original seed? Both the heights and the textures. Does anyone here know? Or have a good guess?
It's done via Heightmap component that stores/reads data from a serialized object (ZDO)
There's one Heightmap object per sector (64x64m in XZ) that stores offsets from the procgen seed values
I'd say Heightmap is the main component displaying current heights, but modified heights come from TerrainComp
Are there specific languages I need to use for modding like C# (bcz it was written in Unity) or is there support for other languages like Java?
There is no way to get around some sort of a C# requirement. You would have a much harder time integrating Java to your mod than just learning C# which is already similar enough to Java to learn quickly
I know C# (like you said it's almost identical to java) but I don't really like it in terms of conventions and stuff (like {} on new lines, capital PascalCase methods, etc)
And going against convention will be even worse bcz some built-in functions will follow PascalCase and then your own will follow camelCase it'd just be hard to keep track of
I dislike languages other than C# for the exact reason that they don't use PascalCase on methods and camelCase on types/variables
But anyways I just get into the mindset of the code and move on. It's better to be flexible and open minded so you can make those neural links in your brain and what not
Well, code style has nothing to do with bytecode it is compiled to.
You can place braces in your code anywhere you want. I think it's possible to adjust style for the decompiled code as well.
As for PascalCase for methods, you can name your methods whatever you want, even snake_case like in python, but you need to call game methods.
You can do some Reflection magic to transform the names from camelCase to Pascal case, but are those hacks (and possible slowdown due to JIT hindering) worth it?
JVM -> .net bridge is even bigger unnecessary hack
You are basically "forced" into those conventions, u can re-create all the methods yourself and name them in camelCase (and just in them call the original method), and u can just write your own methods using camelCase but that's not really viable bcz it'd be alot of work, and if you use camelCase while other methods are PascalCase that'd just cause inconsitencies which is worse than just using PascalCase
Well, code style has nothing to do with bytecode it is compiled to.
Yea but not following the conventions has massive downsides
Massive downsides? Most mods are supported by their only creator anyway. Very low chance you'd have potential co-authors, who'd be repelled by the fact you use unorthodox code style.
Even in solo work, if there is no consistent style it can be difficult to keep track of things, I can't just have "my style" because things like implementin g interfaces will use capital letters
For the brackets I guess that's a thing I can do
It's better to just adopt the language's style and conventions
Not sure why it became such a big deal, just got a bit disappointed that the standard way (if we ignore bindings to other langs) is C#.
I used to care about style a lot more than I do now - as long as people are consistent, I can deal with any style. Within reason, of course. I prefer the C# coding style, but if another language does it differently, it would be kind of a silly reason to not use it, IMO.
These days between git and IDE extensions, its possible to normalize style enough that folks can read/write in their preferred style and have it normalized on checkin/merge.
Very true
Hello, is there an easy way to get info like players health in real time as a value ?
Making a layout for an event and it be really cool with a circular health bar around the players avatars
hey guys, has any of you tried to use the Discord api to send Valheim saves game to a Discord channel (to share them with friends, etc.)? My script (https://sourceb.in/T7lfthUtfP) sends these files to the channel but after downloading, Valheim can't make use of them. I am sending them according to Discords specs https://discord.com/developers/docs/reference#uploading-files
but I reckon that my encoding before sending
$file_enc_fwl = [System.Text.Encoding]::GetEncoding('UTF-8').GetString($fileBytesFwl)```
might be the problem, but I am stuck here, as my understanding of http/encoding is limited
Cheers!
@rich vapor don't use ## to markup text π
why?^^
without knowing anything about anything isn't the problem that the save files are not text, they are binary files. They are not utf-8 or whatever
People use it for spam and causing havoc in channels, so we have them basically disabled on the server.
Check, but where have it used them? π€
Yeah...people recently suggested using another http client than the one I am using. And of course considering the binary file
You should be zipping up the world file first and sending that as gzip
Your source looks like PowerShell leveraging the C# library so looks like you could even make use of:
https://learn.microsoft.com/en-us/dotnet/api/system.io.compression.zipfileextensions.createentryfromfile?view=net-8.0
does zipping prevent file corruption while sending? The larger file is ~18 MB, so that is sent in a few seconds
you might have already figured this out by now, but file compression is unrelated to the integrity of your file transfer. Expect for the fact it spends slightly less time in the airspace, but if your data is already the target of an attack, there really isn't much you can do about that
(Unless you mean "unintentional" bit corruption, in which case TCP already handles and corrects that for you. UDP however doesn't, which is why video streaming has questionable quality)
could anyone here help me with a server Idea I have?
The idea is it's like the minecraft lifesteal server, But firstly, In valheim. And secondly, With hunger slots.
I'm thinking you would start with 1-2 extra slots and could use craftable hungerslots to get back up to 3 but no higher.
It could probably be done by making a custom equipable that just gives an extra hunger slot. Crafted ones would have a maximum capacity but if you died, You'd drop a hungerslot.
That would cancel the other Idea I had of keeping equipped items though. (Since Losing a slot is already alot)
Anyone have any beginner tips on getting into modding in valheim? Ex, what language I should get familiar with?
Valheim is based on the Unity engine, so C# is your best bet and reading up on how that whole ecosystem works
Jotunn has some decent guides: https://valheim-modding.github.io/Jotunn/guides/overview.html
the valheim modding wiki on github and the bepinex docs are also good sources once you have a handle on c#:
https://github.com/Valheim-Modding/Wiki/wiki/Best-Practices
https://docs.bepinex.dev/articles/dev_guide/plugin_tutorial/index.html
ReadAllBytes returns a byte[] array of the binary file, theres no need to have encoding unless you are going to transform it into a Base64 string. Limitations fall under if your account has Nitro or not as you will be hitting a boundry of the limitation size you can upload, as someone mention best to compress the file to shrink it down some as best as you, because the world will slowly expand in size the more you explore, build and change the terrain etc
w/o nitro max size is 2MB I think, gzip won't solve the problem, worlds cannot be compressed that much
Almost nobody use TCP/UDP directly. I'm 99.9% sure request is sent via HTTP with POST request or some Discord-specific API, but not low-level sockets.
yeah I am using discord api -> http. I though I read that max file size is 25MB? right now both file have around 20 MB and I can still upload them without nitro.
I was just confused about the need or no-need for encoding when sending binary...why would I want that?
Well, the encoding is literally... "binary". Some APIs use that, but you had "UTF-8" in your code sample, which is text-encoding
I googled, yes, max file size is 25MB, still not enough in many cases with save files. You can try to workaround with mluti-volume archive, but I'm afraid Discord might detect that and block certain actions.
I just tried it out and windows could compress the 19 MB .db file to 10 MB...almost 50 % - quick google though: people tend to have save files up to a few 100 MB later. In the case we will ever hit that region (will never happen - we play once per month) I will use a cloud service or so - I probably should have though about this earlier, but all this started as a side side hustle and I didnt plan much ahead
100 MB file is typical for explored world, compression doesn't improve at all with size growth.
Our world file is 900+MB and compresses to about 325+MB with .tar.gz
if you're worried about the size, you could just upload it to google drive or something and grab the url, then send that to the discord
Now when the Valheim upgraded to Unity engine 2022+, can we enable DLSS 3+ ? Did anyone tryed?
Is it enabled by default? It seems it's not and I heard from sometime with purple nickname it's not enabled.
I want to set up a dedicated server in such a way that vanilla players can join in no problem but if modded players want to join they will be flagged by the azumatt anticheat. Any ideas on how i can make this?
Nope.
its not possible to read such data from the client naturally, ideally the client would send "ismodded" to the server but it does not
Alternatively can i make the server detect a console player and let them join in and on the other hand restrict all pc players who does not have the anticheat?
the anticheat should already do that for you, not being able to join without it that is
i can make a mod that only allows console players for you
Thank you π
Looking at the decompiled source can't you just call PrivilegeManager.ParseUser(netPeer.m_socket.GetHostName()) and read the resulting User.Platform enum from that?
You could probably also patch ZNet.RPC_ServerHandshake() to parse the incoming netPeer.m_socket.GetHostName() earlier to boot them right away.
Just some thoughts, always good to see new mods on the store.
HI
Heya! Has anybody been able to get an IDE working for mod development on Linux? I'm trying to write a patch for another mod but it requires .NETFramework 4. I installed .net core as well as Mono and both are no good for this I guess.
Does anyone know how I can add a custom slider in settings in a valheim-BepInEx mod?
Patch the Settings.Awake() method and add your custom slider there
In game settings, or BepInEx Configuration Manager settings?
preferably in game settings
Look in assembly_valheim both in Valheim.Settings in the root of the namespace and also in Valheim.SettingsGUI. Mimic what is done there and inject your slider in the most appropriate entry point you can find.
"Mimic what is done" is such a universal thing in programming. Still using it after almost 20 years of working as a programmer %-)
Hello, I'm a fellow Linux user. I'm on CachyOS. I use Jetbrain Rider 2024 and Vscode (Aur). You'll need to download mono. I used Yay manager. Download .net 8 as well if you want to do net standard 2.1 etc
For jetbrain goto Ctrl+Shift+A type Tool Set config and select msbuild 15.0 if you're trying to do net462 or net48
hi guys, my name is Timofey, I'm from Russia, and I was very inspired by your game and wanted to find you to suggest creating a major update in the game in the future (developer GameDev). P.S. THERE ARE A LOT OF IDEAS))
Hello guys, after long time I tried to start valheim. We were playing with my friends in my world. Today I have noticed that my computer cannot upload the valheim character and world data to cloud. Also I am not able to create any new character/world. Did anyone had such kind of an issue? I dont use any mods or any other things. In order to solve the problem I have reinstalled the game but did not work. I have shared the latest save from my worlds_local folder to my friend. She was able to upload to the steam cloud. We played together but whenever I log out from her server my character is not updated and my new created items has gone.
There's dedicated channel #suggestions (read the rules before posting, you need to follow specific format)
This channel is not to talk to developers (of the game), but rather for developers/programmers who play Valheim.
More appropriate for #valheim-help but maybe you're out of space in cloud?
hey yall hope someone can help me, everytime i start valheim i get a unity loading bar and crash during loading. i tried verify integrity through steam but that didnt work, any suggestions?
this happens before the main menu? and not when you load a game world?
if so, sounds like a mods issue to me once again
i have 0 mods
and yeah it happens on startup i dont get to the main menu before it crashes
I don't know where the mods stuff usually goes but I would try locating the game files and deleting them manually, then reinstalling the game
thanks, ill give it a shot. thanks for your time
the Mac Version is here
Is there a way in BepInEx using harmony to read a value inside the Update() function when a class doesn't have one?
basically debugging
If the class doesn't have one how is it calling Update
BTW, I always wondered how does the game picks up mods. I mean technically, you just put a dll in the same folder and the game somehow decides it needs to load it. That sounds like a ... not very secure feature. With my understanding, I'd expect a user to patch game dll by maybe add a simple call of mods init function where everything happens. But just putting a dll... is there a .net feature which just loads all the dll in the folder or something like that?
BepInEx is an injector/modding frame work
yes, but how this work? In the level of dll loading
First up, BepInEx looks at ever assembly located inside the BepInEx/plugins folder, including nested ones. It extracts BepInEx metadata, resolves the load order, loads every mod dll and instantiates each BepInEx plugin class.
Afterwards, if a mod requests a non loaded dependency the .Net assembly resolvement kicks in. Based on the current context, so System, the current application (Valheim.exe itself) and the requesting mod dll location are searched. See https://learn.microsoft.com/en-us/dotnet/framework/deployment/how-the-runtime-locates-assemblies for more information
That's when BePinEx is already loaded. How does the game (or rather OS) know that it needs to load BePinEx?
I believe it works rhe other way around, you launch bepin which loads the game
For this, Doorstop https://github.com/NeighTools/UnityDoorstop is used
probably an issue with a very old save file. Try to make a new character if nothing helps :/
it isn't so I'm asking if there's another way like using a different class' update or something
not quite sure if this is what youd want but BaseUnityPlugins derive from MonoBehaviors so you could probably write an Update method like that
Your plugin class extends BaseUnityPlugin which itself extends MonoBehaviour. Your plugin class can have an Awake(), Start(), or Update() method.
Executing code every game tick is usually excessive though and I would caution against that. Find another place in the game to hook into that is called frequently enough but not at times when it isn't needed.
Harmony doesn't find the derived Update unless it is also implemented in that class, and I just want to display some variable values in the console
You could probably use the method advize described and print out whichever field you need in it
You might also want to look into the UnityExplorer mod, it's good for debugging type tasks like this
I have a server running in an EC2 and I'm anoyed by having to type my password every time I want to join in cuz i play on Controller... Can I just add myself and my friends on to "permittedlist.txt" and remove the password?
I wouldn't run an EC2 outside a VPC with no password under any circumstances...
Hey what programming language valheim use?
And how can i mod it
c# its unity game. Some of the modders may follow this channel but you could ask in#mods-discussion
valheim is its a unity game? damn
apparently it means its relatively easy to mod
given they don't have official modding support afaik
Probably the easiest game to mod. Yes
hi, i need some help, how do i setup the cronjob mod to auto reset the ores, burial chamber, crypts, troll caves and the hildir quest dungeons? the auto reset should happen maybe twice a week
Hi i need help how to code for the wait in line program in unity like all those mobile games we see a customer or a vehicle or anything is waiting in a line and moves when the one nearest to the desk moves to the destination
Does somebody know how to read crash.dmp and player.log? and can tell me what is wrong with my game?#valheim-help message
Hello, I found this great mod ImageSigns but the images are too small for my use.
(I don't know how to reach the author.)
I'm pretty sure I just have to edit this line "widget.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f);"
Now I'm trying to recompile the mod, but I can't find this "On" library.
https://thunderstore.io/c/valheim/p/pseudopulse/ImageSigns/source/
Can someone help me compile this?
You'll need a project reference to MMHook generated DLLs.
Using this mod https://thunderstore.io/c/valheim/p/ValheimModding/HookGenPatcher/ that generates it on start-up, I then just did a reference to it.
<Reference Include="MMHOOK_assembly_valheim">
<HintPath>$(GamePath)\BepInEx\plugins\MMHOOK\MMHOOK_assembly_valheim.dll</HintPath>
</Reference>
Thanks, this helped! Now the "On" library is recognised.
Sadly, I still have 160 errors. I obviously don't know what I'm doing... I think it's my reference to Unity that is incomplete.
Seeing that UnityWebRequest() in there is just asking for all sorts of danger lol
You can just use dnSpyEx to edit the DLL directly I think
Still no luck. But that was a good suggestion.
Hi there guys. I'm trying to make a texture pack for valheim (possibly with new 3D models as well) and I'm stuck since Aedenthorn's CustomTextures doesn't work on terrain texture anymore since they're Texture2DArrays now.
Has anyone come along to update it?
Can someone help me find the models from the game files
I cannot find them
if it's possible
I'm having the same problem.
They are compressed into Unity asset bundles. There are third party tools you can find on the Internet that are able to extract them, but they aren't very useful that way. Best thing to do is rip the entire game into a Unity project (guide linked below), and from there, export the assets to something usable like FBX.
https://github.com/Valheim-Modding/Wiki/wiki/Valheim-Unity-Project-Guide
I found a program that extracts all assets from unity games
https://github.com/Perfare/AssetStudio/releases
- From the Debug menu turn off error because the program will open a new window for every file it cannot process a file
- Open the folder with all game files
- From the filter choose what you want. For models choose mesh
4.After choosing right click and extract
Thanks
how do you start making mods for the game
A good start would be scrolling back through this channel for a bit. Treasures await the patient scroller. π
Hey there friends. I'm working on a small mod (BepInEx and Jotunn as mod framework) and have my mod loading, patching with Harmony and working. I can access the data I'm looking for by poking around in ILSpy and can print to log all the stuff I want.
My question is this: How would you draw a row of Trophy icons on the main HUD starting in the lower left and running to the right? The images already exist in Valheim, I'd just be grabbing them, scaling them, and drawing them as an overlay. Is it possible to do this without creating GUI assets in Unity? Is there already a big UI element for the whole HUD where I could patch in my icon drawing?
The HUD exists mostly as GameObjects buried deep within the hierarchy of the main scene. These GameObjects have components (scripts) attached to them, as well as children / grandchildren all with their own scripts as well. These GameObjects can be cloned, modified, reparented, and/or have their sibling order modified. New GO's can also be made from scratch via code or can be pre-assembled in Unity, built into an asset bundle, embedded within your plugin, loaded, and injected into that hierarchy.
This hierarchy can be explored in game using a BepInEx plugin called Unity Explorer, or you can view it in Unity by ripping the game files into a Unity project. There is a guide for this on the Valheim modding wiki.
My recommendation is to view the existing hierarchy via the methods I've mentioned, and using the existing HUD elements as examples, find and copy/emulate the ones closest to your desired result.
Hello all, I don't know if this is the right channel for this but I am planing to make a small scene (5 second video) of valhiem. For that is it possible somehow to extract sky hdri of valhiem and put it in a 3d program?
Some of the steps of https://github.com/Valheim-Modding/Wiki/wiki/Valheim-Unity-Project-Guide might help find if the out-of-box assets have something you want. I don't know off-hand if the skies are represented in a portable way, though.
ok thank you
Hello, does someone know why recipes pop up even i have disabled them, is it bc i am admin?
Hey everyone, I got a question about performance. I've noticed that I get mini stutters when Valheim places locations on the world map for the first time as you walk around. Even though they are one-frame stutters, it can be jarring. I was wondering if there's a dev command or some other way to force it to place all locations on the map beforehand. For context, my computer is a 4090/12900K that gets above 120FPS normally. It's just these one frame stutters that happen exactly when the Unity log shows "placing location at X which took Y ms."
I found a solution, in case anyone else wants to do the same. You can use the Upgrade_World mod and type the command: zones_generate maxDistance=1000 to pre-load the locations to avoid stutters.
how big the world save becomes in this scenario I wonder
A full world generation takes about 1-2 hrs and the initial world size hovers around 400-500 MB and 3-4 million ZDOs.
Source: I pre-generate the entire world for Comfy as we override location proxy spawning behaviours/quantity. Typical end world file sizes are around 900MB with 7 million ZDOs.
Since server determines location quantity, etc, why not just use a server side mod for that?
Because instantiation occurs on the client
You will see references to the different instantiate modes: Client, Ghost, Full
Server spawns LocationProxy and related objects.
Yeah and I want to instantiate everything including vegetation, of which I have multiple different configs loaded via mod.
Server spawns vegetation too.
OK π
I mean it might work if your mod was just on the server.
Unless there is something that needs user interaction.
It doesn't matter to me, I do it once every few months and I'd rather do the upfront work of generating the entire map to reduce server congestion
If I had to repeat this process more often I would still generate it up-front since custom world edits are done afterwards.
Yeah, nothing wrong with that. Good workflow is what ultimate matters.
I wish umod supported valheim, I really miss the built in compiler. Save your script, reload the mod from the server console and test your changes. It really spoiled me
Would this have any benefits for a 10 player server?
I don't know what is umod, but the company promised official mod support at some point. Maybe, after that there will be better support for various common mods know from other games.
umod is a modding framework for around 6-7 unity games, Rust is probably the biggest game supported
Heard about Rust, but never played it.
The game is pretty solid, the player base pretty toxic
yeah, that's what I heard
what is missing from e.g. mods created by @autumn igloo but existing in umod? I heard he has mods which allow to configure A LOT.
or is it just the familiarity with specific API so to speak... config format?
I haven't really tried modding in valheim, so I'm not sure what features are available, but is doesn't seem like on-the-fly compilation is one
never saw on-the fly compilation, but I haven't even looked at mods in Valheim for a year...
I never made custom maps in WC3 or SC1/SC2, but I roughly understand how powerful are their map editors and I think I know what you're looking for.
I just really liked the workflow with umod since you could change your program on a live server and it would recompile and re-patch with a simple reload command
I think support for a proper scripting languge like LUA is needed here.
I vote for Javacript )
but yes, I know, Lua is much more popular, particulary in game dev
ugh, lua is like the js of the game world
and probably easier to embed
I have no objections to C#, other than having to use VS and all the associated bloatware
what language does umod use for scripting?
C# only, there was talk of implementing lua, but it never happened
JetBrains Rider is free now. Can be a little more performant than Visual Studio Code, not sure how it stacks up against the real Visual Studio.
What's hilarious is that I met a Microsoft dev last year who told me he and most of his coworkers use JetBrains Rider
When did they make it free?
A few days ago.
Oh dang, I will have to check that out
It has it's own bloat, IMO. It's pre-bundled with a Java runtime to run the IDE and has at least one AI-related plugin installed by default
It does tend to creep in if you don't make an effort to avoid bloat
I work for VS, maybe I will try JB Rider lol
guys, does anyone know good resources to start creating mods of my own? ty in advance
It depends on what you need. Do you know C# already and need to know Valheim specifics? Then itβs https://github.com/Valheim-Modding/Wiki
Anyone knows of a way to launch Valheim with a Unity command line argument like -diag-job-temp-memory-leak-validation? I tried to add it on Steam's launch arguments but it didn't work. I'm trying to figure out which mod is causing a constant error that is making me stutter, and this is what I get on the log:
[Warning: Unity Log] Internal: JobTempAlloc has allocations that are more than the maximum lifespan of 4 frames old - this is not allowed and likely a leak
[Warning: Unity Log] To Debug, run app with -diag-job-temp-memory-leak-validation cmd line argument. This will output the callstacks of the leaked allocations.
Not due to any particular mod, we think it happens in vanilla around tar pits
@tight heron Oh that makes sense, it was happing on the Plains biome for me, quite consistently too. Thanks!
Hey, I would like to 3D-print a black marble tower I made. Does anyone know of a method to localize a 3D model or wireframe of a in-game structure?
As far as I know, no one has made a tool to do this
As for a method, you can use a blueprint mod to get the position and rotation of each piece in your build. Then maybe rip the building piece models with Unity. Then you'd have to write a program to build a 3d model using the ripped prefabs and the blueprint
Yeah, true. Might as well make a mock-up of the building pieces in Blender and rebuild it there. π€
the closest would probably be https://github.com/probablykory/location-tools. After importing your blueprint (made with PlanBuild or InfinityHammer) in Unity, you can install and use Unity's FBX Exporter to get the full model
Thanks for the tip!
Three different crashes, all same error code. Unity crash 2022.3.50f1. First one a lot of stuff on the grab and spawning in after killing abomb. 2nd just pulling items from a chest in crypt, third in base just finished fermenter and nothing special.
Has anyone else had these issues? I have tested individual components and stress tested the gpu and cpu. Maybe voltage.
System: AMD 7950x, 64gb ram, asus 3080, 990 pro storage, plenty of cooling, asus motherboard, corsair 1000w psu.
I am at a lost. Seems after some updates this happens a lot for me and then at times all good for weeks.
If it's a Unity crash, immediately after go look at C:\Users\<YOURUSERNAMEHERE>\AppData\LocalLow\IronGate\Valheim\Player.log to see if it's emitted the full crash stack trace in there.
Hi, is there any way to remove the snow storms? My PC is very old and my fps drops a lot when this happens.
If you are playing single player, enable devcommands, and set the environment weather to clear or something.
yo anybody here know anything about Tableau and willing to help me out?
Maybe look into mods, there is a mod configuration that letβs you configure a lot things
Of course if you guys play vanilla then Yeah Idk
@spring rivet
Why are you pinging that person?
He is a friend, who hosts the server I play on.
Ah ye that makes sense
Anyone have any idea how the water was done in Valheim? It appears to me like they may have used a generated texture processed via FFT similar to sea of thieves given how realistic it looks, but just stylised the actual water textures etc. But then I'm wondering if it's just a really well done classic sin/Gerstner wave implementation? Currently trying to write a water shader myself for use in unity and I really like the way valheim's water looks.
Hi, i have a question (hope it's correct channel π)
How can I started make my own modification to valheim, or where can I search tutorial about that? When I look in Google only what I seen is how to install, download etc.
I already stary learning programing and it's can be excellent lesson for me π
Jotunn has some good guides https://valheim-modding.github.io/Jotunn/tutorials/overview.html
The modding wiki has some useful info too https://github.com/Valheim-Modding/Wiki/wiki
There are also a good handful of modding discords listed that you can ask questions and get help in
Ohh thanks so much π
not entirely sure where to post this. I'm on a dedicated server that a friend has sorted for us and quite often when we enter new areas it doesn't load in completely, most of the time its just open areas with nothing, no trees or rocks. Sometimes it will eventually catch up but with a lot of the dungeons caves etc they just don't show. Any help would be great as we've been struggling to figure it
@pale jasper Most of the Z prefixes you might see in the CLI assembly are there for namespacing. You can generally assume that a Z-prefixed class comes from Valheim itself and not from the CLI Standard Libraries, Steamworks wrapper, the PlayFab Party plugin, or Unity. Those libs often have classes named something similar/close to what would need to be created in Valheim.
The wiki contributors have tended to lean on ZDO meaning Zone Data Object, but I don't know if that's been verified by the devs or if it's part of the same namespacing above.
anybody got the mailbox to send a crash log to? cause its crashing without me leaving my desktop.
Please, can someone tell me how the graphics are implemented in the game? I'm filling textures into Unity low res, making the same low res normal map, but I still can't achieve the desired effect. Let's say we take a bonfire. The pixels of the earth change color depending on the lighting. It feels like the light is falling on each pixel, rather than on the entire surface. How is this done?
Since sharing screen shots are not allowed I can't show you but one way you can do this is to go to the png, image map ect and change filter mode to point no filter, then max render size between 256-512. 512 if your object has issues rendering in 256. Use crunch Compression low quality and then set the compressor quality bar to 100.
Thank you a lot and one more question, how can i create a pixelated lighthing? I mean according to the Vahleim graphics there is some specific sort of light source which lays on every texture pixel. I am looking for solution for a week.... maybe You, know somthing about it...
anybody got info on why this is being spammed 100's of times a second?
[Info : Unity Log] 03/02/2025 22:47:55: Im still nto the owner
One of the mods you are using is causing it. Disable each mod one at a time and work out which one.
Has anyone got a build pipeline running for their mod?
tysmm
I know this channel is not for minecraft modding but yall are the only modders i know. Anyway i just picked up programming 15 minutes ago and already embracing the logic. I found an error that was caused by a lack of a config file so i removed the part of the code that checked for it and now it works flawlesslyπ
Hey all o7 idk if this is the right chat to ask this in, but how does one start getting into making mods for valheim? Ive got a few ideas and i want to try but have never made a mod for a game before. Thanks! 
I guess this is a good place to start: https://github.com/Valheim-Modding/Wiki/wiki
Feel free to @ me if you have questions
print(chr(sum(range(ord(min(str(not())))))))
it's....beautiful
does thundesrtone keep a copy of assembly-csharp.dll somewhere cuz I tried to mod another game that uses it by editing the assembly-csharp.dll directly and the game completely ignore my changes ? Like it wont even UnityEngine.Debug.Log on awake for the inventory manager of that game ?
Generally not. Does your log happen in a vanilla non-BepInEx run? If it's anything like Valheim, the real meat of the game might be found in other assemblies.
hum I should have tested it in a vanilla run yes... π¦ that was dumb on my part to not do that
I restore the assembly-csharp.dll now so too late but when I redo it Ill check the vanilla version first and not even start thunderstone
Like I did that because I really sucks at IL and since it's not for distribution I think it's just faster to edit assembly-csharp.dll directly
Does anybody in here know if it's possible to create a completely customized seed, I found one with a really great valley in it. That's surrounded by mountains but it doesn't have really big land masses and I'm trying to do this massive community project, we're being sponsored and everything. Sure that I have a good seed, because we've already started, but I plan on getting the infinity Hammer to move it all over to this new seed if it's possible. If not, I guess I'll have to deal with the one that we have, but I would prefer to be able to have a fully customized one so that I can build it around the lore that we're creating for this world.
Not sure about an actual map builder but you can use this to scope them out without having to generate them in game.
I've used that, it found me my great seed but there's a severe lack of massive land masses lol
And we've already built in this world
01965442-bc57-23ef-11bc-45850e28baf8
out of this modlist, there is a mod that is preventing me from eating, can yall help me find it?
[Error : Unity Log] MissingMethodException: Method not found: bool .SEMan.HaveStatusEffect(string)
Stack trace:
(wrapper dynamic-method) Player.DMDPlayer::CanConsumeItem(Player,ItemDrop/ItemData,bool)
(wrapper dynamic-method) Player.DMDPlayer::ConsumeItem(Player,Inventory,ItemDrop/ItemData,bool)
(wrapper dynamic-method) Humanoid.DMDHumanoid::UseItem(Humanoid,Inventory,ItemDrop/ItemData,bool)
(wrapper dynamic-method) Player.DMDPlayer::UseHotbarItem(Player,int)
(wrapper dynamic-method) Player.DMDPlayer::Update(Player)
#mods-issues will be able to help better. Have you gone through your mods and checked the docs/news for each to ensure they are compatible with the version of Valheim you're using?
are there any console commands to make enemies fight eachother?
or is there a specific trait i need to give them for them to become hostile with other mobs
Check out riverheim. The mod is on thunderstore. Might give you some ideas
I'll be trying that when I run my next server but right now the project is too far in to restart with a new seed. I did find riverheim read what it does and thought I'd give it a try in the future. Thank you for reminding me of it lol
You're welcome :)
Oh and if in the future you want to check out the RP server feel free to dm me, also look on YT and reddit for ValheImmersive!!!
Thanks for asking! π
Nope, not that I know of at least. There's only some interaction within the game where certain creatures attack each other for example, Greydwarfs and Skeletons. Although they mostly target the player, if the player is unnoticed or too far away, they sometimes start fighting each other.
Anyone running an older version of the game (circa 1 year old) and willing to check something for me? It's pretty simple.
It's not necessary to start the game even.
enemies fight other factions
factions that are currently in the game:
Boss
Player
Forest
Undead
Mountain
Plains
Mistlands
Sea
Dvergr
Animal
Demon
enemies are friends with their own faction and will fight all other factions
I'm seeking someone with Lua script knowledge. Please DM me for further information!
How to properly register ZNetView and its ZDO in the current version of Valheim, if there is no access to ZNetScene.m_instances and there is no ZNetScene.Register(ZNetView) method?
The goal is to create a network object manually, assign it a ZDO so that it persists between sessions and is not deleted as "invalid prefab ZDO".
We use:
β ZDOMan.CreateNewZDO(...)
β assign ZNetView.m_zdo via reflection
β call ZNetView.Awake()
β set SetPrefab(...)
Everything works - but without registration in ZNetScene, the ZDO is still destroyed on exit / entry.
What fields / methods / alternative approaches should be used to properly register the object and its ZDO manually?
I would have hoped someone would have answered you by now, sorry, and I don't know the answer. You might try asking in one of the modding-oriented Discords. Feel free to DM if you can't find them.
Using publicized assemblies would give you access to many of the requisite methods for registering a prefab (some details on that here https://github.com/Valheim-Modding/Wiki/wiki/Setting-Up-Mod-Development-Environment#situation-1--3-view-vanilla-code)
The proper way is going to be registering your prefabs to Znetscene on awake. If you want to set and keep data on your prefab you still need a znetview or such on the prefab, or you need to use another objects znetview to set/load values.
Hi,
I've been messing around a bit on basis of CustomAudio mod recently, but especially trying to add new sounds as well as completely new triggers.
Just wanted to see if anyone has any experience with this. I've tried things like overwriting sfx prefab names in EffectList.EffectData[] items, playing sounds locally, using RPCs to play sounds, trying to create own prefabs, etc.
Ultimately, most things seem not compatible with multiplayer one way or another
That is because the Valheim server function is mostly a relay, and only a limited set of triggers with limited information are send to the server and to other players. Your custom triggers will never reach them. The limited set of information the server gets leads to many other problems/limitations as well. It would be nice if the devs expanded what is send. As for now this limits modding to mainly client side, also very good anti cheat is almost impossible because the server is in control of almost nothing. For prefabs you can do that from the server in a limited way, as long as you build your new prefabs from in base game elements.
Register your new sound prefabs in znet else wise not heard in multiplayer
(call to arms spoiler)
Could anyone tell me ||Skull Splittur|| prefab name? too lazy to inspect hehe
You'll probably find it here: https://github.com/ArgusMagnus/ValheimServersideQoL/blob/dev/ValheimServersideQoL/Docs/Prefabs.md
Can anyone explain what the zoid indicates.... ie:
- what are the numbers prior to the colon? is 'session id' or 'playfab id' the right term?
- what is the digit after the colon indicating when it increments after each death. Evidently 0:0 means killed, but whats the logic to it changing after respawning? [edit - time in seconds]
08/31/2025 14:25:27: Got character ZDOID from SmallTest : 0:0
08/31/2025 14:25:27: Got character ZDOID from SmallTest : 1290327661:13
Sure, just about any object that could be communicated over the net or saved for later in a world db is a Data Object (ZDO). Those objects can be something like a dropped item, a creature, or in this case, a character.
ZDOs have an owner and a unique ID amongst that owner's objects. These two things make up the ZDOID. When they're printed as a string for debugging or logging, what you're seeing is <owner ID>:<object ID>. By combining these two identifiers, a client can independently generate an ID for an object it creates without having to ask the server what ID to use.
The client's character is loaded from disk, a ZDO is created for it with the player profile and character inventory and communicated to the server+players as needed. It needs a ZDOID for this ZDO. The client's game session ID (randomly generated when you start Valheim) is used as the owner ID here (1290327661) and the character ZDO has unique object ID 2 created within that session. So the client tells the server that its own character is the ZDO with ZDOID 1290327661:2.
When a client needs to respawn the player, it tells the server there's no ZDO representing its character currently. It does this by setting its character ZDOID to a special NONE ZDOID, the 0:0 you see. After the client has reset the player's inventory, it serializes the profile/character as a new ZDO to share with server+players. As part of the spawn, the client tells the server its new character ZDO's ZDOID (1290327661:13).
thanks
Is there a correlation between time in seconds and the last digit after the colon?
Does the range for ZDOIDs need to be large enough that it extends into negative integers? or do negative ZDOIDs have some other significance?
Do ZDOIDs ever change within the same character/map/game? Or is it completely unique to and static within that context?
It seems like its almost appropriate to refer to ZDOIDs as session id's... right? Do they remain static across client server restarts? (aside from the post-: index of course)
When I said session above, I'm referring to an individual gaming session of someone's Valheim game/client from that client's startup to shutdown. It could get disconnected and come back to the server using the same session ID. That randomly generated session ID is used as the owner ID in the ZDOID for ZDOs it creates. I'll avoid using "session" to refer to anything else here.
With that in mind, it might be better to think of the ZDOID as a globally-unique identifier (GUID). It just needs to be something the server or another peer could request or lookup and there would be no confusion as to what ZDO it refers to; no different object with a duplicate ZDOID.
ZDOIDs can survive server restarts just because ZDOs are the main world data getting stored in the <world name>.db file, and ZDOs are stored along with their ZDOID. That ZDOID might have less intrinsic meaning on the next start, but as long as it's still unique, all good.
The owner ID of a ZDOID can be negative, just because the devs happened to choose CLI's long type for that field, which is an integer between -9,223,372,036,854,775,808 and 9,223,372,036,854,775,807. When a client's session ID is used, it's randomly generated as I mentioned in the prior post, so absolutely could be negative.
The current Valheim just uses a sequential integer for the unique object ID part of the ZDOIDs it creates. It starts at 1 and increments it for each new ZDO that's made until 4,294,967,295.
I tend to be verbose. The tldr:
ZDO = Valheim Data Object
ZDOID = Valheim Data Object Identifier
ZDOID = <app session id, Β±, random>:<object id within that session, +, sequential>
ZDOID 0:0 = special NONE ZDOID indicates lack of a ZDO
Hi all. Does anyone know how to disable original prefabs? A cartography table example.
To what degree do you want them disabled? Could just remove their reference from hammer build table
I want them made not buildable if that is possible, like disable the recipe
Build pieces don't have a recipe component like items do. A reference to the prefab is added to a tool's piece table, it just needs to be removed.
PieceTable pieceTable = [referenceToHammerPrefab].GetComponent<ItemDrop>().m_itemData.m_shared.m_buildPieces;```
The prefab references are then found in pieceTable.m_pieces which I think is of type List<GameObject> so it's a simple .Remove() call
Okey and where i can find this ?
There are several ways to obtain references to the root prefab itself that all clones are instantiated from. What are you familiar with so far? The prefab refs are stored in dictionaries in ZNetScene or ObjectDB
This is thing what im not so familiar with. I have been making my own modpack and pretty much can config the mods but this is new, and pretty much cartography table is the only thing i want to disable from vanilla because it ruins my server.
WackysDB might be able to do it
Will try and explore that, thank you.
Hey guys π
I want to write a mod but its not showing in the build menu
im using Jotunn
but my
private void RegisterBookStand()
is not even called
private void Awake()
{
Log = Logger;
PrefabManager.OnPrefabsRegistered += RegisterBookStand;
Log.LogInfo("VSS: Hello World!");
}
I can read the Hello World and also tried OnVanillaPrefabsAvailable
and I have at the top of my RegisterBookStand
a
Log.LogInfo("VSS: Starting Register!");
but no luck there
How do I reconnect the flux capacitor if the mainframe is all jammed from all the flux the capacitor couldnβt hold
Ok
I am the biggest idiot who ever lived.
I am trying to fork Thrall by egoai (last updated 2024, before bog witch) so i can make an isekai, adventurers guild setup with quests and ranks and npc companion hires (minus the voice chat obviously)
I have almost 0 c# experience, but i had a milestone after a few days of VS2022 and ILspy decompiling fuckery:
I can now spawn in friendly skeletons and track their owner.
Only to find out that, the source code (not the decompiled mess I created and fixed) is readily available (i figured it out when i just went looking for marketplace /commands lmao.)
I am not the hero that the Valheim modding scene either wants, or deserves
does anyone want to help me with restoring Thrall by ego_ai, the thunderstore thing? Ive got a decent headstart and pretty clear goals, and it is interesting and fun. The ai companions they created are incredible, which is why i am going to all this work.
It's a player clone with functioning inventories (and the LLM stuff might be cool with open source keys but im shelving that function until i get the rest of it compatible)
is there anyone that can help me figure out why i cant seem to apply a poison resistence?
iv tryed
HitData.DamageModPair poisonResistance = default;
poisonResistance.m_type = HitData.DamageType.Poison;
poisonResistance.m_modifier = HitData.DamageModifier.Resistant;
var lpoisonResistance = new List<HitData.DamageModPair> { poisonResistance };
player.m_damageModifiers.Apply(lpoisonResistance);
```
```var playermods = player.m_damageModifiers;
playermods.m_poison = HitData.DamageModifier.Resistant;
player.m_damageModifiers = playermods;
player.GetSEMan().ApplyDamageMods(ref player.m_damageModifiers);
player.m_damageModifiers.m_poison = HitData.DamageModifier.Resistant;
with none of them actulay reduceing the damage or timer even when i log it shows its being applyed
use a status effect,
public class SE_PoisonResist : StatusEffect
{
public override void Setup(Character character)
{
base.Setup(character);
m_damageModifiers = new HitData.DamageModifiers
{
m_poison = HitData.DamageModifier.Resistant
};
}
}
Then you can do:
player.GetSEMan().AddStatusEffect("SE_PoisonResist");
hey all, trying my hand at mod creating and stuck on classes, used to be player, fireplace, smelter from all the guides I found. Those classes don't seem to be the same any longer. Can someone point me in the right direction please ?
Searched through Assembly-CSharp and can't find any referenced namespaces
they are in assembly_valheim.dll, not Assembly-CSharp.dll
Thank you
Could anyone help me figure this out:
I'm trying to find more information about how the mysterious rocks/pet rocks work.
Is there a way that I can look at the assets in unity? Or is there a way I can figure out what classes/code the rocks utilize?
Use UnityExplorer mod figure out the components then use Rider or dnSpy to read the disassembly.
Jotunn and BepInExPack Valheim working just fine for mods like Marketplace And Server NPCs Revamped ?
in current version (0.221.4)
I am trying to recreate the genius of Thrall by ego_ai (a team that vanished mysteriously). Player clone companions with really decent modability.
After a week of "could not be instantiated!" on my attempt to resurrect Thrall's player-clone source code from 0.218, I am resolved to just make my own. Adrenaline changed a lot, anyways.
Are these all the sets I might need for material to make prefab player-model companions with equipment/inventory? I am probably in over my head
ItemDrop-ItemData.cs
ItemDrop.cs
Inventory.cs
VisEquipment.cs
ZInput.cs
Terminal.cs
Tameable.cs
CharacterAnimEvent.cs
Player-Food.cs
Skills.cs
Hud.cs
Jotunn.Managers.ItemManager.cs
Jotunn.Managers.PrefabManager.cs
ZDO.cs
ZNetView.cs
Humanoid.cs
Attack.cs
Character.cs
MonsterAI.cs
BaseAI.cs
I need a prebaked asset anyway, built in unity, has anyone done anything like that? I can put the player texture on a thin skeleton later, I'm assuming
thanks for this suggestion iv been tinkering with it for a wile now and cant seem to get that to work either like the other things i tried it will log as its applied but i still take full poison damage and poison timers are still full length
https://github.com/Valheim-Modding/Wiki/wiki/Modding-Discords
You should join one of the modding discords, might be easier to help troubleshoot/find a solution.
@twilit pike if you are looking to program server-side chat logging with injected/modded CLI (such as by using Harmony), you would probably override the ZRoutedRPC.RouteRPC method to intercept chat RPCs before routing them to peers. Try to keep any conditionals in there simple, as any observation for interception will add latency to network gameplay.
You might get some inspiration from this override: https://github.com/valheimPlus/VPlusChatFilter/blob/8a4cae7a8c05e06098918b4f376f6fb9e35f5b11/VPlusChatFilter/VPlusChatFilter.cs#L70
(credit to @hardy jungle)
Thanks!
lel
I don't really know where to put this but is it possible/is there already a mod for reducing network packages, because I feel like 80kb/s is way too much. Theres got to be some way to make this smaller/optimize
Because a couple of my friends on our server have lets say, bad internet, and I feel like there's got to be a way to reduce how much information needs to be sent, like when running around, I'm assuming you just need to send player position, rotation, maybe animation information, what you're wearing, and what you're holding.
There's a lot more that needs to be synchronized between players than player information (position, rotation, animation, etc.). For one thing that also needs to happen for every mob. But more generally, every object in the world (every stone, every tree, mob, build piece, terrain modifications, etc.) needs to be synced.
General optimizations (like compressing the payload before sending) are already done by the game. It's likely it could be optimized further, but I'm pretty sure that it's not going to be as easy as patching the game's code in a couple of spots and inserting a "simple and obvious fix".
I'm not very familiar with how exactly this is implemented in the game's code, so take what I said with a grain of salt.
Also, checkout your mods first if you are playing modded. Mods can be the main contributors to network traffic.
Everyone that has an internet connection in the world has access to 80kb/s. The problem isn't the bandwidth but their connection to it. Likely it goes in an out multiple times per minute because their internet provider is substandard or their country suffers from insufficient regional power to meet 24/7 demand. This means that lower the data rate will not fix their experience and truly the only thing that will fix their experience is a more reliable internet connection.
Or dropping Crossplay if its in use. Crossplay will easily add or amplify latency issues for the server and players, regardless of bandwidth.
It is in crossplay as we have some Xbox players.
I also found a few mods that compress and decompress network packages more. So that less data is being sent, but it's more intensive on processing power. Although I believe all players must have it and I'm not sure how that would work with the crossplay and Xbox players
It probably won't work. If you need to support Xbox players you need everyone to have a good Internet connection and be closish together for good latency. It's because valheim doesn't have a real dedicated server model but had the first player in an area act as host.
XBox/Playfab already uses compression, so it won't help
First player in the area? I do remember hearing somewhere about chunk owners.
Yes
One last question, and thank you, it's about chunk owners. Is it for all time, or like when they leave and someone new goes into the area it gets reassigned, which would make sense.
Yes, I believe the objects/behaviors of an area are reassigned when someone leaves.
I guess I have more questions, so if the area owner has a bad connection does that cause it to lag more for everyone else, and if so can I get it assigned to the server or like our large base area assigned to the server so that it's less laggy, or just to the person with the best connection?
Yes.
There is the DedicatedServer mod that assigns everything to the server (beware, that massively increases the required computing resources on the server, especially with a lot of players).
ServersideQoL has an option to assign ownership to the player with the best connection, but I never was able to properly test it, so if you decide to give it a try, I'd be interested in your feedback.
(the two mods are not compatible, use only one)
Alright, thank you so much I'll have to try each
The ownership to best connection is an interesting idea. π‘
Any chance of breaking that out into its own mod ? I like your ServerSideQoL mod but I canβt use it because it overlaps with a lot of functionality that I do client side. But that piece would be nice to try on its own.
Thanks
You should be able to toggle on just specific settings, then it shouldn't interfere with client mods.
I thought about breaking it out into its own mod, but I'm not going to invest the time into doing that before I get some feedback on if the idea actually works in practice (I've not been able to test it on a server with 3+ players since I added the feature, so I have no idea if it holds any water). I'm not promising I will after I get feedback, but that is like a minimum requirement for me to further consider it.
But feel free to take inspiration (or code, but it's currently somewhat interwoven with the ServersideQoL's infrastructure) and make your own. Maybe it could be expanded on in the future, but what the code currently does is actually very simple. And some things, like measuring connection quality, could probably be done more reliably/robust with a clientside component.
Itβs an interesting idea
Alright so I tried the ServersideQoL mod for the assigning areas to best connection and it did what was expected but was also broken. We had 5 people in the same area and it would rapidly switch between 3 people with the best Internet, you could walk around and I think PVP was just fine but the chest would not open for people that were not area hosts. I only had about 30 minutes to test it out properly.
I would like to do the DedicatedServer mod, but we have Xbox players, and I don't believe they can install the mod for it
You're right, DedicatedServer needs to be on both server and clients and therefore is incompatible with unmoddable clients.
Thanks, that's exactly the kind of feedback I need. Are you per chance willing to collect some data for me? If you set ReassignOwnershipBasedOnConnectionQuality = false and LogPingThreshold = 0 and MeasurePing = true you could collect some some data about the player connection quality in the log file without experiencing the negative side effect. Some real data would help me get a better understanding to finetune it a bit.
Yeah I could get some data for you, also gonna experiment with different combinations of settings as this is the only mod that I know of that does kinda what I want
Thanks π
One of my players just reported that they had extremely high displayed ping and couldn't pick up items on the ground or open doors. I can't upload his screenshot of it but it was: av: 532477840652 +- 17809314779722 ms
I'm assuming some sort of glitch when calculating average ping
I've just recently had a similar report, I'm currently looking into that.
I just pushed an update to the BETA channel (unrelated to the bug you just reported). I added an option (hysteresis) that should help in preventing fast switching of ownership between clients with a similar connection quality and a new metric (EMA / exponential moving average)
Ok nice yeah.
Not sure if I should post here, I just wanna theory craft as I test this. Came across this guy's boot config and want to see if it'll help me.
gfx-enable-gfx-jobs=1
gfx-enable-native-gfx-jobs=1
gfx-disable-mt-rendering=1
wait-for-native-debugger=0
vr-enabled=0
hdr-display-enabled=0
gc-max-time-slice=3
job-worker-maximum-count=7
job-worker-count=7
scripting-runtime-version=latest
Not sure why I would want gfx-disable-mt-rendering=1, maybe someone has some insight on that.
My understanding is that job-worker-maximum-count=7/job-worker-count=7 should be set to the number of threads you have -1, but I don't want the load to cross CCDs. I'm assume it won't if I set this to 15 rather than 31 (which would be stupid anyways). Does hdr-display-enabled=1 actually work? I see windows auto HDR popping up regardless, but it looks great with it anyway so not really worried about this one, I didn't see anything about this game supporting HDR natively.
My specs are:
AMD Ryzen 9950x3D
RTX 4090
32GB DDR5 6400MT (CL30-39-39-102)
Samsung 990 Pro m.2
4k 240hz OLED
I know this game is a little rough around the edges, obviously I want to try to optimize things the best I can to take advantage of the monitor
That's an outdated file. The game just upgraded the engine to Unity 6 and the latest default boot config file comes with new performance tweaks. Delete your current one and verify game files in steam to re-download, then add any extras you find helpful
Thanks for the reply, I'll do that
gfx-threading-mode=6
wait-for-native-debugger=0
hdr-display-enabled=0
gc-max-time-slice=3
build-guid=ec54da918edb4bfc9ea2a09e31401464
By default, these lines are) One line more than it was before the transition to pre-Unity 6) Would there be a guide on which lines should be added and whether they really make sense or if it's nothing more than self-suggestion)
ex:
123,186,000
232,111,31
here we turn them into:
85ZJ1
58QTf
rules:
the first character in the code tells us the combination of odd & even numbers in the RGB values
the second character tells us the combination of RGB values by whether or not they are greater than (or equal to) 128
third character = R
fourth character = G
fifth character = B
Characters 3, 4, and 5 are assigned their values from 1 of 4 tables based on the rule set by the first and second character
O odd - E even
1 = all E
2 = all O
3 = R E, G E, B O
4 = R E, G O, B E
5 = R E, G O, B O
6 = R O, G E, B O
7 = R O, G O, B E
8 = R O, G E, B E
<> 128
L < 128 - G>=128
1 = all L
2 = all G
3 = R L, G L, B G
4 = R L, G G, B G
5 = R L, G G, B L
6 = R G, G L, B G
7 = R G, G G, B L
8 = R G, G L, B L
1 2 3 4 5 6 7 8 9 0
a b c d e f g h i j
A B C D E F G H I J
k l m n o p q r s t
u v w x y z K L M N
O P Q R S T U V W X
Y Z ! ?
64 characters, arranged this way for reasons
Odd-Lesser table (start 129 if Greater)
1-1, 2-3, 3-5, 4-7, 5-9, 6-11, 7-13, 8-15, 9-17, 0-19
a-21 b-23 c-25 d-27 e-29 f-31 g-33 h-35 i-37 j-39
A B C D E F G H I J-59
k l m n o p q r s t-79
u v w x y z K L M N-99
O P Q R S T U V W X-119
Y-121, Z-123, !-125, ?,127
Even-Lesser table (start 128 if G)
1-0 2-2 3-4 4-6 5-8 6-10 7-12 8-14 9-16 0-18
a-20 b-22 c-24 d-26 e-28 f-30 g-32 h-34 i-36 j-38
A B C D E F G H I J-58
k l m n o p q r s t-78
u v w x y z K L M N-98
O P Q R S T U V W X-118
Y-120 Z-122 !-124 ?-126
EG table (thought 128 would be a problem so I wrote it out, it works)
1-128 2-130 3-132 4-134 5-136 6-138 7-140 8-142 9-144 0-146
a-148 b c d e f g h i j-166
A B C D E F G H I J-186
k l m n o p q r s t-206
u v w x y z K L M N-226
O P Q R S T U V W X-246
Y-248 Z-252 !-254 ?-256 (256 shouldn't be used)```
-sorry if this is hard to read, I just kinda sat down & wrote out this system. Want to know if anybody can come up with a value it couldn't handle
(Also, technically, isn't this more compact than hex code? Aside from human usability, is there any advantage hex offers over the proposed system?)
Try asking an LLM (like ChatGPT or Copilot), I find that reviewing stuff like this is something they've become quite good in
As to your second question: In what context are you comparing it to hex? It's possible there are specific scenarios where this representation would be better, but in a general context it's hard to imagine that the benefits this offers (shorter string representation) outweigh the inherent cost of a new and more complex representation as opposed to a well established/well known standard (hex) for everbody that has to use it.
You say "aside from human usability", but who/what else than humans would work with it?
You can encode a hex value (0-15) into 4 bit (2^4=16), for 0-255 8 bit. So, to encode a RGB you need 12 24 bit, for RGBA you need 16 32 bit. Usually, an integer is represented by 32 bit (excluding specific microprocessors), so you can easily encode both RGB and RGBA inside a single int. This isn't possible with your encoding and you require way more space
To make the same calculation with your encoding, for a-z, A-Z, 0-9, ?, ! you need 26+26+10+2=64, so 6 bit per character. With 5 characters per RGB value, that's 30 bit and thus slightly worse than 24 bit with hex
So to make it more efficient the string would need to be 3 characters long, essentially?
"who/what" would be an application that could convert the two. Takes a bit of compute power to make the conversion, but in the end might take up less storage space (if the underlying string were actually smaller)
I thought you were talking about a string representation. If your talking about storage, see Margma' response. Colors aren't stored as strings (usually)
Really the first and second characters are "wasting" values by not including any of the other 64 allowed characters, I should be able to combine them to get it down to a 4 character string. 3 is......maybe possible? (not with these rules, but might use the philosophy of "first character sets the rules the other two find the numbers")
The 24 bits the hex value represent don't contain any redundant information, you cannot compress it further (without loss), no matter what you do. (edit: not sure about that tbh, maybe I'm wrong here)
AABBCC (hex, 6 chars), 11189196 (dec, 8 chars) and 101010101011101111001100 (binary, 24 chars) are all just different ways to display the same 24bit value. It's 3 bytes and how they are displayed has no impact on how they are stored
Ignoring sanity for a second, does the math here make sense? If 5 characters could magically be shrunk to 3 would it not be 18 bits?
If you could make it work with the same number of unique character (64)
Look at it this way: the value is already stored as 3 characters, but 256 unique characters are available instead of your 64.
If you look at them as values you're right
But if characters 1 and 2 defined operations for the 3rd to find the complete set of values, it could work
'least I believe it can work*
I don't think so, not for a single value. It would be different for an array of colors (image)
Yep, for a single color you won't get any better than hex, at least if you don't want to get the full color resolution RGB has
Sure it would be 18 bits, but you can't represent the full 24 bit spectrum with just 18 bits. Some colors will not be included in the 3 character representation. There's simply not enough wiggle room to pack the information differently, at least not with a fixed length encoding
Look at it this way:
The values as they stand are 256X3
With the first character, we narrow down 256X3 to (256X3)/4
Or 64X3
If the second character can divide our posibilites by 3, we are left with just 64 (representable by 1 of each character in the table)
Did I miss something?
You have 256 x 256 x 256 combinations, not 256 x 3
Of Potential combinations of RGB values, not what each RGB value can be
I'm not sure what you mean
The values themselves can't exceed 255 (256)
We don't need to worry about what they can combine to create (each individual color)
We only care about what each individual value of each color is in a given set
Do we see?
We certainly do care what the three values represent. Let's say we know the first value. This doesn't give us any more information about the second or third value. They can still range from 0 to 256 and encoding additional information about the relationship between the three will just increase the space we are using
That's why I wrote 8 different rules, to give us the pattern of information on all 3 values at once
8X8=64, so we should be able to mush the first and second character together to tell us the 64 combinations of what the set of values could be, thereby narrowing down what values are possible, getting us our /4
Sure and it's fine, it's very possible these rules encode all RGB values. I'm not disagreeing here, just saying it takes a bit more space than using a hex representation
I still need a trick for the second character to get the rest of the possibilities to divide by 3 is the current problem
If we can figure that, we're left with 64 possibilites on what the RGB value could be, thereby able to represent them on the 3rd character, thereby reducing the entire value to 18 bits
char 1 = /4
char 2 = /3
char 3 = 1-64
That are only 64x3x4=768 different color combinations
We're not after color combinations, we're after a set of 3 RGB values
Again, I am not sure what you mean by this
I've got the rule for char2, literally divide by 3, it'll either divide evenly, end in .3333-, or end in .6666-
Give me awhile to build this out, let's see where it fails
Ah. Right. I tried to send a big ol list, server rules didn't like it.
Uhh.....I might be stuck doing a lot of tables.
Fascinating exercise though
Hi all. I am starting a server and i want the merchants in spesific location because i want force and control the economy a bit. So, can i spawn them and how? And if can spawn them to the same place, they dont spawn anywhere else? How to do this?
Use ExpandWorldData to modify the spawn quantity of the trader locations to 0
Use infinityHammer to spawn the locations where you want them
snsneaks Why did you make this? It serves no purpose, and it does not really work. There are 2 things here: (1) how much information there is in 6 hex digits which is 16,777,216 unique possibilities and (2) how many human readable characters there are which is 6. The first is important for storage the second is only important for things like used screen space and readability. The reason hex notation is used is because it will give a compact notation for binary numbers as those are always the power of 2 and organised in commputers in bytes being 8 bits and thus having 256 unique combinations. Hex notation has 16 unique chars used and 2 of them 16x16 also gives 256 meaning there is no redundancy in this kind of notation for bytes. Decimal notation only has 0 to 9 so 10 digits. 2 digits is too little as 10x10=100 which is less then 256. And 3 digits is to much (wasteful) as 10x10x10=1000. If you want usefull shorter notation that has fixed length and represents 3 bytes (24bits) of information only works is each character represents 1/x of the bits. As there are 24 bits you have the following choices (1x24 meaning you use 1 symbol and need 16,777,216 a set of unique symbols) (2x12 meaning you use 2 symbols and need a set of 4,096 unique symbols) (3x8 meaning you use 3 symbols and need a set of 256 unique symbols) (4x6 meaning you use 4 symbols and need a set of 64 unique symbols) (6x4 is 6 positions and 16 unique symbols and that is hex notation) (12x2) (24x1). The first 2 are a problem because you need to many symbols and nobody can remember what symbols is what. Even the 3th option is a bit much if you want to stick to letters and numbers. The 4th option needs 64 symbols and is possible with upper and lowercase letters and numbers. So 4 is the shortest viable option if you want to keep it a bit readable.
Hex is used because every character represents either the lower or upper 4 bits of a byte. This makes it readable and understandable because by looking at its position you know the values of specific bytes in a series of bytes. You chose RGB which is 3 bytes of information but not every piece of information has the same length. Hex notation is the shortest notation for byte values that uses a understandable amount of characters to understand the value of a byte without lookup tables that are hard to memorize and also the location of particular bytes in case you have something that is more then 1 byte like your RGB example. The technical shorter notation 4x6 4 characters with a set of 64 characters is hard to understand for humans and it only works if you piece of information is a multiple of 3 bytes. Hex works with all byte lengths. You don't invent a different notation for things that are a multiple of 3 in length but cannot be used at all on other lengths.
Where can i find actually assemblies? not these sstripped out meta's
Hey guys!
Iβd like to start making mods for Valheim, and Iβm looking for a short guide on where to find BepInEx and Harmony from reliable sources, please π
This wiki is pretty up to date and has links or tutorials for the vast majority of things you might need https://github.com/Valheim-Modding/Wiki/wiki/Creating-Your-First-Mod
Thanks a lot !
I just use the BepinEx package listed in the Valheim thunderstore. It has the 0harmony.dll included as well.
Yup, thanks! Iβve already started π
Nice, whatcha working on?
Wow, I learned something today!
Currently working on something new (at least I haven't seen it before) to get myself back into Valheim modding. Basically I'm creating Flight Paths like those in World of Warcraft. The idea is to replace the Portal System with it. Players can build their own Flight paths and use them to get around. It works by interacting with a custom prefab (Raven Statue). This opens up a map and shows you all the flight paths you've build around the world (it only shows you your own Flight Paths and those that you have been granted access to). You can then click on one of them. A Valkyrie (like the one that flies your character in for the first time when playing with it) spawns in and picks you up. It'll then fly you towards your destination and drop you off there.
Done so far:
β
Implemented a unique prefab to use as Flight Path station (Raven Statue)
β
Flight Paths can be placed / build with the Build hammer
β
Interaction with Flight Paths brings up a map that shows all your Flight Paths across the word with pins
β
Clicking one of the pins on the map returns the destination coordinates for the Valkyrie flight script
β
Placeable Flight Paths check if no other Flight Path is too close. They also verify if there's a usable flight corridor to lift off / land through (no buildings or nature blocking). This check is done every time the flight path is interacted with
β
The valkyrie verifies if the landing spot is safe to use upon approach. If not, it'll attempt to search for a near safe spot. If that fails, it'll attempt to return to its starting position. If even that fails, it'll just wish the player good luck and drop them xD
β
All data is stored with server side authority, so no client side cheating to try and force new flight paths
Todo:
β Spawn the Valkyrie in and make it pickup the player
β Keep the player safe during the flight using a spherical detection collider to adjust course if anything gets in the way
β Implement a multiplayer registration system like Wards so players can share their Flight Paths.
is IK transformation of the leg bones and any other bones being replicated to other clients? (in Valheim)
That's pretty freaking sick man. Can't wait to see it come to life. You stuck on anything?
Do you post your mods on thunderstore? I could only find them on nexus
Very excited to see how this turns out, mate
Nah I'm good. It's just a pretty big project as there's really a lot of stuff to keep in mindπ I've already finished (well functionality wise) the multiplayer part. Still need to make the Platforms actually show who's registered on it, but other than that it works. Basic liftoff and traveling from Point A to Point B works as well. Currently fixing a bug where the player flies underneath the Valkyrie like it's Superman, lol π€£ After that I'll implement landing. Then smoothing things out to make the flight feel natural instead of forced. I've also got some more features in mind for future updates, but those I'll work on once the basis is fully functional and released.
Some of those ideas are: Occasional spawning of enemies trying to shoot players out of the sky. Allowing players to use ranged weapons to defend themselves. Another idea would be to implement a small challenge to complete when being hit to "restore balance" before falling of. If the player falls, they're not supposed to drop dead. Just ending in the middle of no where and hoping they're prepared for it π
I do, though it's been a very long time. I've been out of the modding community for quite a while. On Thunderstore I post underneath QOLTeam.
Ye I'm excited about it myself too. Too bad I can't post screenshots in this channel. Otherwise I could show some of the progress so far.
You want to replace those "magic portals" by Valkyrie-pickup "airport stones" ? That's perhaps one to discuss with the guys at IronGate directly.
It's such a great match with the overall lore.
The closest I got to this was to raise ground on the highest mountain I could find, build a 45 degree slope, put a catapult and catapulted myself across the map
They're aware of my work π They never guarantee anything will be adopted to the game itself. But they're aware of outstanding ideas and mods.
As for the progress on my mod: Currently it's fully functional. The only remaining problem is having the Valkyrie dodge obstacles and remain aware of terrain hight. Right now it just simply goes through them, despite my efforts so far. But it's just a matter of time before I figure that one out π
Do you have like a video so far on how it is?
I honestly would be very curious to see how it is on a gameplay perspective
I don't, but if you have a microphone, we can go in a VC and I can stream my screen. That way you can see it in action π
Yes sure
I am in Greydwarf's Nest
Iβve been hacking on a small side project for my Valheim server and figured some of you here might find it interesting:
Itβs a read-only analytics & map visualization tool that shows things like player movement, hotspots and world load over time β mainly to better understand how a server is actually being used. It consists of a lightweight BepInEx plugin (read-only), an offline aggregator and a static web viewer. No gameplay changes, no client mods required.
Iβve open-sourced it here in case anyone wants to poke around, reuse parts or just get ideas:
https://github.com/Htbxbsr/Valheim-Atlas
Itβs an ongoing project Iβm actively iterating on while digging deeper into Valheim internals.
Happy to answer questions or hear thoughts π«‘
Looks pretty neat to be honest. If I may make a useful suggestion: ZDOs keep player IDs registered with them iirc. Player IDs can easily be linked to the actual character names upon a player connecting. With that data, you can't just see ZDO accumulating, but also which player(s) have been going wild over there.
Thanksπ and the suggestion is really good. Being able to filter hotspots by player name would be really nice....ill put it on the todo list
Wow this is really cool man! I think players would like to have something like this on their second monitor while playing on a server, anyway you maintain the fog of war for each player as well? Right now it's kinda an instant spoiler for anyone on the server
Itβs an admin/ server-analysis tool so things like fog of war arent a goal here.
The focus is understanding server load, ZDO growth and systemic issues, not preserving exploration.
I mean you could set it up in a way for players to use it. But most people just use cartography tables for that anyways xd.
for anyone interested: https://github.com/jneb802/valheimCLI
for: "Keep the player safe during the flight using a spherical detection collider to adjust course if anything gets in the way"
what about making the player invulnerable to damage during that time instead of adjusting flight path? and if you're worried about hitting builds, what about raycasting in front of the player to determine an accurate heightmap and then just increase altitude pre-emptively?
Keeping the player safe isn't really the issue. Even right now the player won't get damaged while being smashed through trees and mountains xD It's just weird. Like using a noclipping cheat to bypass any collisions. As for the raycasts, that's my backup idea in case a spherical collider isn't going to work. I'm just looking at what's most efficient in cpu usage.
Quick headsup: just dropped v0.6.0 of the Atlas
This one is mainly about smoother playback and viewer stability.
Iβll be working on player correlations for hotspots next.π«‘
I am trying to use the star wars mod, I canβt get the build hammer to display anything for build seems kinda complicated can anyone help ?
Do you mean custom prefabs in the build hammer?
Yes if I turn on no resources and all buleprints I can see all the starwar mods and bypass the table craft all of it but I canβt build the table or use it the right way
Wait, you're confusing me now. Are you talking about programming the mod or using the mod? Because this is the programming channel. For help with using mods, you'll need to go to #mods-issues
I was just trying to get get help I wasnβt getting any response in the mod issue so I thought Iβd try here
I understand, I'm not offended or anything, lol. Just that it's confusing if you're trying to get help setting up a mod while people here think you're talking about programmingπ As for the prefabs not showing up on your hammer, this is usually because you haven't gathered all the resources needed for them to unlock the blueprint. So you need to check what resources you need to build the item. Gather those resorces and the prefab should unlock on your build hammer
What about you guys talking here?
Hello! Is there a way to make a mod that creates a unique object with a marker on the map?
For example, I have a PvP server and I would like to have a big flag that always appears on the map, that players cannot teleport, to create a kind of Capture the Flag mode.
I'll suggest this to a dude who is making some arena mods etc, sounds like a great idea π
while waiting for that, there might be some way to utilize stuff like HUDCompass to mark Carts, then making a new Cart clone with WackyDB named "Flag" so it marks on map with the name.. π
Toss in a bunch of EWP scripts to handle the capture & respawn and should be a nice ghetto CTF mode before a proper one can be coded π
Aww, except the wacky clone doesn't get marked, meh π
but guess for now could atleast play somekinda weird Capture the Cart mode π
You could probably ping the cart's location with an ewp script. Or regularly launch fireworks from its locating or something
sadly with chatmessage rpc changes, can't ping on map anymore using scripts π
can only mark with RPC_DiscoverLocationResponse, but those markers are static and have to be manually removed by clients as well
so this one def needs its own mod to feel good, but shouldn't be too hard for some coder to whip out
here's a quickie 10min~ script for cart grabber broadcasts, cart capturing & respawning
type: change, attachJoint 1
filter: string, Vagon.m_name, CaptureCart
commands:
- broadcast center <pname> has grabbed the Capture Cart!
- prefab: Cart
type: change, vel
filter: string, Vagon.m_name, CaptureCart
objects:
- prefab: piece_banner04
maxDistance: 3
remove: true
commands:
- broadcast center Cart captured by <#FF0000>Red</color> team!
poke:
- prefab: stone_floor_2x2
filter: string, Piece.m_name, cartspawner
maxDistance: 20000
limit: 1
parameter: respawnCart
- prefab: Cart
type: change, vel
filter: string, Vagon.m_name, CaptureCart
objects:
- prefab: piece_banner02
maxDistance: 3
remove: true
commands:
- broadcast center Cart captured by <#0000FF>Blue</color> team!
poke:
- prefab: stone_floor_2x2
filter: string, Piece.m_name, cartspawner
maxDistance: 20000
limit: 1
parameter: respawnCart
- prefab: stone_floor_2x2
type: poke, respawnCart
spawn:
- prefab: Cart
data: string, Vagon.m_name, CaptureCart
pos: 0,0,1```
ah, but unable to upload videos here ofc xD
Hi, I've jumped into the rabbit hole of creating a mod for this game. I'm now following the Unity Project Guide on github as I want to create assets. It mentions there's a few missing materials and scripts in some scenes.
So my question is : In the context of adding stuff to the game like weapons or buildables, that kind of stuff, do I need to correct those ? If so, where can I find the how-to ?
Thanks for your time π
Typically, if you are following the modding wiki guides you should not need to correct all of that. https://github.com/Valheim-Modding/Wiki/wiki
If you haven't already found it, there is a guide on how to create a game rip, which can give you a good look into how everything works https://github.com/Valheim-Modding/Wiki/wiki/Valheim-Unity-Project-Guide
This is exactly what I'm following ! I was worried that those missing things would get in the way of what I want to make, but if it's fine it's fine, thanks !
It should be fine, if you are making items- just pay attention to the scripts used, ensure its got a collider on the item layer, etc
My favorite breakage is forgetting an icon can break the item from loading π but I'm sure you'll run into all sorts of little things. Good luck!
Many of the modding discords are typically better spots to ask questions about how things work or how to solve stuff when you run into things also FYI.
I'm sure I'll run into problems, that's how you learn lol
I'm also following Azumatt's video tutorials, and I got on a modding discord, thanks for the tips π
Not about me programming, sorry. Here's a shoutout to the Irongate Devs! Thank you so much for such an awesome game!
β€οΈ
Is this the appropriate channel to get assistance with changing the seed, password, & world name in the strat_headless_server start.bat file?
Thank you
I have a question. Iβm currently using cross server portal mods to build a network and Iβve noticed that some people donβt like that It shows the loading screen as well as kicks back to the main menu. Is there a way to overlay a portal animation that covers the screen and hides that?
Yo,
Im working on a serverside plugin for a long-running Valheim world. It scans existing resources, remembers them, detects mined ones later, and could restore selected ones during maintenance with dryrun/backups. Not meant as a live respawn mod.
Im also testing a heuristic seed/worldgen approach, but only as candidates, not blind autorespawn.
Right now Im trying to understand how Valheim resources work internally. For copper I noticed stuff like Rock_4 turning into Rock_4_copper_frac when mined/hit. Does anyone know the resource prefab lifecycle better?
Mainly:what turns into what when mined. Is the state stored in prefabs, ZDO data, hit data, or a mix? Any pitfalls when restoring resources from server-side ZDOs?
Any hints would help a lot.
Thanks!
There are two types of mineable resources: Single-node types like tin or obsidian, for these look at the MineRock component, and those that consist of multiple parts like copper or silver. The latter consist of two objects as you've noticed. The first object has the Destructible component, when it is destroyed (on hit) the second object is spawned (Destructible.Destroy), the second object has the MineRock5 component and stores the health of its fragments in a base64 encoded string in ZDOVars.s_health (take a look at MineRock5).
Generally for serverside stuff: You can look at the components to figure out how stuff works, but you can only manipulate ZDOs/ZDO data (or use existing RPCs). If you got the rest of your logic worked out, it should be easy to spawn the resource ZDOs.
Checking for nearby player-built structes or resetting terrain modifications are a tad more complex, but completely doable.
Thanks that actually clears up a lot.
Expand World Prefabs, Cron and Upgrade World can do this. If you don't want to duplicate the work, might be worth using- alternatively, you could likely look into how Jere does that. His code tends to be pretty clean
I agree its worth checking, but Ill likely keep building my own version and only borrow ideas where it makes sense.
My setup is getting pretty specific with registry logic, policies, audit logs, maintenance only actions and later probably dungeon/state handling too. So even if existing mods solve parts of it, I still need full control over how it behaves on my server.
Totally fair, not trying to disuade you from making your own π more competition tends to make the results better
Is it possible to make a mod that stops enemies from running away constantly? I'd like to learn and make it if possible. It's like the moment you say "okay, I'll stop what I'm doing and fight you" they run out of render distance. Until you stop following then they turn around and throw more rocks
I think it's already possible with mods like CLLC. You can inspect "MonsterAI" class, there's parameters how enemies behave (if they circle, how far and for how long.. or you can just everything to aggressive).
how would i go about making a valheim mod to take a 360ΒΊ screenshot? That would output an equirectangular 360 image