RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Grid Crafting System v2.0

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 83
プログラマです
Grid Crafting System
Version: 2.0
Author: SeMcDun
Date: 09/10, 2011

Version History


  • <Version 1.0> 2011.09.07 - Original Release
  • <Version 2.0> 2011.09.10 - 2x2 Grids, (Picture backgrounds for each window has been postponed).

Planned Future Versions

  • <Version 3.0> 3x3 Grids
  • Edit: <Version 3.0> 3x3 Grids, Recipe Costs if desired.
  • Edit II: Found a bug when using Shift to remove items from the grid. This will be fixed in 3.0

Description


The Grid Crafting System gives the player a grid into which they can put items. If the correct items are used
and are in the correct box a product item will appear on the screen and the player can check it
out. If the player decides they want the item, they can click the product box and get the newly crafted item.

Features

  • The creator can edit the recipes to their own desires.
  • Able to set up multiple stores showing different names. (For example, Blacksmithing, Alchemy, Woodwork)
  • Only allow certain recipes to be crafted at different stores.
  • Gives players something else to do with old equipment rather than just selling it off.

Screenshots





Instructions

Paste the script above main but below materials.
I think everything is explained inside the script.
(Just say if something isn't too clear and I'll try help and edit the script if needed ^_^ )

Script


Please obtain the script from inside the demo.

Credit


  • SeMcDun

Thanks

  • Minecraft - for the grid idea

Support


If there are any bugs, feel free to post here and I'll try fix it as soon as possible.

Known Compatibility Issues

I don't think I've tampered with anything so there shouldn't be any compatibility issues.
If there is, just post and I'll see what the problem is.

Demo


See attached.

Restrictions

Only for use in non-commercial games.
« Last Edit: September 12, 2011, 05:37:19 AM by SeMcDun »

**
Rep: +0/-0Level 75
RMRK Junior
I like it, I do. However, is there a way you could set it up to have more boxes AND the position of the item matter, like in minecraft?

EDIT: Just saw that that is in the planned version. Cool. Maybe make the placement of the boxes editable in the script, so that way, for example, someone could have different amounts and placements based on level/shop. They go to a dirt merchant and he has 3 boxes, shaped like an L, but the very nice shop passed the tracks has 9, shaped like a square...next door is a place with 8, 2 wide and 4 deep...you get what I mean?
« Last Edit: September 08, 2011, 08:57:31 PM by SirCumferance »

**
Rep:
Level 83
プログラマです
I think I get what you mean. Well I'm planning on creating two updates to this script but they will only be 2x2 and 3x3 grids and specific placements of items. I would like to make a script that would be more like Minecraft, so you can make a torch in a 3x3 grid but it can be anywhere as long as the coal was above the stick. I'm still quite new to scripting :) so maybe when I get better I'll try to tackle a new script, more like what you described.

Glad you like it so far :)

**
Rep: +0/-0Level 75
RMRK Junior
Oh yes, I am surprised it hasnt been done before, with the popularity of minecraft. Keep up the good work.

**
Rep: +0/-0Level 69
RMRK Junior
Great Script, I will use this for my cooking and alchemy systems :D Can't wait for the Updates :D

Great Work,
-Crimexx
Current Projects :

Light's Darkest War


**
Rep:
Level 83
プログラマです
Updated to v2.0

If you want one item to be crafted in multiple places (again I'll use Minecraft as an example - sorry if you haven't played this) you just need to declare the recipe several times for each place in the grid it can be.

For example a torch, Coal above a Stick. You would declare it as Coal top left, Stick bottom left, nil for top right, nil for bottom right. THEN AGAIN as nil top left, nil bottom left, Coal top right, Stick bottom right.

Thanks for the positive feedback too :)

**
Rep: +0/-0Level 69
RMRK Junior
Awesome update, once 3x3 is achieved I will probably switch my smithing from KGC_ComposeItem to this script. Keep up the great work.

EDIT: Now can i make it so a item in a recipe is not used. Like say I wanted to have a chopping board and it uses a knife to chop up the ingredients. Can the knife be left in the Crafting box to retrieve when I'm done chopping up items?

-Crimexx
« Last Edit: September 11, 2011, 03:33:52 AM by crimexxstudios »
Current Projects :

Light's Darkest War


****
Rep:
Level 69
With a script, couldn't you set something with the window coord. and if this item is this x and y away from the other it recognizes the combo instead of doing like a 'every possible imprint' scenario?

**
Rep:
Level 83
プログラマです
@crimexxstudios;
I could use an array which holds items that are NOT used up during crafting.
That way you could put the knife into the array, the script will check "is that item in the array?" then if it is, don't set that box to nil. So the item will still be in the grid when you've created the product.

But this way, every time that item is used it will remain in the grid.

Second method, I could create another index in each recipe for every item saying "Is_Used?" That way an item can be used up in one recipe, but remain in another.

I think I prefer the first method... but I'll check out both. Which would you guys prefer?

@Scalinger2;
Yeh I guess you could, but I see the way I've done it as the easiest for implementing checks heh. I guess if I was to do any grid bigger than 3x3 your way would be the more efficient way to do it.

**
Rep: +0/-0Level 69
RMRK Junior
Half of what you just said blew over my head... :d haha I need to start studying scripting (any suggestions on where to start). If you get the chance,  could you add the solution (if you find one) to the demo so I can visually see what you are talking about. Im not trying to be lazy, I just simply don't understand.

Thanks for the quick replies and all of your support on scripts,
-Crimexx
« Last Edit: September 11, 2011, 06:22:43 AM by crimexxstudios »
Current Projects :

Light's Darkest War


***
Rep:
Level 74
I'm baaack!
This reminds me of Minecraft :D it's one of things I liked about that game! I'm using this script in my game

EDIT: Tested and it's awesome ^.^ Just noticed it was based off of Minecraft, which means you made it good (b'-')b

EDIT: Can Version 3 have a 3X2 grid? I tried to make that and failed :(
« Last Edit: September 11, 2011, 08:24:42 PM by Infinate X »

*
Rep: +0/-0Level 65
RMRK Junior
Nice script! I also plan to use this for a upcoming fangame of mine :)

btw, just wanted to ask you if you saw this video yet:

http://www.youtube.com/watch?v=Hn0GUK2Cq2E


I think someone already created the 3x3 system, but i'm thinking he hasn't made it public.

**
Rep:
Level 83
プログラマです
Woah, that script's really nice :) He's went all out and made the inventory and stuff too.

Update: The 3x3 grid is done, but I am wanting to implement recipe costs before I make another demo and release v3.0
Also, there is the option to have retaining items, weapons or armours that do not get used up during the crafting process.

I'll do some more work on it tonight and try get 3.0 out soon.

***
Rep:
Level 74
I'm baaack!
Cool :D

What if you made an equation that shrunk the script and made it more useful by making it so you can pick the number of rows and columns? I think that would be AWESOME!!!

Is it also possible to have features you can turn on and off, such as recipe costs?

*
Rep: +0/-0Level 65
RMRK Junior
Can't wait bro, keep up the good work!

***
Rep:
Level 74
I'm baaack!
IDEA!!! An option where some recipes don't need any form of shape :D

**
Rep:
Level 83
プログラマです
Hi again.

@Infinate X :
   I'm not sure that's the way I want to take this script. Feels like it defies the point of it.

I've had a lot of stuff to do recently and haven't been able to concentrate on scripting.
I plan on overhauling what I have atm and splitting each grid into a separate script, allowing people to have whichever grids they want in their game.

Hopefully get some time to finish v3.0 soon with recipe costs and retaining items.

**
Rep: +0/-0Level 69
RMRK Junior
Take you Time :D Thanks for all the hard work. Can't wait for v3


-Crimexx
Current Projects :

Light's Darkest War


**
Rep:
Level 79
This is a lovely script, it's fun and adorable but I was wondering would there be a way to limit which items are usable at which shop? For example something like a notetag designation for items to only show up in Blacksmith, only in Alchemy, or only in Woodworking; instead of having all items listed in each shop? Or through whatever technique is best, I don't really know this kind of stuff. ^^;
.: Current Project :.

***
Rep:
Level 74
I'm baaack!
This is a lovely script, it's fun and adorable but I was wondering would there be a way to limit which items are usable at which shop? For example something like a notetag designation for items to only show up in Blacksmith, only in Alchemy, or only in Woodworking; instead of having all items listed in each shop? Or through whatever technique is best, I don't really know this kind of stuff. ^^;

TThere is a way off doing that. He used that feature in his demo.

**
Rep:
Level 83
プログラマです
Right now there isn't actually a way of stopping an item from appearing in the item window. I basically copied the method of printing items from the item menu, so it just spits out every item you have.

I'll try come up with a few ways to do what you suggested, Kyriaki, as it sounds like a pretty neat feature :)

*
Rep: +0/-0Level 64
RMRK Junior
Okay, here's what I have to make my item.
Code: [Select]
$Grid_Crafting_1x2[0] = [6,0,1,14,0,8,0]
And then when I put the correct items into the right places on the grid. Nothing pops up in the result box. What did i do wrong?

*
Rep: +0/-0Level 64
RMRK Junior
Nevermind, I wasn't including the right index into the proper inventory...

*
Rep: +0/-0Level 71
RMRK Junior
Some time ago I made a script very similar to this, having in mind the system in Minecraft.
Mine, in the other hand, had possibility to infinite x infinite(not recommended over 7 tho) grid sizes, but the GUI was uglier.
I only posted it in a Brazilian community, so I'm gonna post it here too, thanks for the idea!

**
Rep: +0/-0Level 69
RMRK Junior
Please Update :D I need 3x3 Crafting.

-Crimexx
Current Projects :

Light's Darkest War