Pekka wrote:
How do I make custom weapons and armor with special powers?
If you're willing to step me through the whole process, you could show me, for example, a sword that does something funky every time I press Shift-Tab.
Unless Shift-Tab is the
(edit) key to make weapons do things (whoops wrong terminology)(which it is) that's impossible. However, I can show you how to make a sword that does something each time you activate it. (Via clicking on it, same way as you activate accessories like the pocket roach and potions)
Here's what we shall be making today: An origami item that, when activated, turns into the next kind of item.
The way we shall do this is by making several different items, that each give the player the next one then destroy themselves.
First, the standard equipment making process:
Make an NPC. In the script editing screen, hit the Characters button. Make four custom character types called "
Origami Sword"
, "
Origami Shield"
, "
Origami Crane"
, and "
Origami Quest Log"
. Give each a graphic if you want.
Now, select the Sword and hit Edit Default Script. Add the following commands:
Set Var _MyATK = 20
Each Use "
Fold"
Imperative Ghost Display
Wait for player to touch me
Equipment Swap Weapon Origami Sword
Imperative No Ghost Display
Go To "
End"
Label "
Fold"
Label "
End"
This is how you make any custom item. Note that the character type must be present in order for Equipment Swap to work. The Each Use, corresponding label, and jump to end (don't use End, it'll permanently stop the script) don't have to be there for a normal item, but it does if you want it to do something special. You can also try Each Attack on swords and Each Defend on armor.
So now when you step on the sword it'll give you itself, then disappear.
You need something under that Fold label... since we want an item that can turn into each different type of items, you can just put in:
Equipment Swap Armor Origami Shield
Equipment Destroy Weapon
That's all for this script. Open the Shield default script. Unless you want it to be placable in your hold in any form, you don't need to add in most of the script commands from earlier. Just use:
Set Var _MyDEF=20
Each Use "
Fold"
Go To "
End"
Label "
Fold"
Equipment Swap Accessory Origami Crane
Equipment Destroy Armor
Label "
End"
The Accessory is the same, except instead of a stat boost, we want a behavior. Say... Behavior Lucky instead of Set Var _MyDEF or _MyATK, making it give you twice as much gold. Then the next Equipment Swap is a Command.
Finally, we have the Origami Quest Log. This one's special because what it does for you is on the same button as folding it. So what do we do? We use a question!
Use nothing in place of the behavior/stats. Reference the label "
Use"
for each use instead of "
Fold"
.
In between the "
Use"
labels, put the following:
Answer Option "
View Quest Log"
: Go to Quest Log
Answer Option "
Fold"
: Go to Fold
Label "
Quest Log"
[insert speech statements reflecting progress here]
Go to "
End"
Label "
Fold"
[insert fold script to go back to weapon here]
____________________________
Who, me?
FNORD
[Last edited by Sillyman at 09-18-2008 07:40 AM]