Results 1 to 6 of 6

Thread: I have a concept for a navigational book/board system, but don't know how to code it.

  1. #1

    I have a concept for a navigational book/board system, but don't know how to code it.

    I've been thinking about using board tiles to act as pages of a book for a game map project. It would have buttons that turn the "pages," text boxes to allow jumping to specific pages, and then a list of files the pages need to be. I'm not good with LUA, so all I can really do is concept. Would anybody be interested in helping with this?
    Attachment 828
    "Do not meddle in the affairs of dragons, for you are crunchy and good with ketchup."
    My TTS Mods

  2. #2
    Have a look at this...


    It basically dose what you are asking.

    It functions by getting objects by name.. but it takes the objects by cloning them form a hidden bag or deck or set of stuff or w/e you set it up.. so when you click the button it deletes anything there, then fetched a clone of the object you want and drops it there to read. As you can see you can get creative as it is basically just a bunch of obj.setposition() stuff with a destory test. In his mods he has a index on the left of the book and next page / last page on the bottom right of the book. By using delete and clone you can fetch obejcts as many times as you like and it all stays neat, your just copying it to the spot, and deleting it before copying something else.

    This uses a DECK OF CARDS for the pages. The reasoning is that a deck loads the entire set of bitmaps when out of a bag, so "swapping" pages is instant. You can also use boards, or anything really.. even state objects. If you do that there is a trick you can do where you have the maps mapped to tiny versions of the objects and hidden in the tables, so they are always loaded. This of course increases the weight of the mod in memory, so if you can not live with the memory being used in this way, it will still work, but on changing the image, or setting a state, or placing a board in a bag and replacing it with something from a bag.. etc etc.. well there will be a slight load time.
    My Boardgame uTube chan - Tragic's Table Top
    BGG Guild of BoardGame uTubers - Tube Tables

  3. #3
    Yeah, I looked at that. The main issue with it is that I'm planning a BIG book and doing that with almost 100 pages would destroy the mod size. That's why I was thinking of a "load as needed" kind of book, to reduce the need for such a large amount of resources at once. Half of the book is going to be the map that's played on, with the other half being supplemental info for that map, so the pages wouldn't need to be changed very often unless play happened quickly (which isn't likely).
    "Do not meddle in the affairs of dragons, for you are crunchy and good with ketchup."
    My TTS Mods

  4. #4
    Well, the same methodology basically works for cloning out of a bag...

    I think there are basically 3 ways you can go about this..
    • Pull objects form a bag, using clone and delete
    • Use a single object and have buttons to change the "state" to switch between them
    • Physically change the image on the models, assuming the board are physically identical.


    With the clone and delete, you will need to test.. maybe even with the reload() for changing textures and states stuff.. but it is possible that objects sitting on top of the changing object may drop as it "swaps". You would need to do a test. If so you would need to use a script zone to freeze everyting in the zone, then change the object then unfreeze them... not sure if that would be needed though,.
    My Boardgame uTube chan - Tragic's Table Top
    BGG Guild of BoardGame uTubers - Tube Tables

  5. #5
    For the time being, I'm going with the third method you mention. All the board images will be exactly the same size, so I'll just keep a pastebin of what page is what cloud link and swap as needed. Not the most elegant, but it does the job.
    "Do not meddle in the affairs of dragons, for you are crunchy and good with ketchup."
    My TTS Mods

  6. #6
    you can change the image of a mesh with scripting if you want...

    Code:
    local obj = getObjectFromGUID(guid)
    local objPram = {}
    	objPram.mesh = "https://drive.google.com/uc?export=download&id=0Bxv7nhmMwdKtSGhfUGhtdjAtNmc"
    	objPram.diffuse = "https://drive.google.com/uc?export=download&id=0Bxv7nhmMwdKtTEp1RUdsdlZfQmM"
    obj.setCustomObject(objPram)
    obj.reload()
    This code changes the diffuse and obj file itself.
    My Boardgame uTube chan - Tragic's Table Top
    BGG Guild of BoardGame uTubers - Tube Tables

Similar Threads

  1. avatar proof of concept
    By brainsick in forum Scripting
    Replies: 5
    Last Post: 11-12-2017, 04:49 PM
  2. Example : How to make Rule Book Machines
    By maximo1984@ymail.com in forum Scripting
    Replies: 1
    Last Post: 11-08-2017, 12:56 PM
  3. Replies: 4
    Last Post: 09-24-2017, 11:49 PM
  4. Replies: 9
    Last Post: 07-23-2016, 10:48 AM
  5. Scoreboard and Rule book
    By ensamgud in forum General Discussion
    Replies: 0
    Last Post: 04-22-2014, 10:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •