Sign in to follow this  
Lue

A simple(?) server mod - Spit Roasts.

Recommended Posts

Is there any possibility of someone creating a server mod to allow Spit Roasts to be created with a shaft? Currently, the only way to make one is by foraging for a branch, and using that branch to create it. A few players that I've talked to, as well as the two server owners, found it odd that we can't make one with a shaft. So, I'm posting here in the hopes that maybe someone could create something to do this. I don't know if it's simple, but I'm hoping it is lol. 

  • Like 1

Share this post


Link to post
Share on other sites

I realize this was posted quite a while ago, but it isn't marked as Solved so... If you have access to the server, which I assume you either do or can get ahold of the server owners to do so, you or they can edit the recipe to allow Branch OR Shaft instead of only one or the other without an actual mod.

 

The recipes can be found in the "dist" folder in the dedicated server's root folder(NOT the individual "Adventure" or "Creative", etc... folders). Unfortunately the actual recipe files are numbered rather than named so you'll have to open them to find out which is which unless you can find a list somewhere, but a regular text editor such as Notepad can open and edit the .json files with no problem.

Retrograde's thread here tells a bit more about it in the first post; "Recipe creation and sharing"

  • Like 1

Share this post


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

I realize this was posted quite a while ago, but it isn't marked as Solved so... If you have access to the server, which I assume you either do or can get ahold of the server owners to do so, you or they can edit the recipe to allow Branch OR Shaft instead of only one or the other without an actual mod.

 

The recipes can be found in the "dist" folder in the dedicated server's root folder(NOT the individual "Adventure" or "Creative", etc... folders). Unfortunately the actual recipe files are numbered rather than named so you'll have to open them to find out which is which unless you can find a list somewhere, but a regular text editor such as Notepad can open and edit the .json files with no problem.

Retrograde's thread here tells a bit more about it in the first post; "Recipe creation and sharing"

The problem with that, is that you need to set shafts to be a utensil for cooking in order to use in a recipe.

Edited by Governor
  • Like 1

Share this post


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

I realize this was posted quite a while ago, but it isn't marked as Solved so... If you have access to the server, which I assume you either do or can get ahold of the server owners to do so, you or they can edit the recipe to allow Branch OR Shaft instead of only one or the other without an actual mod.

 

The recipes can be found in the "dist" folder in the dedicated server's root folder(NOT the individual "Adventure" or "Creative", etc... folders). Unfortunately the actual recipe files are numbered rather than named so you'll have to open them to find out which is which unless you can find a list somewhere, but a regular text editor such as Notepad can open and edit the .json files with no problem.

Retrograde's thread here tells a bit more about it in the first post; "Recipe creation and sharing"

 

3 hours ago, Governor said:

The problem with that, is that you need to set shafts to be a utensil for cooking in order to use in a recipe.

 

What Governor said, is about the gist of what I was told by one of the owners. Whilst we could set a custom recipe to use a shaft, it would still require further modification. We don't know how to go about doing that. Would either of you be able to tell us how?

Share this post


Link to post
Share on other sites

Sorry, I haven't done much with recipes. About all I've really one with them was check the files to figure out how to make Passata and Spaghetti in-game.

 

However I do know a good place to learn json, the coding used for the recipes. I posted it a while back actually;

 

Share this post


Link to post
Share on other sites

I edited the code to add the changes I needed. I used IntelliJ to edit the server.jar and then recompiled my changes. Add server.jar, common.jar, and a folder named lib as libraries to your project.

Share this post


Link to post
Share on other sites

First off, As far as I can tell you can not add a "or" condition to items listed in the active field for recipes. A  person would need to make a new recipe using shaft as an active item. I don't like making recipes so someone else will need to do that.

 

* This script runner mod will add shafts as an item usable in recipes. To use this: copy the code, paste it into text editor, name the file using ".js" extension and the name doesn't matter, save the file in the onItemTemplatesCreated folder (mods\scriptrunner\scripts\onItemTemplatesCreated) and make the folder if it doesn't exists.

var ItemTemplateFactory = Packages.com.wurmonline.server.items.ItemTemplateFactory;
var ItemList = Packages.com.wurmonline.server.items.ItemList;
var ItemTypes = Packages.com.wurmonline.server.items.ItemTypes;
var Logger = Packages.java.util.logging.Logger;
var logger = Logger.getLogger("com.joedobo27.scriptRunnerMods.make-shaft-recipe-item");


function onItemTemplatesCreated() {
	var itemTemplates = ItemTemplateFactory.getInstance().getTemplates();
	var shaft = ItemList.shaft;
	var types = [ItemTypes.ITEM_TYPE_RECIPE_ITEM];

	for (i = 0; i < itemTemplates.length; i++) {
		if (itemTemplates[i].getTemplateId() == shaft) {
			itemTemplates[i].assignTypes(types);
			logger.info("Shaft can now be used in recipes.");
		}
	}
}

 

* This script runner mod will let you turn shafts into branches. You use a carving knife on a shaft to make a branch, I disregarded with weight difference between shaft and branch. To use this: copy the code, paste it into text editor, name the file using ".js" extension and the name doesn't matter, save the file in the onServerStarted folder (mods\scriptrunner\scripts\onServerStarted) and make the folder if it doesn't exists.

var CreationEntryCreator = Packages.com.wurmonline.server.items.CreationEntryCreator;
var SkillList = Packages.com.wurmonline.server.skills.SkillList;
var ItemList = Packages.com.wurmonline.server.items.ItemList;
var CreationCategories = Packages.com.wurmonline.server.items.CreationCategories
var Logger = Packages.java.util.logging.Logger;
var logger = Logger.getLogger("com.joedobo27.scriptRunnerMods.make-branch-from-shaft");

function onServerStarted(){
	var branch = CreationEntryCreator.createSimpleEntry(SkillList.CARPENTRY, ItemList.knifeCarving,
                ItemList.shaft, ItemList.branch, false, true, 0.0, false,
                false, CreationCategories.TOOLS);
	branch.setDepleteFromTarget(1000);
}

 

  • Like 2

Share this post


Link to post
Share on other sites

Thanks,@joedobo I was working on learning to make a script for this :-) I have the recipes already made from my server to use with a shaft.

raw sheep spit

raw ram spit

raw lamb spit

 

change the numbers on the file name and inside if the ID is already used. Use a text editor like notepad to edit the files

Edited by Governor

Share this post


Link to post
Share on other sites

This would make a good blacksmithing recipie that could be a component to a masonry recipie to create a permanent cooking item to do this.  Perhaps for large creatures such as Bulls, Horses, Bears, Crocodiles, Dragon Hatchlings, etc.

 

 

Share this post


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

This would make a good blacksmithing recipie that could be a component to a masonry recipie to create a permanent cooking item to do this.  Perhaps for large creatures such as Bulls, Horses, Bears, Crocodiles, Dragon Hatchlings, etc.

 

 

You mean something like this?  If so, I'd suggest instead of making a new masonry cooker, have it use the "Open Fireplace" or the "Campfire"(which is what the current recipe uses).
71I0FD3hcdL._AC_UL320_SR302,320_.jpg

 

Found the image here:  https://www.amazon.co.uk/SunshineBBQs-Roast-Rotisserie-Spit-Tripod/dp/B00JHMG5V0

Edited by Cadh20000

Share this post


Link to post
Share on other sites

I can add a new item and set it up as a cooker. Although, I don't know how to make the artwork.

Share this post


Link to post
Share on other sites
40 minutes ago, joedobo said:

I can add a new item and set it up as a cooker. Although, I don't know how to make the artwork.

If the game uses CAD or SolidWorks files it would not be difficult to create in those programs.  Not sure how to create a skin for it though that would look good.

 

Would be interesting and possibly very difficult if it was an animated cooker that would rotate while cooking :)

Share this post


Link to post
Share on other sites

You'd use something like Blender. Further, iirc the only usable file is a collada (.dae extension). I don't see many new graphics (models, textures, animation) being released publicly. It seems the graphics part is the most lacking area for modding. People do it, it's just that they aren't openly releasing their creations.

Edited by joedobo

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
Sign in to follow this