Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Weapon destroying?

kami

Member

I need a script that works like zelda oot, where if the charecter's wooden sheild is attacked by fire, it burns up and is destroyed. or could i pull this off with a conditional banch?
 
You can create a Common Event for all fire spells. Have this event contain a conditional branch for when the player has a Wooden Shield equipped. If Wooden Shield is equipped, then change the player's equipment and remove the shield from their inventory. Add in a Text line like "Shield was burned away by the flames" (whatever you want).

Now, have any fire spells call the Common Event when cast.
 
Could apply to armor & accessories as well as weapons:
  • Durability (like HP). High values for stronger weapons or armor.
  • Durability damage called through map events as well as in-battle.
  • Durability reduced when successful hit occurs (either way).
  • Element weakness/resistances affect the damage to durability.
  • Turns into broken 'item' for repair or scrap if unable to repair
  • Has to use/create individual weapons somehow (so one Bronze Sword is kept separate from another Bronze Sword... same for armor).

Some of this has been done before (in a Non-SDK format), but what I saw had nothing to do with elemental damages like the fire mentioned earler. I just came up with the broken 'item' thing if you want to see about re-forging the weapon or armor.
 
The problem with durability is that all weapons and armors are the same weapon and armor ($data_weapons[id] or $data_armors[id]). Every bronze sword is the same actual object.

You can only basically do something like probability of breaking. Converting it to another item is doable.
 
Yeah.

The script I mentioned actually pointed that out. It required the end-user to make multiple Bronze Swords, which I thought was... overkill... But if there was an Array of some sort that identified (and limited) multiple copies of a single weapon, and some way to place or insert the copies...

Granted, that would be challenging. But I thought it would make it less 'chance' based and more accurately depict wear and tear.
 
It can be done, but would require extensive work.

Add new objects to the $data_weapons and $data_armors array.

Essientially, that was the main reason for the Virtual Database script. You can duplicate a weapon and add it to the arrays easier. The possiblities are much easier to be maintained.

I might write a simple module that utializes that script, to add and shift items around. But due to the complexity, nothing is guaranteed. Eventually, you would have an extremely large save file holding all that data. Then again, you could delete any non-database item that the party no-longer posses.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top