Jump to content
The Dark Mod Forums

Open Book


Springheel

Recommended Posts

  • Replies 55
  • Created
  • Last Reply

Top Posters In This Topic

Ok, I've already run into some issues with the scripting. :) The books are actually harder to script than the main menu, which always does the same thing every time.

 

Books are different. For example, clicking the rightpagecurl button will cause a sound (and possibly animation) for turning the page, and then a leftpagecurl button will appear. But how do you decide whether or not the rightpagecurl button should show up in the first place? It should only be there if the book has more than two pages, but that depends on the FM author. The same thing applies for how many times the rightpagecurl button should appear, or which text it should call.

 

I'm not quite sure how to script for all the different possibilities. Sounds like there are going to have to be all kinds of 'if-then' statements that are beyond my abilities.

 

The tutorials on D3W don't really go into that kind of detail, either, at least that I can see. So if there is anyone willing to look into this, I'll happily hand off the GUI as it currently exists.

Link to comment
Share on other sites

I'm not quite sure how to script for all the different possibilities. Sounds like there are going to have to be all kinds of 'if-then' statements that are beyond my abilities.

I'm not sure if this can be done with scripting alone. There are not that many possibillities for this book.

 

If it is the first page, the left arrow is removed or ignored. If the remaining text, on any given page, is longer than two pages, the right arrow should be present or enabled.

 

That's the algorithm for the book.

Gerhard

Link to comment
Share on other sites

If it is the first page, the left arrow is removed or ignored. If the remaining text, on any given page, is longer than two pages, the right arrow should be present or enabled.

 

Yeah, but how do you tell the GUI that it is the first page? And how do you tell it that for one book, clicking the right arrow once is ok, but for another book you should be able to click it twice?

 

Those kinds of things are getting into the realm of actual programming...outside my reach at the moment. :)

 

I'll happily provide the GUI files for all three types of books, however, if someone wants to have a go at this.

Link to comment
Share on other sites

I don't know, how WE can do it, but I know how it's done in Thief1/2 ;)

 

all books are STR files with the following format:

page_0: "Text of the first page"

page_1: "Text of the second page"

page_2: "Text of the third page"

etc.

 

I guess the engine can "read" page_0 etc so that it "knows" how many pages the books has. You can specify the various kinds of books in dromed (letter, normal book, papyrus etc)

Link to comment
Share on other sites

Yeah, but how do you tell the GUI that it is the first page?

 

By calculating the amount of text in relation to what fits on a page. That's why I'm not sure if this can be done by scripting or if it can be done efficiently.

 

And how do you tell it that for one book, clicking the right arrow once is ok, but for another book you should be able to click it twice?

 

You don't click it twice. You can click it as often as you like, but if there is no more text (calculating the amount ...) then the event should be ignored.

 

Those kinds of things are getting into the realm of actual programming...outside my reach at the moment. :)

 

I haven't done THAT much with scripting. We can askl Domarius if he is around, because he did a lot with scripting.

 

I'll happily provide the GUI files for all three types of books, however, if someone wants to have a go at this.

 

Just put them in CVS. We can sort this out later IMO.

Gerhard

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 5 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...