Front Office Football Central  

Go Back   Front Office Football Central > Main Forums > Dynasty Reports
Register FAQ Members List Calendar Mark Forums Read Statistics

Reply
 
Thread Tools
Old 10-16-2022, 03:34 PM   #1
Izulde
Head Coach
 
Join Date: Sep 2004
Writing A Visual Novel (RL Dynasty)

So I've spent a lot of the summer playing visual novels as stress relief while going through the travails of the job hunt and sorting out whether I should open a bookstore (we won't mention how much I spent determining that isn't going to work - but at least it's not thousands of dollars had I actually gone ahead and done it to failure).

I figured I might as well turn that into something and create something that can at least get some money coming in, so I decided to create a visual novel. TyranoBuilder Visual Novel Studio is $15, which is literally the lowest cost initiative of all my planned income-generating projects in this wild, yet mundane from the outside season.

Because I have zero programming experience, hilarity is going to ensue. Funny things always happen in the field anyway.

In fact, we got our first example as I was working through the tutorial. I had a character join a scene, only for this to happen:



Went to do a VN tutorial, accidentally wrote giantess fetish porn instead.

I fixed it with the Positioning Tool (insert your own positioning your tool jokes here), so that was just a funny moment with an easy solution.

Less funny - I spent 3 hours last night and into the early morning hours trying to solve a problem after moving on from the tutorial and starting on the game itself:

I was creating an option for the player to name the main character, and on the test text to be sure the name took, I was getting the following:



Instead of the name, it kept coming up undefined.

I was tearing out what remains of my hair over three hours, looking up different tutorials and advice from people who ran into similar problems. Nothing worked. Finally, about 5:30 am, I went to bed and decided to try again in the afternoon when I woke up.

After waking and taking care of the dog, I decided to look at the actual script in debug mode. That's when I saw something curious...

"f.f.name"

Stupid me. I kept seeing f.name everywhere, so I named my variable f.name. It turns out that f. in TyranoBuilder means variable, so what the game actually thought I said was, "the variable is another variable called name", and it was giving me an undefined error, because that second variable had no definition.

So I went back into variables, changed the name from f.name to name, and it finally worked.

Three hours... over something that was a literal two-second solution.

Welcome to programming.
__________________
2006 Golden Scribe Nominee
2006 Golden Scribe Winner
Best Non-Sport Dynasty: May Our Reign Be Green and Golden (CK Dynasty)

Rookie Writer of the Year
Dynasty of the Year: May Our Reign Be Green and Golden (CK Dynasty)

Izulde is offline   Reply With Quote
Old 10-22-2022, 11:07 PM   #2
Izulde
Head Coach
 
Join Date: Sep 2004
So I've been mastering if/else statements - including those that involve multiple else-if variables. I've also taught myself how to incrementally increase numerical variables and single-condition else-if statements (I haven't yet tried multiple-condition else-if statements).

And then, when writing a scene tonight, I hit a snag. When I resize an image that's too big in Paint, it loses transparency upon saving, resulting in a white background when I insert the image, like so:



So I went online and found a transparency converter to remove the background. I'm sure some of you will already anticipate what happened, but for those who can't, or who just want to see the disastrous results:



....Yeah. White-haired character with making white background transparent = he now has transparent hair.

So need to go back to the drawing board for that, and probably need to do some yet more re-sizing and positioning.

But at least progress is being made!
__________________
2006 Golden Scribe Nominee
2006 Golden Scribe Winner
Best Non-Sport Dynasty: May Our Reign Be Green and Golden (CK Dynasty)

Rookie Writer of the Year
Dynasty of the Year: May Our Reign Be Green and Golden (CK Dynasty)
Izulde is offline   Reply With Quote
Old 10-23-2022, 03:43 PM   #3
Izulde
Head Coach
 
Join Date: Sep 2004
After messing around with different things - trying to import transparent image into Google Slides (it doesn't have a save picture as option so that didn't work), downloading GIMP (probably should have done that to begin with), I discovered that TyranoBuilder offers a resizing of images via mouse middle button scrolling.

Hooray! This will save me literally hours of hassles.

So I taught myself multiple option if-else statements that evaluate a single condition...

...or I thought I did. But then I was running into problems when I playtested it. Come to find out, you have to put an [endif] after every single option in order for it to run correctly. Once I figured that out, everything was smooth sailing.

Don't know what I mean? Here's an example of what I was doing:

[if exp= "f.variable == 1"]
#OtherCharacter
Blahblah
[else]
[if exp= f.variable2 == 1"]
#OtherCharacter
BlehBleh
[else]
[if exp= f.variable3 == 1"]
#OtherCharacter
BlohBloh
[endif]

What I intended was for the program to check each variable one by one and display the appropriate remark by OtherCharacter. Instead, I was getting errors.

Each [else] needed an [endif] after it before the program would move on to checking the next variable's condition.

Other beginner notes:

== means that the value of the variable is equal to, whatever (in this case 1)

Want to have it say If variable is 1 OR 2, then this happens?

[if exp= "f.variable == 1" || "f.variable == 2"]
This happens
[endif]

The || means or

Another fun note: In Tyranobuilder, integers come as pre-defined values for variables. When you try to put text as a value for a variable, it hurls an "Uncaught Reference: ThisTextValue is undefined" error at you.

There's two ways of fixing this:
1. Convert the value to an integer (such as 1)
2. Declare the variable at the beginning of your script to allow the text value to be recognized.

Since this particular variable is something that once set, doesn't change, I just converted it to an integer value and it was all good after that.

I'll have to learn how to declare variables at some point, but since I don't need to yet, I'll keep chugging along.
__________________
2006 Golden Scribe Nominee
2006 Golden Scribe Winner
Best Non-Sport Dynasty: May Our Reign Be Green and Golden (CK Dynasty)

Rookie Writer of the Year
Dynasty of the Year: May Our Reign Be Green and Golden (CK Dynasty)
Izulde is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump


All times are GMT -5. The time now is 12:02 PM.



Powered by vBulletin Version 3.6.0
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.