Announcement

Collapse
No announcement yet.

Scene Save State (4.0, upd 18-04-2019)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Utilities] Scene Save State (4.0, upd 18-04-2019)

    Scene Save State

    Utility for saving in-scene multiple states of charas and folders/items (instead of saving multiple charas, which is really HEAVY to load)
    (I'm pretty tired of loading scene with 24+ characters - it takes several minutes and drop FPS almost to zero)
    Also, you can use as many cameras, as you want.

    Working for HS NEO, PlayHome Studio, Koikatsu CharaStudio.

    Contains:
    - SceneSaveState - for save/load scene states/cams etc.
    - PoseLibrary - for save/load poses and faces. You can save poses with tags, in groups, filtering them etc.
    - SceneUtils - set of utils for different scene functions. Details - http://www.hongfire.com/forum/forum/...00#post6416800

    (It's a light modification of chickenManX SceneConsole mod (so, thanks to him!). Differences is under spoiler)
    Spoiler
    - SceneSaveState works on all engines - HS NEO, PlayHome Studio, Koikatsu CharaStudio. SceneConsole - only on NEO engine

    - SceneSaveState has option for export scenes as VN story.

    - (Differences in handling scene)
    SceneSaveState you must clearly defined what items and chars you want to track (between states). So, it makes changes clearly. Also, it follows standart VNFrame naming conventions - so, you can use this scenes in VN case (and also we have some export functions here). Also, you can freely works with chars with identical names.
    SceneConsole tracks a lot of stuff hiding this from you (accesories etc.). It's useful, but may be unclear. Also it generate more data during save.

    - SceneConsole has tracking lights, and some of additional functions , that not presents in SceneSaveState.

    - Since 3.0 SceneSaveState also has:
    -- Pose Library (without hands)
    -- SceneUtils - set of utils
    -- Faces lib

    You can use SceneSaveState and SceneConsole together - they have no conflict.


    Download 4.0: https://mega.nz/#!0mpy3QjB!Kp2ZrBq8I...dPKTYG5F4O3pd4

    (all versions): https://mega.nz/#F!tyZV1Cya!N6Lub1zrcBv3UFbhoIu6XA

    Installation:
    1. You need to install mod VN Game Engine 11.8+ first.
    2. Unpack downloaded package to (depends on engine)
    • HS NEO: Plugins/Console/Lib
    • PlayHome Studio: Plugins/Console/Lib
    • Koikatsu CharaStudio: BepInEx\Console\Lib
    3. Run Studio. Find VN Game Engine window. Press All games - then Utils - then find Scene Save State.

    Several educational videos here (it's for Koikatsu engine, but all is the same for other engines):
    https://mega.nz/#!I6oSzaqD!Vu6kyPplq...JbnIgdhJWQWvdc (base functionality)
    https://mega.nz/#!86pkAAiS!KUCIs19c6...ZxUSixVsu78_8U (Tutorial 1. how to make VN)
    https://mega.nz/#!pjZijYKD!j-YBIaMMW...znevwdDpegLEc8 (Tutorial 2. how to add fake lip sync to VN)
    https://mega.nz/#F!U2wADQRD!7Qzfk4D3qoU_Z0P26cgLLg - folder with all videos


    Some details:
    - Utility save states for tracking objects. You can add/remove objects from tracking list on "Tracking" tab.
    - Utility save/load information in scene folders text. So, you must save/load the entire scene in usual way after save/load states. Also, you can distribute PNG files as usual.

    - Utility tracks only information the same as VNFrame library in VNGame Engine.
    It's includes:
    - visible/unvisible
    - position/rotation/scale
    - FK/IK items
    - animation clip
    - state of clothes (0/1/2 - dressed/half-dressed/no)
    - neck/look/hand states
    - sperm on body
    - etc.

    Since 2.5 you can also track some of system params (use button "Track sys changes" in Tracking menu).
    This params includes (sys params in VNFrame):
    - bgm
    - standart map load, it's position, rotation
    - background PNG
    - CharaStudio: Map_sun?, Frame PNG
    - PlayHome: Skybox
    Additional
    - (beta) NEO: AdvancedIK params (if you set ExportSys_NeoExtSave=1 in vnactor.ini, this increase scene information size.

    Engine will NOT track changes of:
    - info from additional plugins - BodySliders etc.
    - clothes set - if you change clothes entirely (not dress/undress) it will not be saved
    - outside scene environment - Bloom params / map changes / background changes etc.
    (but this params can be setup inside scene, be saved etc. as usual - but changes of them from state to state will be lost)

    Hint:
    you can attach hotkey to this utility. Use vngameengine.ini and change Game2=scenesavestate and some in Shorcut section to your favorite shorcut key.

    Changelog:
    Spoiler

    1.1
    - fixed bug - SceneSaveState wasn't loading in some cases
    1.2
    - fixed bug with Vector2 (appeared in PlayHome engine)
    2.0
    - depends on libjsoncoder lib
    - added posesavestate (as Pose Library)
    - added sceneutils (as Scene Utils)
    - return auto-backup during close
    - adapted for skin system
    2.5
    - ability to save scene sys environment in states (Track/UnTrack in Tracking menu)
    - SceneUtils 2.6 - you can load charas from subfolders
    3.0
    - faces lib
    - sceneutils 2.7 contains body changer
    3.1
    - fixed bug with duplicate keyboard shortcuts processing
    - advanced option: "Try to skip clothes change during scene change"
    - VNSceneScript export changed: scene will be saved in VN only if Cam 1 is VN cam, otherwise skipped
    4.0
    - !!Optimized compact save!!
    - function "Copy selected status to tracking char with same name"
    - VN: help buttons for switch between "Who say" (from VNFrame, thanks to @countd360)
    - VN: export/import cam texts to external text file - so, you can edit script in text editor if you want


    Known bugs:
    Spoiler

    My poses lib disappeared!
    Due to update to 3.0, pose library data was moved to sss folder!
    so, if you was used pose library in 2.0-2.5, you must move your old data files:
    - sss_fposes -> sss/fposes
    - sss_mposes -> sss/mposes

    Camera FOV param non-saved.
    Known bug

    Can't save pose / face without at least one tag.
    Known bug

    Can't save neck position in Fixed mode (in KK, PH)
    Known bug, please use FK for neck instead

    Error showed "Scene Console Error: Failed to read past end of the stream"
    Sometimes happened, don't know why.
    No workaround for now.
    If happens, seems that scene data is corrupted. Recommends to save/load data/make backup/check if something of this works.

    If someone debug this problem, please, send me details.

    During export to VNSceneScript only 60 first states playing, other ignored
    Please, change number in folder name :vnscenescript:60 - to :vnscenescript:100 or :vnscenescript:200 or greater
    This number say VNSS when engine must stop the story - and can be greater than actual story states number. (But not too much - please, don't use 10000, it may slow or even break engine)



    Advanced features
    Spoiler

    If you want to adapt current vanilla scene with lot of characters to SceneSaveState:
    you can use buttons "Copy selected status" and "Paste selected status" on Advanced tab.
    First button full copy status of selected char
    Second - paste it.
    So, just make one character main (and track him), and then copy status of sub-characters to main, and save them.

    Also, you can use button "Copy selected status to tracking char with same name"
    It copy chara status to tracking char in one button (only works if you have only 1 tracking char with that name)

    If you want to don't change character clothes during scene changes
    (may be useful, if you replace scene char with your one, and "dress" it like you want, and don't want to scene change interfere with that)
    Use option "Don't process clothes changes on scene change" on Advanced tab.

    If you want track additional properties:
    - You can use "Track sys params" button on Tracking tab.
    - If you want track additional params from plugins:

    You can toggle save additional info in vnactor.ini, when you need it. (Loading will be processed automatically, besides of these options)
    Warning: all of these options significantly increase dump size! Also, all of them may be buggy!

    Code:
    [neo]
    ExportSys_NeoExtSave=0 - this will save Advanced IK info
    ExportChara_HSPENeo=0 - this will save HSPE
    ExportChara_CurClothesCoord=0 - will save current clothes info
    
    [phstudio]
    
    [charastudio]
    ExportChara_KKPE=0 - will save KKPE data
    ExportChara_CurClothesCoord=0 - will save current clothes info
    VN: How to edit texts in external text editor
    Use buttons "Export" and "Import cam texts" on Load/Save tab.
    This will save your texts in sss_camtexts.txt in game root folder, so you can edit it manually.

    Attached Files
    Last edited by keitaro1978; 04-18-2019, 03:00 AM. Reason: v4.0 release, some adv tips, new video

  • #2
    Thanks a lot for this mod! It is exceptionally useful and actually persuades me to use VN Game Engine for the first time. Bravo!

    Comment


    • #3
      We have needed a mod like this for a LONG time, but not being able to save slider info is very unfortunate as I can't imagine going back to cards without expanded sliders and ABMX.

      Comment


      • keitaro1978
        keitaro1978 commented
        Editing a comment
        Sorry, this is misunderstading.
        Engine will not TRACK CHANGES of additional properties (like ABMX sliders) - so they can't be different in different states. But they kept - and be saved etc. if the plugin support this.

    • #4
      Interesting and nice script. It has lot of potential.


      But unfortunately, currently it does not track important between scenes things like:

      - Advanced IK (from HSStudioNEOAddon.dll) autotracking attaching/detaching changes.
      - items parenting/releasing changes.
      - items like a light cannot be tracked, and neither its settings like the strength of it
      artificial girl 2 kodu kiwi! no... doku! wiki!
      ag2harem official site u_u (actual version is 02b18)

      Comment


      • #5
        Thanks for the work, a godsend for the me who spends so much time in charastudio.
        Hopefully it'll continue to develop so it won't crash as much before I start spending hours modifying my existing scenes.

        Comment


        • keitaro1978
          keitaro1978 commented
          Editing a comment
          Thanks!
          I hope backup functions will work, if something crashed ) (At all, the rule is simple - save as much frequently, as you can )
          Also you always can send bug report, if you want.

      • #6
        Great work! This suggests again a great potential of VN Game Engine.

        By the way, I have a suggestion. How about adding the FOV value when saving the camera?
        It is technically the same as saving the position of the camera, if I remember correctly.

        Comment


        • keitaro1978
          keitaro1978 commented
          Editing a comment
          Thanks!
          About the FOV - it seems saving correctly... but not loading due to my old code. I hope to fix this in next upgrade.

        • keitaro1978
          keitaro1978 commented
          Editing a comment
          Thanks!
          About the FOV - it seems saving correctly... but not loading due to my old code. I hope I fix this in next upgrade.

      • #7
        This is a brilliant plugin! I actually even kind of confuse why developers not includes some like that feature by default. And all scene not build around that staff. And even go further and make some kind of movie slider line in which you can put easily all scene staff like animation, camera movements and other events which will play during playback. Instead that they do that hilariously awful tiny management hell in which you need build a freaking whole new scene to do just one change in animation movement or other little events like face expression or changes in clothes. Just cant understand what the hell is wrong whit those guys хD

        Comment


        • #8
          That is awesome staff! Thank you again. But it have at least one important thing that need to be fix. It is tracking Auxiliary. Pleas patch it. How I understand if it can track animations speed and pattern then probably Auxiliary are not so big problem to include? Or it not so simple?

          Comment


          • #9
            Whenever I try to make a scene with scene save state, I get this error.


            Scene Console error: Failed to read past end of stream

            I've been trying to get this to work for a couple days, and I can't fix it. Anyone know what this means and how to fix it?

            Comment


            • keitaro1978
              keitaro1978 commented
              Editing a comment
              Hm-m. During what action do you get this error? In loading? or in some action?

            • Jerrymarry
              Jerrymarry commented
              Editing a comment
              Whenever I switch scenes in the chara save state editor

              When I click the scene pictured below.
              https://i.imgur.com/xPuhHp7.png

              It displays the failed to read past end of stream error.

              https://i.imgur.com/ipFxhkl.png

              i've tried installing the plugin in a fresh new honey select, but i still run into this problem.
              Last edited by Jerrymarry; 01-12-2019, 12:44 AM.

            • keitaro1978
              keitaro1978 commented
              Editing a comment
              Unfortunately, don't understand where it happened and how to fix.
              If you work in NEO, you can also test SceneConsole, may be it will work better.

          • #10
            v2.0 released
            now includes
            - PoseLibrary - video here: https://mega.nz/#!A7IXnQ6L!00KaqcZ_p...YfSQOkWxMaRHHc
            - SceneUtils - set of utils for mass replacing chars, sync-h, and now (since 2.5) mass-changing FK. About mass changing FK items: https://mega.nz/#!AyQxyS6J!TUI8nX9v_..._afFINqB6jNVSw

            Original code for PoseLibrary was made by chickenManX , so great thanks to him!

            2.0
            - depends on libjsoncoder lib
            - added posesavestate (as Pose Library)
            - added sceneutils (as Scene Utils)
            - return auto-backup during close
            - adapted for skin system

            Comment


            • #11
              v2.5 released

              Since 2.5 you can also track some of system params (use button "Track sys changes" in Tracking menu).
              This params includes (sys params in VNFrame):
              - bgm
              - standart map load, it's position, rotation
              - background PNG
              - CharaStudio: Map_sun?, Frame PNG
              - PlayHome: Skybox
              Additional
              - (beta) NEO: AdvancedIK params (if you set ExportSys_NeoExtSave=1 in vnactor.ini, this increase scene information size.

              (May be some additional system properties will be added in future)

              Comment


              • keitaro1978
                keitaro1978 commented
                Editing a comment
                > Does this mean you can now save attaching/detaching changes from AdvancedIK ?
                Yes!!!

              • byblo
                byblo commented
                Editing a comment
                Hum... Maybe I misunderstood. What it does exactly?

              • keitaro1978
                keitaro1978 commented
                Editing a comment
                @byblo
                if you set ExportSys_NeoExtSave=1 in vnactor.ini and use "Track environent", SSS will save in scenes information about current AdvancedIK params

            • #12
              This. Is. Awesome!! Why did I find about this tool just now?!
              Wow,a great work, keitaro1978!

              I hope you make light sources also trackable in the future (I hope it's not too complicated)

              Comment


              • keitaro1978
                keitaro1978 commented
                Editing a comment
                Thanks!

                There are a trick you can use to track lights in this version:
                (you need do this BEFORE start track scene):
                1. Press Ctrl+F5
                2. Choose Scene Helper (down menu)
                3. Select light source in workspace and press Create TAG
                4. Enter unique ID (like li1) and press Tag It
                5. Goto 3 and do this for all light sources you need.
                6. Press Back to close to close Script_Helper

                Now you can run SSS. You will see lights as trackable elements in list.

                (I plan to add this natively, but it takes time)

            • #13
              Thank you, this tool is actually great! I combined it with my HSCameraMessage mod, which allows me to have dialoge displayed with every camera. This made for a very fun scene.

              Comment


              • keitaro1978
                keitaro1978 commented
                Editing a comment
                Glad you like it )

            • #14
              v3.0 released
              Key features:
              - faces library - for save and load faces in the same way as body. Video: https://mega.nz/#!QyIxlIbL!3FUR-vuA_...r7bdOw17YeqctM
              - body changer (body changes will be saved in scene). Inspired by BodySliders mod for NEO. Video: https://mega.nz/#!RrRBlKbS!ptdmxodt0...S-Ad7BTqhIjAXw

              Warning!:
              - due to update, pose library data was moved to sss folder!
              so, if you was used pose library in 2.0-2.5, you must move your old data files:
              - sss_fposes -> sss/fposes
              - sss_mposes -> sss/mposes

              For modders:
              If someone want extend chara body editor (I made only some of body params), you can change arrays in file sceneutils.py near line 772 (def start_BodySliders(game): )
              For example, PH version contains only two elements - Height and Tits (BodyParam 0 and 1). You can add more to this array, and track what kind of changes will be made in scene, and adjust array due to it. Also, you can send me updated array/file, and I include your results in next version.
              Last edited by keitaro1978; 03-11-2019, 02:47 AM. Reason: "for modders" section

              Comment


              • #15
                If you want to save HSPE data in SSS, please, download latest VNGE 11.7.

                SSS 3.0 will save HSPE in scenes, if you toggle it in VNGE:
                - use HSPE v2.8.0 and higher (thanks to Joan to upgrade it)
                - set ExportChara_HSPENeo=1 in vnactor.ini



                Comment

                Working...
                X