Hi there,
I decided that I want to include a game log in the bottom of all of my passages.
So, if something happens to the character's stats, equipment, inventory or a quest is started or finished, the log in the bottom of the passage would show that.
The description of the area and the options the player's character has. These would be printed to that specific passage he or she is visiting currently and the game log below that would help me show text that is triggered if a status changes. I sometimes would like to display a passage in this log, which would send the player to a new passage to inform him/her of something and then using <<back>> the player could go back to the game.
Now, my problem is the length of the log. I don't want this to be too long. Maybe 8-10 lines. Before the text that was on the top would start to dissapear as new logging entries are being added by the game in the bottom of the log.
I already have a stowable right side and left side (default) UI and I would like to have this log to be stowable as well and slide into the bottom, when not needed.
My question is, how do I count the row of text that needs to be displayed and how do I present this logging screen in the bottom of my passages?
Thank you for your answers in advance!
Comments
The easiest thing to do would be to rebuild the log's contents every time it changes from a list. For example: You'd display/include the Log passage someplace. Probably similar to how you're doing the stowable right side bar.
To add a new entry:
It would've been an overkill.
So, basically each time a new log entry is added or gets removed, it should refresh, regardless if the player is entering or leaving a passage.
Since I'll be using a couple of <<link>> and <<linkreplace>> to trigger some of the log entries.
Again @TheMadExile I cannot express how thankful I am for the help. You are always on point and help a lot!
I wonder if I need something like #game-log-contents or something, to be honest I'm clueless how to glue this thing to the bottom of my window and make it respond to the window size if the player decides to resize his or her window.
ps. I really suck at CSS, but I'll try my best to figure this one out...
Now that I think about it a simple border with a show/hide button would be enough ...
well, lol, it shows an ugly window with a white background and some scrollbars around it and saying this:
I need to say that I moved the contents of :: Log into a passage named StoryGameLog. Maybe this has something to do with the problem...
Passage:
Widget
(has "widget" tag added)
Update: Solved!
Had to initialize $log right at the first window (start passage).
Now I need to do something about the ugly window with the white background and white fonts that it displays. My non-existant CSS's skills are totally useless...
http://imgur.com/a/815xb
You are right, I moved it there. I'm still having trouble with CSS though.
Look at me failing:
http://imgur.com/a/815xb
This is hard to figure out, because the stowable right and left side UI will overlap the log screen and I can't seem to make it stick to the bottom area, where I want it to, right between the left and right opened stowable UI bars.
And try adding something like:
Adding did not solve the issue.
I added
modified width and height to 100% and 30% respectivly and closed both UI's on the left and right side, now I can at least see the text, lol
Still, doesn't look good.
Modified it to
Now, it looks better, it is now stuck to the left UI bar and when that gets stowed it slides to the left. I wonder if there is a way to glue it to the bottom of the window and make it's left position independed from the right or left UI bars.
Time to figure out how to make it collapse and reappear when the button is pressed again ...
Amazing! Thank you @TheMadExile !
Now, I really need to figure out the rest of the CSS.
Two things are left to do:
- Glueing the game-log to the bottom of the window and between the two UI bars.
- Adding a close/open log button.
I haven't got the faintest clue how to do these...
Story JavaScript: Story Stylesheet: