View Full Version : Making Weapons
In my game I want the player to be able to make custom weapons. They get different kinds of materials and make weapons based on what they have. I know i could make some thing where it takes certain materials and you trade them and get the wepon they make (like in kingdom hearts where you gave them stones and you got items), but i'd like it to be something where you get materials and make a weapon and not know what you're going to get until you make it. can anyone help me?
Rodak
06-09-2005, 04:27 AM
A simple solution would be to use a variable.
Set it to change to a specific value based on the item placed in your "forge" (put it in the direct effect for the material).
Then set your forge to sort that variable and give a specific weapon based on the current value of the variable.
You can put your Blackmithing mini-game here if you like. A simplified version couild be a succeed or fail game with a weapon given or you have to get more material.
You may need to set the material to only be usable in the "forge room" by using a flag or sorting your map input and only "applying if" you are in the smithery.
Good Luck with it.
Peace
WilliamKirk
06-09-2005, 08:04 PM
It's very much so possible (I was one of the first to make a blacksmithing system (with jewelry though)). The two things you said (knowing what you'll make and not knowing what you'll make) are the same except that you cut-out a few Text: Message commands in the second (the ones where they would say what they'd get). Try this for starters:
Make 2 items called Iron and Wood
Make 2 items called Sword and Hammer
Make an event the player can talk to with this script:
Text: Message: First material to be used?
Input: Multiple Choice: 'Iron' 'Wood' 'Cancel'
Script Branch: Sort: var User Choice
Apply If 1
Data: var Material1 = 1
To End
Apply If 2
Data: var Material1 = 2
To End
Apply If 3
Data: var Material1 = 0
Script: Force Script End
To End
Script Branch: End
Text: Message: Second material to be used?
Input: Multiple Choice: 'Sword' 'Hammer' 'Cancel'
Script Branch: Sort: var User Choice
Apply If 1
Data: var Material2 = 1
To End
Apply If 2
Data: var Material2 = 2
To End
Apply If 3
Data: var Material1 = 0
Data: var Material2 = 0
Script: Force Script End
To End
Script Branch: End
Text: Message: Are you sure about this?
Input: Multiple Choice: 'Yes' 'No'
Script: Condition: var User Choice = 2
Data: var Material1 = 0
Data: var Material2 = 0
Script: Force Script End
Script: Condition: End
Script: Condition: var Material1 = 1
Script: Condition: var Material2 = 1
(give player item for when Iron and Sword are used)
Text: Message: Made 'item for when Iron and Sword are used'
Script: Condition: End
Script: Condition: End
Script: Condition: var Material1 = 2
Script: Condition: var Material2 = 1
(give player item for when Wood and Sword are used)
Text: Message: Made 'item for when Wood and Sword are used'
Script: Condition: End
Script: Condition: End
Script: Condition: var Material1 = 1
Script: Condition: var Material2 = 2
(give player item for when Iron and Hammer are used)
Text: Message: Made 'item for when Iron and Hammer are used'
Script: Condition: End
Script: Condition: End
Script: Condition: var Material1 = 2
Script: Condition: var Material2 = 2
(give player item for when Wood and Hammer are used)
Text: Message: Made 'item for when Wood and Hammer are used'
Script: Condition: End
Script: Condition: End
Basically, the more items you have the more options you have to give to the player and the more conditions you have to enter at the end, and the longer the script and the more memory it costs. This should get you started though.
RPG Learner
06-09-2005, 08:10 PM
Wait. but should'nt there be an event if you don't have either materials for the making of the weapons.
WilliamKirk
06-09-2005, 08:21 PM
Good point, thank you RPG Learner.Use this instead, that other one doesn't track to see if the party has the items for making stuff or not.
Make 2 items called Iron and Wood
Make 2 items called Sword and Hammer
Make an event the player can talk to with this script:
Text: Message: First material to be used?
Input: Multiple Choice: 'Iron' 'Wood' 'Cancel'
Script Branch: Sort: var User Choice
Apply If 1
(check if party has item)
(if so)
Data: var Material1 = 1
To End
Apply If 2
(check if party has item)
(if so)
Data: var Material1 = 2
To End
Apply If 3
(check if party has item)
(if so)
Data: var Material1 = 0
Script: Force Script End
To End
Script Branch: End
Text: Message: Second material to be used?
Input: Multiple Choice: 'Sword' 'Hammer' 'Cancel'
Script Branch: Sort: var User Choice
Apply If 1
(check if party has item)
(if so)
Data: var Material2 = 1
To End
Apply If 2
(check if party has item)
(if so)
Data: var Material2 = 2
To End
Apply If 3
(check if party has item)
(if so)
Data: var Material1 = 0
Data: var Material2 = 0
Script: Force Script End
To End
Script Branch: End
Text: Message: Are you sure about this?
Input: Multiple Choice: 'Yes' 'No'
Script: Condition: var User Choice = 2
Data: var Material1 = 0
Data: var Material2 = 0
Script: Force Script End
Script: Condition: End
Script: Condition: var Material1 = 1
Script: Condition: var Material2 = 1
(give player item for when Iron and Sword are used)
Text: Message: Made 'item for when Iron and Sword are used'
(remove 1 Iron and 1 Sword from party)
Script: Condition: End
Script: Condition: End
Script: Condition: var Material1 = 2
Script: Condition: var Material2 = 1
(give player item for when Wood and Sword are used)
Text: Message: Made 'item for when Wood and Sword are used'
(remove 1 Wood and 1 Sword from party)
Script: Condition: End
Script: Condition: End
Script: Condition: var Material1 = 1
Script: Condition: var Material2 = 2
(give player item for when Iron and Hammer are used)
Text: Message: Made 'item for when Iron and Hammer are used'
(remove 1 Iron and 1 Hammer from party)
Script: Condition: End
Script: Condition: End
Script: Condition: var Material1 = 2
Script: Condition: var Material2 = 2
(give player item for when Wood and Hammer are used)
Text: Message: Made 'item for when Wood and Hammer are used'
(remove 1 Wood and 1 Hammer from party)
Script: Condition: End
Script: Condition: End
Basically, the more items you have the more options you have to give to the player and the more conditions you have to enter at the end, and the longer the script and the more memory it costs. This should get you started though.
Thanks for the help guys. When I get more of my game done i'm going to try putting this in. I 'd do it now but it seems kind of pointless if hafe of the game isn't even done.
RPG Learner
06-10-2005, 11:00 AM
You know this would work even better if a class increased the success rate of succesfully forging an item. like a Blacksmith, or Crafter Job. by gaining job levels equals increased chance on successfully making common items and making new weapons. and if more party members take this class the success rate increases even more up to a maximum percentage. meaning less chances of failure. eventually you can make common items with no difficulty, and very powerful ones with less of a chance of failure.
For example BlackSmith Job Lv 1 Success Rate 10% chance of successful items.
Mastered BlackSmith Job Lvl 8 Success Rate 20% chance of success + 5% chance of making a rare weapon. and a -5% Failure Rate decreasing the chance of botched attempts.
More Party Members Mastering the class it's adds up. depending on how many party members.
Lone Phantom
06-10-2005, 06:46 PM
I am assuming you can also use bronze roght?
Lone Phantom
06-10-2005, 07:29 PM
Now hold on, I kind of messed up this one thing right here,you
said that I need to make a event that I can talk to, so how do I do this, because I think I messed up:
Blacksmith text:Hello, I'm a blacksmith, what do you want me to forge
for you.
Blacksmith menu::Eagel sword
Ifrit sword
Was this thr right thing to do.
WilliamKirk
06-15-2005, 02:38 AM
http://www.pavilionboards.com/forum/showthread.php?t=1618
"Scripts(and Character/Object Models)->Events->Event Placement->World Organization (this results in stuff the player can interact with, example: a townsperson)"
The 'No Application' is a script command under Script>No Application. For an explanation every script command press start in the game when the cursor is on them or look at Blood Knight's script faq here: http://www.gamefaqs.com/console/ps2/game/538013.html . The stuff between the 'No Application' and 'Branch: End' commands occur when the 'Apply If's before it were not met (when there was no application).
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.