Problem adding a new book -- Text Alignment

Post » Mon Jun 18, 2012 6:03 am

Ok, so I'm helping a friend who has written some TES fan fiction in adding it to the game now that the CK is out, by creating new books in the CK and adding them somewhere in the world.

However, I'm running into a weird issue when trying to add the text -- the game does not display the correct text alignment in some situations.

What's happening is that whenever a paragraph "wraps" to another page, it loses its left alignment and becomes center aligned. A new paragraph then will be left aligned again, until it wraps to another page.

I duplicated an existing in-game book for a template (Biography of Barenziah v1), and simply modified as needed and dropped the text of the story in the right place.

The structure looks like this:

Title and Author Information[pagebreak]IntroductionVolume 1

[pagebreak]

Text begins here for the story.


Here's a screenshot of the issue. Note the left alignment when a paragraph starts, that switches to center align when the paragraph wraps to another page.

http://cloud.steampowered.com/ugc/469735349018481075/A76FF7CDDB925B09FFE3ECD2390E7CFBDB7FDB8C/

Also note that I did try center aligning the entire book, and that works fine, it's just not keeping my left align for some reason.
User avatar
michael danso
 
Posts: 3492
Joined: Wed Jun 13, 2007 9:21 am

Post » Mon Jun 18, 2012 3:24 am

Past the 11th page and no views... so I'll jump bump this once.
User avatar
Nick Jase Mason
 
Posts: 3432
Joined: Sun Jul 29, 2007 1:23 am

Post » Mon Jun 18, 2012 4:59 am

iirc, the books don't use the paragraph tags. So just write and then when you want it to end.

[edit] Checked the wiki, appears they do in Skyrim. Ignore me!
User avatar
Yonah
 
Posts: 3462
Joined: Thu Aug 02, 2007 4:42 am

Post » Mon Jun 18, 2012 11:17 am

Solution: avoid overlong paragraphs, and use page breaks to force new pages before long ones.
User avatar
Amie Mccubbing
 
Posts: 3497
Joined: Thu Aug 31, 2006 11:33 pm

Post » Mon Jun 18, 2012 12:08 pm

Try this:

Title and Author Information

[pagebreak]

IntroductionVolume 1

[pagebreak]

Text begins here for the story.


If you know you are going to have a page break, then you also know a paragraph is ending. Somehow that first center alignment may have carried over past all page breaks, because you did not end the paragraph with a

before the pagebreak.
User avatar
Brιonα Renae
 
Posts: 3430
Joined: Mon Oct 22, 2007 3:10 am

Post » Mon Jun 18, 2012 7:45 am


Try this:

Title and Author Information

[pagebreak]

IntroductionVolume 1

[pagebreak]

Text begins here for the story.


If you know you are going to have a page break, then you also know a paragraph is ending. Somehow that first center alignment may have carried over past all page breaks, because you did not end the paragraph with a

before the pagebreak.

Thanks, i'll give your code a try when I get home from work today. That may very well be it.


As for manually adding pagebreaks -- this isn't done in the books in the original game, not sure why I should have to.

As for having "overlong" paragraphs -- I didn't write the story, but I'm not going to adjust the writing just because the game engine is being a pile of crap. Again, the original game has paragraphs just as long without an issue. And if you look at the screenshot, the paragraphs are actually not that long, maybe 3 sentences and between 50 and 75 words on average.
User avatar
james reed
 
Posts: 3371
Joined: Tue Sep 18, 2007 12:18 am

Post » Mon Jun 18, 2012 1:28 am

Thanks, i'll give your code a try when I get home from work today. That may very well be it.

the pagebreak command with the brackets around it instead of the < > indicates it is a function specific to the game so it knows when to force the book to jump to the next page. Web browsers often have intuitive measure in place to allow for sloppy HTML code. For example, a

is not necessary. It assumes that the next time that a

is encountered it is starting a new paragraph and automatically treats what came before it as if it had a

. It depends on how the HTML markup parsing is handled for books, notes and other readables in Skyrim. I get the feeling it was designed to adhere to the strict rules of HTML. So if a tag has a it has to be there. If this is the case, the pagebreak coming before a

may cause whatever properties were originally set to carry over to subsequent pages.

So this would be how I would go about doing this, just to err on the absolute side of caution:





Title
by Author

[pagebreak]

Chapter Number
Chapter Name



Begin text here


For those who know nothing about HTML coding, the
tag is an HTML-standard linebreak. Whenever I code HTML manually I get in the habbit of using them to make absolutely sure that the document behaves as I want it to.
User avatar
Quick Draw III
 
Posts: 3372
Joined: Sat Oct 20, 2007 6:27 am

Post » Mon Jun 18, 2012 10:25 am

It looks to me like you are starting a new paragraph but not aligning it. ie:

Title


Chapter 1


Text properly aligned to left

Unwated centered text


or possibly not closing a tag when intended:

Title

Chapter 1


Text properly aligned to left

Unwated centered text


Check to make sure you have closing tages in the correct places. I could be wrong, but it also seems like a possibility.
User avatar
SEXY QUEEN
 
Posts: 3417
Joined: Mon Aug 13, 2007 7:54 pm

Post » Mon Jun 18, 2012 7:54 am

Well, none of the suggestions worked, and I'm unwilling to manually code breaks or paragraph tags in, since the original game books don't need these inserted manually.

HOWEVER, I have fixed it.

It seems the issue arises because I didn't start the book with a pagebreak, forcing the text to start on the right page rather than the left.

If I add a pagebreak at the beginning of my text, it works fine.

Without that pagebreak, the issues crop up. Which is odd, to say the least.

Final conclusion: Always start a book that displays on the two-page models with a pagebreak, otherwise bugs may occur.
User avatar
Britney Lopez
 
Posts: 3469
Joined: Fri Feb 09, 2007 5:22 pm


Return to V - Skyrim