Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to TerraFirmaCraft Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Dries007

      ATTENTION Forum Database Breach   03/04/2019

      There has been a breach of our database. Please make sure you change your password (use a password manager, like Lastpass).
      If you used this password anywhere else, change that too! The passwords themselves are stored hashed, but may old accounts still had old, insecure (by today's standards) hashes from back when they where created. This means they can be "cracked" more easily. Other leaked information includes: email, IP, account name.
      I'm trying my best to find out more and keep everyone up to date. Discord (http://invite.gg/TerraFirmaCraft) is the best option for up to date news and questions. I'm sorry for this, but the damage has been done. All I can do is try to make sure it doesn't happen again.
    • Claycorp

      This forum is now READ ONLY!   01/20/2020

      As of this post and forever into the future this forum has been put into READ ONLY MODE. There will be no new posts! A replacement is coming SoonTM . If you wish to stay up-to-date on whats going on or post your content. Please use the Discord or Sub-Reddit until the new forums are running.

      Any questions or comments can be directed to Claycorp on either platform.
Miner239

Weighted Uncountable Material

25 posts in this topic

Have you read, understood, and followed all of the rules listed in large text at the top of the suggestions forum? (Yes/No): ja   Answering "no" to the above question will result in your post being deleted.   Basically, uncountable material gets weighted. AFAIK, that includes (food is in TFC1) clay, unrefined ore, clothing material, rock(but not the block form), unrefined lumber, gems( along with Darmo's suggestion), fuel, and flux.   Metal and water are quantized in TFC1(liquid in Forge), as in separated into countable units(quantum).

 

e25CrMF.gif

Edited by Miner239
0

Share this post


Link to post
Share on other sites

Moving away from the traditional stacking mechanics is a massive pain to do, primarily because pretty much every vanilla mechanic depends on it, from storage, to inventory management, to crafting recipes, etc.

Edited by Kittychanley
0

Share this post


Link to post
Share on other sites

Of course, not all material would be weighted. Cut lumber, cut gem, refined ore, blocks, are not weighted, as they are countable. Some solutions to what you might concern about mechanics:

Rock -> Cobble : Put rock on the crafting matrix.

Jute -> Rope : Craft Jute and a spindle. Removes 16 oz.

Leather -> Clothing : Cut as usual, material removed according to item made, removed after you take out the item.

Flux -> Smithing : Remove a small amount every time you start working.

Flux -> Limewater : No difference.

Clay -> Pottery : Same mechanic as leather.

If this does not satisfy, then I'd like to know how weighted item works that affects vanilla mechanics much. 

 

Besides, we also have this plugin that combines food on pickup. Why not do the same with what should be stacking?

0

Share this post


Link to post
Share on other sites

The issue is with crafting. The vanilla crafting system looks only at items and metadata. It doesn't check NBT data. So let's say a block of cobble requires 10 oz of rocks. If you put 1 oz of rock in the crafting grid, it's still going to show you the cobble block in the output slot. Making it behave any differently requires an overhaul of most of the crafting handlers, and also breaks compatibility so none of those crafting recipes would work in other mod's crafting methods, or even the vanilla workbench. This is already what the food system is doing in TFC1, and it's not pretty.

 

There's also that huge debacle about what unit to use for weight. We can get by with ounces in TFC1's food system because literally nothing else is using the weight. The unit is arbitrary because it's nothing more than a way to measure how many times you can eat the thing. I can guarantee you that if things other than food also get weight, there's going to be a much bigger cry for configuration to allow metric units. Conversion for that would be an absolute nightmare.

1

Share this post


Link to post
Share on other sites

I actually would prefer for things to be stack-able instead of weighted. I would prefer to have a stack of 64 bell peppers and use one unit in the sandwich. It would make possible for other mechanics.

So for example when harvesting fruits it would be possible to make then stack. Also we could change the system and have fruits give seeds, the way it should be. 

Not a coder, so no idea what is easier to code weights or stack-able units, From the outside it seems is units. So one orange is one orange, no need to calculate how heavy it is, you just stack then and use it.

Of course I may be totally wrong.

0

Share this post


Link to post
Share on other sites

The weighted system does seem like a good idea, but I appreciate the dificulty of implementation.

 

I've been thinking of a system to split blocks into logical components. It would effectively add more granularity allowing for a more intuitive 'weight' system without actually having 'weight'.

We could have divisible substances and materials such as stone broken down into pixels (for example). So many pixels of stone would be requried each crafting recipe.

Let us propose that a pixel is a 3D version of what we see in minecraft currently. Making each block be composed of 16x16x16 pixels. i.e. 256 pixels.

(Pixels is just a placeholder for the smaller quantity.)

 

To complete the idea a few recipes could be added to fascilitate communication between blocks and their smaller components such as if a recipe needs 128pixles and so returns 128p from a block's usage when crafted. Similarly you could use 128p to create the same thing. or 192p with the recipe returning 64p.

 

This could then be integrated with a weight system by valuing a pixel of stone as a specific weight and telling the computer therefore how much weight so many pixels' worth might be.

At this point it bleeds into encumberance discussion but I think the topic lends itself to that. I hope I'm not digressing too much.

 

I appreciate that this is only applicable to substances like flux and stone, but I don't think Miner239 was trying to overhaul foodstuffs as much as more naturally divisible substances.

 

Anyway how does that sound as a workaround?

0

Share this post


Link to post
Share on other sites

That would also require a rewrite of the vanilla crafting system, because the way it is written there is a limitation of 1 item per slot. Therefore you can't use the vanilla stacking system to get the requirement of 128p, and if you go the NBT route its the exact same problem as mentioned above.

0

Share this post


Link to post
Share on other sites

the exact same problem as mentioned above.

Which one? The handler?

0

Share this post


Link to post
Share on other sites

Which one? The handler?

 

 

The issue is with crafting. The vanilla crafting system looks only at items and metadata. It doesn't check NBT data. So let's say a block of cobble requires 10 oz of rocks. If you put 1 oz of rock in the crafting grid, it's still going to show you the cobble block in the output slot. Making it behave any differently requires an overhaul of most of the crafting handlers, and also breaks compatibility so none of those crafting recipes would work in other mod's crafting methods, or even the vanilla workbench. This is already what the food system is doing in TFC1, and it's not pretty.

0

Share this post


Link to post
Share on other sites

Kitty is VERY correct here. The vanilla crafting system is a massive pain to work around.

0

Share this post


Link to post
Share on other sites

Well, if it is a massive pain to work around, then don't. I thought I only listed material which only way of processing TFC has provided, no? All refined materials that would be used for other mods should be countable and not weighted.

 

I acknowledged that the weighted system needs its own crafting handler. If that's the case, then why not separate it instead of combining it with the vanilla crafting matrix? Will it lessen the burden or not?

 

And for the recipes, make it a ratio, like how chemical reactions are. For example, let's say that I want to mix charcoal and flux to make blast furnace packed fuel, enough fuel and flux for 2s of iron. The ratio would be 1 charcoal:1 flux:2 packed fuel. If I have 60s of charcoal and 45s flux, I would choose to make 45s*1:1:2 which then would consume 45s charcoal, 45s flux, and produce 90s of packed fuel. Or I could choose to only make 2s of packed fuel, or 512p, or any amount that I wish. Use a text box for the ratio multiplier input. 

Edited by Miner239
0

Share this post


Link to post
Share on other sites

Well if that's the only issue we could instead have a block of stone split into 64 which would solve the problem right? I wouldn't say we'd need any smaller divisions than 1/64th of a block of stone.

0

Share this post


Link to post
Share on other sites

I...still don't understand this suggestion.  What problem is it trying to solve?  Or what is it trying to add to the game?  I haven't seen a good explanation of what the benefits of this idea would be.

0

Share this post


Link to post
Share on other sites

You want benefits? I got... 

 

- Freedom from 64 stack size limit.

- Recipe consists of ratio, item count, and placement instead of only placement and item count.

 

The main point is that I liked how food is handled in TFC1 so much. Ideas popped into my mind-world, and this thread was born.

 

Will cobble up a mock GUI in a few hours.

Edited by Miner239
0

Share this post


Link to post
Share on other sites

Oh, you want to bring quantity to the crafting grid?  Ya that'd be nice.

 

As for 64 stack, I guess I've never had a problem with it.

0

Share this post


Link to post
Share on other sites

Well, if it is a massive pain to work around, then don't. I thought I only listed material which only way of processing TFC has provided, no? All refined materials that would be used for other mods should be countable and not weighted.

 

I acknowledged that the weighted system needs its own crafting handler. If that's the case, then why not separate it instead of combining it with the vanilla crafting matrix? Will it lessen the burden or not?

 

And for the recipes, make it a ratio, like how chemical reactions are. For example, let's say that I want to mix charcoal and flux to make blast furnace packed fuel, enough fuel and flux for 2s of iron. The ratio would be 1 charcoal:1 flux:2 packed fuel. If I have 60s of charcoal and 45s flux, I would choose to make 45s*1:1:2 which then would consume 45s charcoal, 45s flux, and produce 90s of packed fuel. Or I could choose to only make 2s of packed fuel, or 512p, or any amount that I wish. Use a text box for the ratio multiplier input. 

 

One of the key things about the vanilla crafting handler is that you can do it right in your inventory. That's why we added the 3x3 crafting grid right to the player inventory in TFC1, because having to haul around a specific block just for crafting was really annoying. I can only see adding a whole other block and interface for very specific processing to be even more annoying and detrimental to gameplay. Imagine if in TFC1 you had to lug around a specific crafting table block just to do food combining, trimming, splitting, etc? Even if it was added as a tab for another screen on the player inventory, switching back and forth is going to get old fast.

 

There's also the issue of combining and dividing stacks. What if you have 60 of charcoal and 45 of flux, but you only want to use 5 of each to make 10 of packed fuel? With the vanilla stacking system this is fine, because there's a whole system of clicking and dragging and whatnot that you can use to directly combine and split stacks. With weighted items using NBT tags, not so much.

 

Requiring a text box for input on what you want to craft is bad design in my opinion. It's not intuitive, and requiring user input in the form of typing is always asking for trouble.

 

Well if that's the only issue we could instead have a block of stone split into 64 which would solve the problem right? I wouldn't say we'd need any smaller divisions than 1/64th of a block of stone.

 

No. The problem is combining. The crafting grid does not have 64 slots, so there is no way for you to put 64 things of rock into the grid to get the block back out. Without completely rewriting how vanilla crafting works, you can at most have 1 "pixel"/thing per slot. Not a stack of things, a single thing from a stack. You can't make a crafting recipe that requires more than 9 individual items, even if all of those items are the same, because you can only do one individual item per slot, and the grid only has 9 slots.

1

Share this post


Link to post
Share on other sites

There's also the issue of combining and dividing stacks. What if you have 60 of charcoal and 45 of flux, but you only want to use 5 of each to make 10 of packed fuel? With the vanilla stacking system this is fine, because there's a whole system of clicking and dragging and whatnot that you can use to directly combine and split stacks. With weighted items using NBT tags, not so much.

 

Requiring a text box for input on what you want to craft is bad design in my opinion. It's not intuitive, and requiring user input in the form of typing is always asking for trouble.

Nah, 5 clicks and a key press is faster, easier, and more intuitive than fifteen ten clicks. It would only be a matter of familiarizing.

 

Breakdown:

Weighted:

-Put charcoal in matrix (2 clicks)

-Put flux in matrix (2 clicks)

-Enter ratio multiplier '5' (key press)

-Take product from slot (click)

 

Stacked:

-Take reactant from inventory (click)

-Right-click to put 5 item on the matrix (5 clicks)

-Put remaining reactant into inventory (click)

-Do the above steps one more time (7 clicks)

-Put other reactant into matrix (2 clicks)

-Take product from slot (click)

 

Make more 10-sized fuelpack by clicking more. Or shift-click it (if you can implement it).

The text box is just for the ratio of the recipe. If you need an exact proportion of an alloy, say, 15s 512p, then you can put that ratio on the text box, and take that exact amount of ore from the ore lump every time you click on the product slot (and not forgetting to put it into the inventory first before taking another). This dividing method would be similar to food dividing, only a text box instead of a knife. A tool slot is optional.

 

Now that Bioxx had posted about metal tiers and procedural alloys, it won't be impossible for an alloy recipe to have unnaturally weird combination of metal/alloy proportion. To help with that, why not making the batch start from the first step, the ore management?

 

 

One of the key things about the vanilla crafting handler is that you can do it right in your inventory. That's why we added the 3x3 crafting grid right to the player inventory in TFC1, because having to haul around a specific block just for crafting was really annoying. I can only see adding a whole other block and interface for very specific processing to be even more annoying and detrimental to gameplay. 

Aw, TFC1 does good with it's 3x3 crafting matrix right on the inventory. I do agree that hauling a block only to craft mere raw materials is annoying, because you're not supposed to be able to craft anywhere, anytime. Sure, you can craft simple items like stone axe, spindles on the go, but I don't think you should be able to craft a barrel without any tools in the wilderness just because your pocket is full. I think the point of workbenches is, well, a work station. That does not move. If my speculation about tiered workbenches/forges is true, then the player really doesn't need to be able to craft anywhere.

 

Imagine if in TFC1 you had to lug around a specific crafting table block just to do food combining, trimming, splitting, etc? Even if it was added as a tab for another screen on the player inventory, switching back and forth is going to get old fast.

 

If you can't implement the current method of crafting, then I'd happily set up a kitchen. If it was never there or implemented in a block, then I'd still say that TFC is still trying to be 'survival as it should've been' better than vanilla does. My opinion would still be 'TFC is awesome' even if the 3x3 crafting grid in the inventory was never there. Now, would it hurt to make TFC2 even more awesome than TFC1?

 

EDIT per Darmo's correction.

Edited by Miner239
0

Share this post


Link to post
Share on other sites

Nah, 5 clicks and a key press is faster, easier, and more intuitive than fifteen clicks.

Those examples are a bit off.  In the stacked system, only 1 ingredient needs to be in the correct ratio.  So your second 7 clicks is really just two clicks, because the first ingredient will govern the result.  

OR, you just put both stacks in in their entirety, and L/R click for the quantity desired, if it's small.

 

And really who ever does that with a recipe?  Anytime I make a pretty basic thing (i.e. not beds or quorns), it's either entire stacks, or half stacks.  Brick recipes are the most tedious because the diagonals mean I can't just drag the first ingredient to evenly distribute.  But I almost never pull out a small number from a stack, unless it's logs (i.e. 1 log to make lumber to make a barrel).    I'm not really seeing the need for this kind of exaction, except in alloying, but it sounds like that system is getting a revamp anyway.

 

And beyond that, the time required to set up the recipes and make them could be considered a game factor.   If time efficiency were the end-all be-all, then block breaking would always just be virtually instant.  Time is a cost, just like materials.

0

Share this post


Link to post
Share on other sites

And really who ever does that with a recipe?  Anytime I make a pretty basic thing (i.e. not beds or quorns), it's either entire stacks, or half stacks.  Brick recipes are the most tedious because the diagonals mean I can't just drag the first ingredient to evenly distribute.  But I almost never pull out a small number from a stack, unless it's logs (i.e. 1 log to make lumber to make a barrel).    I'm not really seeing the need for this kind of exaction, except in alloying, but it sounds like that system is getting a revamp anyway.

What, you pulled out whole stack of charcoal and flux into your blast furnace? I'm putting an idea of integrating the stack-splitting and measuring of those materials into a single step of crafting. After all, only raw materials are weighted. Countables are still stacked.

 

 

And beyond that, the time required to set up the recipes and make them could be considered a game factor.   If time efficiency were the end-all be-all, then block breaking would always just be virtually instant.  Time is a cost, just like materials.

Sure, time is a cost. I'll get there soon (the GUI too), like, two weeks later. Finals coming.

 

And just to add to my point here:

 

I do agree that hauling a block only to craft mere raw materials is annoying, because you're not supposed to be able to craft anywhere, anytime. Sure, you can craft simple items like stone axe, spindles on the go, but I don't think you should be able to craft a barrel without any tools in the wilderness just because your pocket is full. I think the point of workbenches is, well, a work station. That does not move. If my speculation about tiered workbenches/forges is true, then the player really doesn't need to be able to craft anywhere.

 

Would be to quote Bioxx:

 

The more I think about it, the more that I like the idea of a modular workbench. Not quite what the OP suggested, but closer to what Saberwulfy mentioned above. If there is anything that I believe most folks can agree on, its that the need to build your smithy somewhat specifically in tfc1 was something that worked well and should be expanded upon. If we had some sort of bench that the player could customize by building a workshop in the area and then crafting could be done based on what was available, I think it would be pretty neat.

 

Feel free to take the idea and run with it.

0

Share this post


Link to post
Share on other sites

What, you pulled out whole stack of charcoal and flux into your blast furnace?

 

Yes actually, that's an extremely common practice. The blast furnace only consumes what it can, so most players just Ctrl+Q the whole stack of charcoal and flux into it, and pick up what's leftover floating at the top.

0

Share this post


Link to post
Share on other sites

Kitty beat me to the BF thing.

 only raw materials are weighted. Countables are still stacked.

This is part of what confuses me.  These definitions seem a bit arbitrary.  Everything is countable.  It's still not clear to me why some items are in one category, the others in another.  Are these coder terms I'm just not aware of?  Or terms minecraft modders know?

The other part is, what are we solving with this?  Saving a couple seconds once in awhile in crafting?  There's also something to be said for keeping a system that will be more familiar to vanilla MC players. 

0

Share this post


Link to post
Share on other sites

At the end of the day, what you're suggesting Miner239 is far more difficult to make work than you would expect. The core concept of a raw stone block having nbt which contains the current weight is simple. But then when you start having to deal with 10-20 interfaces, it becomes radically more complex. Making food weight function across all of the various interfaces and crafting situations was a bit of a herculean effort honestly. One which I'm not keen to repeat unless I have something that really excites me. If MC was built with that concept from the ground up, it wouldn't be so bad, but you have to remember that when modding, you're basically shoehorning things into place.

1

Share this post


Link to post
Share on other sites

Um, so it's not as simple as replacing decreaseStackSize(x)/something into decreaseWeight(x)? /j

 

Despite that, wouldn't making an encumbrance system in place makes a weight entry on each item already? Which would then be gotten by all/some containers? What would be the difference? If you can shed some light on that, maybe I can help you. And, you might be the one telling me this, but I remind you that crafting with weighted items should not be combined with vanilla crafting matrix.

 

And blocks still stacks to 64/32, but my point right above still stands.

Edited by Miner239
0

Share this post


Link to post
Share on other sites

You make a really good point 239 but I have to agree with Bioxx. IT seems that it wouldn't add an enourmous amount to the game considering the effort required.

As regards encumberance I love that idea but couldn't we model it based on items as they're currently manifested with much the same effect. i.e. one block of stone being x weight, and a log being y weight.

 

Personally I'm all for the idea of a fully realized intuitive system that doesn't have an arbitrary concept of 'items' determining how much you can carry. I'd much rather have a system that logically takes into account what I could carry in a manner that factors in the physics of the world. However I can't see a coding solution myself from what either Bioxx or Kitty say. If it is possible, you seem to know a bit about coding, could you demo it at all? I 'm not just trying to shoot you down I do really like the idea.

 

edit: Grammar

Edited by Thorah
0

Share this post


Link to post
Share on other sites

Um, so it's not as simple as replacing decreaseStackSize(x)/something into decreaseWeight(x)? /j

 

Despite that, wouldn't making an encumbrance system in place makes a weight entry on each item already?

1. No its not remotely that simple. Stacksize is a public integer that often gets directly adjusted rather than using some method to be overridden. I believe there IS a method in Itemstack that you could find a way to override, but no its not even remotely that simple.

2. Weight on items would not be part of any nbt system and would not require any sort of interaction with anything else beyond registering each item as having X weight in some hashmap somewhere. Then all we do is scan the players inventory for itemstacks. When it finds an item, it looks it up in the hashmap and sees that this stack of 32 planks weighs (32 * lumberWeight) and adds it to the total. We just perform this check every now and then and update a tracker of the players total weight. It has no need of interaction with any other systems unless we specifically want it to. It is vastly simpler for me to write and for the player to understand.

0

Share this post


Link to post
Share on other sites