Search the Community
Showing results for tags 'scriptrunner'.
Found 1 result
-
For this mod, because I think ccfp is stupid, I made it so my ccfp values are basically always maxed. Required -Ago's server modloader -You need to have the scriptrunner mod installed and setup as explained on github wiki page: https://github.com/ago1024/WurmServerModLauncher/wiki/Mods-ScriptRunner Install 1. Copy the javaScript code from the code box. 2. Paste that into any simple text editor. 3. Save the file and I named this, "ccfp-maximizer.js". You could use whatever name you want as long as its unique and it ends with ".js". 4. Put it in the directory, "~Wurm Unlimited Dedicated Server\mods\scriptrunner\scripts\onItemTemplatesCreated". If the, "onItemTemplatesCreated" folder doesn't exists, create it. 5. Change the values for carbs, calories, fats or proteins if you want something different. var ItemTemplateFactory = Packages.com.wurmonline.server.items.ItemTemplateFactory; var Logger = Packages.java.util.logging.Logger; var logger = Logger.getLogger("com.joedobo27.scriptRunnerMods.ccfp-maximizer"); function onItemTemplatesCreated() { var templates = ItemTemplateFactory.getInstance().getTemplates(); var maxValue = Packages.java.lang.Short.MAX_VALUE; //*************************************************** // Use maxValue to max and 0 to minimize. var carbs = maxValue; var calories = maxValue; var fats = maxValue; var proteins = maxValue; //*************************************************** for (i = 0; i < templates.length; i++) { templates[i].setNutritionValues(carbs, calories, fats, proteins); } logger.info("CCFP simplified, template count: " + templates.length); } Take note that ccfp values are scaled based on a standard unit size of 1-kg. A pumpkin is 32k and a garlic 1.6k because its .05 or 5% of 1kg. I'm not sure what is going on with fish but weights and sizes for them seems constantly strange.
- 5 replies
-
- scriptrunner
- server aml
-
(and 1 more)
Tagged with: