Actor
The Actor plugin/library allows you to create "Actors" which playback pre-recorded actions as an NPC. Great for Machinima or for making your NPCs do exactly what you want. Actors can currently playback exact recordings of the following actions:
- Walking / Movement
- Block Placement / Removal
- Current Item selection
- Chatting
Multiple actors can be active at once. Scenes of actors can be saved to disk and loaded later. Actors can be dubbed into a translated position for crazy effects. See video.
Latest version notes: V0.10
Troupes! Now you can record more than one player at a time. If you have 'troupe' permission you can...
- /actor troupe add playername - add player to your troupe (they will be asked for confirmation and must type 'yes' in response)
- /actor troupe remove playername - remove player from troupe
- /actor troupe show - shows the current players in your troupe
Once your troupe is defined, use '/actor record' like normal but you will now be recording everyone in the troupe. '/actor hire' will hire an actor for every recorded troupe member.
Also in this release:
- /actor rename actorname newname - renames an actor
- minor bug fixes
Demo
Typical Usage / Getting Started
Typically the usage goes like this:
- /actor record <run around - place blocks, remove blocks, chat, etc>
- /actor cut
- /actor hire actorname
- /actor action <watch the actor do what you just recorded>
- /actor reset
- /actor actionrec <you are now playing back the actor and recording at the same time>
- /actor cut
- /actor reset
- /actor action <You now see both actors in the scene together>
- /actor savescene scenename
Installation
Put the ActorPlugin.jar into plugins on your server. The first time it is loaded it will create an Actor folder in your plugins dir where all your saved actors and scenes will be created.
Dependencies
Vault (optional)
Commands
In addition to being a library for use in other Bukkit mods, the Actor plugin provides commands to demo the basic functionality itself. Full table of commands and associated permission nodes can be found on this page. The following sub-commands have /actor as the root command:
- record:
Start recording into buffer.
- cut:
Stop recording and stop playback on all actors
- hire:
Spawn new actor using recording in buffer
usage: /actor hire [name]
- dub:
Duplicate one or all actors with a translation
usage: /actor dub [name|all] x y z
- fire:
Fire an actor (this means they are removed from the world). Name can be "all".
usage: /actor fire [name]
- action:
Playback actor or all actors
usage: /actor action [actorname]
- actionrec:
Playback actor or all actors and record
usage: /actor actionrec [actorname]
- loop:
Set an actor (or "all") to loop
usage: /actor loop [on|off] [actorname]
- reset:
Rewind actor or all actors
usage: /actor reset [actorname]
- remove:
Remove an actor. Alias for "fire".
usage: /actor remove [actorname]
- troupe:
Manage your troupe of actors. Subcommands: add, remove, show
usage: /actor troupe add [playername] - add player to troupe
usage: /actor troupe remove [playername] - remove troupe member
usage: /actor troupe show - list the current troupe members
- saveactor:
Save an actor's recording to a file
usage: /actor saveactor [actorname] [filename]
- savescene:
Save all actor recordings to dir/actorname
usage: /actor savescene [scenename]
- loadactor:
Spawn an actor with the give recording file
usage: /actor loadactor [actorname] [filename]
- loadscene:
Load and spawn all actor recordings from dir
usage: /actor loadscene [scenename]
The above list can be found in-game by using /actor. In-game list is based on the user's permissions.
Configuration
API
Actor is a libray which can be used in other plugins. View API here. Use the public "getInstance()' method on the ActorPlugin class which gives you access to the API commands. For example:
ActorPlugin.getInstance().record(player);
Beta Release
Currently in Beta this plugin will be revised to fix bugs and add features. Feel free to contribute.
GPL Licensed
The Actor Library is released under the GPL License.
Source
Image Credit
Thanks to Stugace for creating the RomeCraft texture pack used in the video: http://www.planetminecraft.com/texture_pack/romecraft/
Thanks to WLhokies for creating the Roman Villa used in the video: http://www.planetminecraft.com/project/roman-villa---villa-syndexioi-world-save-schematic/
Thanks
Thanks to Mitsugaru for adding permissions, maven, cleaning up the code, etc.
I've been testing this a bit. Am I correct that the actor does not really interact with chests?
I was trying to set up an actor that would take seeds from a chest and then plant them. Obviously if there were no seeds in the chest, it shouldn't be able to plant, but the actor magically had seeds.
Not that there is anything wrong with that, I'm just trying to make sure I understand its limitations.
@Nicomang070
Hey - I'm not seeing the problem you are having with building/destroying. Is there any specific situation in which this happens?
When you reset I intentionally drop the blocks you used back to you so you can use them again. I guess in creative mode this isn't really important.
The talking I haven't really tested that much so I'm sure there are some issues - I'll look into it. And yeah the chats should be proximity based like normal chatting. Right now it sends it to everyone on the server i think.
I can put a confirmation msg after 'fire'. And a rename. In a pinch you can always save the actor and then load it with another name but 'rename' might be better.
Thanks!
@Akam123
Permissions will probably be added in soon.
Also, should my changes be accepted, the console spam will be completely optional and turned off by default.
Hello, thanks for that update. I have found a few glitches. When building while recording, it does not let you destroy the blocks after you have built them, even while still recording. Also, once you reset, all the the blocks made will drop onto the ground. He will also disappear, but still talk once in a while, and the talking still shows up everywhere in the world. After firing someone it doesn't say anything in chat, so I don't know if they are still invisible or gone? Last, I think there should be a way to change the name of an actor. Sorry for a long list of problems, but these are what I have noticed, not to sound to negative about this plugin because it is awesome!
does this plugin have permissions if not, can you add permissions for all commands
@jessefjxm
Due to the way that minecraft loads the character skins, a server mod cannot directly set them. The minecraft client goes off and loads the character skin from s3.amazonaws.com/MinecraftSkins/[charactername].png. Since the client is doing it, the server has no control over it.
That being said, it is possible to control it by running a client mod or by changing your hosts file so that s3.amazonaws.com points to another server where you store your own custom skins. That's what I did for the video.
can we edit the skin of the actors?
@Nicomang070
I have posted a new version of the plugin (v05) which fixes the 'remove' command conflict with WorldEdit. Also the Apache Commons IO jar can now just be put in the craftbukkit server folder without changing the startup file.
Please review the updated instructions above. Thanks!
-josh
I made a ticket. And also, I am very confused on what to do to install the dependency. I mean I install it, but where do I put it? And where is the root to my craftbukkit server? And /remove interferes with WorldEdit, so can that be changed?
@Nicomang070
Hi - Sorry I forgot to add the dependency information. You need Apache Commons IO library - see above under the "Dependencies". Thanks!
-josh
I get this error when trying to save an actor or scene:
2012-06-04 13:11:00 [SEVERE] null
org.bukkit.command.CommandException: Unhandled exception executing command 'savescene' in plugin Actor v0.4
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166)
at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:479)
at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:821)
at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:781)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:764)
at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:34)
at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:113)
at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:567)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:459)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/io/FilenameUtils
at com.insofar.actor.commands.author.SaveScene.execute(SaveScene.java:38)
at com.insofar.actor.commands.author.AuthorBaseCommand.onCommand(AuthorBaseCommand.java:55)
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
... 12 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.FilenameUtils
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:41)
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 15 more
Can this be fixed, or am I doing something wrong?
@brickshot
Sweet, I can't wait to try out the update.
The Actor plugin has been updated for CB 1.2.5-R3.0.
If you are having problems saving/loading actors, review the updated readme for the Apache Commons dependency information.
I will try to add bug fixes and enhancements as requested. Please use the ticket system. Thanks!
-josh
@Ghettogreen
Hi Ghettogreen - Thanks for taking an interest in the Actor plugin. I just had a daughter two months ago and I haven't been able to do anything outside of normal work and sleep :) So I more than welcome any thing you'd like to contribute. You're welcome to just maintain it on your repo or you can submit pull requests to my repo on github and I will incorporate any changes you make into that trunk.
Hopefully when things get a little less crazy for me I'll be back again. Thanks!
-josh
I don't know what happened to the author of the plugin, but he has created a very good framework for this type of plugin. At this point it's just a simple matter of updating the even system for the newest version of Bukkit.
There are likely some new packets that have been added to both the vanilla Minecraft server and client that will need to be updated, but other that that the rest of the plugin seems compatible with the current version of Minecraft and Bukkit.
I'm working on updating the Actor plugin now for use with archiving player movement and behavior on my server. The source code can be found at http://github.com/Ghettogreen/Actor Right now I only have the forked version of the plugin which is currently NOT compatible with the dev build of Bukkit. When I get some free time I will start working on getting it to work.
@Lightwave8
Looking at the source code, there doesn't seem to be any support for this feature. However, because of the object oriented nature of Java, it would be EXTREMELY simple to implement.
i can't wait the update
is there any way to add in non-human NPC support? record as normal, but spawn an NPC actor like a creeper or zombie? that would make this a truly useful machinima tool.
Also, it'd be nice if you could add a prefix to your commands, as i'm getting conflicts with other plugins, and it's making /remove not work for me. something like
/act remove <name>
would be nice.
sorry for rambling.
Why when i try to save an actor or a seen then it gives me this error! ? and cant you make it to where if you log off or shut down the server then a actors say loaded?
[SEVERE] null org.bukkit.command.CommandException: Unhandled exception executing command 'saveactor' in plugin Actor v0.1 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:165) at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:378) at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:757) at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:722) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:715) at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33) at net.minecraft.server.NetworkManager.b(NetworkManager.java:226) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:93) at net.minecraft.server.NetworkListenThread.a(SourceFile:108) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:527) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425) at net.minecraft.server.ThreadServerApplication.run(SourceFile:457) Caused by: java.lang.NoClassDefFoundError: org/apache/commons/io/FilenameUtils at com.insofar.actor.commands.author.SaveActor.execute(SaveActor.java:59) at com.insofar.actor.commands.author.AuthorBaseCommand.onCommand(AuthorBaseCommand.java:54) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40) ... 12 more Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.FilenameUtils at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 15 more
@Fizzyjoe908
Ahhh OK - thanks for pointing that out. I'll install spout and see why it's breaking. Thanks!