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 5 von 5
  1. Beiträge anzeigen #1 Zitieren
    Abenteurer Avatar von Senlax
    Registriert seit
    Jan 2021
    Ort
    HH
    Beiträge
    92
     
    Senlax ist offline

    Fackelständer anzünden (NPC's)

    Hallo,

    es ist ja seit G1 möglich, wenn ich als Held eine angezündete Fackel in der Hand halte,
    die Fackelständer anzuzünden, wenn es noch nicht abends ist.

    Allerdings wollte ich das gerne auch für die NPC's machen. Nun stehe ich vor dem Problem,
    wie genau heißt der Fackelständer eigentlich?

    Da das hier für G1 sein soll, müsste ja in der TA.D in etwa sowas drin stehen.

    Spoiler:(zum lesen bitte Text markieren)

    Code:
    func void TA_UseTorch_Stand(var int start_h,var int start_m,var int stop_h,var int stop_m,var string waypoint)
    {
        TA_Min(self,start_h,start_m,stop_h,stop_m,ZS_UseTorch_Stand,waypoint);
    };


    und in der ZS.Torch (was meinen Ablauf enthalten sollte)

    Spoiler:(zum lesen bitte Text markieren)

    Code:
    func void ZS_UseTorch_Stand()
    {
        PrintDebugNpc(PD_TA_FRAME,"ZS_UseTorch_Stand");
        B_SetPerception(self);
        B_StartUseMob(self,"Torch");
    };
    
    func void ZS_UseTorch_Stand_Loop()
    {
        var int randomizer;
        PrintDebugNpc(PD_TA_LOOP,"ZS_UseTorch_Stand_Loop");
        randomizer = Hlp_Random(20);
        if(Npc_GetStateTime(self) >= (100 + randomizer))
        {
            B_InterruptMob("Torch");
        };
        AI_Wait(self,1);
    };
    
    func void ZS_UseTorch_Stand_End()
    {
        PrintDebugNpc(PD_TA_FRAME,"ZS_UseTorch_Stand_End");
        B_StopUseMob(self,"Torch");
    };


    Das war nun mein Gedankenansatz - wobei ich denke, dass der nur zum Teil stimmt.

    Vielleicht kann mir einer dabei auf die Sprünge helfen.

    Vielen Dank und einen schönen, sonnigen Tag
    Der Senlax war's

    ein Modder-Krüppel schlecht hin

  2. Beiträge anzeigen #2 Zitieren
    Local Hero
    Registriert seit
    Feb 2017
    Beiträge
    270
     
    F a w k e s ist offline
    Hello Senlax,
    What you are looking for is mob property SCEME - in case of torches it is FIREPLACE:

    [Bild: GM-Fireplace.png]

    This one is tricky:
    1. FIREPLACE mobs are 'available' for AI_UseMob even when lit (state 1) - but it is not possible to interact with them ... NPC will get 'stuck' in interaction animation.
    2. Mobs cannot have useWithItem ItLsTorchBurning, seems like game engine does not recognize that NPC is having burning torch in hand. NPC will not be able to use mob.

    With Ikarus & LeGo you can work-around these limitations by creating your own mob detection function and your own AI_UseMob function:
    (in the video torch is in right hand while interaction animation has it in left hand - fixed meanwhile )
    [Video]

    I am still ironning out some details in the code - but later on (in couple of weeks) I will share this solution.

  3. Beiträge anzeigen #3 Zitieren
    Rock Me Amadeus  Avatar von Askanius
    Registriert seit
    Oct 2009
    Beiträge
    3.972
     
    Askanius ist offline
    Zitat Zitat von F a w k e s Beitrag anzeigen
    [video[/video]

    I am still ironning out some details in the code - but later on (in couple of weeks) I will share this solution.
    Hello F a w k e s,

    I am not a modder but only love playing Gothic, so I can't really comment on the coding aspect of what you did. But I just wanted to appreciate how absolutely fantastic this is and how much it adds to the atmosphere of Old Camp only seeing this little video. NPCs not lighting up lights in the evening has been bothering me for 20 years. Great work!

  4. Beiträge anzeigen #4 Zitieren
    Serima Avatar von Fisk2033
    Registriert seit
    Dec 2010
    Ort
    Dresden
    Beiträge
    5.803
     
    Fisk2033 ist offline
    Zitat Zitat von Askanius Beitrag anzeigen
    Hello F a w k e s,

    I am not a modder but only love playing Gothic, so I can't really comment on the coding aspect of what you did. But I just wanted to appreciate how absolutely fantastic this is and how much it adds to the atmosphere of Old Camp only seeing this little video. NPCs not lighting up lights in the evening has been bothering me for 20 years. Great work!
    This!
    Also amazing how you, Fawkes, help the community and provide examples/code!

  5. Beiträge anzeigen #5 Zitieren
    Local Hero
    Registriert seit
    Feb 2017
    Beiträge
    270
     
    F a w k e s ist offline
    Hello Senlax,
    Took me forever, but finally I can share whole solution. I've uploaded example to this GitHub branch:
    https://github.com/Bad-Scientists/G1...rePlaceLighter

    In this comparison view, you can see exactly what code I have added where in Gothic 1 to make it work.
    https://github.com/Bad-Scientists/G1...rePlaceLighter

    It is fairly complex solution using Ikarus & LeGo + several custom AI functions from script-packet I am contributing to. Hope this helps

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