Post new topic    
Page 1, 2, 3  »
Slime Knight
Send private message
Visual crafting mechanics 
 PostWed Nov 19, 2014 11:27 pm
Send private message Reply with quote
I'm adding a Minecraft style crafting/raw materials element to the game I'm working on. As of right now, the crafting table is just a shop at which the player can exchange certain amounts of raw material for special items.

I got wondering about if there would be any possible way in CUSTOM to add a visual interactive component to this. I know that people have done minigames within their RPGs with the OHR engine. This is, once again, nothing crucial to gameplay, just a thought I was pondering. This would be something I would consider adding down the line if at all.

I did a mock up of what such a system might look like... I was bored. Hurr

Metal King Slime
Send private message
 
 PostThu Nov 20, 2014 3:16 am
Send private message Reply with quote
The short answer is, in slices everything is possible.
Slime Knight
Send private message
 
 PostThu Nov 20, 2014 4:34 am
Send private message Reply with quote
nice! Short answer is good enough for me right now.
Liquid Metal Slime
Send private message
 
 PostThu Nov 20, 2014 6:03 am
Send private message Reply with quote
That mockup alone got me excited. I'd love to see this get put into reality.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
⍠ C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
Slime Knight
Send private message
 
 PostThu Nov 20, 2014 11:09 pm
Send private message Reply with quote
I was doing more brainstorming about this, trying to figure it out in a method I could understand, i.e. making a crafting system with maps, hero swapping, and npcs. I think this would be possible, but would require accounting for lots of variables and npcs.

I got wondering if anyone had ever designed a tic-tac-toe game using the Custom Editor. I guess this crafting mechanic is kind of just a special version of tic-tac-toe.

Anyway... This is still bouncing around inside my head.
Metal King Slime
Send private message
 
 PostThu Nov 20, 2014 11:41 pm
Send private message Reply with quote
Urkelbot666 wrote:
I was doing more brainstorming about this, trying to figure it out in a method I could understand, i.e. making a crafting system with maps, hero swapping, and npcs. I think this would be possible, but would require accounting for lots of variables and npcs.

I got wondering if anyone had ever designed a tic-tac-toe game using the Custom Editor. I guess this crafting mechanic is kind of just a special version of tic-tac-toe.

Anyway... This is still bouncing around inside my head.


Coincidentally, I have worked on a tic-tac-toe game, though I was using Slices and not maps/npcs/heroes etc. The only reason I gave up was because I was tired of copy-pasting all the moves and I was pretty sure I'd screwed something up in the turn order. I bet I could get it finished within 48 hours, if you really wanted to see.
Slime Knight
Send private message
 
 PostFri Nov 21, 2014 12:11 am
Send private message Reply with quote
Haha, that is pretty coincidental! If you think that your tic-tac-toe system could viably be modified, or provide insight into, or ideas for something like I'm trying to figure out, then it would definitely be cool to see it in action. Heck, it would be cool just to see another application for the Custom editor. That said, don't put too much effort into it solely on my account.

Yes, slices and scripting are most likely the best way to go with something like this. I was trying to think of ways to do it with NPCs, doors, tags, and maps simply because those are what I am currently most familiar with. I'm a visually oriented kind of guy, so sometimes scripting things with text confuzzles me.

I am trying to learn more about the capabilities, of the program, and how best to utilize plotscripting, but it will take a while for the concepts to penetrate my think skull. Hurr

Thanks for the reply V
Metal King Slime
Send private message
 
 PostFri Nov 21, 2014 1:45 am
Send private message Reply with quote
The nice thing about scripting with slices is that they can be very visual. The collection editor in custom, and the slice debug menu (I believe Ctrl+F4?) in game give you a wealth of information about the stuff you're working with. That said, it could be possible with NPCs, Heroes and tags and such. It'd just be really weird and clunky. Right now I see an NPC for each space on the grid 1-9, I see an NPC to select what item you're currently adding, and I see tags for "Has item in stock" to determine what stuff you can add. I don't know how you'd figure out whether or not the recipe is valid, and indeed, what it should make without the use of scripting.

I suppose I'll go ahead and try to finish this up, even though I doubt any of it would be very applicable to the problem at hand. Might be fun, though!

EDIT: Wow, this code is worse than I remembered...
Slime Knight
Send private message
 
 PostFri Nov 21, 2014 1:59 am
Send private message Reply with quote
Gizmog wrote:
I don't know how you'd figure out whether or not the recipe is valid, and indeed, what it should make without the use of scripting.


Yes! That was (is?) my main quandary. How to make the game know when something is successfully crafted. The NPC way really is a backwards way of going about it.

I will continue to study the plotscripting dictionary, and try out some of your suggestions for using slices.

Again, thank you for taking some time to post about this. And good luck with your own little project! I hope it prove fun, and enlightening V

If you get any further ideas or thoughts, I would of course love to hear them. And I'll update this thread if I have any breakthroughs
Metal King Slime
Send private message
 
 PostFri Nov 21, 2014 9:08 am
Send private message Reply with quote
You could use a custom shop, I think, to "Trade" ingredients for finished products, but that's obviously not as cool.
Slime Knight
Send private message
 
 PostFri Nov 21, 2014 2:13 pm
Send private message Reply with quote
That's the system I've been using. It gets the job done but, as you mentioned, lacks the coolness factor.
Slime Knight
Send private message
 
 PostFri Nov 21, 2014 9:10 pm
Send private message Reply with quote
I've been diddling around with scripting commands on and off all day. As is most likely apparent by the state of my script, I am a novice with this. The script I've included is but the most recent attempt, as I tried many times before this.

I am trying to make a system in which the hero moves in a 3x3 grid, and pressing a key will create a certain npc at his position. I initially had this using a mouse cursor, and slices, but I wanted a way that could actually create npc's instead of just creating their walkabout graphic with a click.

I am now attempting another approach with little success. If anyone could identify my most egregious scripting errors, and point me in a direction, I'd be ever so grateful.

I've been at this for a while, and I'm only posting about this here because I'm pretty sure I'm beyond my depth. Confused

Anyway, thanks

Code:

plotscript, crafter, begin

set hero picture (0,98,outside battle)
set hero palette (0,0,outside battle)

variable (key:1, key:2, key:3)
variable (npid:0, npid:1, npid:2)

wait for scancode(key:1) 
    if(key is pressed(key:1)) then(create npc (npid:0, hero x, hero y))

wait for scancode(key:2)
    if(key is pressed(key:2)) then(create npc (npid:1, hero x, hero y))

wait for scancode(key:3)
    if(key is pressed(key:3)) then(create npc (npid:2, hero x, hero y))
end
Liquid Metal Slime
Send private message
 
 PostFri Nov 21, 2014 10:50 pm
Send private message Reply with quote
If you don't mind me asking, what is the script error you're running in to?

Also I noticed you declared these variables:
Code:
variable (key:1, key:2, key:3)


I'm pretty sure you don't have to do that as far as I'm aware.

Another problem you may be having is you may have forgotten to include this at the very top of your script:
Code:
include, plotscr.hsd
include, scancode.hsi
include, game.hsi


I know I often forget to include: "include, scancode.hsi" because it's only used for checking if keys are pressed.

If your problem is something else though please explain.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
⍠ C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
Slime Knight
Send private message
 
 PostFri Nov 21, 2014 11:51 pm
Send private message Reply with quote
crafty.png
aaahhh, I hadn't included scancode.hsi, that's why I was declaring the keys as variables. I guess without scancode it didn't know what I was trying to tell it to do. Hurr

Yeah, the funny thing was that I wasn't getting script errors! Everything appeared as if it ought to have been working, but nothing really was.

As it is now, when I enter the map I'm using for my crafting table, one NPC is automatically created in the center block, which I have to try to get rid of, or prevent from appearing.

Other than that I am able to place one of each NPC on the table, each from their own keypress. I need to trudge through the plotscripting dictionary to see if I can find how to make multiple copies of the same NPC using the same keypress.

Again, this is all assuming that at some point I will be able to make it so that if certain NPCs are in a certain pattern on the table, a new item will become available, a la Minecraft

But thank you so much for that reply! Somehow I was clueless to the fact that I had to include scancode.hsi, I would never had figured that out. So thanks again to you and the other poor souls who have taken pity on me in my quest to add some kind of minecraft ripoff system to this game. Smile
Metal King Slime
Send private message
 
 PostSat Nov 22, 2014 3:36 am
Send private message Reply with quote
Urkelbot666 wrote:

Yeah, the funny thing was that I wasn't getting script errors! Everything appeared as if it ought to have been working, but nothing really was.


That's because you were defining variables for Key:1, Key:2, etc. When you were saying "WaitForScancode (Key:1)", you were saying "WaitforScancode (X)" where X equalled 0, because you hadn't given it a value.

What Scancode.hsi does, is defines those different things to the appropriate scancode. So when you say "WaitForScancode (Key:1)" the script knows that Key:1 is shorthand for "2", the appropriate scancode.

Great start! If I may be so bold, I think your next step should be the command NPCAtSpot.
Display posts from previous:
Page 1, 2, 3  »