• Announcements

    • Keenan

      Password Reset!   06/28/17

      Just as a reminder (thank you Wurmhole) - all passwords have been reset! You will need to use the Forgot Password link to reset your password in order to log in and participate.


  • Content count

  • Joined

  • Last visited

  • Days Won


joedobo last won the day on February 19 2015

joedobo had the most liked content!

Community Reputation

982 Excellent

About joedobo

  • Rank

Profile Information

  • Gender
    Not Telling


  • Xan
  1. Is it possible to use the script-runner to do action performer/ behavior provider? If so, is there an example somewhere?
  2. I'm working on a mod that will let players influence plants to do things differently within a defined zone then how they normally act in WU. Next is a short list of my goals. Have I forgot something that is of similar subject? 1. speed up tree growth. 2. prevent trees from ageing past very old, sprouting. 3. forcing tree/bush to have a harvestable item outside the normal seasonal harvest time, and having that item stay on the tree/bush until it's picked. 4. speeding up flower creation and influencing what kind of flower is created within the zone. 5. speeding up grass, steppe, or moss spreading. 6. stopping plants from spreading to adjacent dirt tiles within the zone. 6. speeding up grass growth. Here I'm talking about the grass growth stages like "wild". 7. preventing trees/bushes from sprouting in the zone. 8. influencing both category and individual item that are collected with forage and bontanize. As an example, forgo a bunch of blueberry to a totem in order to make it so every tile in the zone will only produce berries(all types). If you forgo enough you'd only get blueberry. I doubt I'll do anything with farming. But I am aiming to have harvested amounts within the zone be comparable to farming harvest assuming no raking. This will depend on if I make custom collection actions or try to use WU default ones.
  3. yeah, I keep thinking about a mod to try and emulate mark, recall and gate travel. I've frequently thought about night sight has well. As I remember one issue with spells is that there aren't many empty spots to add new spell types. Here they are listed com.wurmonline.shared.constants.Enchants. These end up getting passed to the SpellEffect object creation as the type. I suspect that getting a new magic system to play nice with WU will be a major hassle, and that is even for the simplest of things. Magic spells that only work with custom content should work well. I just don't see someone adding a new custom combat system.
  4. make the onItemTemplatesCreated folder and it goes with the other "onBlahBlah" folders. copy the javascript code into text editor save it with whatever name followed by the javascript extension, which is ".js". put the javascript file into the onItemTemplatesCreated folder.
  5. @bdewThank you! I got the debugger to work. It seems to work well if I configure a JAR application in order to run modlauncher.jar. I run that and then run the remote debug tool. Still not able to get JAMM to work... [05:56:31 PM] SEVERE org.gotti.wurmunlimited.modloader.server.Listeners: ItemTemplatesCreatedListener handler for mod NatureSwayingMod failed java.lang.IllegalStateException: Instrumentation is not set; Jamm must be set as -javaagent I made a simple project to test JAMM ( Data.class is just a simple data holder object). It works and I used it similarly: -javaagent:C:\Users\Jason\IdeaProjects\jamm\target\lib\jamm-0.3.1.jar I'm guessing there are instrumentation conflicts happening. That error is thrown from inside JAMM. public class App { static MemoryMeter memoryMeter = new MemoryMeter(); static Random random = new Random(); static final String ALPHABET = "abcdefghijklmnopqrstuvwxyz"; public static void main( String[] args ) { Data data = new Data(random.nextLong(), random.nextInt(), ALPHABET); long size = memoryMeter.measure(data); IntStream.range(0, 100) .parallel() .forEach(value -> new Data(random.nextLong(), random.nextInt(), ALPHABET)); int length = Data.objectHashMap.size(); Data[] data1 = new Data[length]; Data.objectHashMap.keySet().toArray(data1); long size2 = memoryMeter.measure(Data.objectHashMap.get(data1[random.nextInt(length)])); long size100 = memoryMeter.measure(Data.objectHashMap); } } Anyway my test answered my noob question regarding memory use and whether collections use object references or the memory footprint for the whole object.
  6. ABANDONED. This uses a bunch of bytecode in order to achieve its goal. I don't want to support bytecode based mods anymore. The script-runners should still work.
  7. Another helpful thing related to this would a way to use debug breakpoints in the modloader related methods like onServerStarted() or init(). Here Bdew advised on one way to get the debugger to work: I've only been able to get that to work for a round about process: 1) make a proper java code method in my mode, 2) insert a call to that method in WU code somewhere, 3) add a breakpoint in the new method in my mod somewhere. 4) do stuff in game that would call the new method. This does work. I'd like to be able to use breakpoints earlier in execution. I tried to configure some kind of remote-debug and Batch-execute (modlauncher.bat) in hopes Intellij would run mod launcher and immediately after attach the debugger. The server does start and run but my breakpoints aren't working. An unrelated yet interesting side effect is I see is using the "Before launch" section I can compile the artifact.jar, run mod launcher, and have the information we usually see in a command prompt instead be Intellij frame, cool!
  8. I'd like to use this tool: https://github.com/jbellis/jamm But I'm having trouble getting it to work. I need a step by step complete noob tutorial. Here is what I did so far: 1. cloned the github project into a new Intellij projbect. 2. used ant and the included build.xml file to fetch external sources. 3. setup the project so it can build a artifact jar and artifact-built to make jamm.jar. 4. put that jamm.jar in my server directory. Here is some print out info from the command window I use to launch modlauncher: Here is modlauncher.bat if exist logging.properties set LOGGING=-Djava.util.logging.config.file=logging.properties set JAVA=java if exist runtime\bin\java.exe set JAVA=runtime\bin\java.exe if exist ..\runtime\bin\java.exe set JAVA=..\runtime\bin\java.exe %JAVA% "-Dworkdir=%CD%" "-Djava.library.path=%CD%\nativelibs" %LOGGING% "-javaagent:C:\Users\Jason\Documents\WU\WU-Server\jamm.jar" -Xmn256M -Xms512m -Xmx2048m -XX:+OptimizeStringConcat -XX:+AggressiveOpts -jar modlauncher.jar %* Maybe you know of an easy-to-use, super-noob-compliant, object memory inspection tool? edit...This has nothing to do with the WU server or WU code in any form. It is a request to help me get this third party tool to work. I have no idea why a WU moderator moved it here.
  9. Slopes...pregenerated (updated weekly, monthly, maybe longer) "heat map" or a mesh that holds data on the intensity of the slopes. I believe fetching data in this way is more efficient then calculating slopes for every creature's movement. Using that and combine it with something similar that holds data about population density could be used in some kind of probability logic for decided if a creature should move in a direction and or if it should continue moving in its current direction.
  10. Okay, my plan to do releases every other WU release isn't going to work. Instead I'll just support robust mods, and this one is such. There is an update release on github, https://github.com/Joedobo27/SmeltPurifyMod/releases/tag/1.0.1. Question? Is it okay that the smelt action time is the same regardless of the lump's size? It's possible to scale up the action time in proportion to the lump's base size. For an iron lump that is 1kg, so a 64kg lump would have a time ~64 times longer. I seem nice that a player could do lumps one at a time for skill or do a combined bundle if in a hurry.
  11. I had to look up the most basic of the basics concerning the logarithm and exponent relationship, so don't feel bad. The math I did was taking the conversion through step by step. http://www.mathsisfun.com/algebra/exponents-logarithms.html
  12. This script-runner mod seems to work. I just set the "fullprice" field in ItemTemplate.class to false for sleep powder. It was toggled on with the item type, ITEM_TYPE_FULLPRICE = 53;. Save it as something with a .js extension and put it in ~WU\Wurm Unlimited Dedicated Server\mods\scriptrunner\scripts\onItemTemplatesCreated var ItemTemplateFactory = Packages.com.wurmonline.server.items.ItemTemplateFactory; var ReflectionUtil = Packages.org.gotti.wurmunlimited.modloader.ReflectionUtil; var Class = Packages.java.lang.Class; var Logger = Packages.java.util.logging.Logger; var logger = Logger.getLogger("com.joedobo27.scriptRunnerMods.make-sleep-powder-priceable"); function onItemTemplatesCreated() { var itemTemplates = ItemTemplateFactory.getInstance().getTemplates(); var fieldfullprice = ReflectionUtil.getField(Class.forName("com.wurmonline.server.items.ItemTemplate"), "fullprice"); var sleepPowder = Packages.com.wurmonline.server.items.ItemList.sleepPowder; for (i = 0; i < itemTemplates.length; i++) { if (itemTemplates[i].getTemplateId() == sleepPowder) { ReflectionUtil.setPrivateField(itemTemplates[i], fieldfullprice, false); logger.info("Sleep powder's price can be set."); } } }
  13. @Asperis I only update every other release. I don't have a problem waiting for content and doing it this way reduces the updating effort.
  14. Oh my, what a hassle! Latests problem is the new tiles(TILE_FIELD3 at 44, TILE_FIELD4 at 45) don't appear to be supported. I'm wondering if the client also needs to be modded to support new tile additions. Could be an error on my part I missed somewhere. I put my progress on a GitHub. There is no release.
  15. hehe, you're not the first BaddBob. Although, I don't have a link to prove it. I'm surprised there aren't more -1 in that suggestion thread. Quite a few people seem to like the general idea. I just did it because I dislike wasted low quality metal which just literally just sits in a bin. The biggest problem form mmo perspective, imo anyway, is resource depletion. I good mining toon can pop a iron vein in a day and folks would start doing just that if they could use it to trade up quality. edit... oh, my. when you do the math a 5 to 1 setting is an crazy amount of lump to go up say 70 quality points. I believe you just raise your setting to the power of desired increased quality points. so 5^70 is a big number, pretty much impossible to achieve. It looks like a good value for me is maybe 1.12 setting or less. 1.12^70 is ~ 2.8k lumps. That would mean a 30ql vein should be able to make a handful of high 90's ql lumps. Here is another way to do it where I figure out the conversion ratio assuming I want 70 ql points to cost 1000 lumps. x^70=1000 log base-x (1000) = 70 log 1000 / log x = 70 log 1000 / 70 = log x log x = 0.04285714285714285714285714285714 10^0.042 = x x = 1.1037155032027572401187958194173 This begs the question of whether I should change how the settings work.