Jump to content




[MC 1.8.9-1.12.2] Plethora


105 replies to this topic

#1 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 06 August 2016 - 01:35 PM

Plethora The most anticipated mod of the month! As featured on CCJam 2016!
Plethora is a ComputerCraft peripheral provider for Minecraft 1.8.9+. It aims to provide both metadata and peripherals for vanilla Minecraft and most mainstream mods.

Plethora also adds a series of "modules" to the game. These modules can be used by the player with varying success. They really come in to their element when put in a manipulator, providing a series of methods which allow interacting with your environment. This includes:
  • Introspection: investigating the current player's inventory (and ender chest)
  • Scanner: scans blocks in an area, gathering metadata about them and allowing wrapping peripherals remotely
  • Sensor: scans entities in an area. Like the scanner this allows getting metadata and wrapping them as peripherals.
  • Frickin' laser beam. It fires lasers.
If you've ever wanted to embed a computer in your skull then today is your lucky day. Plethora provides a neural interface which can be attached to your head, or some unsuspecting animal or monster. Right clicking the entity with a neural controller allows you to interact with it. You can insert modules (which will be wrapped as peripherals) and manipulate them with the built-in computer. Building a cyborg army has never been so easy.

You can also add a kinetic augment to the neural interface. This allows controlling the host entity in various ways.

Documentation
There is pretty comprehensive documentation on the Plethora website. This contains tutorials, explanations of several fundamental concepts and thoroughly explained examples.

You can also create a HTML dump of all methods by running the command /plethora dump out.html. When run in a single player world this will save a file in the active directory (normally .minecraft or your modpack's folder). This documentation is also available online.

Download
Download from CurseForge A full list of dependencies can be found on the website.

Screenshots
Spoiler

Edited by SquidDev, 03 May 2019 - 12:33 PM.


#2 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 06 August 2016 - 02:02 PM

View PostSquidDev, on 06 August 2016 - 01:35 PM, said:

Squid with frickin' laser beams attached to their heads!

I suppose with no sharks (nor ill-tempered mutated seabass), you just had to make do. ;)

#3 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 08 August 2016 - 05:45 AM

Regarding 1.0.0-beta1;

Does interfacing a critter nametag them (that is, prevent them from despawning)?

Seems odd to just have kin.disableAI(), as opposed to a toggle? Said function makes it impossible to move my test dummy (a zombie pigman) at all - whether it be by my character pushing them, kin.launch(), whatever.

kin.launch() seems a tad... overpowered? I mean, kin.launch(0,270,4) translates to "send entity over fifty blocks up into the air"... Likewise, that infinite-ammo laser really packs a wallop...

getTransferLocations() seems to show up in places where it shouldn't (ie pretty much everywhere).

While messing about with inventory reading on myself, I crashed out with this. I can reproduce by entering into the Lua console:

inv = peripheral.wrap("whatevs")

inv = inv.getInventory()

inv.list() -- Can call this as much as I like.

-- Duck out and modify inventory contents here

inv.list() -- MC crash

Best I can make out there's no way to "use" items other than food yet, and no way to interact with external inventories? I may just be missing something there?

#4 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 08 August 2016 - 06:40 AM

View PostBomb Bloke, on 08 August 2016 - 05:45 AM, said:

Does interfacing a critter nametag them (that is, prevent them from despawning)?
It doesn't nametag them but does prevent them from despawning. That should be enough.

View PostBomb Bloke, on 08 August 2016 - 05:45 AM, said:

Seems odd to just have kin.disableAI(), as opposed to a toggle? Said function makes it impossible to move my test dummy (a zombie pigman) at all - whether it be by my character pushing them, kin.launch(), whatever.
That method needs a rework: I'm pretty sure it also disables gravity. The point was to prevent mobs trying to kill you, but it ends up disabling all physics.

View PostBomb Bloke, on 08 August 2016 - 05:45 AM, said:

kin.launch() seems a tad... overpowered? I mean, kin.launch(0,270,4) translates to "send entity over fifty blocks up into the air"... Likewise, that infinite-ammo laser really packs a wallop...
Balance is not my strong suite. I don't know why launch seems to throw you in the air so high when horizontal velocity is so low. There is a sort of rate limiting on the laser but making everything non-op needs some work.

View PostBomb Bloke, on 08 August 2016 - 05:45 AM, said:

getTransferLocations() seems to show up in places where it shouldn't (ie pretty much everywhere).
Everywhere. Yeah, I probably need a flag on methods saying whether they transfer things.

View PostBomb Bloke, on 08 August 2016 - 05:45 AM, said:

-everything is awful-
I have no clue why this is happening but I've filed an issue.

View PostBomb Bloke, on 08 August 2016 - 05:45 AM, said:

Best I can make out there's no way to "use" items other than food yet, and no way to interact with external inventories? I may just be missing something there?
Other interaction methods are on the todo list, just not implemented. You should be able to wrap chests and what-not as peripherals from a computer so I guess you're talking about from the neural interface? At the moment no: I'm not sure the best way to handle it. All ideas welcome!

Thanks for the feedback (and trying out the mod).

#5 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 08 August 2016 - 12:03 PM

View PostSquidDev, on 08 August 2016 - 06:40 AM, said:

Balance is not my strong suite. I don't know why launch seems to throw you in the air so high when horizontal velocity is so low. There is a sort of rate limiting on the laser but making everything non-op needs some work.

If I might hazard a suggestion: an expensive crafting station would make it rather more "fair" to have individual, high-powered items at a cheap price.

You totally need to add a Cortex Reaver mob, by the way.

View PostSquidDev, on 08 August 2016 - 06:40 AM, said:

You should be able to wrap chests and what-not as peripherals from a computer so I guess you're talking about from the neural interface? At the moment no: I'm not sure the best way to handle it. All ideas welcome!

Beats me how viable this is on the backend, but from the Lua-scripting side of things I guess it'd make sense to have the block sensor return a list of inventory blocks in range of the entity as a list of strings - presumably they have their own UUIDs or something. You could then either getInventory(UUID) them, or ownInventory.push() to them.

An augment which adds an inventory to entities which otherwise wouldn't usually have them would be cool, too, especially if it gave them the innate ability to such up dropped items automatically like a player does.

I haven't tried them, so I guess I'll ask if modems be equipped in augment slots?

#6 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 08 August 2016 - 05:48 PM

View PostBomb Bloke, on 08 August 2016 - 12:03 PM, said:

If I might hazard a suggestion: an expensive crafting station would make it rather more "fair" to have individual, high-powered items at a cheap price.
Like this? I'm not convinced that making things super-expensive works: resources are generally dirt cheap in modded anyway. However some things could do with making more expensive or having a higher cost: such as consuming XP or food from a player.

View PostBomb Bloke, on 08 August 2016 - 12:03 PM, said:

You totally need to add a Cortex Reaver mob, by the way.
Went and looked this up. I'm more interested with the laser rapier.

View PostBomb Bloke, on 08 August 2016 - 12:03 PM, said:

Beats me how viable this is on the backend, but from the Lua-scripting side of things I guess it'd make sense to have the block sensor return a list of inventory blocks in range of the entity as a list of strings - presumably they have their own UUIDs or something. You could then either getInventory(UUID) them, or ownInventory.push() to them.
Most of the infrastructure is there already. I'd have to have a think about how transfer sources are shared between different modules. Putting it on the block module is a good idea though.

View PostBomb Bloke, on 08 August 2016 - 12:03 PM, said:

An augment which adds an inventory to entities which otherwise wouldn't usually have them would be cool, too, especially if it gave them the innate ability to such up dropped items automatically like a player does.
The neural interface can manipulate the equipment slots of entities, but doesn't add additional inventory space. I guess it might be possible. Sucking/dropping is going on my todo list has been added. Thanks!

View PostBomb Bloke, on 08 August 2016 - 12:03 PM, said:

I haven't tried them, so I guess I'll ask if modems be equipped in augment slots?
They're modules, not augments :P. Modems should work fine (that is what I've said about everything else though :().. I'm hoping to allow other mods items to be used as modules, for instance the thaumometer could tell you the aspects makeup of an item.

If you have other ideas do post them! Its really useful having other voices in the mix.

Edited by SquidDev, 08 August 2016 - 08:46 PM.


#7 HDeffo

  • Members
  • 214 posts

Posted 08 August 2016 - 09:03 PM

I wasnt quite as excited for 1.8 modpacks to start coming out until you released this. Now I have to impatiently wait until someone puts it into a modded game

#8 immibis

    Lua God

  • Members
  • 1,033 posts
  • LocationWellington, New Zealand

Posted 27 September 2016 - 06:48 AM

Is that neural interface what it looks like - does CC now have an API for embedding computers into things?

#9 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 27 September 2016 - 09:01 AM

View Postimmibis, on 27 September 2016 - 06:48 AM, said:

Is that neural interface what it looks like - does CC now have an API for embedding computers into things?
No. I just ended up using some internal classes. Its ugly, hacky and frowned upon but it works :) :wacko:

#10 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 12 November 2016 - 11:20 PM

Well, long time no see. I must say: I've missed working on this mod and am excited to get another update out. Grab it on curse! We're still in beta so expect some things to change, like they have in this version.

The biggest change you'll notice is that I've done a re-work of modules. Instead of each module being independent of the others, methods can depend on multiple modules. For instance if there was a "goggles of revealing" module you could use that and the introspection upgrade to list aspects inside your inventory. As a result of this, the neural interface has separate slots for peripherals and modules now: modules are mounted on the "back" slot of the computer. There is also a Mk II manipulator which can hold 5 modules at once.

I've added a load more mod-compatibility with support for Vanilla, CCTweaks, Baubles, IC2 and RF. There are also use and walk methods on the kinetic augment, allowing you to send an unsuspecting entity walking around. Sadly you can't control yourself yet :(.

Everything is now configurable, allowing you to disable transfer sources, meta provides and methods, blacklist entire mod specific integration and add a "base cost" to every method: allowing rate-limiting method calls.

There are also a load of bug fixes, but we'll not focus too much on them :).

Edited by SquidDev, 13 November 2016 - 09:46 AM.


#11 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 13 November 2016 - 09:23 AM

Oh hey, just last night I was wondering what would become of this. :)

I'm having a bit of trouble with it, though. First I tried loading up a zombie pigman with modules - I could wrap them via the "back" peripheral and got a load of functions in the resulting table, but they all threw "The module has been removed" when called. Including listModules(). Putting aside that the modules were clearly still in place, it'd be handy if the error specified which modules it thought were missing...

Trying listModules() on myself didn't error, but didn't list anything, either. A quick check of launch() yielded some success (whee!), but walk() seems to be missing from my character's interface (the pigman got it, even if it didn't work - I'd assume both functions should come from the kinetic module?).

After moving the kinetic module around a bit in the hopes of getting the missing walk() / isWalking() functions to appear, I re-wrapped the rear peripheral and started getting "The module has been removed" for everything through my own interface. At this point I quit to the main menu and re-entered the world, only to find it had rolled back to a point very shortly before I had first stuck the interface on the pigman.

The resultant log's a bit lengthy, so please excuse this Mediafire link to a zip. I doubt you'll find anything of interest in it other than this being repeated ad nauseam, however:

Spoiler

module.use() is all kinds of awesome and I want to play with it some more.

#12 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 13 November 2016 - 09:32 AM

View PostBomb Bloke, on 13 November 2016 - 09:23 AM, said:

Putting aside that the modules were clearly still in place, it'd be handy if the error specified which modules it thought were missing...
That is really, really weird. Everything worked when testing, so I'll have another look to see if I accidentally broke something during release. Thanks for the report: I'll be including the removed module in the error message.

Sorry about this :(.

View PostBomb Bloke, on 13 November 2016 - 09:23 AM, said:

walk() seems to be missing from my character's interface (the pigman got it, even if it didn't work - I'd assume both functions should come from the kinetic module?).
Ahh, walk won't be implemented on player's as they don't have an AI. I apologise for false advertising -_-. I'll look into adding it, though it might involve some hacks so I'm not too sure about it. In the mean time I'll remove that from the OP.

Edited by SquidDev, 13 November 2016 - 09:45 AM.


#13 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 13 November 2016 - 09:07 PM

View PostBomb Bloke, on 13 November 2016 - 09:23 AM, said:

-snip-
I've been unable to reproduce this so just a couple of questions:
  • Were you using a world which had Plethora already on it? I don't think this would cause breakages, but I did change some item and block names which might have caused this issue.
  • Did you call disableAI() on the Pigman before using walk? Otherwise the Pigman's AI might override your walk instruction and wander somewhere else.
I hopefully have fixed the issues with modules, though I'm also unable to reproduce the "not attached" issue, I'll have a fiddle to see where anything might be breaking. I've added the module name to the error message which should help a little.

Thanks for the report though :).

I've got a 1.10.2 build working, though I'm not sure it is ready for general consumption. If people are interested in an "alpha", PM me/post something here or on the GitHub.

#14 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 13 November 2016 - 10:12 PM

View PostSquidDev, on 13 November 2016 - 09:32 AM, said:

Sorry about this :(.

Pish posh. Thank you for your work. :)

View PostSquidDev, on 13 November 2016 - 09:07 PM, said:

Were you using a world which had Plethora already on it? I don't think this would cause breakages, but I did change some item and block names which might have caused this issue.

Yes. I'd intended to test a new world (and perhaps upgrade Forge), but ran out of time last night.

Trying a new world just now yielded some success - but depending on how I shuffled the modules, I was still able to generate either "module has been removed" errors, or new "no such method X" messages. Further shuffling got it working again, but the long list of "Failed to save chunk" messages also recurred within the log.

After this I went back to the first world and tried the same thing there, and was able to get the same results (some success, some failure). One method that seems to be fairly reliable in terms of bugging things out is placing modules (any types) in just the left and / or right arrow slots, leaving the other three empty - I can't even wrap the rear peripheral that way. Putting other modules in may lead to the "missing" modules being detected, shuffling them around may make them go missing again (even if I don't touch the bugged slots directly), and so on.

Turns out I'm already on the latest Forge (11.15.1.1902), though I could try the older, "recommended" build if you think it's worthwhile (11.15.1.1722)?

View PostSquidDev, on 13 November 2016 - 09:07 PM, said:

Did you call disableAI() on the Pigman before using walk? Otherwise the Pigman's AI might override your walk instruction and wander somewhere else.

No, but I called a bunch of other functions beforehand. They all without exception threw the "module has been removed" error, as did walk(), so it was a bit of a moot point at the time.

Is it intentional that the interface doesn't work with all vanilla mobs at this stage? Eg, Endermites, Pigmen children? Certainly the majority of mobs seem to accept them...

Edited by Bomb Bloke, 13 November 2016 - 10:15 PM.


#15 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 13 November 2016 - 11:11 PM

View PostBomb Bloke, on 13 November 2016 - 10:12 PM, said:

Is it intentional that the interface doesn't work with all vanilla mobs at this stage? Eg, Endermites, Pigmen children? Certainly the majority of mobs seem to accept them...
I've explicitly blocked baby mobs. Why would you do such a horrible thing to them? It won't render the overlay on mobs where it looks stupid on (such as bats, chickens and entermites). That being said, you should still be able to attach it to them, it just won't render.

Edited by SquidDev, 13 November 2016 - 11:11 PM.


#16 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 14 November 2016 - 01:29 AM

View PostSquidDev, on 13 November 2016 - 11:11 PM, said:

I've explicitly blocked baby mobs. Why would you do such a horrible thing to them?

Putting aside that they're vicious little half-human, half-pig, undead abominations, and that they likely dream of being the Terminator when they grow up... because that's what the monster egg gave me. :P

Seriously though, it seems... arbitrary. :mellow:

This is just me babbling, but launch() makes me think back to the ultra dense cannon. Makes me yearn for a module made out of compressed TNT blocks or something.

#17 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 16 November 2016 - 06:20 PM

Well, here is another Plethora release with a load of bugfixes. Hopefully it'll be less buggy than the previous one though I know how well that has turned out. I've also released a 1.10.2 version if you fancy. Grab them both on Curse.

Changelog
  • Implement IComputerItem and IMedia on neural interface (can now be placed in disk-drive).
  • Fix issue when getting metadata of turtles
  • Fix NPE when serializing entities due to the DisableAI capability
  • Fix neural interface peripheral not being rebound
  • Add neural interface overlays for remaining mobs
  • Ignite TNT when hit by a laser
  • Display module name in "module removed" error message
  • Nerf the Y velocity on the kinetic augment
Look at this adorable bat:
Posted Image

View PostBomb Bloke, on 14 November 2016 - 01:29 AM, said:

Seriously though, it seems... arbitrary. :mellow:
Currently the main reason I'm avoiding it is that all the neural interface offsets would have to be different. It would be fine for "humanoid" entities such as zombies, but most of the time it looks stupid.
Posted Image

Edited by SquidDev, 16 November 2016 - 06:23 PM.


#18 Xerxes

  • Members
  • 55 posts
  • LocationSwitchCraft

Posted 30 November 2016 - 02:14 AM

SwitchCraft has added Plethora to it's mod list.
The 1.10.2 version of Plethora is considered stable and suitable for public server usage.
I'm hosting a HTML dump of all of the methods on the version of Plethora that SwitchCraft uses (as of version 1.10.2-1.0.0-beta3) at http://switchcraft.p...thora_docs.html

Edited by Xerxes, 30 November 2016 - 03:08 AM.


#19 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 05 December 2016 - 09:12 AM

Just for fun I wrote a little inventory management system using Plethora:
Posted Image

You can search for items, extract them and insert them back into the system. It'll try to guess where to place items based off where items of the same type are stored and where there is room. This also requires CCTweaks in order to transfer items across the network, though I guess you could modify it to transfer using turtles instead. For those interested, you can find the source on GitHub.

#20 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 05 December 2016 - 09:40 AM

Sooo... you've made an even cheaper ME system than AE gives us, yes? ;)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users