Jonneh

Members
  • Content Count

    513
  • Joined

  • Last visited

Posts posted by Jonneh


  1. The newer version doesn't use RMI any more, it needs access to the map and database files. You could do it across separate machines by setting up the server directory as a shared folder on the windows machine then using something like samba on the linux machine to access that and point the map viewer to the shared directory. It'd probably run a bit slower as it would need to copy a couple hundered megabytes of data across the network each time you update the map. Alternatively you could run it on the windows machine then have some automated way of uploading the generated map to the linux machine over (s)ftp.


  2. On 13/03/2016 at 8:51 PM, Senitor said:

    I've just set up my own server and the map is showing, with the first deed, but 2 more deeds have been created but their names are not showing on the map - I can see the actual settlements but not the deed names, 

     

    SHOW_DEEDS = true
    SHOW_DEED_BORDERS_IN_3D_MODE = true
    SHOW_DEED_BORDERS_IN_FLAT_MODE = true

     

    Any ideas?

     

    You need to re-run the program every time you want to update the map. You can use some kind of task scheduling software such as cron to do this automatically.


  3. 44 minutes ago, razoreqx said:

    Nevermind.. this worked:      java -Xmn256M -Xms512m -Xmx1024m  -jar mapviewer.jar

     

    Update:

    But the map is blank like its not able to read the just the zoom, search box and blue background...  GRRRRRRRRRRRR..

     

    Still broken.

     

    Try removing all the files from the old version (the map.js, main.css, index.html etc) and running it again (it should automatically replace them with the new versions).


  4. Just released new version. This update has more accurate deed borders, shows bridges and attempts to reload sections that don't load properly. The setup procedure and config file have changed considerably so you'll need to set everything up again (also paths also no longer need slashes to be escaped in the config file).


  5. On 11/02/2016 at 4:04 AM, Honeysolo said:

    So I have it going.. but when I go to the map, it's just blue. I tried to run the mapviewer, and it gives me an error at the end in regards to no target sections. Yet, there is a sections folder? 

     

    INFO: Rendered 96%
    Exception in thread "main" java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoa
    der.java:58)
    Caused by: java.nio.file.NoSuchFileException: \var\www\pve\mapviewer\sections
            at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
            at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
            at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
            at sun.nio.fs.WindowsFileSystemProvider.createDirectory(Unknown Source)
            at java.nio.file.Files.createDirectory(Unknown Source)
            at com.wyverngame.mapviewer.MapViewer.save(MapViewer.java:87)
            at com.wyverngame.mapviewer.MapViewer.main(MapViewer.java:278)
            ... 5 more

     

    If the directory definitely exists it's most likely a permissions problem. Try changing the permission on the directory with the command 'chmod a+wr /var/www/pve/mapviewer/sections'.


  6. Patch notes for Wyvern for 2016/02/04

     

    * Update to latest Wurm Unlimited release. This brings the following changes: http://steamcommunity.com/games/366220/announcements/detail/652262930199883209
    * Added rewards for voting for Wyvern on http://wurm-unlimited.com/. You can claim 10 copper coins for each vote at settlement tokens.
    * Added depth drill item, this allows you to measure how deep the rock layer is below the surface on tile corners. The depth drill can be created by using an iron ribbon on a shaft, along with two handles and a small nails.


  7. Patch Notes for 2015/12/24

    * The CA channel is now opt-out instead of opt-in, which should help new players.
    * Santa Claus has arrived and brings players a (cosmetic) gift. Find him at the spawn towns on each server. (A client bug does mean his texture is terrible, however. Not much we can do about this.)
    * There's also a Julbord at each of the spawn towns, so you can get 100% food, water and nutrition.
    * Santa Claus and the Julbord will stay for at least 2 weeks. The exact day on which they disappear will depend on reboot timings, so there may be a few extra days as well but we can't guarantee that.

     

    s3EFRFJ.jpg


  8. 15 hours ago, Crustyfoot said:

    BTW: This is maybe not exactly important but I noticed after this is done generating a map the files are not closed. You have to close the java applet to release the files so that for example you can look at the map with an image viewer.

     

    Just uploaded fixed version for this.


  9. DbQ4dDw.png

     

    Latest release:

    Requires Java 8.

     

    Yv6sI6k.png

     

    The map and a render of the surface will be saved to a map_<seed> directory in the same location as terraingen.jar.

     

    Features:

    • Mountains (smooth & ridged)
    • Rivers/lakes
    • Deserts/tundra/steppe
    • Clay/peat/moss
    • Tar pits
    • Flowers
    • Regional forests
    • Regional ores
    • Fairly uniform iron distribution

     

    Example maps:

    http://i.imgur.com/ccAuJNz.png

    http://i.imgur.com/LjFSJJ6.png

    http://i.imgur.com/igm0ozW.png

     

    Source code: https://github.com/jonathanedgecombe/wu-terrain-gen


  10. It won't work with anything that modifies the existing RMI interface, not much I can do about that :/

     

    Edit: Actually you *might* be able to get it working by also replacing the WebInterface class in mapviewer.jar with the modified one as well, as long as it hasn't changed the methods for retrieving deed info.


  11. The checkForGrassGrowth in TilePoller has a problem if grass grows and a new flowerType of null is generated in the same call, causing a null pointer exception.

     

    Can be fixed by changing the flower growth part to

    	FlowerType newFlowerType = Terraforming.getRandomFlower(flowerType, false);
    	if(andFlowers && createFlowers && newFlowerType != null) {
    		flowerType = newFlowerType;
    		dataHasChanged = true;
    	}

     

    Stack trace

    Nov 23, 2015 12:42:35 AM com.wurmonline.server.Server run
    SEVERE: null
    java.lang.NullPointerException
            at com.wurmonline.mesh.GrassData.encodeGrassTileData(GrassData.java:572)
            at com.wurmonline.server.zones.TilePoller.checkForGrassGrowth(TilePoller.java:763)
            at com.wurmonline.server.zones.TilePoller.checkEffects(TilePoller.java:400)
            at com.wurmonline.server.zones.TilePoller.pollNextTile(TilePoller.java:235)
            at com.wurmonline.server.zones.TilePoller.pollNext(TilePoller.java:165)
            at com.wurmonline.server.Server.run(Server.java:1709)
            at java.util.TimerThread.mainLoop(Timer.java:555)
            at java.util.TimerThread.run(Timer.java:505)

     


  12. In the getChampionsFromKingdom method in the Players class, the select statement is called incorrectly.

    The ps.setLong(2, System.currentTimeMillis()) call is causing the issue, as the SQL query only has one parameter.

     

    Stack trace:

    WARNING: Array index out of bounds while polling an action Jonneh due to 1
    java.lang.ArrayIndexOutOfBoundsException: 1
            at org.sqlite.core.CorePreparedStatement.batch(CorePreparedStatement.java:110)
            at org.sqlite.jdbc3.JDBC3PreparedStatement.setLong(JDBC3PreparedStatement.java:298)
            at com.wurmonline.server.Players.getChampionsFromKingdom(Players.java:2901)
            at com.wurmonline.server.behaviours.Methods.sendRealDeathQuestion(Methods.java:329)
            at com.wurmonline.server.behaviours.HugeAltarBehaviour.action(HugeAltarBehaviour.java:357)
            at com.wurmonline.server.behaviours.HugeAltarBehaviour.action(HugeAltarBehaviour.java:423)
            at com.wurmonline.server.behaviours.Action.poll(Action.java:3226)
            at com.wurmonline.server.behaviours.ActionStack.poll(ActionStack.java:237)
            at com.wurmonline.server.players.Player.pollActions(Player.java:8901)
            at com.wurmonline.server.Players.pollPlayers(Players.java:4302)
            at com.wurmonline.server.Server.run(Server.java:1722)
            at java.util.TimerThread.mainLoop(Timer.java:555)
            at java.util.TimerThread.run(Timer.java:505)
    

     


  13. So is that something you would remove after using one time and out back the original?

     

    Like i add that to the packs? run the game once then remove it?

     

    I don't want to respawn flowers every time I run the game.

     

    Is this something that can be used on a server that is already established and has people without having to completely redo the server?

     

    Just a bit confused with the instructions....is that an executable file i can run and just add flowers to my server?

     

    It's just a run once program that modifies the map, doesn't need to be added to anything, although you'll need to shut down the server while you swap out the map files.

    Needs to be run from command line (or a batch/shell script) like 'java -jar flowerspawner.jar top_layer.map top_layer_flowers.map 25'.

     

    You'll need to either have the top_layer.map in the same directory as the flowerspawner.jar or specify the entire path.


  14. As promised earlier, here's a simple Java program to add flowers to an existing map: http://wyverngame.com/flowerspawner.jar


    Needs to be run with 3 arguments: original top_layer.map path, new top_layer.map path and percent chance for flowers on each grass tile (this can be floating point)


     


    If it works properly, the output should be something similar to this



    >$ java -jar flowerspawner.jar top_layer.map top_layer_flowers.map 25
    Creating flowers on existing grass with ~25% chance
    Loaded 'top_layer.map' with size 4096
    0%
    3%
    ...
    93%
    96%
    Finished, written to 'top_layer_flowers.map'

    Keep a backup of the original top_layer.map just in case anything goes wrong.


     


    Here's the code if anyone wants to mess around with the flower type chances etc: http://pastie.org/pastes/10557593/text?key=psyvgrhs7epdjmsjt9teta



  15. Just took a look at the code for naturally spawning flowers, and came across this gem: http://pastie.org/private/2hxponyzyzpwiiqvvsqq


     


    Whoever wrote that code either doesn't understand or forgot how Java passes references, but either way that's why there are no natural flower spawns.


     


    Edit: I gave someone a script that adds flowers to existing maps, I'll clean it up a little bit and post soon.



  16. This is a tool that provides a much nicer way of interfacing with RMI methods on the server. It runs as a HTTP server which provides responses in JSON format.


     


    Releases: https://github.com/jonathanedgecombe/wu-json-rmi-api/releases


    License: https://github.com/jonathanedgecombe/wu-json-rmi-api/blob/master/license.md


     


    Setting up


    There is an example config.json file provided in the git repository. A copy of this should be made, edited (and renamed to config.json) and placed in the same directory that you are running the API from.


    Ideally this should be run locally, given the security issues of exposing the RMI ports to external access.


    You will need to set the USE_INCOMING_RMI setting to true in the wurm.ini file for the WU server you are targetting.


    After that simply run it with the command java -jar rmi-api.jar.


    You may need to run it with elevated privileges to bind to certain ports.


    Currently the API must be restarted on server restarts, however I plan to resolve this in a future release.


     


    rmiHost


    The host name of the server to connect to the RMI interface of. If you're running the API locally, this should be set to a loopback address.


     


    rmiPort


    The port the RMI registry for the server is listening on. The default port is 7220.


     


    rmiPassword


    The password used for the servers RMI interface.


     


    apiPort


    The port that the API HTTP server will listen on.


     


    apiPassword


    A password used in requests to the API. If this setting is left as an empty string then the password parameter can be omitted from requests, however this will leave the server wide open from a security standpoint unless the port the API is listening on is firewalled off.


     


    Example request and response


    Request: http://127.0.0.1:8080/getPlayerId?name=Jonneh


    Response:



    {
    "playerId": 19710976
    }

    API Reference


    As this project is still a work in progress, there are still many methods that are not implemented yet. As I continue to implement more I will update this post.


     


    /broadcastMessage


    Broadcasts a given message to the event tab for all players on the server.


     


    Parameters


    message - The message to broadcast.


     


    Example response



    {
    "success": true
    }

    /getBattleRanks


    Gets the battle ranks for the top players.


     


    Parameters


    limit - The limit of players to retrieve the battle ranks of. Defaults to 10 if not present.


     


    Example response



    {
    "ranks": {
    "Jonneh": 1000,
    "Graham": 1000
    }
    }

    /getBodyItems


    Gets the equipment for the given player.


     


    Parameters


    id - The ID for the player to retrieve the equipment of. See /getPlayerId.


     


    Example response



    {
    "items": [
    {
    "parentId": 10092096531,
    "details": {
    "sizeX": 5,
    "sizeY": 30,
    "sizeZ": 60,
    "owner": 19710976,
    "posX": 942,
    "posY": 2752,
    "creator": "Jonneh",
    "creationDate": "12:50:34 on Luck day in week 2 of the starfall of the Digging in the year of 980.",
    "description": "",
    "material": "birchwood",
    "id": 102511723522,
    "name": "shield",
    "quality": 50.0,
    "damage": 0.0
    }
    },
    {
    "parentId": 10092094995,
    "details": {
    "sizeX": 1,
    "sizeY": 4,
    "sizeZ": 75,
    "owner": 19710976,
    "posX": 942,
    "posY": 2752,
    "creator": "Jonneh",
    "creationDate": "12:50:34 on Luck day in week 2 of the starfall of the Digging in the year of 980.",
    "description": "",
    "material": "iron",
    "id": 102528500738,
    "name": "short sword",
    "quality": 50.0,
    "damage": 0.0
    }
    }
    ]
    }

    /getDeedList


    Gets a list of all deeds on the server.


     


    Parameters


    detailed - If set to false only the deed ID and name will be retrieved. If set to true then the motto, kingdom, size (in the X direction), founder, mayor, # of citizens, # of allies, # of guards and location will also be retrieved. Defaults to false if not present.


     


    Example response



    {
    "deeds": [
    {
    "motto": "A settlement like no other.",
    "kingdom": "Freedom Isles",
    "size": 5,
    "founder": "Jonneh",
    "mayor": "Jonneh",
    "citizens": 1,
    "allies": 0,
    "guards": 0,
    "posX": 942,
    "posY": 2752,
    "id": 1,
    "name": "Newtown"
    }
    ]
    }

    /getFriends


    Gets a list of friends for the given player.


     


    Parameters


    id - The ID for the player to retrieve the friends list of. See /getPlayerId.


     


    Example response



    {
    "friends": {
    "Jonneh": 19710976,
    "Graham": 20032411
    }
    }

    /getInventory


    Gets the inventory for the given player.


     


    Parameters


    id - The ID for the player to retrieve the inventory of. See /getPlayerId.


    detailed - If set to false only the item name, quality and damage will be present. If set to true then the size, position, owner (as a player ID), creator (as a player name), creationDate, description (renamed name) and material will also be retrieved.


     


    Example response



    {
    "items": [
    {
    "sizeX": 1,
    "sizeY": 1,
    "sizeZ": 1,
    "owner": 19710976,
    "posX": 942,
    "posY": 2752,
    "creator": "",
    "creationDate": "14:33:19 on Luck day in week 2 of the starfall of the Digging in the year of 980.",
    "description": "",
    "material": "crystal",
    "id": 510365844482,
    "name": "emerald",
    "quality": 50.0,
    "damage": 0.0
    },
    {
    "sizeX": 3,
    "sizeY": 10,
    "sizeZ": 60,
    "owner": 19710976,
    "posX": 942,
    "posY": 2752,
    "creator": "",
    "creationDate": "12:33:19 on Luck day in week 2 of the starfall of the Digging in the year of 980.",
    "description": "",
    "material": "birchwood",
    "id": 102494946306,
    "name": "hatchet",
    "quality": 10.0,
    "damage": 0.0
    },
    {
    "sizeX": 1,
    "sizeY": 1,
    "sizeZ": 1,
    "owner": 19710976,
    "posX": 942,
    "posY": 2752,
    "creator": "",
    "creationDate": "12:33:19 on Luck day in week 2 of the starfall of the Digging in the year of 980.",
    "description": "Newtown",
    "material": "birchwood",
    "id": 102746604546,
    "name": "Settlement deed",
    "quality": 10.0,
    "damage": 0.0
    }
    ]
    }

    /getItemSummary


    Get detailed information about an item.


     


    Parameters


    id - The ID for the item to retrieve information of.


     


    Example response



    {
    "item": {
    "sizeX": 1,
    "sizeY": 1,
    "sizeZ": 1,
    "owner": 19710976,
    "posX": 942,
    "posY": 2752,
    "creator": "",
    "creationDate": "20:47:58 on Luck day in week 2 of the starfall of the Digging in the year of 980.",
    "description": "",
    "material": "vegetarian",
    "id": 1189507548162,
    "name": "bouquet of greenish-yellow flowers",
    "quality": 1.0,
    "damage": 10.02768
    }
    }

    /getPlayerCount


    Gets the number of players currently logged in.


     


    Example response



    {
    "playerCount": 17
    }

    /getPlayerId


    Gets the ID for a player with the given name.


     


    Parameters


    name - The name for the player to retrieve the ID of.


     


    Example response



    {
    "playerId": 19710976
    }

    /getPlayerMoney


    Retrieves the quantity of money the given player has in their bank. The quantity is given in iron coins.


     


    Parameters


    name - The name for the player to retrieve the money of.


     


    Example response



    {
    "money": 10000000
    }

    /getPlayerPower


    Retrieves the power level for the given player.


     


    Parameters


    id - The ID for the player to retrieve the power level of. See /getPlayerId.


     


    Example response



    {
    "power": 5
    }

    /getPremiumPlayerCount


    Gets the number of premium player currently logged in on the server.


     


    Example response



    {
    "playerCount": 5
    }

    /getServerStatus


    Gets the current server status.


     


    Example response



    {
    "status": "Up and running."
    }

    /getSkillList


    Retrieves a list of available skills on the server.


     


    Example response



    {
    "skills": [
    {
    "id": 1024,
    "name": "Healing"
    },
    {
    "id": 1,
    "name": "Body"
    },
    {
    "id": 1025,
    "name": "Clubs"
    },
    {
    "id": 2,
    "name": "Mind"
    },
    {
    "id": 1026,
    "name": "Religion"
    },
    {
    "id": 3,
    "name": "Soul"
    },
    etc...
    ]
    }

    /getSkills


    Retrieves the skill levels for the given player.


     


    Parameters


    id - The ID for the player to retrieve the skills of. See /getPlayerId.


     


    Example response



    {
    "skills": {
    "Large axe": 1.0,
    "Staff": 1.0,
    "Prospecting": 1.0,
    "Shield smithing": 1.0,
    "Ballistae": 1.0,
    "Mining": 9.173884,
    "Traps": 1.0,
    "Carpentry": 1.0,
    "Hatchet": 1.0,
    "Animal taming": 1.0,
    "Body stamina": 99.00001,
    etc...
    }
    }

    /getTestMessage


    Retrieves a test message from the server.


     


    Example response



    {
    "message": "HEj! 1447045549224"
    }

    /isServerRunning


    Retrieves the running status of the server.


     


    Example response



    {
    "running": true
    }