Hi! I'm new to Twine and to this forum. I use Twine
version 1.4.2 (since I want to put images in my story) and the story format
Sugarcane.
I have a question regarding the game menu and in-game advertising. I've read
Long_Story_Short's topic where the user asked
how to put advertisements in games among others.
My first question is: Is it possible to add in-game advertising in one's Twine-game by using codes from e.g. Google ads?
As for the menu, I've taken a look at Zoe Quinn's
Depression Quest (free version). As you can see in the menu to the left, there's only information about the authors of the game. When I create my first Twine-game, there is this information and link to TiddlyWiki and the button "Restart the game". When I try to use the "Restart button" when I experiment with my story, the story doesn't restart from the beginning.
My next two questions are the following:
1. How do I remove the default information in the menu so that I can make a menu similar to the one found in "Depression Quest"?
2. How can I make the "Restart button" work properly?
As you can see, I have no knowledge about programming (I have basic knowledge of HTML which I rarely have used for years) and I've tried to look around on the net for answers. But I suppose I haven't used the correct search words.
Thanks in advance.
Comments
Actually I used the latest version of Twin 2.0, but I changed to 1.4.2. because I couldn't insert images the way I wanted, especially when I tried to follow auntiepixelante's tutorial.
Now to answer some of your questions:
If you use your web-browser built-in Developer Tools to look at the HTML elements for that section of the page you will see that the related element has an ID of credits, so If you really feel a need to remove the Sugarcane credits you can do that using some CSS based on that ID. The follow goes in your story's stylesheet tagged passage. The restart link does send the reader back to the first passage of the story and it even resets the story's variables/internal state. What it does not do is reset the web-browser's own History system, so the reader is still able to use the web-browser's Back button to undo the past.
Switching to SugarCube would fix the web-browser's History system/Back button issue because it does not use it to track the story's internal state.
Alright, I understand that it's preferable to have external images in order to make the HTML-file not too big. But how do I exactly link to images stored in my computer? I'm not linking to images found on the Internet. With 1.4.2. I didn't need to think of this problem, especially when I need to test run my game a lot.
Secondly, how do I exactly upgrade Sugarcube when I install the latest 2.x version?
greyelf, so I simply open a new passage StoryInit and add the code above in the passage?
But greyelf, when I tried my game and I was at other passages, the restart button didn't take me back to the first passage of the story. Then the restart button is pretty much useless, isn't it?
Since we're already discussing the pros of 2.x and Sugarcube:
1. if I want to use an inventory system, how could I "make it" happen?
2. if I want to use a old computer log/SMS-like system, which codes can I use?
3. if I want the reader to have many language options, like English, French and Swedish (my native language), do I have to have all of translations of all the passages together in the final game?
If some of my questions have already been answered in another thread, then please point me in the right direction.
Thank you.
eg. something like c:\mystory if you are on Window although you may of created that folder somewhere other that the root of your C: drive and obviously named it something other than mystory.
Within that folder create a new sub-folder to store all your stories media files in, in this explanation I will name the new sub-folder media, once this has been done move all your story's image/sound/video files in this new folder.
eg. the folder structure will look something like c:\mystory\media, your story.tws file will be in the c:\mystory folder and your media files will be in the c:\mystory\media folder.
Assuming your image is named background.jpg you would used code like the following to reference your image.
As I stated in my previous post "The follow goes in your story's stylesheet tagged passage.", if your story does not have one these passages yet you can use the Story > New > Stylesheet menu items to create one. This is where all the custom CSS used to style your story will be placed.
Which operating system (brand, version, edition, 32/64bit are you using?
Which web-browser(s) (brand, version, 32/64bit) did you use to test the restart link (it's not a button) with?
I ask because the restart link is meant to work as I previously described, and I tested that functionality (using Chrome and Firefox on Windows) before I commented about it.
Those three question are too large to answer in a single thread, I suggest you create new Questions for each of them.
Alright, then I can see how the images fit with my story this way. But when I want to upload the whole story to a web server (or Dropbox) or when a friend "installs" my story on his/her computer then I'll have to change all of the image links manually, won't I?
And if I want to upload my story to Kongregate (I've heard of a case where one of its users has submitted his game to that GameStop-owned social media website) and/or Gamejolt as a standalone game, all of the image codes will be "mucked up" right?
I guess you can see now why I perfer to "embed" the images in the HTML-files directly? I'm not planning to make a large HTML-file >50 MB.
I didn't know about that function, thanks for your patience to explain it for me.
Of course. I use Windows 7 Home Premium 64bit version. Twine (both 1.x and 2.x) automatically use Internet Explorer 10 to test play my stories.
Only when I have built the game as a standalone HTML-file, I can open it with Firefox (There's no "Open file" in Chrome, I can't find it anyway). And yes, I can see that the restart link works as it should now. Then I guess I won't need to worry about it when I continue building my game. The restart link doesn't work in Internet Explorer at all.
Will do. Thanks again greyelf!
And if anyone of you happen to find an answer to my original question about in-game advertising, I'll be happy to hear about it.
If you use relative URLs like the one in my example then all you need to do is supply the folder containing the media files along with your story HTML file to either your friend or a web-server and the image links should just work.
One common method used to do the above is to add both the story HTML file and the media folder to a ZIP archive file (aka a Compressed Folder in Windows) and then supplying the ZIP archive file to whomever you want. This Zip and unzip files article at Microsoft explains one way to do the archiving.
The Twine 1.x application uses whichever web-browser you have configured as your default for Windows. The Twine 2.x install-able application uses it's own built-in webkit based custom web-browser, and the web-browser based release of Twine 2.x uses whichever web-browser you are using to run the application.
If you are manually running a story HTML file you have generated (via Build or Publish to File) then it will also use whichever you have configured as your default for Windows unless you deliberately open it with another web-browser.
Beyond that, Scaffold 22 uses a hacked version of SugarCube, so even if you could import it into Twine 2—and there is a Twine 1 ⇒ Twine 2 converter—you'd be missing parts of the code.
Thanks for explaining for me how you work with your projects. I would love to try one of them out.
I don't have any problems with creating ZIP archived files (I do that all the time everyday), but I needed to be sure nevertheless. I hope you didn't mind me - a layman - asking about things you would take for granted since I'm more in the science field.
I'll give Twine 2.x a new chance and in case I get stuck, I'll either post in this thread or create a new one.
Yes, I can deliberately open the generated HTML file with Firefox, but not with Chrome. I don't know how to change the default web-browser. Is it with this method?
As I stated previously, it's not a matter of story formats supporting it, the compiler in question must support it.
There are two compiler families, each with multiple implementations: (not an exhaustive list)
AFAIK, no compiler has, yet, been written which understands the data chunk format of both compiler families. That said, there are some conversion utilities out there which can load the compiled form of a project and do a conversion of its data chunk—the only one I know of off hand is my own Twine 1 compiled form ⇒ Twine 2 story archive converter.
There are other complications as well, however, the data chunk format incompatibility is the first hurdle.