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 7 von 7
  1. Beiträge anzeigen #1 Zitieren
    Keks-Experte  Avatar von TazmanDevil
    Registriert seit
    Aug 2008
    Ort
    Diesseits des grossen Teiches
    Beiträge
    38.910
     
    TazmanDevil ist offline

    G1: Wie Skripte effizient kompilieren (Gothic.dat)?

    Ich wollte die Gothic.dat einer G1 Erweiterungsmod bauen.

    Wenn ich die Skripte vom GothicStarter_mod parsen lasse, dann werden meine Skripte compiliert und die Gothic.dat erzeugt (soweit so gut); im Fehlerfall ist das aber etwas muehsam, ausserdem sieht man nur Show-Stopper (fehlerhafte Zuweisungen wie a == 2; scheint der Compiler zu ignorieren).


    Ich wollte daher die Gothic.dat mit dem GothicSourcerer (V3.14) erstellen. Nach der Korrektur der Gothic.src (Wildcards wurden vom GothicSourcerer nicht richtig verarbeitet) konnte ich das Projekt anlegen und Kompilieren. Ergebnis waren etwa 100 Errors wegen fehlenden Rueckgabewerten (die meisten davon im Original Code von PB ), die Warnungen hatte ich bei den Compiler-Optionen bereits deaktiviert.
    Am Ende des Buils-Logs steht dann Process stopped... und eben die Zahl der Fehler. Eine Gothic.dat wurde nicht erstellt.

    War ich mit dem Gothic-Sourcerer auf dem Holzweg, oder muss ich die Fehler von PB erst noch korrigieren damit der Sourcerer die Gothic.dat baut?

    Oder gibt es ein anderers Tool mit dem man effizient compilieren kann?

  2. Homepage besuchen Beiträge anzeigen #2 Zitieren
    Schwertmeister Avatar von JohnPY
    Registriert seit
    Jan 2009
    Ort
    Darmstadt
    Beiträge
    720
     
    JohnPY ist offline
    Im Wiki steht dazu folgendes:

    [...]
    Auch die Version 3.0 hat zwar den Namen GothicSourcer, verfügt aber leider nicht über die Kompilationsfunktionen der Version 2.4
    [...]
    Also würde Ich es einfach mal mit Version 2.4 Versuchen, aber Ich habe nochnie mit dem Gothic Surcer gearbeitet und kann daher nichts genaues sagen.

    Ich wünsche dir jedenfalls noch viel Glück bei deiner Modifikation .
    Vom 22.7 bis zum 26.7 auf dem Thing.
    Ubuntuusers :|: Python :|: codeviewer :|: DTG :|: blender :|: GIMP :|: Wikipedia
    "Wer einen Fehler gemacht hat und ihn nicht korrigiert, begeht einen zweiten." - Konfuzius

    [Bild: style5,JohnPY.png]

  3. Homepage besuchen Beiträge anzeigen #3 Zitieren
    General Avatar von Nodrog
    Registriert seit
    May 2005
    Ort
    Dresden
    Beiträge
    3.145
     
    Nodrog ist offline
    Was spricht dagegen, es gothic selbst machen zu lassen?
    Es geht schnell und unkompliziert.

    Die Fehler beim Sourcer sind standart. Bei genauem Hinsehen ist es ja auch ein Fehler in den Scripten. Die Fehler sind eigendlich alle im Magiebereich. Die hat man in einer viertel Stunde behoben.

    Wenn du nur einen guten Parser suchst, aber das Kompilieren dich nicht interessiert, dann suche einfach nach Parser. Davon gibt es hier ein paar. Naja mindestes einen von dem ich gehöhrt habe.

  4. Beiträge anzeigen #4 Zitieren
    Keks-Experte  Avatar von TazmanDevil
    Registriert seit
    Aug 2008
    Ort
    Diesseits des grossen Teiches
    Beiträge
    38.910
     
    TazmanDevil ist offline
    Zitat Zitat von Nodrog Beitrag anzeigen
    Was spricht dagegen, es gothic selbst machen zu lassen?
    Es geht schnell und unkompliziert.
    Der Vorteil vom Sorcerer ist ja, dass er eben Fehler findet welche ich nicht sehe wenn ich ReparseSkripts verwende. Eine Falsche Zuweisung (a ==b anstatt a=b) findert der Sourcerer und man kann direkt via Doppelklick auf die Zeile in der Datei springen, aber beim Reparse Skripts sehe ich den Fehler noch nicht einmal.

    Ausserdem habe ich das Gefuehl dass die Performance beim Kompilieren via ReparseScripts gegen Ende hin stark nachlaesst.

    Zitat Zitat von Nodrog Beitrag anzeigen
    Die Fehler beim Sourcer sind standart. Bei genauem Hinsehen ist es ja auch ein Fehler in den Scripten. Die Fehler sind eigendlich alle im Magiebereich. Die hat man in einer viertel Stunde behoben.
    Ist der Default-Rueckgabewert bei den Funktionen "0", wenn kein return angegeben wurde?

    Zitat Zitat von Nodrog Beitrag anzeigen
    Wenn du nur einen guten Parser suchst, aber das Kompilieren dich nicht interessiert, dann suche einfach nach Parser. Davon gibt es hier ein paar. Naja mindestes einen von dem ich gehöhrt habe.
    Kompilieren interessuiert mich schon auch, ich will ja am Ende wenn die Fehler draussen sind eine Gothic.dat haben
    Aber ich mach mich mal auf die Suche nach dem Parser.

  5. Beiträge anzeigen #5 Zitieren
    Dea
    Registriert seit
    Jul 2007
    Beiträge
    10.466
     
    Lehona ist offline
    Ja, wenn nichts angegeben wird, wird 0 (False) zurückgegeben.

  6. Homepage besuchen Beiträge anzeigen #6 Zitieren
    Ritter Avatar von MaGoth
    Registriert seit
    May 2007
    Ort
    Russland (Samara)
    Beiträge
    1.407
     
    MaGoth ist offline
    @TazmanDevil:
    Hi,
    Ich wollte die Gothic.dat einer G1 Erweiterungsmod bauen.

    Wenn ich die Skripte vom GothicStarter_mod parsen lasse, dann werden meine Skripte compiliert und die Gothic.dat erzeugt (soweit so gut); im Fehlerfall ist das aber etwas muehsam, ausserdem sieht man nur Show-Stopper (fehlerhafte Zuweisungen wie a == 2; scheint der Compiler zu ignorieren).

    Ich wollte daher die Gothic.dat mit dem GothicSourcerer (V3.14) erstellen. Nach der Korrektur der Gothic.src (Wildcards wurden vom GothicSourcerer nicht richtig verarbeitet) konnte ich das Projekt anlegen und Kompilieren. Ergebnis waren etwa 100 Errors wegen fehlenden Rueckgabewerten (die meisten davon im Original Code von PB ), die Warnungen hatte ich bei den Compiler-Optionen bereits deaktiviert.
    Am Ende des Buils-Logs steht dann Process stopped... und eben die Zahl der Fehler. Eine Gothic.dat wurde nicht erstellt.

    War ich mit dem Gothic-Sourcerer auf dem Holzweg, oder muss ich die Fehler von PB erst noch korrigieren damit der Sourcerer die Gothic.dat baut?
    If you decompile scripts game GOTHIC, GOTHIC2 or GOTHIC2 - NoTR, or compile GOTHIC.dat and OU.bin of the original file *.src - the file of those games, coming together with GMDK of PB, then the error in the decompile/compile necessary to fix everything.

    Actually this has already been said many times:
    1. When you decompile/compile scripts may cause errors (they are present in a different form and in all the *.dat files games GOTHIC).
    2. None of the errors decompile/compile should not lead to the shutdown process (correct the error and run again - decompile/compile).
    3. All errors that need to be addressed in the decompile, or before re-compilation, the logs are in red.
    Only after that will decompile/compiled *.dat file.


    NOTE:
    Spoiler:(zum lesen bitte Text markieren)
    If you use scripts decompile then the errors (at compile them can not be).
    Mistakes are possible in the case of overdetermined types, it is the most probable source.

    On this occasion I have said in this topic, I advise all concerned to re-reinstall.
    Check for errors like the best comparison decompile scripts from the original script GOTHIC, GOTHIC2 or GOTHIC2-NoTR.

    For example, an overdetermined type of Mod Miranda:
    Error in file C_PCIsInMyRoom.d
    A fragment of the original file:
    Code:
    if ((self == owner) || (Wld_GetGuildAttitude (self.guild, portalowner) == ATT_FRIENDLY)) 
    { 
            return 1; 
    }
    ...
    Fagment decompile file:
    Code:
    if ((self == 2165) || (Wld_GetGuildAttitude (self.guild, portalowner) == ATT_FRIENDLY)) 
    { 
          return 1; 
    } 
    ...
    Overdetermined type - 2165.
    2165 should be replaced by the owner.

    A little bit of the overdetermined types.:
    In scripts GOTHIC overdetermined meet members of classes, functions, arguments, local and global variables.
    Overdetermined with kind CLASS on the type INT.

    Consider for example the function void EquipItem (c_npc self, int item), in item-type argument c_item (refer to the class c_item or its derivative) to override the type int. As a result of the decompilation of *.dat file to replace the argument of a number (example 4574), instead of the appropriate class name c_item (example ItMW_Addon_Knife01).

    The challenge is to correctly distinguish the true from the INT types overdetermined types. All would definitely be resolved, if it were not overdetermined functions, written in the scripts themselves, as they are!

    And this requires comparing the texts of the source code files and scripts to find the maximum for such situations and correct them.



    Oder gibt es ein anderers Tool mit dem man effizient compilieren kann?
    The latest version of the program GothicSourcer-3.14 implemented very strict on the correct syntax of the language - the compiler scripts GOTHIC.
    The original compilers Gothic.exe or Spacer.exe not go with him to compare, since they skip when compiling a large number of fatal errors. In the compiled program GothicSourcer ver. 3.14 file GOTHIC.dat, gets the minimum number of errors.

    Note:
    Spoiler:(zum lesen bitte Text markieren)
    The compiler will check that all data types, the use of expressions in the right places, that the ad functions and return values. Even in the original script, there mess in some places is written strictly as it should be allowed a lot of other inconsistencies, which in certain cases can lead to error.

    Consider the example of a specific error:
    1. Possible error, function should return value - this message appears in a few cases where the declared function must return a value, but this does not happen.
    The reasons could be two:
    - First, if a function should indeed return a value, then when you exit the function should be recording - return xxx;
    where - xxx the return value.
    Many script file is not being respected.
    - The second reason, the function should not return anything, as indicated in the ad features the return type - int, in this case, instead of return type in function declaration must specify the type - void.
    Such errors in the scripts below, but they exist.

    If you correct all the errors, the compilation is successful, the process of compilation and decompilation are no errors and results of all the compilations give the same correct results.


    To date, the only program that is not passed to script the game most of the known bugs, as the original game files, and modifications created on their basis.


    MfG MaGoth, WoG.ru-Community.
    |: WOG.de :|: WOG.en :|: WOG.ru :|: WOG.ro :|||: MAGIC-Team :|
    [Bild: 106462_941c3dcc88ff9e9b5597d9f24d9aea88.jpg]
    |: WOR.de :|: WOR.en :|: WOR.ru :|: WOR.ro :|||: Piranha-Bytes :|
    -=GOTHIC UND DIE FREUNDSCHAFT FÜR ALLE ZEITEN!=-
    Geändert von MaGoth (08.06.2009 um 01:20 Uhr)

  7. Beiträge anzeigen #7 Zitieren
    Keks-Experte  Avatar von TazmanDevil
    Registriert seit
    Aug 2008
    Ort
    Diesseits des grossen Teiches
    Beiträge
    38.910
     
    TazmanDevil ist offline
    Hi MaGoth,

    thanks for your detailed explanation.

    My starting point is the real source-code of the mod (which is based on the source-code of the MDK), so no decompilation was necessary/did happen.

    As this code was successfully compiled before and as there were also quite some errors reported in the code of PiranhaBytes I was surprised and got uncertain about the correctness of my build environment/procedure.

    But meanwhile it's clear to me. I'll stick with the GothicSourcerer and fix those lines in the PB code. First of all I prefer a compiler that identifies as much defects as possible and second I prefer to work on code in a development environment over using a word-processing program.

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