sunn-official

Villager
Member
Joined
Oct 26, 2021
Messages
10
Reaction score
4
First Language
English
Primarily Uses
RMMV
so i have a part in my game that you choose an item to put it in trash.So you choose the item and a text will appear says "Trash crumpled paper?" for example.but i don't know how to make the text say the name of the choosen item,how to solve this?
 

Lady_JJ

Veteran
Veteran
Joined
May 6, 2019
Messages
322
Reaction score
202
First Language
English
Primarily Uses
RMMZ
You can use a plugin like one of Yanfly's that allows you to use \item in a textbox or you can simply dedicate a block of variables (a block to keep these variables organized) and then use \v[x] where x is the variable number you stored the item name in.

For instance
Code:
◆Control Variables:#0031 itemName = "crumpled paper"

Then in a text box
Code:
You trash the \v[31].
 

sunn-official

Villager
Member
Joined
Oct 26, 2021
Messages
10
Reaction score
4
First Language
English
Primarily Uses
RMMV
You can use a plugin like one of Yanfly's that allows you to use \item in a textbox or you can simply dedicate a block of variables (a block to keep these variables organized) and then use \v[x] where x is the variable number you stored the item name in.

For instance
Code:
◆Control Variables:#0031 itemName = "crumpled paper"

Then in a text box
Code:
You trash the \v[31].
what's the plugin name?
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,837
Reaction score
1,660
First Language
English
Primarily Uses
RMMV
I'd use a simple script call for efficiency. Do the choose item event command. Then right after it, do Control Variable on a second variable using: $dataItems[$gameVariables.value(X)].name
where X is the ID of the variable you used in the choose item command.

Then you can use the regular \V[n] escape code on that second variable to display the name of the item you chose.
what's the plugin name?
The Message Core. It doesn't directly do what Lady_JJ suggested, that I can see, you'd have to try to nest them and do \ni[\V[X]]
 

sunn-official

Villager
Member
Joined
Oct 26, 2021
Messages
10
Reaction score
4
First Language
English
Primarily Uses
RMMV
this is how my event page looks like,can you pls explain when i add the commands,i'm new to rpg maker so i can't understand easily
I'd use a simple script call for efficiency. Do the choose item event command. Then right after it, do Control Variable on a second variable using: $dataItems[$gameVariables.value(X)].name
where X is the ID of the variable you used in the choose item command.

Then you can use the regular \V[n] escape code on that second variable to display the name of the item you chose.

The Message Core. It doesn't directly do what Lady_JJ suggested, that I can see, you'd have to try to nest them and do \ni[\V[X]]


watagato.PNG
 

Lady_JJ

Veteran
Veteran
Joined
May 6, 2019
Messages
322
Reaction score
202
First Language
English
Primarily Uses
RMMZ
The Message Core. It doesn't directly do what Lady_JJ suggested, that I can see, you'd have to try to nest them and do \ni[\V[X]]
I've been using MZ so I may be wrong, but I think it does. From Yanfly's website

1635276202865.png

@sunn-official Did you assign the text "crumpled drawing" to variable 5 before opening the textbox?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,196
Reaction score
15,545
First Language
English
Primarily Uses
RMMV
this is how my event page looks like,can you pls explain when i add the commands,i'm new to rpg maker so i can't understand easily

You forgot this after the Select Item command:
Do the choose item event command. Then right after it, do Control Variable on a second variable using:
Code:
$dataItems[$gameVariables.value(X)].name
where X is the ID of the variable you used in the choose item command.

So you'll need 2 variables - one for the item id in the Select Item command (let's say that is 5), and one for the item name (let's say that's 6).

Add a new command right after Select Item, and do this:
Code:
Control Variables: 6 (item name) = Script: $dataItems[$gameVariables.value(5)].name

then in your Text command, do \v[6] to show the item name.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,837
Reaction score
1,660
First Language
English
Primarily Uses
RMMV
I've been using MZ so I may be wrong, but I think it does. From Yanfly's website
If you read what I said right after that, I said you'd have to nest escape codes. Whether you use \ii for the name and icon or \ni for just the name (which I gave as an example), they need you to supply the ID of the item (in the picture you pasted, "x").

The OP doesn't have that, he has it stored in a variable. I didn't say you were wrong, just that the syntax would be slightly more complex - I felt it worth giving the warning as he's clearly inexperienced with the software.
 

Latest Threads

Latest Profile Posts

Well, I've got a party tomorrow, and my friends are coming over. I wanted to work a bit on the Fandom Scouts assets so I can be ready when that update arrives... in other news, Pizza Time Horror is getting a second teaser, and it shows Cabaret Helen's last performance before the location closed.
Also who used to be scared of Chuck E as a kid? I was! Now I love him!
The new cards and what they do:

(I am clearly not a youtuber... Haha)
Just for the record you CAN use the "Exclude unused files" successfully to trim a project down seriously even if you're doing calls to various assets via plugins and such. BUT you need to do a full playtest of pretty much every option to ensure you did get every one of those other assets added in. Then I dumped the assets into a fresh copy of the project and yay it was like 400 Meg......
party time.png
If you've played Knight Shift Chapter 1 this image'll mean something to you. If not, that's also fine!

Forum statistics

Threads
117,269
Messages
1,105,993
Members
153,445
Latest member
sweetchi
Top