TyranoBuilder Visual Novel Studio

TyranoBuilder Visual Novel Studio

Zhero 26 Jan, 2017 @ 1:59am
How to making inventory menu and combine item for use it to unlock something?
Hi guys, I have question
1. how to make Inventory menu after get item on map will be place in inventory???
2. how to combine 2 item and change to 1 item to unlock something?
( example , item flash light + combine with item batere then item change to flashlight with the light on it. and it can be use to unlock scene like the dark room.

I've reading about post for inventory and tutorial youtube before, at https://www.youtube.com/watch?v=BPvbEeUDDF0 . but I dont understand.
i know i'm not smart enough for understanding the coding , need explanation for it

please help
Last edited by Zhero; 26 Jan, 2017 @ 2:03am
< >
Showing 1-5 of 5 comments
8oni 26 Jan, 2017 @ 5:42am 
Well yeah, making inventory is actually fairly simple. You just remove items on scene and then you check if the items have been removed then they have to show up on inventory screen that's all.

That's why I first make that video to show how to remove items from scene after you click them using image and touch area because :
1. Using button means extra work for me because I have to put fix="true" for every single image button there that I use as items. So that's why on point 2
2. By using image I can easily remove the image from screen using freeimage and also, by using image I can easily give them a number of layer which is really important later when showing inventory screen. You see, because I ma using return, I can't use change background image. Why? If I use change bg, when I use return the bg will change into one from inventory right? But if I use remove bg before return, the bg will be removed when I close the inventory screen. And I have no intention to make a long function just to check what scene I am so I can change bg to that scene before I use return. No, no way I will do that. Which is why the inventory screen is using image too as the bg.
So that's why, as long as I make the inventory screen bg image on layer higher than any other image items the bg problems is solved.

[eval exp="f.gem=1"] [eval exp="f.loli=1"] [eval exp="f.check=0"] [macro name="gem"] [if exp="f.gem==1"] [image storage="default/Gem.png" layer=1 page=fore visible=true x="41" y="124" ] [locate x=41 y=124] [clickable width=150 height=150 target=*RemoveGem] [else] [endif] [endmacro] [macro name="loli"] [if exp="f.loli==1"] [image storage="default/Lollipop.png" layer=2 page=fore visible=true x="247" y="151" ] [locate x=247 y=151] [clickable width=150 height=150 target=*RemoveLoli] [else] [endif] [endmacro] [if exp="f.check==2"] [jump storage=scene1.ks target=*MoveOn] [else] [gem] [loli] [endif] [eval exp="f.gem=0"] [eval exp="f.check+=1"] [freeimage layer=1 page=fore] [eval exp="f.loli=0"] [eval exp="f.check+=1"] [freeimage layer=2 page=fore]

Ok, so based on the code above from video that you show, basically first I just declared all variable that I used. It's 3 because I have 2 items on scene and I need another one to check if all items have been clicked or not. So if you have say, 100 items on scene that you want user to click before they move on then make it 100+1 variable.
But alternatively, you can just make 100 variable and put some button saying "EXIT THE ROOM" so user didn't have to click all 100 items and can just leave when they feels they have got enough items.
Then I make a macro for the items, since I have gems and lollipop I just name them 'gem' and 'loli' so I can easily remember which one for the items.
And as you can see they are basically the same, if the variable that represent them [loli for lollipop, gem for gem] is 1 then show the image and put the clickable area on top of them that point to label that I call RemoveLoli and RemoveGem.

Then after that I make another check if the variable that show all items have been clicked or not is 2 or not because on the label RemoveLoli and RemoveGem I make so that each click increase the value of the check variable. So again, if you have 100 items then make it

if exp="f.check==100"

And that's all.

Sorry that my video tutorial all have no sounds. I have no microphone and English isn't my first language so I have no confidence anyway speaking English on video tutorial. I have see too many video tutorial that got criticized because well, the user isn't speaking well enough etc so I probably will never make any video tutorial with voice.
8oni 26 Jan, 2017 @ 5:43am 
Ah I forget to add. For the combine items I am working on it right now don't worry :)
Zhero 26 Jan, 2017 @ 10:15am 
visible=true x="247" y="151" ]
[locate x=247 y=151]
[clickable width=150 height=150.

Varia ble x, y, widht and height shoukd i change too based where the item will be place?? And for height & width should i change it? Because idk how to see status for height and widht
Last edited by Zhero; 26 Jan, 2017 @ 10:16am
Zhero 26 Jan, 2017 @ 10:16am 
Thankyour i will waiting your next tutorial
Last edited by Zhero; 26 Jan, 2017 @ 3:27pm
8oni 26 Jan, 2017 @ 7:12pm 
Originally posted by ZekkenSao:
visible=true x="247" y="151" ]
[locate x=247 y=151]
[clickable width=150 height=150.

Varia ble x, y, widht and height shoukd i change too based where the item will be place?? And for height & width should i change it? Because idk how to see status for height and widht

Yes, you have to change x and y according to where your image is.
And I didn't put the height and width because I already set the size before. I like to do that so I know before hand where exactly they will fit on the scene.
You can see where to put the height and width from here : http://tyranobuilder.com/tyranoscript-tags-reference/#image
You only need to change the width and height if you feels they are too small or too big for the scene though so it's up to you :)
< >
Showing 1-5 of 5 comments
Per page: 1530 50

Date Posted: 26 Jan, 2017 @ 1:59am
Posts: 5