Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Crafting/combining items

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
bmp




Joined: 10 Aug 2012
Posts: 4

PostPosted: Sat Aug 11, 2012 10:26 am    Post subject: Crafting/combining items Reply with quote

Hello again, I have another plea for help and advice. Happy

I had plans for a simple crafting system and I'm just not sure where to begin. Hopefully this wont be a case of a beginner being too ambitious!

The player would find glyphs - items - that will teach them spells. For example if the player found the three glyphs "Fire", "Bolt" and "Area" they could combine the glyphs of "Fire" and "Bolt" to get the glyph "FireBolt" as well as learn the spell "Firebolt". They could then combine the "FireBolt" glyph with the "Area" glyph to learn a "Mass Firebolt" spell

So... Unless I'm mistaken I will have to create a new custom menu that runs a script. Which is the problem as I have no idea where to begin... I've learnt how to call up slices and update them, but have no idea how to implement a menu.

Alternatively, is there a way to handle the combinations without a custom menu - combining the items with each other via the default item menu?

Or perhaps it is possible to handle via textboxes and scripts? But then I would have to think of a way to display the items being combined...


So if anyone can offer any pointers or advice on what to look up or where to start I'd be grateful!
Back to top
View user's profile Send private message
Nepenthe




Joined: 27 Sep 2004
Posts: 132

PostPosted: Sat Aug 11, 2012 4:34 pm    Post subject: Reply with quote

I haven't looked at the default shop stuff in a loooong time, but I'm pretty sure you can trade multiple, different items (your glyphs) for a new item (the spell). Anyone care to confirm?
Back to top
View user's profile Send private message Visit poster's website AIM Address
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sat Aug 11, 2012 5:40 pm    Post subject: Reply with quote

Yep, shops are the simplest way to do this. You can specify up to 4 different item types, plus cash, that must be traded in to purchase an item.

But it isn't much work to write a script to do the trade in. Then you can attach the script to a textbox or customisable menu (Edit Menus options in Custom, make a menu option call a script), without having to script a fancy menu.

Code:
plotscript, try to craft FireBolt, begin
  if (inventory(item: Fire glyph) >= 1 && inventory(item: Bolt glyph)) then (
    delete item(item: Fire glyph, 1)
    delete item(item: Bolt glyph, 1)
    get item(item: Firebolt glyph, 1)
    show textbox (1)  # Crafted firebolt
  ) else (
    show textbox (2)  # You don't have the ingredients
  )
end


You can combine customisable menus with scripts to create fancy menus, for example showing additional info or images (slices) depending on which menu item is selected. You might also want to set tags before opening the menu to disable menu items based on conditions like which crafting ingredients you have.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
bmp




Joined: 10 Aug 2012
Posts: 4

PostPosted: Sun Aug 12, 2012 6:48 am    Post subject: Reply with quote

Thanks very much!

I used your script and menu method and it works like a charm!

Here's what I came up with:

Code:

plotscript, FireBolt, begin
   $1="Firebolt"   
    delete item(item: Fire, 1)
    delete item(item: Bolt, 1)
    get item(item: Firebolt, 1)
    show textbox (5)  # Glyph Crafted!
end   


Instead of the conditional I just used tags (activated by the items) on the custom menu screen, so the entry is hidden unless you have the required components. I found out I could use a string so I didn't have to refer to a new textbox for each "You have crafted a ____ glyph!" message.

It is quite simple for the time being, but I might look into improving it later the way you suggested - using more scripts to show some additional information.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group