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.

Item steal event system!

Item steal event system
By Gando

v1.2 (03-01-2008)


Ok, so what i have done is a event system that allows you to have a character that can steal items from monsters.
I know that there are already a script version of this (probably a better version o.O) but i thought that i would do an alternative version for those who doesnt want to or can't use those scripts.

How to do this:

Start of by opening the Database and Common events. (see picture below)

http://i244.photobucket.com/albums/gg9/ ... ents-2.jpg[/img]

First create a variable (steal) with a random number between 1-100, than make a contodional branch that states that if variable steal is equal to 50 or higher (50-100) you will steal an item, else if variable steal is 49 or lower(1-49) you does not steal. Then create a new variable, call it whatever you want, like, "wich item to steal" with a random number, depending on how many items that will be available to steal. (if there is 2 items available, make a random number betwen 1-2)

Make a new conditional branch, that states that if variable "wich item to steal" is equal to 1 than you get a potion and a text is shown saying "You stole a Potion!"
make another conditional branch under that states that if variable "wich item to steal" is equal to 2 than you get a High potion and a text is shown saying " You stole a High potion!"...

you can keep doing this how many times you want, depending on how many items you want to have available to steal. (remember to change the random number in "wich item to steal" if you want more items!)


When you have done everything in Common events, go to Skills and create a new skill called Steal. write a description, set scope to One enemy and occasion to Only in battle. Change the user and target animation as you please. When you have done all that, change the common event to the event that you created earlier. (see picture below)

http://i244.photobucket.com/albums/gg9/ ... kills-.jpg[/img]

You should also change power to at least 1, or else everytime you use the skill, it will say that you miss, even though you don't.

And now it's done!

Here is a demo for those of you who want to try it out^^

Demo : http://www.box.net/shared/jsg9hh8dco

Increase % chance to steal

If you would want to increase the chance of successfully steling an item, based on if you have a special armor/weapon equipped, this is how you do it.
Go to Database armor/weapon (depending on what item you want to change the %) and create a new accessory. I have choosen to create a glove called Thief's glove, wich increases the chance of stealing an item with 20%. Make the item like the picture below.

http://i244.photobucket.com/albums/gg9/ ... -armor.png[/img]


Then go to Database/Common events/steal (see picture below)

http://i244.photobucket.com/albums/gg9/ ... ove1--.png[/img]


and create a conditional branch saying that if character "theif" (the guy that can steal items) has Theif's glove equipped. Then create another conditional brach inside that conditional branch saying that if variable steal is equal to 40 or above you will successfully steal an item (see picture on how to set it up) and then in the else section of the first conditional branch (if theif has theif's glove equipped) you create another conditional branch saying that if variable steal is equal to 50 or above you will successfully steal an item. (see picture below on how to set it up)

http://i244.photobucket.com/albums/gg9/ ... glove2.png[/img]


And that is how you do if you want to increase the chance of successfully stealing an item. :D

Demo v1.1 (01.01.2008) : http://www.box.net/shared/895bcc7wgo

Decrease % chance to steal an item depending on if special state is inflicted

If you would like to decrease the % chance to successfully steal an item if a special state is inflicted (like the state "clumsy"). then do like this:
Create a variable called steal, and make it random between 1-100, (just like before) and then create a conditional branch saying that if "thief" is inflicted with clumsy. Then make another conditional branch inside that conditional branch saying that if variable steal is equal to 75 or higher you successfully steals an item, else you don't steal an item. (see picture below on how to set it up).

http://i244.photobucket.com/albums/gg9/ ... onstat.png[/img]

When you have done that, in the Else section of "Conditional branch [Thief] is [Clumsy] inflicted" (first conditional branch) insert the same things that's in the section on how to "Increase % chance to steal" ( where i descibes how to create Thief's Glove and how to increase the % chance to steal an item if it's equipped.)

See pictures below:
http://i244.photobucket.com/albums/gg9/ ... dons-1.png[/img]

http://i244.photobucket.com/albums/gg9/ ... dons-2.png[/img]

Then just go to Database/Skills/Steal and change the common event to the same common event that you've just created.
And now it's done! :D


Features and Changelog
v1.0: fully functional steal system.
v1.1: fixed the small bug, added a feature where you can increase the % chance of stealing an item when you have something equipped (thief's glove?)
v1.2: Added a way to decrease your % chance to successfully steal an item depending on if you are infilcted with a special state.

Full version: Fully functional steal system. You can increase your % chance to steal an item with a weapon/armor equipped. If a certain state is inflicted your % chance of stealing an item decreases.

Next version
-Don't know o.O  suggestions please! :D

Screenshots
When you successfully steals an item, a messege pops up telling you what you stole:
http://i244.photobucket.com/albums/gg9/ ... potion.png[/img]

After you have stolen the item, you can use it directly from your inventory:
http://i244.photobucket.com/albums/gg9/ ... entory.png[/img]

If you do not succed to steal an item, a messege pops up telling you "You didn't steal anything":
http://i244.photobucket.com/albums/gg9/ ... ything.png[/img]

Demo v1.2 (03.01.2008) : http://www.box.net/shared/rlcca6i8ss

 
Easy fix to the problem, put the Text: You didn't steal anything in the first else: not the last one.


Tool.


Nice one though
 
shiroun":17al20cs said:
Easy fix to the problem, put the Text: You didn't steal anything in the first else: not the last one.


Tool.


Nice one though

sry, but that will not solve my problem. :P
I figured out what the problem was by myslef, but thanks anyways =)
 
CIPWM74":1ndrndyw said:
You know, asking for over 50 in 100 is EXACTLY the same as asking for over 1 of 2.

yeah, that might be so. but if you make a variable with a random number between 1-100 you can change the % chance of steling an item, instead of 50-100 you can make a conditional branch saying that you will only steal the item if the number is, lets say 80-100 ^^
 
Updated to version 1.1!
Changelog: fixed a small bug and added a feature where you can increase the % chance of stealing an item when you have something equipped.
 
Updated to version 1.2!
Changelog: added a feature where you can decrease the % chance of successfully stealing an item if a special state is inflicted!
 

Nel4t5

Member

Does this script let you steal the same thing everytime? In other words, is it a one time only thing if you manage to steal the item in question, and can you change the item for each different monster?
 
Nel4t5":1iefz2rs said:
Does this script let you steal the same thing everytime? In other words, is it a one time only thing if you manage to steal the item in question, and can you change the item for each different monster?

First of all, this isn't a script, it's an event system :P
And to answer your questions..  If you want, you could set it up so you steal the same item everytime, or you could set it up so you steal an item out of 10 random different items if you like. If you have stolen an item, you can still try to steal another item, if you have stolen an item, you can keep try to steal an item as long as you like, depending on your patience:P 

So to answer your question, No, it's not a one time only thing, but i think it wont be that hard to set it up if you would like it to be that way^^


And for the other question:
Nel4t5":1iefz2rs said:
can you change the item for each different monster?

I guess you could, altough i don't know exactly how to do it, but i can look in to it and try to find out^^
 
Well, to change the items for each troop, here's what you'd do. In the troops page of the Database, set a command to change a variable [troopID] to something, probably the troop's number. Then in the common event use conditional branches to check for the troop ID and go from there.

Alternatively, you could use a switch and have certain boss troops flip a switch[BossTroop], and work from that. The only problem with that is that you'd have to remember to change it back after the battle.
 

Nel4t5

Member

Can you tell me more about this, gratheo? I don't quite follow either method Also, I'd rather change what each monster carries, not the troop as a whole.
 
This is a great event.  Thanks a lot.  However;  Wouldn't it be easier in the basic event, without any increase or decrease, just to make one conditional branch for the [item to steal] variable, and have the else give you the second item on the list?  It might just save a little clutter.  But maybe I'm confused.  Just trying to help.
 
Mikee":2d71zsiw said:
This is a great event.  Thanks a lot.  However;  Wouldn't it be easier in the basic event, without any increase or decrease, just to make one conditional branch for the [item to steal] variable, and have the else give you the second item on the list?  It might just save a little clutter.  But maybe I'm confused.  Just trying to help.

Thanks! glad you like it :smile:^^  yeah, you could do that, but then you could only have 2 different items to steal, if you do it my way you could for example make the "Which item to steal?" variable a random number between 1-5 and then you could make it so that you have 5 different items to steal instead of 2. :wink:
 

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