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 6 von 6
  1. Beiträge anzeigen #1 Zitieren
    Mythos Avatar von Elvardo
    Registriert seit
    May 2012
    Ort
    Bruderschaft
    Beiträge
    8.506
     
    Elvardo ist offline

    other defekt?

    Einer meiner Tester hatte folgendes Problem, das ich auch schon einige Male beobachtete:

    Questgeber verlangt xxx Items
    Held besitzt xxx Items
    Abgabe nicht möglich.

    Einfache Lösung, denkt man. Iteminstanz falsch eingetragen, die Klammer falsch rum. Aber nein, da ist etwas seltsam dran. Als der Tester mir den Save mit der Itemübergabe schickte und ich sie lud, konnte ich Diese problemlos tätigen. Auch als der Tester den Save selbst wieder lud war der Fehler nicht mehr da und weiterspielen problemlos möglich.
    Meine Vermutung ist, dass Gothic bei ihm die Instanz 'other' nicht erkannt hat, die nach den Items befragt wurde.

    Mal der Skript zum Anschauen:
    Code:
    if (Npc_HasItems (other, ItPl_Mana_Herb_01) > 9)
            && (Npc_HasItems (other, ItPl_Health_Herb_01) > 9)
    	&& (Npc_HasItems (other, ItPl_Temp_Herb) > 4)
    	&& (Npc_HasItems (other, ItPl_swampherb) > 99)
    	{
    		Info_AddChoice (DIA_Cruchot_HerbsRunning, "Ich habe alle Pflanzen, die ich beschaffen sollte!", DIA_Cruchot_HerbsRunning_Success);
    	};
    In 99% der Fälle klappt die Übergabe, aber bei 1% geht es erst nach einem Neuladen wieder.

    Gibt es eine Möglichkeit, other irgendwie 'festzulegen'? Ich hätte vor, dies in meinem Permaskript im Hintergrund alle paar Minuten aufzuführen.
    Oder, besser, kennt jemand den Grund dafür, dass other 'beschädigt' wird?

    Sei vielleicht noch gesagt, dass pc_hero bei jedem Neuladen ein neues Aussehen zugewiesen bekommt, je nach Wahl des Spielers. Weis nicht, ob dies den NPC 'beschädigt'.

  2. Beiträge anzeigen #2 Zitieren
    Dea
    Registriert seit
    Jul 2007
    Beiträge
    10.447
     
    Lehona ist offline
    Verwende doch einfach 'hero' anstatt 'other'?

    Im Hintergrund dauernd 'other' zu überschreiben ist auf jedenfall nicht ratsam, da machst du mehr kaputt als du reparierst.

  3. Beiträge anzeigen #3 Zitieren
    Local Hero
    Registriert seit
    Feb 2017
    Beiträge
    270
     
    F a w k e s ist offline
    @Elvardo, can you show whole dialog?

    There are some functions in Gothic that are overriding 'other', for example:
    Code:
    Npc_GetTarget ();
    Wld_DetectNpc ();

  4. Beiträge anzeigen #4 Zitieren
    Provinzheld Avatar von TopLayer
    Registriert seit
    Nov 2020
    Beiträge
    285
     
    TopLayer ist offline
    There are 2 known bugs in Npc_HasItems implementation. It can return wrong value in some situations.

  5. Beiträge anzeigen #5 Zitieren
    Local Hero
    Registriert seit
    Feb 2017
    Beiträge
    270
     
    F a w k e s ist offline
    @TopLayer can you elaborate on 2 bugs - what are those and in which situation do they occur? Thank you

  6. Beiträge anzeigen #6 Zitieren
    Provinzheld Avatar von TopLayer
    Registriert seit
    Nov 2020
    Beiträge
    285
     
    TopLayer ist offline
    Zitat Zitat von F a w k e s Beitrag anzeigen
    @TopLayer can you elaborate on 2 bugs - what are those and in which situation do they occur? Thank you
    When you open inventory in game all items it contains are stored in `inventory` field that is a list of oCItem objects. But when you save the game (or after load) all unequipped items are destroyed as oCItem objects and stored in `packString` field instead, ex:
    packString="ITFO_APPLE:2,ITMI_GOLD:50"

    1. Imagine, you save the game and your inventory is [inventory="", packString="ITFO_APPLE:1"]. Then you pick another apple and your inventory is [inventory="ITFO_APPLE:1", packString="ITFO_APPLE:1"]. In this case Npc_HasItems(hero, itfo_apple) returns 3: it sums apples in inventory list (+1), then it creates apple from packString but in this moment inventory become [inventory="ITFO_APPLE:2", packString=""] and it add +2 to the total amount returned. So, it counted item in `inventory` list twice.

    2. Imagine, you save the game and your inventory is [inventory="", packString="ITFO_APPLE:1"]. Then you pick another apple and your inventory is [inventory="ITFO_APPLE:1", packString="ITFO_APPLE:1"]. Save again and your inventory is [inventory="", packString="ITFO_APPLE:1,ITFO_APPLE:1"]. So, Npc_HasItems(hero, itfo_apple) will return 1 (the first occurance of apple in the packString) and leave inventory in the previous buggy state: [inventory="ITFO_APPLE:1", packString="ITFO_APPLE:1"]

    3. Yes-yes, there are more bugs. Imagine, you save the game and your inventory is [inventory="", packString="ITFO_BEER:1,ITMI_GOLDRING:2"]. The call Npc_HasItems(hero, itmi_gold) returns 1 and replaces your gold rings by 1 gold: [inventory="ITMI_GOLD", packString="ITFO_BEER:1"]. To reproduce it packString must contain more the 1 item in list and the last item listed must have the name that starts with the name of requested item.

    4. The fourth bug is aslo related to packString but is reproducable in Gothic 1 and Gothic 1 Sequel only. I forgot the nuances but it is about multiply commas in packString. Ex: packString="ITFO_APPLE,,,,,,,ITFO_BEER".

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