[FUN] Citizens v2.0.11 - Human NPCs for Bukkit [1.7.2]

Discussion in 'Archived: Plugin Releases' started by Citizens, Mar 5, 2011.

  1. Offline

    Citizens

    Citizens - Human NPCs for Bukkit
    Version: 2.0.11
    Authors: @fullwall and @aPunch
    Source: Citizens on GitHub

    Citizens is now on BukkitDev

    This thread will no longer be updated. We encourage you to use our page on BukkitDev. You can find information, links to our wiki and website, and the download page there.

    Showing Your Support

    We work hard to maintain Citizens. We've been working on Citizens2 around the clock on new and exciting features. A little motivation never hurts, so feel free to donate to us - fullwall and aPunch.

    If you can't donate, we appreciate a "hello" every now and then. Stop by the IRC channel #citizens on irc.esper.net to discuss Citizens and give thanks!
     
  2. Offline

    Aefio

    I have no bugs whatsoever except when I restart or stop my server, all of the NPC's chat go's away. I tried everything I could think of to fix it but still nothing. Is anyone else having this problem?
     
  3. Offline

    d00ba

    @fullwall

    Some of the players on my server have reported a glitch, where they can sell one item multiple times to a trader. So they would click a single block and get money for it multiple times, before it disappears from their inventory.

    Regards,

    d00ba
     
  4. Offline

    d00ba

    No issues with that here. I'd check the Citizens.texts file on the server and make sure the text is in there, and ensure the server can write to that file.
     
  5. Offline

    Dagumboss

    I'm getting the same problem as him. Logging should be implemented because I've been losing stack after stack of diamond to see if it keeps happening and there is no way to tell who's doing it.

    I assure you, users have found a way to take items without buying.
     
  6. Offline

    VGLink

    Someone knows how to use Iconomy as payment with Essentials installed?
     
  7. Offline

    hofec

    what the hell im doin wrong :confused: just upgraded to #803 [Citizens 1.0.8d]
    Code:
    [SEVERE] Error occurred while enabling Citizens v1.0.8 (Is it up to date?): null
    java.lang.NullPointerException
        at com.fullwall.Citizens.Commands.CommandHandler.registerCommands(CommandHandler.java:51)
        at com.fullwall.Citizens.Citizens.onEnable(Citizens.java:60)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:125)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:750)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:253)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:132)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:110)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:218)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:205)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:145)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:265)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    This pops up .. any ideas ? thx in advence.
     
  8. I don't know how to sell or buy an item at a trader so if anybody could help me with that I would really appreciate that
     
  9. Offline

    Aefio

    What is the permission for the setowner command because it is not on the Wiki page, I scoured for it.
     
  10. Offline

    Aefio

    You have to add the permission citizens.trader.stock to the group you want to have it. If you are referring to the command, it is on the wiki as well as the help page client-side.
     
  11. Offline

    LucidLethargy

    CB: 803
    Citizens: 1.0.8d
    Looks like you've got bandits planned, however you left it in the live version despite it not being finished i'm guessing.
     
  12. Offline

    aPunch

    Yea, we left it in their because we're lazy. Come 1.0.8e there will be generated quester files as well because I'm sure we'll forget to remove them. :p
     
  13. Offline

    Dagumboss

    What is the likelihood of a log being added?
     
  14. Offline

    Drei Gyuu

    Just wondering how the progress for the alternate skin server, and the way-points are?

    Best Regards to the developers.
     
  15. Offline

    fullwall

    Waypoints are being worked on currently, no word on progress with the single player mod though. A log may be added, if someone lays out what should be logged. I need more information on this trader taking bug in order to fix it :S. Anyway to find out @d00ba / @Dagumboss ?
     
  16. Offline

    _knot_

    Same thing here! Shift Click = Free! D:
     
  17. Offline

    fullwall

    Strange... doesn't seem to happen on my machine.
     
  18. Offline

    Daniel Few

    @Citizens
    I know your probably very busy, but would it be possibe at all to tidy up the config a litte? the 'citizens.settings'. If this is something you would like to do, i'd be happy to come up with a layout wit headings etc that would just make it a bit easier to see. Up to you though.
    Love the plugin,
    -DanJames

    EDIT: Maybe something like this:
    Code:
    #Citizens Properties File
    
    #These are the options applied when creating a NPC
    DefaultOptions:
        DefaultText:
            1= Hello.
            2= How are you today?
            3= Having a nice day?
            4= Good weather today.
            5= Stop hitting me\!
            6= I'm bored.
        default-talk-when-close=false
        slashes-to-spaces=true
        default-enable-following=true
        npc-colour=\u00A7f
        chat-format=[%name%]\:
        look-range=4
        use-npc-colours=true
    #These are the options that specify what items to use to interact with an NPC
    ItemOptions:
        healer-give-health-item=35
        healer-take-health-item=276
        wizard-interact-item=288
        items=340,
        select-item=*
        item-list-on=true
    #Any other options
    OtherOptions:
        healer-health-regen-increment=12000
        tick-delay=1
        save-tick-delay=72000
        save-often=true
        use-save-task=true
    #Creating NPC options
    CreationOptions:
        max-NPCs-per-player=0
        wizard-max-locations=10
     
  19. Offline

    fullwall

    We need a good YAML parser first.
     
  20. any idea what this means:

    Code:
    java.io.FileNotFoundException: plugins/Citizens/Traders/Citizens.inventories (Too many open files)
    	at java.io.FileOutputStream.open(Native Method)
    	at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
    	at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
    	at com.fullwall.Citizens.PropertyHandler.save(PropertyHandler.java:145)
    	at com.fullwall.Citizens.PropertyHandler.setString(PropertyHandler.java:219)
    	at com.fullwall.Citizens.PropertyHandler.setString(PropertyHandler.java:223)
    	at com.fullwall.Citizens.Properties.Properties.TraderProperties.saveInventory(TraderProperties.java:41)
    	at com.fullwall.Citizens.Properties.Properties.TraderProperties.saveState(TraderProperties.java:173)
    	at com.fullwall.Citizens.Properties.PropertyManager.save(PropertyManager.java:52)
    	at com.fullwall.Citizens.Properties.PropertyManager.saveAllNPCs(PropertyManager.java:91)
    	at com.fullwall.Citizens.Properties.PropertyManager.stateSave(PropertyManager.java:96)
    	at com.fullwall.Citizens.Citizens$2.run(Citizens.java:99)
    	at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:138)
    	at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:360)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:287)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
     
  21. Offline

    fullwall

    Hm. @Spidi - which plugins do you use? Are you using 1.0.8d? To all: switching to new YAML config next version.
     
  22. Offline

    Sim121

    After upgrading to 1.0.8 I got this :

    Code:
    Error occurred while enabling Citizens v1.0.8 (Is it up to date?): null
    java.lang.NullPointerException
            at com.fullwall.Citizens.Commands.CommandHandler.registerCommands(CommandHandler.java:51)
            at com.fullwall.Citizens.Citizens.onEnable(Citizens.java:60)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:125)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:750)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:253)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:132)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:110)
            at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:337)
            at org.bukkit.command.SimpleCommandMap$ReloadCommand.execute(SimpleCommandMap.java:243)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:127)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:271)
            at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:401)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:386)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:292)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    
     
  23. Offline

    fullwall

    There's a missing command in the plugin.yml somewhere.
     
  24. Offline

    fullwall

    @aPunch - fix plugin.yml in the ZIP please :).
     
  25. Offline

    qrux

    @fullwall Is the lag problem supposed to be fixed in the 1.0.8d release? I still have it.
    (i read a few pages back that you had found the memory leak problem, but i don't know if that was before or after the d release)
    Thanks :)
     
  26. Offline

    fullwall

    @qrux - I've found the problem, but it's in the server code :(. I was told to wait till after 1.6 to see if it gets optimised at all, otherwise I'll submit a pull request allowing that portion of the code to be disabled.
     
  27. Offline

    aPunch

    @Sim121 I updated the .ZIP. There should be no more issues with downloading, but if it happens again, post the contents of your plugin.yml.

    Also, @fullwall : What the H is an ExceptionInInitializerError? :S
     
  28. Offline

    d00ba

    @fullwall
    I haven't been able to recreate the bug myself, though the players tell me it's an intermittent problem. Sometimes they can get away with selling a single diamond 5 or 6 times, other times it works fine.

    I have been able to create the lag bug though.

    Scenario 1) Citizens loaded and running with monster-spawns set to False
    My server has been running for weeks like this with absoloutly no lag at all, I even spawned hundreds of NPCs and loads of traders just to test it. No lag problem.

    Scenario 2) Citizens loaded and running with monster-spawns set to True
    I've recently tried this out and have found it causes major issues. Initially everything is fine during the day, when night comes however, and the monsters spawn, it causes a very strange lag problem.

    If I type something in the chat, it shows up instantly in the server console, but in-game it takes 10, 15, 30 seconds and more. The delay continues to get worse throughout the minecraft night.

    Another interesting thing is, lets say, Player A connects first, and the lag gets gradually worse until it reaches 15 seconds. Now, Player B connects, and shortly afterwards starts to get a 5 second lag yet Player A is getting 15 or more seconds. The server shows what these players type instantly. So when Player A says something, it takes 15+ seconds before it shows up on Player A's screen, but Player B see's this after 5 seconds, and when player B says something, it takes 5 seconds for Player B to see his own text and 15+ seconds for Player A to see it.

    Scenario 3) Citizens disabled, monster-spawns set to True
    No lag problems with this whatsoever. Runs as smoothly as when Citizens is loaded with monster spawns off.

    EDIT: I've also noticed that with Citizens enabled, you get a hell of a lot more monsters spawning. I use worldguard to stop monster spawns inside towns, which is where all the NPC's are. In the surrounding areas to these towns you get a massive amount of monsters.

    Hope this is helpful,

    Regards,

    d00ba
     
  29. Offline

    fullwall

    As I say, @d00ba - I think I've pinpointed where lag happens (in server code, it's World.j()) - what happens is every single tick, the server goes through its list of players (which happens to include NPCs), and adds it to a set with a pair of int coordinates.
    Then, it iterates through this set to check for effects like melting ice, growing crops, making the ambient.cave.cave sound. Because they're int coordinate pairs in a set, this uses up quite a lot of RAM, lagging the server, and this is also done every tick.
    These tasks are naturally useless for NPCs. I would say that setting monster-spawns to true is eating up the rest of your available RAM, causing the lag with all the other per-tick things monsters bring. Anyway, I've been told to wait until 1.6, so if it's not fixed by then I will try and get a pull request going.
     
  30. Offline

    d00ba

    Glad to hear the problem has been identified.

    I've monitered my server usage when this happens. CPU usages increased from 6-7% upto 50%. RAM usage increased from 25% to approx 50% so seems to make sense.
     
  31. Offline

    fullwall

    Shiny new YAML file :).
     

Share This Page