TyranoBuilder Visual Novel Studio

TyranoBuilder Visual Novel Studio

Game variable issue
Greetings,

I am having an issue with variables, I have tried many tutorials, including the ones on the website support section, also using copy/paste to be sure the typos are not on my part, but nothing seems to work with what I am trying to do.

What I am trying to do is to set a variable in the variable menu, as a normal game variable ( not system ), lets say "test" with a value of "1", then in the Title_screen, I would create a Jump at the beginning, to Scene2, with a condition that has to be True, if "test = 1" ( A = B ).

This Jump goes to Scene2, instead of Scene1. So far that works.

In Scene2, I would add Text ( just to show something ), then after add a Process Variable, or Script / Tyranoscript ( tryed every way I could ) to add "1" to the "test" value.

By my understanding, now "test = 2", and if I use any way to confirm that it is, in Scene2, it seems to work fine.

I would then add a Jump, still in Scene2, this time back to the Title_screen, where the Jump requires "test" to be equal to "1" to go to Scene2.

Now here is my actual problem:

When doing a New game, If I click the cog, and click "Back to title", it completely ignores the fact that "test = 2", and just Jump to Scene2 again, as if "test = 1" again.

My guess was that game variables ( such as f.test ) would not be able to retain their values if the game session is "forced" to go back to the Title_screen, so I tried system variables instead... but it still doesnt work. I searched online for this specific issue, but found nothing yet.

As you might have guessed, I am trying to play a short scene when the game start, a logo with fade in/out on a background, then go on to the Title_screen to start the game. If the player goes back to the Title_screen after starting a new game or loading a game, I do not want this scene to play again... BUT I want it to play again when the game is launched again, regardless of how the player quit the game (which I understand would not require a system variable).

I've seen a similar question, on this forum, that has been answered and tryed the same approch as mentionned ( I believe it was using system variables, but with A< >B comparator ),
but that still doesn't seem to work.

I used a similar method to try and set fullscreen mode at the beginning of the game, because for some reason if the player goes back to Title_screen, it seems to cancel itself, but using variables to bypass this problem also didn't work, which again makes me wonder about a problem with variables.

This is probably a lack of knowledge or understanding on my part, so any advice would be appreciated.

< >
Showing 16-27 of 27 comments
Shimmersoft Feb 8, 2019 @ 11:54am 
Originally posted by Dirty Janitor:
Thank you Unihorn for this complete back-to-title button, if i want to add a popup window for a "All unsaved progress will be lost, do you want to go back to Title?", do i add it before the [stopbmg time="0"]?

Shimmersoft,

I tried both, here are my results:

1: Whenever i try to link a button to Config.ks, i get the following error ( minus the japanese characters )

Error:system/_config.ks:I
[./data/bgimage/&tf.img_path&nbsp;+'bg_config.png']
data/fgimage/file.png

Then another error message:

Error:config.ks:62:
An error occured. Check the scenario script.

I then did a debug, found the line, and the summary of the error is "bg_config.png not found"
I went to the folder, and found out that the image is in .jpeg format, for some reason...
Should i make a .png version in 960x640 ? Replace the .jpeg or just add the .png version to the folder ? Haven't tried it yet, just in case it broke something further.

2: I was aware of the link.png, but it never worked. Tried it again in a Test project, no success.
Does the link.png have to be of a specefic size ? The image im trying to use is 64x64, in png format. Does the color dept need to be specefic ? like png 24, or 8, etc ? Does transparancy needs to be off ? Like in the post i've seen about it, I made sure to place it in the root folder, I am exporting for Windows.

Just in case Unihorn doesn't come back around, yes, I think you would add a [dialog] box or some other kind of pop-up with buttons prior to all that code, and then have a "confirm" prompt jump to a label where the code begins.

I'm not sure what's up with the config screen - I think there's a BG component on the scene itself that you could use to swap in a different version, or yeah, you could try to put a PNG version in the folder. You wouldn't really risk breaking anything there.

As for the "link" file, it doesn't have to have any specific settings as far as I know. I just have a png file called "link" sitting in the root directory, and when I export the game, the icon appears when the game boots up (notably, it does not change the TyranoBuilder icon for the exported file - that's a different process). Does not happen on your end?
Dirty Janitor Feb 8, 2019 @ 8:29pm 
Alright...

For the config screen, I found out that every image buttons and the background are assigned the wrong paths ... they link to absolutely nothing. Its going to be fun pointing to every image again.
I have no clue as to why this happened, as I never changed anything in the files or script of the config.ks, its created this way on every new project.. I wonder if re-installing would fix this.

Also, im getting an error from Steam everytime I start Tyrano, saying that the saves on cloud are different than the ones on my computer, and uploading them again doesn't fix it. Note that i didn't access Steam or Tyrano from another computer, as its stating.

Anyhow....

The link.png ... it works. Its my fault again, I was actually naming it "link.png", so I believe Tyrano was reading it as "link.png.png". Renaming it to "link" with a .png format made it work.
Shimmersoft Feb 8, 2019 @ 9:55pm 
Originally posted by Dirty Janitor:
Alright...

For the config screen, I found out that every image buttons and the background are assigned the wrong paths ... they link to absolutely nothing. Its going to be fun pointing to every image again.
I have no clue as to why this happened, as I never changed anything in the files or script of the config.ks, its created this way on every new project.. I wonder if re-installing would fix this.

Also, im getting an error from Steam everytime I start Tyrano, saying that the saves on cloud are different than the ones on my computer, and uploading them again doesn't fix it. Note that i didn't access Steam or Tyrano from another computer, as its stating.

Anyhow....

The link.png ... it works. Its my fault again, I was actually naming it "link.png", so I believe Tyrano was reading it as "link.png.png". Renaming it to "link" with a .png format made it work.

That's... really weird. Maybe you should try to resintall. You could also just forget about the native config and try to build your own. It's definitely doable - I can try to provide some guidance as needed.

Regarding that error, do you have steam cloud enabled? I've found and read that it can be unstable and mess with people's save files (it was outright deleting my game projects before I disabled it). You might consider turning off Steam Cloud - rightclick on TB in your Steam Library, choose Properties, and on the Updates tab, uncheck Steam Cloud.
Dirty Janitor Feb 8, 2019 @ 10:14pm 
I've seen in a post about a possible way to fix the config images error, I made a new project with the smallest window/screen size, and copy/pasted the new Config.ks to my old project ... now the images work, but the "Back" button isnt working at all, it throws random errors at me referencing lines that dont exist in the debug screen, so yea... I think im done with this native config.ks.

Making a custom config is definately what I need to do now, so any help you can give me will be really appreciated. Would you mind if I added you as friend to work on this ? I think this thread has gone off topic..

Also, I turned the Steam Cloud off, thank you for that too.
Last edited by Dirty Janitor; Feb 8, 2019 @ 10:22pm
Shimmersoft Feb 8, 2019 @ 10:49pm 
Originally posted by Dirty Janitor:
I've seen in a post about a possible way to fix the config images error, I made a new project with the smallest window/screen size, and copy/pasted the new Config.ks to my old project ... now the images work, but the "Back" button isnt working at all, it throws random errors at me referencing lines that dont exist in the debug screen, so yea... I think im done with this native config.ks.

Making a custom config is definately what I need to do now, so any help you can give me will be really appreciated. Would you mind if I added you as friend to work on this ? I think this thread has gone off topic..

Also, I turned the Steam Cloud off, thank you for that too.

Feel free to add me as a friend, although I might recommend posting specific questions here on the forum to deal with, if only for the sake of creating records that might be useful to others who have similar issues. That's up to you, though - if you catch me around, I'll try to help where I can.
unihorn Feb 9, 2019 @ 3:18am 
Originally posted by Dirty Janitor:
Thank you Unihorn for this complete back-to-title button, if i want to add a popup window for a "All unsaved progress will be lost, do you want to go back to Title?", do i add it before the [stopbmg time="0"]?

Better separate fork with buttons "Yes"and " No". When" Yes "make the jump to"Back to Title".

And the text warnings do, for example, through "blue component" ([tb_ptext_show]), as "a dialogbox label".

Originally posted by Dirty Janitor:
1: Whenever i try to link a button to Config.ks, i get the following error ( minus the japanese characters )

Error:system/_config.ks:I
[./data/bgimage/&tf.img_path&nbsp;+'bg_config.png']
data/fgimage/file.png

You put the background that is written in the script. If jpg, then jpg; if png, then png; if webp, then webp.

Put it where it says in the script.

***

And Yes... If the screen resolution in your project is different from 960x640..., then config.ks you will have to redo anyway...

Edit the coordinates of the buttons and other things under your screen resolution...

TB, when you create a blank project, does not generate them automatically. It just throws a "hard template" on 960x640... :(

Originally posted by Dirty Janitor:
2: I was aware of the link.png, but it never worked.

Export the game (to exe, mac, etc.).

Does not work in preview mode.

The icon should be at the root of the project.

Originally posted by Dirty Janitor:
Does the link.png have to be of a specefic size ? The image im trying to use is 64x64, in png format. Does the color dept need to be specefic ? like png 24, or 8, etc ? Does transparancy needs to be off ? Like in the post i've seen about it, I made sure to place it in the root folder, I am exporting for Windows.

The icon, definitely, should be square (not to be distorted in the title bar)... No other, special, requirements, more, it seems, no... But I really wasn't interested in that question (so I can not answer)... With transparent link.png wasn't experimenting.
Last edited by unihorn; Feb 9, 2019 @ 3:23am
unihorn Feb 9, 2019 @ 3:45am 
Until respond... And messing with the electric translator in English... That has already been answered. :)

Originally posted by Dirty Janitor:
but the "Back" button isnt working at all, it throws random errors at me referencing lines that dont exist in the debug screen, so yea...

The Back button uses the [awakegame] mechanism.

To make this mechanism work config.ks must be run through [sleepgame] (example: [sleepgame storage="config.ks" next="true" target="*begin"]). Or it is started through the standard button "config" (the button added from"User Interface").

With this method of starting the game "freezes", and then returns to "frozen" values...

If you run directly (not through [sleepgame], and, for example, run through [jump]), there will be errors (because there is no that it is necessary to "unfreeze")...
Last edited by unihorn; Feb 9, 2019 @ 3:56am
jay_rab Feb 9, 2019 @ 6:47am 
Originally posted by Shimmersoft:
Feel free to add me as a friend, although I might recommend posting specific questions here on the forum to deal with, if only for the sake of creating records that might be useful to others who have similar issues. That's up to you, though - if you catch me around, I'll try to help where I can.
I would like to further suggest this, please continue to use the forums for troubleshooting and limit private messages to only issues that also need to be under NDA, since anything you share on the forums could be helpful to other users in working out their problems and allows multiple people to help.
Dirty Janitor Feb 9, 2019 @ 6:51am 
Originally posted by Shimmersoft:
Feel free to add me as a friend, although I might recommend posting specific questions here on the forum to deal with, if only for the sake of creating records that might be useful to others who have similar issues. That's up to you, though - if you catch me around, I'll try to help where I can.

I will try to make a test project with everything I learned here with a config page made from scratch, and when ( not if .. lol ) I get stuck, I'll start another discussion for anyone with the same problems to see, then.
Originally posted by unihorn:

The Back button uses the [awakegame] mechanism.

That makes sense ... now that you mention it, I should have guessed it wouldn't work with a Jump ( I did use a Jump without [sleepgame] ).

I'll play more with Tags as I think most of my misunderstandings are related to them.. but I think the exemples on the Tyranoscript tags reference page on the website are not complete/detailed enough to understand how to properly use them.. most of the time Im trying to use a Tyranoscript in a project, I look at the Tyranoscript Tag Reference, end up not understanding at all how to use it, and come back on this forum to search for hours for somebody who happens to have the same problem as me.

Wouldn't it be more practical to have a page on the website with clear instructions for things that should already be included or easy to do such as;

-How to make a fullscreen button

-How to make a config.ks or custom menu ( and link to/back from it ) with sleep/awake game. (All over this forum, people are actualy crying over the fact Config.ks is useless and a buggy mess .. I understand its not easy to fix for the developper, with the fact that KAG and other scripts making Tyrano work aren't perfect either.. so instead of fixing it, or until you do, can we have a tutorial for a simple and working config/menu/thing that can mute sound, change text speed, that works in every screen resolutions ?)

-How to change the cursor, INCLUDING how to change the CSS so it doesn't revert to a windows one over buttons or clickable areas.

-How to add the icon to your window ( top left ) using the link.png

-How to make a real "Quit" button, in the way Unihorn explained it, plus a confirmation window ( Like in EVERY visual novel I played )

-How to make your own fixed buttons, to access menus during gameplay, and how to animate them in/out.

-Give complete and detailed exemples of buttons, jumps ( with labels ) using Tyranoscript and/or Javascript, in situations that they will actualy be used in, not just show that a Branch button can be linked to a label .. any commited user of this engine will need much, MUCH more versatility than this.

I am sorry if I sound frustrated or harsh, but I bought TyranoBuilder because its supposed to be easy.. Im a middle aged man that doesnt work with computers, nor am I willing to become the next "java/css/html coding super hero" .. I just want to make a little game with a friend, just for fun and to maybe make some extra income.. but nothing outside the ''barebone'' way of doing a project is easy or clear.. I just want it to "look like" a real game, with an icon, fullscreen, a Quit button, working custom mouse cursor, a usable config screen... but I dont have 5 hours a day to lose searching on google for forum posts that are 90% outdated from 2015... Or looking at a Thechnical demo on the website that I have to open in notepad, or copy/paste it in a test game, to realise its all in textOLD and "General" comments, and that I cant even begin to understand how the flow of it works.... most of the time I think im an Alien or something because I find absolutely nothing online about the problems im having.. Hell, Im not even good at english, but everyday i need to read and write on forums to implement things that should ALREADY be on an engine that is presented as "Easy, visual, nearly no coding required".

Anyway, my rant is over, a big "Thank you" to you three, who took the time to give me advices. I will make a new discussion in the future.
Last edited by Dirty Janitor; Feb 9, 2019 @ 8:47am
Shimmersoft Feb 9, 2019 @ 5:50pm 
Originally posted by Dirty Janitor:
Anyway, my rant is over, a big "Thank you" to you three, who took the time to give me advices. I will make a new discussion in the future.

Hey, I feel ya, man. There's a lot of nice features in TB, but I do feel like in the interest of accessibility, the engine has done less to accommodate more advanced users, even though it's the advanced users who will commit most to the platform to make commercially viable games. The developers can't really help that the forums aren't terribly lively, but some better documentation and examples would definitely be appreciated.

In any case, it's still better than having to code from scratch in Ren'Py, so there's that, ha. I'm planning to stick with the program and figure out all it can do, so I'll try to help where I can.
Last edited by Shimmersoft; Feb 9, 2019 @ 5:51pm
jay_rab Feb 9, 2019 @ 9:35pm 
Originally posted by Shimmersoft:
Originally posted by Dirty Janitor:
Anyway, my rant is over, a big "Thank you" to you three, who took the time to give me advices. I will make a new discussion in the future.

Hey, I feel ya, man. There's a lot of nice features in TB, but I do feel like in the interest of accessibility, the engine has done less to accommodate more advanced users, even though it's the advanced users who will commit most to the platform to make commercially viable games. The developers can't really help that the forums aren't terribly lively, but some better documentation and examples would definitely be appreciated.

In any case, it's still better than having to code from scratch in Ren'Py, so there's that, ha. I'm planning to stick with the program and figure out all it can do, so I'll try to help where I can.
Thanks so much for that, we really do appreciate all the support and are trying to continue to improve in the areas we can, I know its just at a very slow pace.
Shimmersoft Feb 10, 2019 @ 6:23am 
Originally posted by jay_rab:
Originally posted by Shimmersoft:

Hey, I feel ya, man. There's a lot of nice features in TB, but I do feel like in the interest of accessibility, the engine has done less to accommodate more advanced users, even though it's the advanced users who will commit most to the platform to make commercially viable games. The developers can't really help that the forums aren't terribly lively, but some better documentation and examples would definitely be appreciated.

In any case, it's still better than having to code from scratch in Ren'Py, so there's that, ha. I'm planning to stick with the program and figure out all it can do, so I'll try to help where I can.
Thanks so much for that, we really do appreciate all the support and are trying to continue to improve in the areas we can, I know its just at a very slow pace.

Considering the glacial pace that I feel like I get things done, I'm in no position to complain about slowness, ha. I know you guys are doing everything you can and do appreciate the continued support!
< >
Showing 16-27 of 27 comments
Per page: 1530 50

Date Posted: Feb 2, 2019 @ 12:40am
Posts: 27