jakj

Redstone In Motion now in full release as of June 23

Recommended Posts

You know what would be nice? A sort of a "prefab" carriage. Basically, the idea is the same as with BC architect tables and builders. You record a set number of blocks using some kind of landmarks, and later on the carriage with that recording will ONLY move those blocks, no matter what other blocks there are around. If there are other blocks inside the volume of the template, they are ignored. If they are bumped into, they stop the carriage, naturally, but they do not stick to the prefab blocks. If some blocks are removed from the prefab shape after it starts moving around, the carriage ignores the empty space, and moves the rest of the blocks as normal. The carriage has a max limitation on either size of the prefab, or the number of blocks in it.

Why bother? Well, this would allow for some extremely tight builds. Complex airlocks, sliding platforms (that move in different directions indoors or underground), there are lots of uses for such a carriage.

Share this post


Link to post
Share on other sites

Interesting idea. It might go like this:

Create a new carriage type: Call it Carriage X.

Create a new block: Call it Carriage Anchor.

Place Carriage X in the world in the shape of the blocks you want to move. (So there would be one Carriage X in every spot where you're going to put a block, and then extra Carriage X as necessary to make it a contiguous shape.)

Attach the anchor to the set of Carriage X and activate. All Carriage X are absorbed into the anchor. The anchor draws the carriages translucently like they're still there, but in reality it's now empty space again, rather like guide lines on a piece of paper for you to write on. The Carriage Anchor becomes Carriage Template.

Put blocks where you want them within the template, and leave empty space where you want it. Activate the Carriage Template: All id/metadata pairs are recorded within the template. The Carriage Template is now finalized and becomes Carriage Pattern.

The Carriage Pattern will act as a carriage drive: Signal it on a side or via CC peripheral, and it will move, taking its predetermined blocks with it.

Something like that?

Share this post


Link to post
Share on other sites

I was thinking far simpler, with template drawing like in BC, but I like your idea much better. It would help you remember exactly how the carriage looked like, and maybe it'd be possible to record templates and patterns on paper so that they can be reused.

Also, I am not exactly sure on the metadata. Wouldn't it cause problems transporting Redstone Energy Cells, as those change the metadata as they charge/discharge?

Share this post


Link to post
Share on other sites

Believe it or not, while my way might sound more complex, it's actually much simpler to code, and I think you'd agree it's much simpler to use as well once you have to deal with trying to not only manipulate but also visualize a 3D pattern of blocks in the world with a GUI made up of 2D slices represented as inventories. From a programming standpoint, drawing the translucent templates is just iterating through an array of X/Y/Z offsets each time the core block is rendered.

I suppose I could have two different types of Carriage X, one which records just ID and one which records ID+Metadata. Not going to touch the tile entities, though: It'll use the same moving code as the rest of the mod, so they'll be preserved as normal on motion, but I'm not going to reimplement the entire BC gate system. If your build requires blocks to be moved or not moved based on anything besides Id/Meta, you can either have multiple different patterns overlapping, moving one or the other based on conditionals you evaluate, or else you're SOL.

Share this post


Link to post
Share on other sites

How about making it simple and stopping at Carriage Pattern? As in, you skip the second step, but keep the first one. What this would mean would be that the carriage does not differentiate between blockID and metadata, but just moves whatever block or entity there is in the proper X/Y/Z offset. That'd eliminate a whole bunch of trouble. The ghost shape would be toggleable using whatever version of a wrench/tool your mod will have, just so that you don't have to deal with translucent shapes if the template is not completely filled.

Share this post


Link to post
Share on other sites

This would get back to your problem you mentioned before, though. Imagine a pattern like this: ABCDEFGH

Now, the blocks in that pattern are like this: ABCD F H

You move the pattern, and where you moved it to, there was already a block in the G position, so now the pattern contains this: ABCD FGH

If you move the pattern again, it's going to take G with it.

Now, I could make a simple check for empty space v. not empty space, but not include id/metadata at all beyond that. In fact, there could be a set of conditionals:

*) Just move the pattern, absorbing any new blocks at the destination if they didn't block movement.

*) Move the pattern, but remember where the pattern was empty, and don't pick up new blocks in space that was empty when the pattern was formed.

*) Refuse to move the pattern at all if any blocks are present at the destination where in the pattern is empty space.

And you would select which of these you want by using different carriage blocks to form the pattern, so you could mix and match.

This method would certainly be a whole lot easier than having to track ID/Meta.

Share this post


Link to post
Share on other sites

This would get back to your problem you mentioned before, though. Imagine a pattern like this: ABCDEFGH

Now, the blocks in that pattern are like this: ABCD F H

You move the pattern, and where you moved it to, there was already a block in the G position, so now the pattern contains this: ABCD FGH

If you move the pattern again, it's going to take G with it.

I personally think that's a positive thing. It allows for easy repair and modification of the prefab. Then again, there might be some cases where that's not desirable. I dunno, have 2 types of carriages? This is quickly becoming overcomplicated. How about a simple GUI or wrench toggle for different modes on the anchor block?

Share this post


Link to post
Share on other sites

It's not actually overcomplicated: It just seems that way without pictures. Let me lay it out:

There are three types of carriages: Foo Carriage, BarCarriage, and Baz Carriage. These are just blocks you craft. Put down the carriages where you want your pattern to be.

If you place a Foo Carriage, that means simply add that spot to the pattern, so it'll move blocks if they're there when the pattern is moved. (Example usage: Move the pattern to one position, where a cobblestone block formed from lava and water meeting, so it connects to the cobblestone block; Move the pattern to another position, where it stops with the cobblestone block; Break the block, and repeat.)

If you place a Bar Carriage, that means add that spot to the pattern, but remember whether that spot has a block or not when the pattern is formed. When the pattern is moved, if it remembers there being no block but right now there's a block, it'll just leave that block there instead of moving it. (Example usage: Making a set of hanging lights on your ceiling that you want to move around the place at will, without picking up any of your other furniture along the way.)

If you place a Baz Carriage, that means add that spot to the pattern, but remember whether that spot has a block or not when the pattern is formed. When the pattern tries to move, if it remembers there being no block but if it moves there will be a block, it'll prevent the movement. (Example usage: A mobile platform or rig that needs empty space preserved, such as for allowing arrows to be shot from a dispenser.)

To make a pattern, lay out the carriages, stick an anchor on it, sneak-activate or screwdriver the anchor, and it sucks in all the carriages and makes a pattern.

Share this post


Link to post
Share on other sites

So it's still a 2-step process, right? First you lay out the template using the different Carriage types (a good idea would be to make them very distinct colors, such as green for Foo, yellow for Bar and red for Baz, which would make them very visible even in ghost form), and after creating the ghost images, you lay out the blocks and activate the anchor again, right?

Are the Carriages going to be destroyed upon this act, or will they be stored inside an internal inventory in the anchor, or will they simply drop on the ground?

Finally, what could you name these Carriages? Foo, Bar and Baz are obviously placeholder names. I was thinking along the lines of X Template Carriage, where X is an adjective describing its functionality.

* Foo = Accepting, indiscriminate, flexible, forgetful (as in, it forgets which blocks it carried). Something to do with it being the least restrictive type of template carriage.

* Bar = Ignoring/ignorant. Something to signify its ability to completely ignore any blocks that are not there when the template is created.

* Baz = Restrictive, fixed. Should describe this type's complete rigidity when it comes to handling abnormalities in structure.

Also, I feel that with these complex rules, a comprehensive ingame documentation of sorts is almost a necessity. Either a book like Tinker's Construct ones, or an equivalent of Thaumcraft's Thaumonomicon.

Share this post


Link to post
Share on other sites

It's a 1-stage process: Place the carriages as desired to describe the pattern, place the anchor next to them, activate anchor. Anchor consumes carriages (they're just gone). Although I could make it so that the anchor drops the carriages if you break it but you can't get them back otherwise; That might be more fair, so people don't feel stressed over making mistakes in placement.

Tooltips should be enough documentation, but I can add a book if absolutely necessary.

Keep thinking about the names: I won't finalize them until I actually start coding this feature, which will be after I get Redstone In Motion into beta and pound out a quick soul-shards ripoff. A few weeks, ish.

Share this post


Link to post
Share on other sites

It's a 1-stage process: Place the carriages as desired to describe the pattern, place the anchor next to them, activate anchor. Anchor consumes carriages (they're just gone). Although I could make it so that the anchor drops the carriages if you break it but you can't get them back otherwise; That might be more fair, so people don't feel stressed over making mistakes in placement.

So wait, I am not sure I get it.

1. Place down the 3 types of carriages in desired pattern.

2. Activate the anchor.

3. What next? When do you determine which blocks are where? What exactly is the process here?

Share this post


Link to post
Share on other sites

The anchor records the pattern of carriages and becomes a pattern. The pattern is a block just like an engine: Apply a redstone signal or CC or whatever to make it move. When it moves, it uses the pattern to determine if it can move and what it should pick up.

Super-simple example:

Place anchor on ground. Place Foo Carriage on anchor. Activate anchor. Anchor eats Foo Carriage and becomes pattern. Put block on pattern (where the foo carriage was). Signal pattern. Pattern moves block.

So instead of having engine -> carriages -> blocks, you just have pattern -> blocks, because the carriages are already recorded inside. It lets you be more compact because you don't have carriages taking up space, and it lets you be more precise because you always have the exact same pattern no matter where you move it.

Share this post


Link to post
Share on other sites

New testing code: http://j-a-k-j.com/RedstoneInMotion_testing9.zip

*) Drives now make sure they won't move things above/below the height/depth limit of the world.

*) Fixed screwdriver propagating from client instead of from server (meaning it didn't actually work).

*) Implemented support carriages: These will let you make a flat platform in any shape and in any direction: N/S/E/W or Up/Down. Use the screwdriver or sneak with empty hand to change which side is open: All of the same side must be open for any particular support carriage (so you can't have some up and some down on the same one.)

Pictorial demonstration: http://imgur.com/a/xHEeh

*) Implemented structure carriages: These will let you move entire cuboid areas of the world. Place the structure carriages in a wireframe box around whatever you want to move (8 corners, 12 edges), then use the screwdriver on the CORNERS to open/close the carriage sides appropriately, place the engine/motor on the CORNER, and boom: Your house just moved.

Pictorial demonstration: http://imgur.com/a/jFySc

*) Implemented balancing features: There are now four tiers of drive and four tiers of carriage. Each successive tier of drive can move more carriages at the same time, and each successive tier of carriage can move more blocks at the same time. You can mix and match carriages of the same type at will (so you can mix tier 2 and tier 4 support carriages but you can't mix support and platform carriages). Tooltips tell you how much of what they can handle.

Share this post


Link to post
Share on other sites

Looks like it's at a point that I'm comfortable putting it in my server for more heavy testing. Kitty Jailers away!!!

Share this post


Link to post
Share on other sites

Looks like it's at a point that I'm comfortable putting it in my server for more heavy testing. Kitty Jailers away!!!

Be careful: I can pretty much guarantee there will be mod blocks that don't get moved 100% correctly (so loss of electrical energy or what-not), and it doesn't have a blacklist yet (meaning it will let you pull up a layer of bedrock).

Share this post


Link to post
Share on other sites

We're mostly responsible people here, so we won't attempt to surround our homes with bedrock. :D

Share this post


Link to post
Share on other sites

It has just come to my attention that Minefactory Reloaded already has a replacement for red-alloy wire. (If any of you have already told me this and I was too stupid to understand what you said, I apologize. :P) Therefore, I will not be implementing this feature. Yay! Less work. ;-) That also encourages me because I know I'll spend less time on that, and have more time for additional carriage and drive types (if anybody suggests any) and optimizing the code over time.

I will still be making my blocks compatible with CC as peripherals, however.

And I may throw a quickie mod together that adds basalt and marble stuff in, since I did like building with those. Not volcanoes, though: Other mods have added that. I'd just add crafting/smelting recipes to make the marble/basalt from vanilla materials instead of doing worldgen. And I already even have textures for them, since I collected them back when I actually used to play with Redpower.

Share this post


Link to post
Share on other sites

And I may throw a quickie mod together that adds basalt and marble stuff in, since I did like building with those. Not volcanoes, though: Other mods have added that. I'd just add crafting/smelting recipes to make the marble/basalt from vanilla materials instead of doing worldgen. And I already even have textures for them, since I collected them back when I actually used to play with Redpower.

MFR has covered that too, with Blackstone and Whitestone.

I think Rednet was mentioned earlier in the thread, but what it is wasn't explained.

Share this post


Link to post
Share on other sites

MFR has covered that too, with Blackstone and Whitestone.

Oh damn! Now I'm positively gleeful. I can just throw the textures into my texture pack and use MFR stone. Woot.

I think Rednet was mentioned earlier in the thread, but what it is wasn't explained.

Yeah, since I've never used MFR and barely used CC, I thought "RedNet" was just the CC equivalent of "TCP/IP". I do remember the word "cable" being used, and I also remember now that I paid absolutely no attention since I thought it was only between CC machines. >_>

But hey, in this case, all's well that ends well, especially since I found out Forge is hiding a metadata-sensitive version of adding smelting recipes in the FurnaceRecipes class that it hasn't exposed to the GameRegistry class. Heh.

Share this post


Link to post
Share on other sites

...sure, what he said

I was thinking about okamikk being the exception to the rule here. :D

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.