ago

[RELEASED] Server mod loader + priest + crops + seasons + server packs + bag of holding

Recommended Posts

Yeah a http server, yo9u are sooo awesome ago :))))

 

Eject

Share this post


Link to post
Share on other sites

Ago please consider a #loaderVersion command so I know what version of your mod loader is on my hosts site. I have no idea if the mod loader they provide is up to date or not.

Share this post


Link to post
Share on other sites

The idea behind the split between serverpacks and http server came when working on the BML stuff. For some resources it's possible to give a http url instead of a mapping.txt key. This would allow a mod to send a dialog with an image which is downloaded directly from the server. For example a regularily updated server map. The only downside is the textures are never destroyed and reloaded. But a server map that's rerendered every few hours should not cause any resource problems.

Edited by ago

Share this post


Link to post
Share on other sites

Is anyone else finding that the Creature Age Mod is no longer working?  Or do I just have a lot of bugged animals...  I have 2 young horses (1 male, 1 female, both wild), and have aging set to 15 minutes (increaseGrowthTimer=7200, increaseGrowthUntilAge=12).  Both on deed, not hitched, on grass, not branded.  Been young for about a total of 10 hours play time (server actively up, terraforming my deed).

 

I'm also seeing a ridiculous amount of young mobs running around when I explore (huge spiders, trolls, cows, bulls, etc).

Share this post


Link to post
Share on other sites

I confirmed creatureagemod is working. There are two effects that must be taken into account though:

  • The servers map is separated into zones which are updated in a non-linear way. If the server is large enough it's possible that it takes more time than increaseGrowthTimer to visit the same zone twice. The creatures age will increase nonetheless.
  • The server does not update the model if the age changes. Examining or opening the inventory of the creature will show the correct age. The server will however send a new model if a calf matures to a cow for example. Relogging will also show the correct age

By now you've probably noticed an aging after logging on another day.

Share this post


Link to post
Share on other sites
On 9.11.2017 at 0:01 PM, ago said:

Added containerSize, maxItemCount and maxItemWeight to ItemTemplateBuilder

awesome, thank you very much Ago ;)

 

Eject

Share this post


Link to post
Share on other sites
11 hours ago, ago said:

I confirmed creatureagemod is working. There are two effects that must be taken into account though:

  • The servers map is separated into zones which are updated in a non-linear way. If the server is large enough it's possible that it takes more time than increaseGrowthTimer to visit the same zone twice. The creatures age will increase nonetheless.
  • The server does not update the model if the age changes. Examining or opening the inventory of the creature will show the correct age. The server will however send a new model if a calf matures to a cow for example. Relogging will also show the correct age

By now you've probably noticed an aging after logging on another day.

 

I'm running the default Adventure (Heavenord) server, which I think is 2048x2048.  The two young horses I'm keeping an eye on have been on deed with me (since I'm still in the process of terraforming).  I've been logging in / out  stopping / restarting the server fairly regularly - firing up the server and logging in for an hour or two a day, then logging out and shutting the server down in the evening.  They are both still "young".  I've picked up a third young horse since my earlier post, who is also not aging at all.

 

I've looked at the server log, and I see where the creatureagemod is loading.  I do not see any errors being thrown by the mod, or anything else that could be attributed to it.

Share this post


Link to post
Share on other sites
2 hours ago, Nikalus said:

 

I'm running the default Adventure (Heavenord) server, which I think is 2048x2048.  The two young horses I'm keeping an eye on have been on deed with me (since I'm still in the process of terraforming).  I've been logging in / out  stopping / restarting the server fairly regularly - firing up the server and logging in for an hour or two a day, then logging out and shutting the server down in the evening.  They are both still "young".  I've picked up a third young horse since my earlier post, who is also not aging at all.

 

I've looked at the server log, and I see where the creatureagemod is loading.  I do not see any errors being thrown by the mod, or anything else that could be attributed to it.

 

It sounds like it's working fine, just that you are not keeping the server up long enough each day to really notice it.  If you try leaving it running for 6-8 hours (minimum), you should notice a big difference.

 

Share this post


Link to post
Share on other sites

6-8 hours, when the increaseGrowthTimer is set to 7200?  That seems excessive, especially considering that it used to work as expected when it was set to 28800 (which the config file says should be 1 hour) with previous versions.  This was working fine until I updated to 0.31.1 to support another mod, and is still not working with 0.31.2.

 

Is it possible that setting the timer too low is reversing or negating the effect?  Causing it to poll too often, and skip / miss things?

 

Maybe what I need is a mechanic to specifically trigger age transitions on targetted animals (like a special "MiracleGrow" feed or something).  Too bad I haven't seen any mods like that.  :D

Edited by Nikalus
Adding more info.

Share this post


Link to post
Share on other sites

I've had the timer at 1 Minute and later reduced it down to 10 seconds and had calves grow up to bulls and cows and those grew to mature. I even increased the maximum age and could hear chicken and rooster die of old age all around me.

 

Please provide server.log from the server folder. Maybe there is a configuration issue of some kind.

Share this post


Link to post
Share on other sites

I found the issue.  I am running a copy of the default Adventure map, but before I started the copy I rolled back the world time from the middle of summer to the beginning of spring.  The animals creatureStatus.lastPolledAge was greater than the WurmCalendar.currentTime, so part of the age check code was returning a negative value.  Since the negative value was never greater than increaseGrowthTimer, it was ignoring the critter entirely.

 

Only newly spawned creatures were aging properly, none of the creatures that were originally spawned before the calendar rollback.  Apologies for wasting your time.  >.<

Share this post


Link to post
Share on other sites

Ago - I am doing some testing for a class I am teaching in Spring and wanted to try Sindusk's player starting gear mod.  Which requires your server mod loader.  I had no problem with the client mod loader, but I wanted to check and see if this server mod loader was compatible with the "Wurm for Dummies" version, where you run a SP game, launching the game from Steam and using the local server option.  I am not a computer coder, just a poor teacher, but suspect that changes you list might not play well with the Steam launch set up.

 

Obviously, in the class, we will be running a dedicated server (since I have an IT department to support me : ) 

 

But I am trying to test everything, at home, to see if I can actually add some projects to the class (since the idea is exploring the use of contemporary computer games in an educational setting, I want to add a project where they do essentially what I have done for the class - create a world / scenario.)  I came up with a very inelegant starting gear option for the class, but someone suggested Sindusk's mod as a better solution.

 

Sorry if the question seems silly - or I missed some obvious instructions in this thread.  But most stuff seems to be coming from / addressed to people with a lot more understanding and experience with dedicated servers.

 

Thanks.

 

P.S. And the obvious request (you may have already seen it) - do I have your permission to use this mod loader in the class? (i.e. not just to set up the game scenario the students will use, but to allow them to use your mod loader in their individual projects).

 

*EDIT* - I think I may have answered at least one of my own questions.  Careful reading of your instructions and comparing them to the SteamApps file structure, seems to indicate I just do the initial install in the dedicated folder, then copy the server launcher into the "wurmunlimited/wurmserverlauncher" folder . . . seems reading comprehension and old age don't play well together.  Sigh.

Edited by lokitheweaver
update to list possible solution

Share this post


Link to post
Share on other sites

Yes. Putting the server modloader into WurmServerLauncher should work.

 

Feel free to use the modloader in class although it might not be the best coding example.with the poor documentation and the sometimes unstructured development.

Share this post


Link to post
Share on other sites

Version 0.32

modloader

  • Added facility to override the model name for items
    • ModItems.addModelNameProvider(templateId, modelNameProvider)
    • modelNameProvider receives the item and can return a custom model name or null
  • Move configuration options to modname.config

  • Extract packaged config files
  • Translate tempate ids on server transfers
    • Transfering custom items with a different id on the other server should now work properly (tested with GM transfer and boat transfer)
    • Items in inventory which are not available on the target server will remain in inventory on the origin server (like deed papers)
    • Items in boats which are not available on the target server will vanish. The server does not preserve or restore them as this is not available in the regular game
    • Creature crates and tokens in boats are not tested. It's very likely that crossing with a creature token of an unknown creature will do really bad things. The creature is sent no matter if the token crosses and will probably cause errors on the target server or corrupt the player transfer.
    • It is advised to have the same items and creatures available across all servers.

serverpacks

  • serverpacks mod can be used by other mods to dynamicly serve packs
  • server pack downloads can be forced

servermap

  • new mod which packs a map dump as serverpack
    • Option addServerMapPack: A server pack mit the mapdump is added (defaults to true)
    • Option renderServerMap: The server map is rendered from the live data on server start (defaults to true)
    • If renderServerMap is false the following static map dumps are checked in the following order
      • servername/mapname.png (e.g. Adventure/heavenord.png)
      • servername/render.png
      • mapdump.png (created with #savemapdump, requires a restart to create the new map pack)

 

https://github.com/ago1024/WurmServerModLauncher/releases/tag/v0.32

  • Like 2

Share this post


Link to post
Share on other sites
1 hour ago, ago said:

Yes. Putting the server modloader into WurmServerLauncher should work.

 

Feel free to use the modloader in class although it might not be the best coding example.with the poor documentation and the sometimes unstructured development.

Hm.  Just putting the files into that directory was an epic fail.  (Or at least the modifications of starting gear were not applied.  That was the only mod I had activated, if I understand the process.)

 

I tried several variations: Steam "play", manage local server, start "offline" / "normal" / "use dedicated" (for the third one I started the dedicated server, first).  Could not even join the game in anything except "offline" until I realized the Steam check was failing, since I was not on-line.  (I actually live in an off-grid cabin, with solar and no "real" internet connection.  I tie into my iPhone when I need to do something like ask stupid questions of the forum, or download mods : )

 

Once I went on-line with Steam, I could join all the game instances.  But starting gear was vanilla / normal.

 

Is there one of your mods that would give me a quick / simple way to check if the modloader itself is running as it is supposed to do?  (I keep wondering if I am confusing file names / folders / etc. since the naming convention is the same.  For instance, placing the modified file into the wurmserverlauncher is one thing.  Replacing the vanilla file with the modified file (something I have had to do on other modified games) by renaming the vanilla and then changing the modified file name to original vanilla, is another.

 

Just FYI, I am not a coder (just a teacher) so my understanding of how Steam would now know to call the modified file is limited.

 

And I doubt my students will care about the coding documentation - as far as I know, none of them are comp sci majors. They would be doing exactly what I am doing.  Creating a game world / scenario which might use mods.  Which is why I am working to try and understand what can and cannot be done with your mod loader, instead of just giving up like any sensible non-geek.

Share this post


Link to post
Share on other sites

I did the following steps:

  • extract server-modlauncher-0.32.zip into WurmServerLauncher folder
  • ran patcher.bat in WurmServerLauncher
  • renamed WurmServerLauncher-patched.exe to WurmServerLauncher.exe. The client launcher calls this file and will now start the modded version.

Starting WurmServerLauncher.exe should now produce the file server.log which starts with

[05:27:46 PM] INFORMATION org.gotti.wurmunlimited.modloader.ModLoaderShared: ModLoader version v0.32-8965aa6
[05:27:46 PM] INFORMATION org.gotti.wurmunlimited.modloader.ModLoaderShared: Game version 1.5.0.1

and then goes on to list which mods it found and which it will load.

 

Starting the server from the client launcher would then run the modded version.

Share this post


Link to post
Share on other sites
1 hour ago, ago said:

I did the following steps:

  • extract server-modlauncher-0.32.zip into WurmServerLauncher folder
  • ran patcher.bat in WurmServerLauncher
  • renamed WurmServerLauncher-patched.exe to WurmServerLauncher.exe. The client launcher calls this file and will now start the modded version.

Starting WurmServerLauncher.exe should now produce the file server.log which starts with


[05:27:46 PM] INFORMATION org.gotti.wurmunlimited.modloader.ModLoaderShared: ModLoader version v0.32-8965aa6
[05:27:46 PM] INFORMATION org.gotti.wurmunlimited.modloader.ModLoaderShared: Game version 1.5.0.1

and then goes on to list which mods it found and which it will load.

 

Starting the server from the client launcher would then run the modded version.

Thanks.  I had just finished a couple of attempts and had limited success.  Renaming the file was the key in the dedicated launcher.  Ran the dedicated, from Steam Tools, then the main game from Steam games.  Selected "use dedicated" and joined the game with no issues.  (I had gone on-line with Steam as a result of previous tests : )  New character joined game and had only the modded starting gear.

 

Win!

 

Then I tried copying the dedicated files to the WurmServerLauncher folder.

 

Error . .. error . . . error.

 

Had to go back and verify my basic game files.  Ouch, 23 megs on a metered iPhone.  Which kind of put me off doing any more testing.

 

But easy enough to download your newest set of files and run everything as you listed.  Odd no one ever had this issue.  But I suspect most people who are modding the game are using dedicated.  Thanks again for the quick answers and going as far as to test everything.

 

Cheers.

 

*EDIT* Just tested everything, using the new instructions.  Everything loaded / ran fine from Steam Menu.  Tested both options (not dedicated, since that was already working) while on-line, then tested with Steam off-line, with off-line server connecting via address.  All systems 'go'. And all characters started with nothing but begging bowl, hatchet and knife.  Perfect.  Of course, now I am thinking I want to explore more mod options . . . like your SP priest mod <LOL>  Just for my own personal SP games, of course.

Edited by lokitheweaver
update testing results = win

Share this post


Link to post
Share on other sites
On 10/28/2017 at 4:13 PM, ago said:

In addition all subfolders in mods which are not already handled by above *.properties rule are checked for properties in

  • mods/<modname>/<modname>.jar!META-INF/org.gotti.wurmunlimited.modloader/<modname>.properties

Mods discovered this way will have depend.ondemand=false set unless the properties file in the jar explicitly sets depend.ondemand to something else.

 

Maybe i'm misunderstanding something but it looks like mods that are discovered from the jar (no .properties in mods directory) actually get depend.ondemand set to true and don't load unless required by something else? 

Share this post


Link to post
Share on other sites

Yes. This is exactly what happens. A mod without a .properties file in the mods folder has ondemand=true set. This can be overruled by a packaged .properties file (client side serverpacks and custommap do this to enable them by default) or in a .config file in the mods folder.

 

EDIT: I just checked the old posting and i wrote it the other way around. I just edited it. Autodiscovered mods are not activated unless they are required by another mod or they have ondemand=false in the packaged .properties.

Edited by ago
  • Like 1

Share this post


Link to post
Share on other sites

So where do all of the .config files reside?  I don't see them in any of the zip files that are downloadable.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now