Disableling items in caves...

Status
Not open for further replies.

Firewolf31

Villager
Member
Joined
May 17, 2014
Messages
6
Reaction score
0
First Language
English
Primarily Uses
what i am trying to do is have sleeping bags and tents in my inventory that i can use as items but i want them to be unusable when in a cave or dungeon... i want to only be able to use it on the world map

i have searched the web for a little over half hour and havent found anything of the sort...

how would i do that i was able to sorta do it in such a way that it still consumes the item but does not activate the effects...

i was thinking something like the item is grayed out when in a cave and when you click on it, it makes like a ding stating that it cannot be done and wont consume the item and nothing will happen

and then when on the world map the item would be white again and be usable and when used will sleep and save the game

thanks for the help
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
If you want the item greyed out at specific maps, you'll need a script - such a function does not exist in default.


However, from the names "tent" and "sleeping bag" I assume that the items work with common events to set up special functions, is that correct?


Because then you can make a condition in the common event for it to be only processed if outside, and replacing the "used up" item when it was started inside the wrong map. Just have the condition check a general switch "tent usable", and place commands for that switch at the transfer events going inside or outside.
 

Firewolf31

Villager
Member
Joined
May 17, 2014
Messages
6
Reaction score
0
First Language
English
Primarily Uses
yes i have common events setup and i though of that  readding the item that was consumed if not on the overworld

but i was hoping to have it so when not on the overworld the use of the item  would be denied.

but if i cannot do that without a script guess i should be looking for that
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
look for a tag manager script or a conditional script, those usually can handle similiar things by notetags.
 

monkeyintartan

TartanMonkey
Veteran
Joined
Nov 13, 2013
Messages
195
Reaction score
122
First Language
english
Primarily Uses
Can you not set it up in the common even to first store the map id in a variable, then in conditional branch set it so that the idem will only be usable if the map Id is non of the ones you want the item to be used on.

and check the item to not consumed, but if the conditional branch is met then remove the item at the end.

If more than one item does the same thing just store the items id in a variable aswell and check what the idem id is before removing the item used??
 

Firewolf31

Villager
Member
Joined
May 17, 2014
Messages
6
Reaction score
0
First Language
English
Primarily Uses
look for a tag manager script or a conditional script, those usually can handle similiar things by notetags.
i have found a tag manager script online but i dont understand how to use it :(

Can you not set it up in the common even to first store the map id in a variable, then in conditional branch set it so that the idem will only be usable if the map Id is non of the ones you want the item to be used on.

and check the item to not consumed, but if the conditional branch is met then remove the item at the end.

If more than one item does the same thing just store the items id in a variable aswell and check what the idem id is before removing the item used??
as far as i can see you can only change the consume bit in the database of the item so its one or the other 
 

monkeyintartan

TartanMonkey
Veteran
Joined
Nov 13, 2013
Messages
195
Reaction score
122
First Language
english
Primarily Uses
I mean to make the item uncomsumable but remove it later on so it appears as if it is

ie

http://i1256.photobucket.com/albums/jj501/Monkeyintartan/CommonEvent_zps6a33214e.png

the picture shows that the common event for your tent should first store the map id in a variable, Then store the item Tent or whatever in a variable as shown, then the fist conditional branch will check what the map Id is, so you set it so only ids of maps that are not in caves will get you to the next conditional branch, which will check if the number in the item id variable is above 1, Then play out any animations or whatever to show the party has slept and been healed then simple remove the tent, or if multiple items do it set the same thing up for each item in different common events.

Does that make sense??  
 
Last edited by a moderator:

Firewolf31

Villager
Member
Joined
May 17, 2014
Messages
6
Reaction score
0
First Language
English
Primarily Uses
i guess then if i only want the tent and the sleeping bags to be usable in the world map i would only need to specify the world map id but item id i dont understand  cause as i understand and im just saying this before i even attemtp to put it in the code but if you have a tent in your inventory it will show up wether your in a forest/cave or on the overworld. im going to play with this and see what i can do
 
Last edited by a moderator:

monkeyintartan

TartanMonkey
Veteran
Joined
Nov 13, 2013
Messages
195
Reaction score
122
First Language
english
Primarily Uses
Im not explaining very well it would look something  like this

Common Event

@>Control Variables:[001 Map ID] = Map ID

@>Conditional Branch: Variable [001 Map ID] = = ( you word map id)

        @>Conditional Branch: [Tent] in inventory

                  @>Recover All : Entire Party

                  @Change Item[ Tent] - 1

             : Branch End

: Else

@> Text_,_,Normal,Bottom

: Sorry you can not camp here

This will first check what map your on, then that they have a tent in the inventory heal then remove the tent. you would do the same for a sleeping bag though I am not sure how to designate which character is using the item in a conditional branch so not sure on that.
 

Firewolf31

Villager
Member
Joined
May 17, 2014
Messages
6
Reaction score
0
First Language
English
Primarily Uses
this is pretty much the same as what i had i just had a switch that i turned on and off evertime i entered/exited a specific area but your way is much simpler i am atm coding it in i will see how it works  only thing im a big hazy on  should leave the item consumable at this point or take that to consume no ?

well i think that worked  i put consume no on the items and added the common events and so far on the world map i can use the tent and cannot use it in my town or forest so i believe its working

no if i wanted to add just a spot in the forest that when i was in that area it would allow me to use them  kinda like say if i had a save point in the forest in the shape of a hexagram and when i was on that hexagram i was able to use the tent otherwise if i wasent on the hexagram then i couldnt use it  

how hard would that be to implement
 
Last edited by a moderator:

monkeyintartan

TartanMonkey
Veteran
Joined
Nov 13, 2013
Messages
195
Reaction score
122
First Language
english
Primarily Uses
Yeh we an do this quite easily :

ok at the start of your common event u need to get information for 3 different variables

first you need to store the players x and y map locations in separate variables:

Control variables: operand - game data -  characters map x and another for y

then what you need to do is use the Get Location Info command on the 3rd page. Here you can store the information of Region Id in to a variable Using other variables

so what you do is store the Region id in a 3rd variable using the players map x and map y variables you have just made.

so:

 Command Variable[003:players map x] =  players map x

Command Variable[004:players map y]= players map y

Get location info:[005],Region Id, Variable[003][004]

Then all you have to do now is where the original conditional branch checking the map ID says Else instead of a message saying you cannot camp here, place a conditional branch that has the region ID set to a specific region, Say 30. this will then check the number in the variable you have stored the region id in is 30, which will be decided via the players map location.

then a conditional branch to check that a sleeping bag is in the inventory, then simply place you heal commands and remove sleeping bag

IN the else section of that conditional branch place your message that you cannot camp her.

What this will do essentialy will check that

1. if the player is  on your world map, if so they will use a tent to heal.

2. if the player is not on the world map and not in the designated region(say 30 or whatever you choose) then they will get the you cannot use that item in this location message.

3. if the player is not on the world map but in the correct region they will camp using a sleeping bad and heal.

this presumes that on the world map you must use a tent and when not you must use a sleeping bag.

if iv not explained this well enough or you need more help just let me know
 

Firewolf31

Villager
Member
Joined
May 17, 2014
Messages
6
Reaction score
0
First Language
English
Primarily Uses
lol i somewhat understand and no i am allowing the use of a sleeping bag and tent on the world map. my friend which is building this game with me is anal about it and absolutely wants me to make a spot in the dungeons where you can use the tent and sleeping bag and make the sleeping bah heal less then the tent does. in my opinion a save point in the dungeons was good enough:D  anyway as i understand of what you said i have to add a region in the spot i want to allow the use of the tent and add a conditional branch in the else part of my existing one and make that one check for (if player is in designated region or not and allow the use of those items) i will play with this in a little bit i will report back with what happens if it worked or if i need more help  thanks

edit:

Well it looks like it worked  :D so far thats all i wanted to happen with those items if i think of anything else i will post it

credits to you  thanks very much :D
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,050
Members
137,571
Latest member
grr
Top