[Mod] LWComponents [0.1.34] [lwcomponents]

User avatar
MisterE
Member
Posts: 693
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] LWComponents [0.1.6] [lwcomponents]

by MisterE » Post

related: reading this might give some inspiration for a mesecons-controlled LWcarts carts mod replacement
http://www.minecraft101.net/redstone/mi ... roads.html

I think it would be cool to have mesecons devices to catch players and mobs, attach them to a cart, send them off, and down the line dump them off. you might consider using or building off of minecart by joe viewtopic.php?t=22464 if interested, since it travels in unloaded areas.

you could have a deployer be able to place a cart, another device to load an entity into the cart, and then a mesecons controlled bumper from minecart to send it on its journey.

you can also have tnt carts which explode when they hit an activator rail or a player or mob, and mob occupied carts can release their mob or player when they hit another player or an activator rail.

You could also have carts be able to dump their mob when punched.

you can also have a deathcart... if it hits you or a mob, death occurs.

the usecases I can see for this besides survival uses and utility are a crossyroad minigame and a tower defense minigame, built by players.

User avatar
MisterE
Member
Posts: 693
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] LWComponents [0.1.6] [lwcomponents]

by MisterE » Post

another few suggestions for *this* mod:
edit the detector to also send the location of entities and players it detects.

also have a node scanner that can give pos of nodes.

have a cannon that can recieve digilines signals to aim at a position, and to fire. it can destroy nodes (optional by players and systemwide in settings) and deal damage. probably should have an inventory with tnt sticks that gets loaded in with hoppers or smth.

make a variant especially for targeting aerial targets, such as dragons, players flying apercy's planes, etc

have a node that when aotivated, releases small entities that float around and punch entities they collide with, and they disappear after a little while or when they touch a walkable node (anti-air flak also useful against players)

have a small cannon that is good for attacks in close areas, that is similar to the security camera from the portal mod. it probably shouldn't need much or any ammunition

the usecase wold be building smart defense systems which, especially in the absence of protection, allow players to defend their base from mobs and other players. it can be good for challenge courses too.

User avatar
MisterE
Member
Posts: 693
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] LWComponents [0.1.6] [lwcomponents]

by MisterE » Post

another suggestion: scratch programmable mesecons controller... many people can't be bothered to learn lua, this would open up advanced mesecons to them

if you'd like me to stop making so many suggestions for new content I can

loosewheel
Member
Posts: 155
Joined: Mon Dec 28, 2020 01:19
GitHub: loosewheel
In-game: loosewheel

Re: [Mod] LWComponents [0.1.6] [lwcomponents]

by loosewheel » Post

MisterE wrote:
Tue Nov 16, 2021 22:56
if you'd like me to stop making so many suggestions for new content I can
Suggestions are Ok, but I don't know if I'll do them all.

loosewheel
Member
Posts: 155
Joined: Mon Dec 28, 2020 01:19
GitHub: loosewheel
In-game: loosewheel

Re: [Mod] LWComponents [0.1.6] [lwcomponents]

by loosewheel » Post

MisterE wrote:
Tue Nov 16, 2021 18:43
edit the detector to also send the location of entities and players it detects.

also have a node scanner that can give pos of nodes.
Detectors already can (optionally) detect players, entities, drops and nodes. It already sends the location of the detected item relative to the detector.

If detecting nodes, best to use a single direction (not All) otherwise a digilines message is sent for all nodes the detector is in range of.

loosewheel
Member
Posts: 155
Joined: Mon Dec 28, 2020 01:19
GitHub: loosewheel
In-game: loosewheel

Re: [Mod] LWComponents [0.1.6] [lwcomponents]

by loosewheel » Post

MisterE wrote:
Tue Nov 16, 2021 04:22
node placer places node from inv
Added deployers, and breakers can now dig a node up to 5 spaces in front with a digilines message. Deployers can place a node up to 5 spaces in front with a digilines message as well.

Warning with node placement. First by calling the inventory item's mod handler, and then placing manually if no handler or the handler fails (crashes). If a mod handler fails an error message is issued. This can be turned off with the Alert handler errors setting. Nodes are always placed in downward direction.

User avatar
MisterE
Member
Posts: 693
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] LWComponents [0.1.6] [lwcomponents]

by MisterE » Post

loosewheel wrote:
Fri Nov 19, 2021 01:08
MisterE wrote:
Tue Nov 16, 2021 22:56
if you'd like me to stop making so many suggestions for new content I can
Suggestions are Ok, but I don't know if I'll do them all.
thats good; suggestions are cheap; and 10% of ideas are good if you're lucky

User avatar
MisterE
Member
Posts: 693
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] LWComponents [0.1.7] [lwcomponents]

by MisterE » Post

I noticed that fans cant blow you upwards, even when rotated that way

loosewheel
Member
Posts: 155
Joined: Mon Dec 28, 2020 01:19
GitHub: loosewheel
In-game: loosewheel

Re: [Mod] LWComponents [0.1.7] [lwcomponents]

by loosewheel » Post

MisterE wrote:
Sat Nov 20, 2021 02:09
I noticed that fans cant blow you upwards, even when rotated that way
This has been fixed.

loosewheel
Member
Posts: 155
Joined: Mon Dec 28, 2020 01:19
GitHub: loosewheel
In-game: loosewheel

Re: [Mod] LWComponents [0.1.8] [lwcomponents]

by loosewheel » Post

Changed detector digilines message to single message with list of detected items, instead of 1 message per item.

Made changes to lwcomponents.register_spawner api - called function must now set velocity, can use force parameter as velocity hint. Removed spawning from this mod. Created lwcomponents_spawners to register spawers. This way there is no circular dependency, and if the mod implements this api it is used instead.

loosewheel
Member
Posts: 155
Joined: Mon Dec 28, 2020 01:19
GitHub: loosewheel
In-game: loosewheel

Re: [Mod] LWComponents [0.1.6] [lwcomponents]

by loosewheel » Post

MisterE wrote:
Tue Nov 16, 2021 04:22
horizontal and vertical conveyor belts move nodes and objs above/next to them onward one node.
I opted here for conduits.

Conduits are connected in a circuit, and can move items from their inventory to another conduit in the same circuit.

When a conduit node is placed it has a simple form that asks for a channel. This channel is both the digilines' channel and the target id of this conduit within the circuit. A conduit does not have to be given a name. Most of them are just used to connect other conduits together.

Transfer of items takes 0.1 seconds per conduit node moved.

Item transfers can be done with a mesecons power pulse, digilines message or automatically (one per second).

With a conveyor, each node has to constantly check for items to move. With conduits only the conduit sending the item does any work, and only while its doing it.

Conduits also support hoppers.

User avatar
MisterE
Member
Posts: 693
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] LWComponents [0.1.8] [lwcomponents]

by MisterE » Post

ok... but also the main idea of conveyors was to move *nodes* above them. perhaps a node-only conveyor?

loosewheel
Member
Posts: 155
Joined: Mon Dec 28, 2020 01:19
GitHub: loosewheel
In-game: loosewheel

Re: [Mod] LWComponents [0.1.8] [lwcomponents]

by loosewheel » Post

MisterE wrote:
Sat Nov 20, 2021 17:50
ok... but also the main idea of conveyors was to move *nodes* above them. perhaps a node-only conveyor?
Nodes are more complex than entities on a conveyor. Nodes can't really be moved. To move them you remove one and add one in the moved position with the data from the original. If the conveyor is packed and the game engine calls the node handlers from the end to the beginning of the conveyor, all the nodes move down in one cycle. If from beginning to end, only the last one moves leaving a gap. This happens at each cycle until the first one can move.

Nodes like pistons and movestone only push in a single known direction so all nodes can be actioned at once. For a conveyor that can zigzag in any direction, the mod has to calculate the entire conveyor as the user has laid it out to move them.

This operation should be possible with conduits, by breaking the node at the source. Dropping it in a conduit via a hopper to send it to a destination. Then dropping it into a deployer via a hopper and deploying it.

Or by using pistons timed in sequence to push nodes along a path.

User avatar
MisterE
Member
Posts: 693
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] LWComponents [0.1.8] [lwcomponents]

by MisterE » Post

Code: Select all

2021-11-21 10:47:36: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'lwcomponents' in callback node_on_timer(): ...ft/games/mesecraft/mods/ITEMS/lwcomponents/collector.lua:363: attempt to call field 'item_pickup' (a nil value)
2021-11-21 10:47:36: ERROR[Main]: stack traceback:
2021-11-21 10:47:36: ERROR[Main]:       ...ft/games/mesecraft/mods/ITEMS/lwcomponents/collector.lua:363: in function <...ft/games/mesecraft/mods/ITEMS/lwcomponents/collector.lua:350>

User avatar
MisterE
Member
Posts: 693
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] LWComponents [0.1.8] [lwcomponents]

by MisterE » Post

also,

Image

apparently this setup crashes the server too

Is the breaker supposed to be a dropper (note the infotext versus the debug info)

loosewheel
Member
Posts: 155
Joined: Mon Dec 28, 2020 01:19
GitHub: loosewheel
In-game: loosewheel

Re: [Mod] LWComponents [0.1.8] [lwcomponents]

by loosewheel » Post

MisterE wrote:
Sun Nov 21, 2021 19:09

Code: Select all

2021-11-21 10:47:36: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'lwcomponents' in callback node_on_timer(): ...ft/games/mesecraft/mods/ITEMS/lwcomponents/collector.lua:363: attempt to call field 'item_pickup' (a nil value)
2021-11-21 10:47:36: ERROR[Main]: stack traceback:
2021-11-21 10:47:36: ERROR[Main]:       ...ft/games/mesecraft/mods/ITEMS/lwcomponents/collector.lua:363: in function <...ft/games/mesecraft/mods/ITEMS/lwcomponents/collector.lua:350>
This looks like you have an older version of lwdrops. I tried it on mine and had no problem. Same with the breaker problem. Try and update lwdrops and see if that fixes it. If its ok I'll update with the textinfo fixes.

User avatar
MisterE
Member
Posts: 693
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] LWComponents [0.1.8] [lwcomponents]

by MisterE » Post

oh yes I havnt been updating lwdrops. Sorry :)

loosewheel
Member
Posts: 155
Joined: Mon Dec 28, 2020 01:19
GitHub: loosewheel
In-game: loosewheel

Re: [Mod] LWComponents [0.1.9] [lwcomponents]

by loosewheel » Post

Fixes for infotext updated.

loosewheel
Member
Posts: 155
Joined: Mon Dec 28, 2020 01:19
GitHub: loosewheel
In-game: loosewheel

Re: [Mod] LWComponents [0.1.10] [lwcomponents]

by loosewheel » Post

Added cannons. They shoot items similar to dispensers but can be aimed. If lwcomponents_spawners is installed ammo from projectiles mod can be used.

Cannons can be controlled by a mesecons power pulse, digilines messages, digistuff game controller and manually on the rear panel. Barrel can be aimed from 60 degrees left to 60 degrees right, 20 degrees down to 50 degrees up.

User avatar
MisterE
Member
Posts: 693
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] LWComponents [0.1.10] [lwcomponents]

by MisterE » Post

nice! can they be aimed by sending a target position or do you have to do the math in your code and only send a degree

User avatar
MisterE
Member
Posts: 693
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] LWComponents [0.1.8] [lwcomponents]

by MisterE » Post

MisterE wrote:
Sun Nov 21, 2021 19:31
also,

Image

apparently this setup crashes the server too

Is the breaker supposed to be a dropper (note the infotext versus the debug info)
any fix for this?

loosewheel
Member
Posts: 155
Joined: Mon Dec 28, 2020 01:19
GitHub: loosewheel
In-game: loosewheel

Re: [Mod] LWComponents [0.1.10] [lwcomponents]

by loosewheel » Post

MisterE wrote:
Wed Nov 24, 2021 12:53
nice! can they be aimed by sending a target position or do you have to do the math in your code and only send a degree
No, currently only set pitch and rotation, then fire. Could put that in, but it would be where the cannon aims, not necessarily where the projectile hits.

User avatar
MisterE
Member
Posts: 693
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] LWComponents [0.1.10] [lwcomponents]

by MisterE » Post

yes of course. that would make it easier to aim at an intruder

loosewheel
Member
Posts: 155
Joined: Mon Dec 28, 2020 01:19
GitHub: loosewheel
In-game: loosewheel

Re: [Mod] LWComponents [0.1.10] [lwcomponents]

by loosewheel » Post

MisterE wrote:
Wed Nov 24, 2021 20:43
yes of course. that would make it easier to aim at an intruder
Added cannon aiming.
Image

The center position is straight down the barrel of the cannon, which is 0.65 above the center of the cannon's base. This may need to be taken into consideration when aiming. In the test above -0.5 was taken as the cannon base's height and hit every target with fire arrows where z <= 10 (the wood still in the image was for tests in other directions). More details in the docs.

loosewheel
Member
Posts: 155
Joined: Mon Dec 28, 2020 01:19
GitHub: loosewheel
In-game: loosewheel

Re: [Mod] LWComponents [0.1.8] [lwcomponents]

by loosewheel » Post

MisterE wrote:
Wed Nov 24, 2021 12:54
MisterE wrote:
Sun Nov 21, 2021 19:31
also,

Image

apparently this setup crashes the server too

Is the breaker supposed to be a dropper (note the infotext versus the debug info)
any fix for this?
I'm not getting a crash on this setup, but I did find a poorly scoped variable (which creates a global). It's been fixed. If this doesn't fix the problem I'll need the info from the debug.txt file about it.

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests