[INACTIVE][MECH]NpcSpirit v1.11 - Block based NPC system[cb617]

Discussion in 'Inactive/Unsupported Plugins' started by acegiak, Mar 6, 2011.

  1. Offline

    acegiak

    NpcSpirit: Npc Souls are stored in blocks!
    Version: 1.13

    The point of NpcSpirit is to create an Npc system that will tie in well with world economies and player constructed environments, rather than having them be an administrated constant. A certain kind of block (sponge by default but editable in config) is denoted as containing the souls of NPCs. When this is placed, it spawns an npc and will continue to do so when the npc is killed. Admins or the Npc's owner may change the npc's name(and associated skin pulled from minecraft.net), equipped item, greetings, threats and conversation.

    Requires permissions & sqlite.

    This is based heavily on Redecouverte's NpcSpawner lib which is craftbukkitbased, not bukkit based. So it may become unstable/stop working if craftbukkit changes the way it processes HumanEntities too much. But that's what we get for making plugins for in development software.

    Lastly, the ultimate goal of this plugin is to have a player scriptable AI system, so that players can have armies of Npcs battling each other or tilling their fields etc, provided they have the capital to invest in such extravagances.

    JAR:
    http://www.machinespirit.net/ace/minecraft/NpcSpirit.jar

    Commands:
    Place a sponge block to start spawning an NPC there. (they need headroom)
    while targeting the soulblock for the npc:
    /npcs rename [NEWNAME] - renames/reskins the npc on next respawn
    /npcs givethis - changes the NPC's held item to the player's held item on next respawn
    /npcs respawn - kills and respawns the npc
    /npcs sethi [TEXT] - adds a greeting to the npc
    /npcs delhi [KEYWORD] - removes all greetings with the keyword
    /npcs setow [TEXT] - adds a thread (damage message) to the npc
    /npcs delow [KEYWORD] - removes all threats with the keyword
    /npcs setclick [TEXT] - adds a chat phrase (said when right clicked) to the npc
    /npcs delclick [KEYWORD] - removes all chat phrases with the keyword

    Config:
    First load up will generate the file plugins/NpcSpirit/global.yml .
    To change what kind of block acts as NPC spawner, just change the property "npcblocktype" to the decimal ID of the block you want to use. For example, to use a LapisLazuli Block set it to:
    Code:
    npcblocktype: 22
    skins are set by the name of the npc. These are pulled from minecraft.net. there ia no way for bukkit or it's plugins to change that link. Names = skins. You have been told.

    Permissions:
    npcspirit.admin - grants the right to F with everyones npcs, not just your own.

    Todo:
    • Persistence
    • Config File
    • Pathfinding
    • Scriptable AI system:
    changelog:
    1.13
    Updated for build 617, may have broken persistence saving.
    1.12
    Added debug methods to answer "why aren't they spawning?"
    1.11
    moved NpcSpirit.db into it's plugin folder to conform with standards.
    1.1
    Added config file to change blocktype
    1.0
    Added sqlite persistence!
    0.75
    Npcs now spawn anywhere there is space for them up to 10 blocks above their spawner.
    Made npcs despawn when their block gets changed by other mods.
    0.7
    Added respawn command to remedy pvp issue found by Wulfspider
    0.6
    Fixed a few bugs that popped up when updating to 493, including constructor troubles.
    0.5.1
    Gave admins power over other people's soulblocks
    0.5
    Added remove ability to chat lines
    0.4
    Added chat customisation and held item customisation.
    0.3
    Added skin changing & owner recognition over multiple logins
    0.2.1
    Created soulmanager to make main class less bloated
    0.2
    Associated NPC souls with blocks
    0.1
    Got Redecouverte's library working
     
  2. Offline

    nathanaelps

    Night fell fast on the little purple server, as nathanaelps thought, "Hmpf. An NPC scripting mod would be Just The Ticket." So he went and found and downloaded NpcSpirit, as it seemed to have everything he needed (or *would*, in short order. Hopefully. Fingers crossed.)

    After installing it (and downloading this piece, that piece, jython, etc.) it got [SEVERE] with him:

    Code:
    15:10:54 [INFO] Starting minecraft server version Beta 1.4
    15:10:54 [INFO] Loading properties
    15:10:54 [INFO] Starting Minecraft server on *:xxxx
    15:10:54 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-646-gb61ef8c-b670jnks (MC: 1.4)
    15:10:55 [INFO] Preparing level "world"
    15:10:55 [INFO] Preparing start region
    15:10:56 [INFO] 144 recipes
    15:10:56 [INFO] Preparing spawn area: 12%
    15:10:58 [INFO] Invalid config file found and converted to proper name/format.
    15:10:58 [INFO] [Permissions] version [2.5.5] (Phoenix)  loaded
    15:10:58 [INFO] [EpicZones] version 0.19.1 is enabled.
    15:10:58 [SEVERE] ENTITY_DAMAGED loading NpcSpirit v1.12 (Is it up to date?)
    java.lang.NoSuchFieldError: ENTITY_DAMAGED
            at acegiak.NpcSpirit.NpcSpirit.onEnable(NpcSpirit.java:84)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:578)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:216)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:115)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:93)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    15:10:58 [INFO] Runecraft plugin version 0.2 is enabled!
    15:10:58 [INFO] [MonsterTamer]: version [1.3] (Commander) loaded
    15:11:00 [INFO] [iConomy] v4.63 (Kenzi) loaded.
    15:11:00 [INFO] WorldEdit 4.3 enabled.
    15:11:00 [INFO] Done (0.571s)! For help, type "help" or "?"
    
    And also it doesn't work.

    Any ideas?

    (Confessions: I deleted some of the irrelevant lines, such as the line that told me that iConomy and Permissions were talking to one another. Also, there is a sponge in the world already, and I have tried to get an NPC to spawn from it. Did I perhaps set something up suicidally?)

    Thanks,

    Fixed! Turns out I downloaded an old .jar and a new .jar, and I failed to use the new .jar.

    Heh. Idiot problems.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 11, 2016
  3. Offline

    Flenix

    the jython thing fixed it, there is now a "me" in the weapons store!

    Any chance of fixing the fact all NPCS disappear on server restart?
     
  4. Offline

    acegiak

    @Flenix, yeah that's a weird one. If you turn on debug in the global yml you'll see that it's actually saving and loading from the database so I've got to go through and work out exactly where they go.
     
  5. anny pictures for this ?
     
  6. Offline

    Deacal

    Hey.

    When I use the /npcs commands, nothing happens. Wuts up man? I'm OP btw

    Btw, there isn't any spawning when i place an sponge, even though when I remove it, it says I picked up a soul block.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 11, 2016
  7. Offline

    acegiak

    @Deacal turn on debug in the NpcSpirit/global.yml and then give me the console output spam. Also what craftbukkit build, permissions and java are you running?
     
  8. Offline

    Deacal

    I'm running worldguard Permissions, and Bukkit Recommended #617. I got my server hosted at Brohoster, so I ain't got no console running :/
     
  9. Offline

    acegiak

    @deacal, with no console output I have no idea but i think it might be worldguard skipping out. I dunno. Hope future updates fix it.
     
  10. Offline

    Deacal

    Oh shit, I'm sorry, I ment WorldEdit. I'm OP btw.
     
  11. Offline

    kingzeus91

    01:14:46 [WARNING] BasicNPCs error: null; mapping values are not allowed here[Lj
    ava.lang.StackTraceElement;@1b9e7df
    01:14:46 [SEVERE] mapping values are not allowed here
    in "<reader>", line 2, column 11:
    debugmode: true
    ^

    01:14:46 [SEVERE] at org.yaml.snakeyaml.scanner.ScannerImpl.fetchValue(Sca
    nnerImpl.java:745)
    01:14:46 [SEVERE] at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreToken
    s(ScannerImpl.java:307)
    01:14:46 [SEVERE] at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(Sca
    nnerImpl.java:183)
    01:14:46 [SEVERE] at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappin
    gKey.produce(ParserImpl.java:564)
    01:14:46 [SEVERE] at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(Parser
    Impl.java:163)
    01:14:46 [SEVERE] at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(Parse
    rImpl.java:148)
    01:14:46 [SEVERE] at org.yaml.snakeyaml.composer.Composer.composeMappingNo
    de(Composer.java:228)
    01:14:46 [SEVERE] at org.yaml.snakeyaml.composer.Composer.composeNode(Comp
    oser.java:160)
    01:14:46 [SEVERE] at org.yaml.snakeyaml.composer.Composer.composeDocument(
    Composer.java:122)
    01:14:46 [SEVERE] at org.yaml.snakeyaml.composer.Composer.getSingleNode(Co
    mposer.java:105)
    01:14:46 [SEVERE] at org.yaml.snakeyaml.constructor.BaseConstructor.getSin
    gleData(BaseConstructor.java:124)
    01:14:46 [SEVERE] at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
    01:14:46 [SEVERE] at org.bukkit.util.config.Configuration.load(Configurati
    on.java:73)
    01:14:46 [SEVERE] at acegiak.NpcSpirit.NpcSpirit.onEnable(NpcSpirit.java:7
    6)
    01:14:46 [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlug
    in.java:127)
    01:14:46 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(
    JavaPluginLoader.java:632)
    01:14:46 [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(Si
    mplePluginManager.java:218)
    01:14:46 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftSe
    rver.java:116)
    01:14:46 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftS
    erver.java:94)
    01:14:46 [SEVERE] at net.minecraft.server.MinecraftServer.e(MinecraftServe
    r.java:217)
    01:14:46 [SEVERE] at net.minecraft.server.MinecraftServer.a(MinecraftServe
    r.java:204)
    01:14:46 [SEVERE] at net.minecraft.server.MinecraftServer.init(MinecraftSe
    rver.java:144)
    01:14:46 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftSer
    ver.java:259)
    01:14:46 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(Sour
    ceFile:394)




    any help with this error? ><
     
  12. Offline

    Plague

    considered inactive
    (and no "cb" in version tags please)
     

Share This Page