Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> Consumed item swapping script(let), it simply implies what zelda has. use a potion and get an....
ASCIIgod
post Mar 16 2010, 02:31 AM
Post #1


Demonic God of Snippets of Doom +10
Group Icon

Group: Revolutionary
Posts: 271
Type: Scripter
RM Skill: Intermediate




Description 1: simply implies what zelda has. use a potion and get an empty bottle
Decription 2: this script(let) helps you make item that changes or perhaps i could say, swapped upon being consumed. this eliminates the tedious work on the old fashioned common event swaps.

credits: me and only me ASCIIgod

[Show/Hide] the script for VX
CODE
################################################################
#
###############
# #
# #
# ASCIIgod's consumed item swapping script(let) #
# Ver.0.1 #
################################################################################
# #
# this script(let) allows you to have an item that swaps or pherhaps i should #
# say, changes upon consming. This script(let) has a little equallity to the #
# system the zelda games uses. like for example, link got a bottle that has #
# nothing in it. so we buy a potion or pherhaps caught a fairy. instead of #
# using the tradfitional and tedios 'common event' i cam up a solution. #
# so instead of the item disappearing it will rather evolve to a new one. like #
# drinking a bottle of potion, instead of throwing away the bottle the heroes #
# can recycle it to reduce waste but thats out of the scripts capabilities ^V^ #
################################################################################
# #
# note that i did it under a default clean project so it might not compatible #
# with scripts that changes the scene_item itself like the grid inventory from #
# modern algebra or the tem weight script(which i dont know the name of the #
# author).... so im going to make the compatible soon.... also note that the #
# substitution process take place AFTER the item is consumed(in and out) #
# of battle. so you must check your inventory again to see what item changes #
################################################################################
# #
# instruction: just jam all the item ids in the has under the module of the one#
# you want to have a substitutional item. then next to the => command is the #
# item that will substitute after the item is consumed.... thats just easy.... #
################################################################################
# #
# final note: i tested it nad it works but. the second time you're gonna get #
# subtitution item you may notice it does count well the fix for that is simply#
# get out of the item screen and return. the addition will now be applied. i'll#
# fix it sometime. sorry. #
################################################################################
module ASCII
module ITEM_SWAP

#put the item id you want to have a subtitute upon consuming

ITEM_SWAPPING =
{
# item_id => swap_id
1 => 2,
3 => 2,
}

end
end

# be warned that editing below here needs a lv20+ scripter to survive or else,
# you may suffer from under level sickness and easily be pawned by the lvl50 programming
# porings and lose all your HP in one try ^v^..... you've been warned.

class Game_Party < Game_Unit

def consume_item(item)
if item.is_a?(RPG::Item) and item.consumable
lose_item(item, 1)
swap = ASCII::ITEM_SWAP::ITEM_SWAPPING[item.id]
gain_item($data_items[swap], 1)
end
end

end



[Show/Hide] the script for XP
CODE
#################################################################
###############
# #
# #
# ASCIIgod's consumed item swapping script(let) #
# Ver.0.1 XP ver #
################################################################################
# #
# this script(let) allows you to have an item that swaps or pherhaps i should #
# say, changes upon consming. This script(let) has a little equallity to the #
# system the zelda games uses. like for example, link got a bottle that has #
# nothing in it. so we buy a potion or pherhaps caught a fairy. instead of #
# using the tradfitional and tedios 'common event' i cam up a solution. #
# so instead of the item disappearing it will rather evolve to a new one. like #
# drinking a bottle of potion, instead of throwing away the bottle the heroes #
# can recycle it to reduce waste but thats out of the scripts capabilities ^V^ #
################################################################################
# #
# note that i did it under a default clean project so it might not compatible #
# with scripts that changes the scene_item itself like the grid inventory from #
# modern algebra or the tem weight script(which i dont know the name of the #
# author).... so im going to make the compatible soon.... also note that the #
# substitution process take place AFTER the item is consumed(in and out) #
# of battle. so you must check your inventory again to see what item changes #
################################################################################
# #
# instruction: just jam all the item ids in the has under the module of the one#
# you want to have a substitutional item. then next to the => command is the #
# item that will substitute after the item is consumed.... thats just easy.... #
################################################################################
module ASCII
module ITEM_SWAP
#put the item id you want to have a subtitute upon consuming
SWAP_ITEM =
{

1 => 2,

}

end
end
# be warned that editing below here needs a lv20+ scripter to survive or else,
# you may suffer from under level sickness and easily be pawned by the lvl50 programming
# porings and lose all your HP in one try ^v^..... you've been warned.
class Game_Party
def lose_item(item_id, n)
# Reverse the numerical value and call it gain_item
swap = ASCII::ITEM_SWAP::SWAP_ITEM[item_id]
gain_item(item_id, -n)
gain_item(swap, +1)
end



end


This post has been edited by ASCIIgod: Mar 17 2010, 07:29 AM


__________________________

Go to the top of the page
 
+Quote Post
   
 
Start new topic
Replies (1 - 12)
narwhals1
post Mar 16 2010, 04:46 AM
Post #2


Level 4
Group Icon

Group: Member
Posts: 47
Type: Writer
RM Skill: Skilled




Wow, very nice script! No issues whatsoever, and it would really help out some Action RPGs on RRR! smile.gif

However, can't you do this with a common event? I'm aware that this is easier to do, nonetheless, but can't you do it with a Common Event, and if so, is the inconvenience of constant Common Events what sparked the idea of this script?

Very nice script, though. Very neat and straightforward. Very nice, indeed!

This post has been edited by narwhals1: Mar 16 2010, 04:47 AM


__________________________
CURRENT PROJECT:

DESORIAN CHRONICLES: DOMINANCE (Guaranteed sequel in the series, if you all like it!)
click here!

Scripts: 100%
Story: 100%
database: 90%
Events/Maps: 55%
sprites: 100%

OVERALL: 89% complete

RELEASE: ???

________________________________________________________________________________

Extra Stuff...




Tee-Hee. :3



Go to the top of the page
 
+Quote Post
   
ASCIIgod
post Mar 16 2010, 06:17 AM
Post #3


Demonic God of Snippets of Doom +10
Group Icon

Group: Revolutionary
Posts: 271
Type: Scripter
RM Skill: Intermediate




QUOTE (narwhals1 @ Mar 16 2010, 08:46 PM) *
Wow, very nice script! No issues whatsoever, and it would really help out some Action RPGs on RRR! smile.gif

However, can't you do this with a common event? I'm aware that this is easier to do, nonetheless, but can't you do it with a Common Event, and if so, is the inconvenience of constant Common Events what sparked the idea of this script?

Very nice script, though. Very neat and straightforward. Very nice, indeed!


well thats the whole idea of the script itself. to eliminate the use of common event. its pretty hard to do it on an item. did you forget that an item that has a common event in it will exit the window to map... so using my script it mimics the same effect as common event but without the window exiting... but thanks for your good comment anyway. its actually my very first script. or rather scriptlet ^v^

This post has been edited by ASCIIgod: Oct 31 2012, 12:10 AM


__________________________

Go to the top of the page
 
+Quote Post
   
Fixxxer4153
post Mar 16 2010, 08:43 AM
Post #4


Level 10
Group Icon

Group: Revolutionary
Posts: 155
Type: Developer
RM Skill: Beginner




Would it be possible to do one for RMXP? I was just talking to my friend about that idea... Using a potion, and keeping the empty bottle, so you can fill it up again later.


__________________________
"Then it comes to be that the soothing light at the end of your tunnel... is just a freight train comin' your way..."


Which Final Fantasy Character Are You?
Final Fantasy 7
Go to the top of the page
 
+Quote Post
   
ASCIIgod
post Mar 17 2010, 02:35 AM
Post #5


Demonic God of Snippets of Doom +10
Group Icon

Group: Revolutionary
Posts: 271
Type: Scripter
RM Skill: Intermediate




QUOTE (Fixxxer4153 @ Mar 17 2010, 12:43 AM) *
Would it be possible to do one for RMXP? I was just talking to my friend about that idea... Using a potion, and keeping the empty bottle, so you can fill it up again later.


if only i can finally get a grip on the XP scripts then yes i'll make a port.... but for now try it at least in VX.... aint it cool eh... 'cuz you want a port ^v^


__________________________

Go to the top of the page
 
+Quote Post
   
The Frontera
post Mar 17 2010, 05:47 AM
Post #6


Level 2
Group Icon

Group: Member
Posts: 22
Type: Developer
RM Skill: Advanced




Wow ! This script is really useful ! laugh.gif

I will use it in my new game !

Well done, ASCIIgod ! happy.gif


__________________________
Visit my official website for resources, games, and informations.
Download for free my (great) videogames and resources.
Link:
http://thefrontera.knossus.net

Watch also my great videos on YouTube !
Link:
http://www.youtube.com/user/AdamCorporation

The VX Project I'm working on: (Click to see the Description)


My Completed VX Games: (Click to Download)


My Completed XP Games: (Click to Download)




Go to the top of the page
 
+Quote Post
   
ASCIIgod
post Mar 17 2010, 07:31 AM
Post #7


Demonic God of Snippets of Doom +10
Group Icon

Group: Revolutionary
Posts: 271
Type: Scripter
RM Skill: Intermediate




QUOTE (Fixxxer4153 @ Mar 17 2010, 12:43 AM) *
Would it be possible to do one for RMXP? I was just talking to my friend about that idea... Using a potion, and keeping the empty bottle, so you can fill it up again later.


hey mr.spuddmuncher the port is done. take it on the XP version. no other stuff needed. its more cooler to use it in xp though because the bug(you cant see the additional one swapped item after the first one. the one with VX.) is all gone.

This post has been edited by ASCIIgod: Mar 17 2010, 07:31 AM


__________________________

Go to the top of the page
 
+Quote Post
   
narwhals1
post Mar 17 2010, 07:57 AM
Post #8


Level 4
Group Icon

Group: Member
Posts: 47
Type: Writer
RM Skill: Skilled




QUOTE (ASCIIgod @ Mar 16 2010, 11:17 AM) *
QUOTE (narwhals1 @ Mar 16 2010, 08:46 PM) *
Wow, very nice script! No issues whatsoever, and it would really help out some Action RPGs on RRR! smile.gif

However, can't you do this with a common event? I'm aware that this is easier to do, nonetheless, but can't you do it with a Common Event, and if so, is the inconvenience of constant Common Events what sparked the idea of this script?

Very nice script, though. Very neat and straightforward. Very nice, indeed!


well thats the whole i dea of the script itself. to emiminate the use of common event. its pretty hard to do it on an item. did you forget that an item that has a common event in it will exit the window to map... so using my script it mimics the same effect as common event but without the window exiting... but thanks for your goo comment anyway. its actually my very first script. or rather scriptlet ^v^


Yeah, I guess it's only common sense that the inconvenience would trigger inspiration, huh?

I must compliment your work again. The ability to make the whole program better than it already is with scriptlets is far more impressive than some SUPR AWSUM PWNAGE Battle system, in my eyes. tongue.gif


__________________________
CURRENT PROJECT:

DESORIAN CHRONICLES: DOMINANCE (Guaranteed sequel in the series, if you all like it!)
click here!

Scripts: 100%
Story: 100%
database: 90%
Events/Maps: 55%
sprites: 100%

OVERALL: 89% complete

RELEASE: ???

________________________________________________________________________________

Extra Stuff...




Tee-Hee. :3



Go to the top of the page
 
+Quote Post
   
ASCIIgod
post Mar 17 2010, 08:05 AM
Post #9


Demonic God of Snippets of Doom +10
Group Icon

Group: Revolutionary
Posts: 271
Type: Scripter
RM Skill: Intermediate




QUOTE (narwhals1 @ Mar 17 2010, 11:57 PM) *
QUOTE (ASCIIgod @ Mar 16 2010, 11:17 AM) *
QUOTE (narwhals1 @ Mar 16 2010, 08:46 PM) *
Wow, very nice script! No issues whatsoever, and it would really help out some Action RPGs on RRR! smile.gif

However, can't you do this with a common event? I'm aware that this is easier to do, nonetheless, but can't you do it with a Common Event, and if so, is the inconvenience of constant Common Events what sparked the idea of this script?

Very nice script, though. Very neat and straightforward. Very nice, indeed!


well thats the whole i dea of the script itself. to emiminate the use of common event. its pretty hard to do it on an item. did you forget that an item that has a common event in it will exit the window to map... so using my script it mimics the same effect as common event but without the window exiting... but thanks for your goo comment anyway. its actually my very first script. or rather scriptlet ^v^


Yeah, I guess it's only common sense that the inconvenience would trigger inspiration, huh?

I must compliment your work again. The ability to make the whole program better than it already is with scriptlets is far more impressive than some SUPR AWSUM PWNAGE Battle system, in my eyes. tongue.gif


why thank you. and did ya see the new XP port? its via request. you should try it out too.


__________________________

Go to the top of the page
 
+Quote Post
   
kyle?
post Mar 19 2010, 11:40 PM
Post #10


Level 8
Group Icon

Group: Revolutionary
Posts: 113
Type: Event Designer
RM Skill: Skilled




This could be good for Zelda fan games
or even just drinking things in random games!


__________________________

Go to the top of the page
 
+Quote Post
   
DarkSarul
post Jun 28 2010, 11:21 AM
Post #11


Level 1
Group Icon

Group: Member
Posts: 14
Type: None
RM Skill: Undisclosed




i feel dumb... can you make a demo pls?


__________________________
<p align="center" style="font-family: arial;"><a href="http://www.wizards.com/magic/playmagic/whatcolorareyou.asp" target="_blank"><img src="http://www.wizards.com/magic/images/whatcolor_isblue.jpg" border="0"><br/><b>Take the Magic: The Gathering 'What Color Are You?' Quiz.</b></a></p>
Go to the top of the page
 
+Quote Post
   
ASCIIgod
post Jun 29 2010, 03:27 AM
Post #12


Demonic God of Snippets of Doom +10
Group Icon

Group: Revolutionary
Posts: 271
Type: Scripter
RM Skill: Intermediate




QUOTE (DarkSarul @ Jun 29 2010, 03:21 AM) *
i feel dumb... can you make a demo pls?


the script's functions isnt that hard... so not even a demo will not help if you wont understand the code itself. beside i added a few comments on how to use it but to make sure it sinked to your tinsy winsy little brain here how to use it...

on the customization section there is only one array type variable there or should i say hash type variable...

to make an item that changes upon consuming follow this:

Item ID => Swap ID

where Item ID is the item that has a swapping function and Swap Id is the item that will swap the consumed item...

that how easy it is also im not sorry for the insult. beside as i said earlier the script is super easy to use


__________________________

Go to the top of the page
 
+Quote Post
   
hainkiwanki
post Dec 30 2011, 02:19 AM
Post #13


Level 5
Group Icon

Group: Member
Posts: 69
Type: Event Designer
RM Skill: Beginner




It is a ok scipt, good job ^^


__________________________
Signature


Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th May 2013 - 01:44 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker