Portal-Zone Gothic-Zone Gothic II-Zone Gothic 3-Zone Gothic 4-Zone Modifikationen-Zone Download-Zone Foren-Zone RPG-Zone Almanach-Zone Spirit of Gothic

 

Ergebnis 1 bis 9 von 9
  1. Beiträge anzeigen #1 Zitieren
    Local Hero
    Registriert seit
    Feb 2017
    Beiträge
    270
     
    F a w k e s ist offline

    G1 import of TREASURE_ADDON_01.ASC

    Hello folks,
    I need your help! I would like to use G2A mob for treasure digging in G1, but cannot get it working properly

    I used GothicSourcer V3.14 to decompile G2A:
    TREASURE_ADDON_01.MDL -> TREASURE_ADDON_01.ASC
    HUMANS.MSB -> to get HUM_TREASURE_A01.ASC

    Then I edited G1 HUMANS.MDS file and added following animations:
    Code:
        ani        ("t_TREASURE_Stand_2_S0"           1               "s_TREASURE_S2"               0.1 0.0  M. "HUM_TREASURE_A01.ASC"                         F  0   15)                    
        {
            *eventTag (5 "DEF_INSERT_ITEM" "ZS_LEFTHAND")
        }
        ani        ("s_TREASURE_S0"                   1               "t_TREASURE_S0_2_S1"          0.0 0.0  M. "HUM_TREASURE_A01.ASC"                         F  15  15)                    
        ani        ("t_TREASURE_S0_2_Stand"           1               ""                            0.0 0.1  M. "HUM_TREASURE_A01.ASC"                         R  0   15)                    
        {
            *eventTag (5 "DEF_REMOVE_ITEM")
        }
        ani        ("t_TREASURE_S0_2_S1"              1               "s_TREASURE_S1"               0.0 0.0  M. "HUM_TREASURE_A01.ASC"                         F  15  15)                    
        ani        ("s_TREASURE_S1"                   1               "t_TREASURE_S0_2_Stand"       0.0 0.0  M. "HUM_TREASURE_A01.ASC"                         F  15  15)                    
        ani        ("s_TREASURE_S2"                   1               "s_TREASURE_S3"               0.0 0.0  M. "HUM_TREASURE_A01.ASC"                         F  15  75)                    
        {
            *eventPFX (44 1         "CPFX_IAI_STONE" "ZS_RIGHTHAND")
            *eventSFX (44 "PICKORE" R:1000           EMPTY_SLOT)    
        }
        ani        ("s_TREASURE_S3"                   1               "s_TREASURE_S4"               0.0 0.0  M. "HUM_TREASURE_A01.ASC"                         F  15  75)                    
        {
            *eventPFX (44 1         "CPFX_IAI_STONE" "ZS_RIGHTHAND")
            *eventSFX (44 "PICKORE" R:1000           EMPTY_SLOT)    
        }
        ani        ("s_TREASURE_S4"                   1               "s_TREASURE_S0"               0.0 0.0  M. "HUM_TREASURE_A01.ASC"                         F  15  75)                    
        {
            *eventPFX (44 1         "CPFX_IAI_STONE" "ZS_RIGHTHAND")
            *eventSFX (44 "PICKORE" R:1000           EMPTY_SLOT)    
        }
        aniAlias   ("t_TREASURE_S1_2_S0"              1               "s_TREASURE_S0"               0.0 0.0  M. "t_TREASURE_S0_2_S1"                           R)                            
        aniAlias   ("t_TREASURE_Stand_2_S1"           1               "t_TREASURE_S1_2_Stand"       0.0 0.0  M. "t_DONTKNOW"                                   F)                            
        ani        ("t_TREASURE_S1_2_Stand"           1               ""                            0.0 0.0  M. "HUM_TREASURE_A01.ASC"                         F  0   0)
    And finally in Spacer I have added oCMobInter object:
    Code:
    oCMobInter
    Vob
     + vobName: TREASURE_01
     + visual: TREASURE_ADDON_01.ASC
     + showVisual: TRUE
     + visualCamAlign: NONE
     + cdStatic: FALSE
     + cdDyn: FALSE
     + StaticVob: FALSE
     + dynShadow: DS_NONE
    visual:
    ai:
    MOB
     + focusName: Treasure
     + hitpoints: 10
     + damage: 0
     + movable: FALSE
     + takable: FALSE
     + focusOverride: FALSE
     + soundMaterial: WOOD
     + visualDestroyed:
     + owner:
     + ownerGuild:
    triggerTarget: TREASURE_TRIGGER
    useWithItem: ITMWPICKAXE
    conditionFunc:
    onStateFunc: TREASURES
    rewind: FALSE
    Animation of digging plays fine, player is using ITMWPICKAXE.

    Problem is that onStateFunc TREASURES_S0 or TREASURES_S1 are never called. In debug mode I can see that state of this oCMobInter object never changes from 0.

    As you can see in code for oCMobInter object above - I already tried to trigger TREASURE_TRIGGER (which is ocTriggerScript and should call function TREASURE_SCRIPT - this as well does not happen)

    What am I missing - is there something special about ASC for G1 that has to be adjusted (I have 0 experience with animations) ?
    These are my print test functions:
    Code:
    FUNC VOID TREASURES_S0 ()    {    Print ("TREASURES_S0");        };
    FUNC VOID TREASURES_S1 ()    {    Print ("TREASURES_S1");        };
    FUNC VOID TREASURE_SCRIPT ()    {    Print ("TREASURE_SCRIPT");    };

  2. Beiträge anzeigen #2 Zitieren
    Local Hero Avatar von Mark56
    Registriert seit
    Sep 2010
    Beiträge
    254
     
    Mark56 ist offline
    How does treasure mds look like ?

  3. Beiträge anzeigen #3 Zitieren
    Local Hero
    Registriert seit
    Feb 2017
    Beiträge
    270
     
    F a w k e s ist offline
    Zitat Zitat von Mark56 Beitrag anzeigen
    How does treasure mds look like ?
    Hi Mark,
    That must be what I am missing here I don't have such file - can you help me with that - how this should look like?

  4. Beiträge anzeigen #4 Zitieren
    Local Hero Avatar von Mark56
    Registriert seit
    Sep 2010
    Beiträge
    254
     
    Mark56 ist offline
    You need to decompile TREASURE_ADDON_01.MSB (model script binary -> you get mds = model script) if there is one, I am not sure, if it is dynamic (has own model script and animations) or static mobsi (only asc model).

  5. Beiträge anzeigen #5 Zitieren
    Provinzheld
    Registriert seit
    Mar 2010
    Ort
    Berlin
    Beiträge
    201
     
    withmorten ist offline
    It doesn't have an MSB/MDS, just an MDL.

  6. Beiträge anzeigen #6 Zitieren
    Local Hero
    Registriert seit
    Feb 2017
    Beiträge
    270
     
    F a w k e s ist offline
    Zitat Zitat von withmorten Beitrag anzeigen
    It doesn't have an MSB/MDS, just an MDL.
    Yip, and when I decompiled it only file 'TREASURE_ADDON_01.ASC' was inside. What can be wrong - why is it not working

  7. Beiträge anzeigen #7 Zitieren
    Local Hero Avatar von Mark56
    Registriert seit
    Sep 2010
    Beiträge
    254
     
    Mark56 ist offline
    Yeah its static mobsi then. Only human has script and animations.
    I cannot look at it this weekend, but if everything is done correctly, it is probably difference in mobsi state handling in G1 and G2.

    G2 removed the need to manually advance interaction i.e.. in G1 any interaction begins with holding click (npc enters state S0) and pressing forward advances to next state. In G2 this is autmatically advanced, and maybe state is assumed faster.

    Look at example chest mobsi (one click and hero kneels to chest (s0) and opens it (s1))
    You will see the pattern from there.

    Every G1 mobsi has its state looped - ani("mobsi_s0" "mobsi_s0").
    While in G2, new mobsi do not use this rule, as states advance automatically.

    This is pure speculation:
    While this mob, has a lot of transition animations, but the state is not looped, but forces smooth playback with next ani set to another transition. (Which might not work for G1)

    Code:
     ani        ("t_TREASURE_Stand_2_S0"           1               "s_TREASURE_S2"               0.1 0.0  M. "HUM_TREASURE_A01.ASC"                         F  0   15)                    
        {
            *eventTag (5 "DEF_INSERT_ITEM" "ZS_LEFTHAND")
        }
    = here animation from stand to state 0 (stand_2_s0) actually results in calling animation s2 (state 2)... which could result in state 2 being entered, but:
    Code:
    ani        ("s_TREASURE_S2"                   1               "s_TREASURE_S3"               0.0 0.0  M. "HUM_TREASURE_A01.ASC"                         F  15  75)                    
        {
            *eventPFX (44 1         "CPFX_IAI_STONE" "ZS_RIGHTHAND")
            *eventSFX (44 "PICKORE" R:1000           EMPTY_SLOT)    
        }
    animation representing state 2 is not held/looped but immediatelly followed by s3....
    etc etc.

    maybe G1 has differend system determining what state to call...
    maybe its the skipping state 0 completely into s2, that is problem....

    I am not sure, you could experiment, rename those animations, rewrite humans.mds part of it, make loops at states, and see what works.

    [hint]
    in marvin mode, if you press G and T with mob in focus you should see its animation controller debug output (current state and frame)

  8. Beiträge anzeigen #8 Zitieren
    Local Hero
    Registriert seit
    Feb 2017
    Beiträge
    270
     
    F a w k e s ist offline
    Hi Mark,
    After several trial & errors it seems to me G1 requires loop animations in order to change state.
    Once I have added looped animation s_TREASURE_S0 into humans.mds state changed from 0 to 1.
    Code:
                ani        ("s_TREASURE_S0"                   1               "s_TREASURE_S0"               0.0 0.0  M. "HUM_TREASURE_A01.ASC"                       F  15  15)
    I tried to play around with S2 - S4 animations - but couldn't get state of mobsi changed to any of these - so in the end I decided to cut these out completely. This is how treasure animations look like now:
    Code:
                ani        ("t_TREASURE_Stand_2_S0"           1               "s_TREASURE_S0"               0.1 0.0  M. "HUM_TREASURE_A01.ASC"                       F  0   15)
                {
                    *eventTag (5 "DEF_INSERT_ITEM" "ZS_LEFTHAND")
                }
                ani        ("s_TREASURE_S0"                   1               "s_TREASURE_S0"               0.0 0.0  M. "HUM_TREASURE_A01.ASC"                       F  15  15)
                ani        ("t_TREASURE_S0_2_S1"              1               "t_TREASURE_S0_2_Stand"               0.0 0.0  M. "HUM_TREASURE_A01.ASC"               F  15  75)
                {
                    *eventPFX    (44 1 "CPFX_IAI_STONE"    "ZS_RIGHTHAND"    )
                    *eventSFX    (44   "pickore"    R:1000    EMPTY_SLOT)
                }
    
    
                ani        ("t_TREASURE_S0_2_Stand"           1               ""                            0.0 0.1  M. "HUM_TREASURE_A01.ASC"                       R  0   15)
                {
                    *eventTag (5 "DEF_REMOVE_ITEM")
                }
                
                ani        ("t_TREASURE_Stand_2_S1"           1               "t_TREASURE_LOOTED"           0.0 0.0  M. "HUM_TREASURE_A01.ASC"                       F  0   0)                     
                aniAlias   ("t_TREASURE_LOOTED"               1               ""                            0.0 0.0  M. "t_DONTKNOW"                                 F)
    Now finally when I use this mobsi - state is changed to 1 and function TREASURES_S1 is called (from here I call 3 more additional animations for player to dig out treasure as a replacement of S2, S3, S4 animations I cut out).
    Code:
    FUNC VOID AIQ_FIND_TREASURE ()
    {
        ... insert item
        ... play some effect
        ... give XP
    };
    
    
    FUNC VOID TREASURES_S1 ()
    {
        AI_PlayAni (hero, "T_TREASURE_S0_2_S1");
        AI_PlayAni (hero, "T_TREASURE_S0_2_S1");
        AI_PlayAni (hero, "T_TREASURE_S0_2_S1");
        
        AI_Function (hero, AIQ_FIND_TREASURE);
    };
    [Video]

  9. Beiträge anzeigen #9 Zitieren
    Local Hero Avatar von Mark56
    Registriert seit
    Sep 2010
    Beiträge
    254
     
    Mark56 ist offline
    You could have made 3 entries of the pickaxe animation, then let it enter S1 loop... this way you wont need to rely on LeGo...
    Pseudocode:
    Code:
    //     ani name,          next ani
    //-----------------------------------------------------
    ani ("s_treasure_s0"  "s_treasure_s0") // state s0
    ani ("s0_2_hit"  "s_treasure_hit") // pickaxe animation
    ani ("s_treasure_hit"  "s_treasure_hit2") // repeated pickaxe  animation
    ani ("s_treasure_hit2"  "s_treasure_hit3") // repeated pickaxe  animation
    ani ("s_treasure_hit3"  "s_treasure_s1") // repeated pickaxe  animation
    ani ("s_treasure_s1"  "s_treasure_s1") // state s1
    this way, you would get 3 repetitions before reaching s1... same effect, but without relying on AI functions...

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
Impressum | Link Us | intern
World of Gothic © by World of Gothic Team
Gothic, Gothic 2 & Gothic 3 are © by Piranha Bytes & Egmont Interactive & JoWooD Productions AG, all rights reserved worldwide