In-game notebook

  • #1, by qamilloSaturday, 25. June 2016, 12:05 8 years ago
    Hi guys! My adventure with Visionaire started few years ago with 3rd edition, but lately I decided to return to work on my project with version 4. Besides standard inventory I designed one more interface for something like in-game notebook. It will have buttons for character menu and achievement menu, but I also wanted to implement task notes list. The idea is to add new records (in text preferebly) via triggers and list them in right order on notebook page (with additional buttons for page flipping). Is there any smart workaround to do this in editor (without [intensive] LUA)? I enclose screenshot with empty interface background.

    http://imgur.com/l30btID

    Best regards! smile

    PS. At begining I was thinking about alternative item system and text images added like in inventory, but Visionaire supports only one inventory system. Now I am thinking about some objects listing, but it feels like more custom LUA solution. Unfortunately I did not find any template with this kind of feature. roll

    Newbie

    21 Posts


  • #2, by sebastianSaturday, 25. June 2016, 12:31 8 years ago
    Glen just posted a concept how to achieve this:
    http://www.visionaire-studio.net/forum/thread/creating-a-jou...

    Thread Captain

    2346 Posts

  • #3, by afrlmeSaturday, 25. June 2016, 13:25 8 years ago
    Aye 1 active inventory system per character. Lua script would also be a viable option in combination with some animations & a table. You would use the table to include the animation you want active as well as its height in pixels, then you could use that to determine the order & scroll position of each entry. It's a lot more complicated than the inventory approach Glenfx posted earlier though!

    Imperator

    7278 Posts

  • #4, by sebastianSunday, 26. June 2016, 11:49 8 years ago
    Are there methods/functions in lua to put/add objects in a table by the way?

    Thread Captain

    2346 Posts

  • #5, by sebastianSunday, 26. June 2016, 12:02 8 years ago

    Thread Captain

    2346 Posts

  • #6, by afrlmeSunday, 26. June 2016, 13:16 8 years ago
    I recommend this blog for Lua stuff (http://www.phailed.me/2011/02/learn-lua-the-hard-way-tables/) as it's much easier to understand than lua.org.

    Inserting stuff into a table is easy. Removing it is a little more complicated if you are wanting to remove a specific entry as it all depends on how you created the entry.

    Imperator

    7278 Posts

  • #7, by sebastianSunday, 26. June 2016, 23:32 8 years ago
    Thanks for the link.I guess in this specual case (Notebook) there will be no removing needed.

    What i had in mind for such a notebook was a table where object(links)-further its actions get added when adding a notebook entry. These have also their text in them(called by other action, display objext text)

    So adding a notebook entry is only adding a name of the action to the table.
    When displaying the text of oage 1 the action on tableslot 1gets called and so on...

    Thread Captain

    2346 Posts

  • #8, by qamilloSunday, 26. June 2016, 23:59 8 years ago
    Thanks for help and resources! I'm rather click-in-editor than code guy, so I decided to implement Glen's idea. After some fine tuning it works great! Here is some screenshot with temporary gfx: http://imgur.com/pRMWSCv

    There is only one thing that makes me worry - other languages. At this point I assume, that there need to be several notebook interface copies with translated notes/items/images. Am i wrong? Is there any other way to swap item images?

    Newbie

    21 Posts

  • #9, by sebastianMonday, 27. June 2016, 00:02 8 years ago
    You could use an animation for the item instead of an item image. Each frame of zhe animatuin is abother language. You could then add a little lua (yeah its needed here) to check what your current language is and set the first and kast frame of your itemanimations to the current language.
    By that all other frames are ignored.

    Thread Captain

    2346 Posts

  • #10, by afrlmeMonday, 27. June 2016, 02:55 8 years ago
    You could also create a character for each language I suppose. The animation method that Sebastian mentioned would be less work though. Forcing which animation frame to play is as simple as...
    ActiveAnimations["name"].AnimationFirstFrame = 1
    ActiveAnimations["name"].AnimationLastFrame = 1
    

    ... though you can make the code even shorter if you use my set animation frame workflow function which is available on the script index page on the wiki.

    As to where you should add this line of code... it should be added inside of the first frame of each animation & should be wrapped by some if language = ? queries. Alternatively you could use display object text actions, which would be a nicer method as you can specify text for all available languages for each one. I don't know how you would handle the positioning of them though as you would need to use Lua script to force them into position. Also text is always displayed on top of the screen, so you wouldn't be able to overlay any other images above the text.

    Imperator

    7278 Posts