Home Gothic Gothic II Gothic 3 Gothic 4 Downloads Forums

 

Ergebnis 1 bis 4 von 4
  1. Beiträge anzeigen #1
    General Avatar von Korianous
    Registriert seit
    Jun 2008
    Ort
    USA
    Beiträge
    3.080
     
    Korianous ist offline

    Ironkeep Modder's Compendium

    Ironkeep Modder's Compendium
    An in-depth guide to Gothic I/II Modding
    by Korianous

    This is the start of a modding compendium. It will grow and expand as I have free time, will build up and review the basic components of Gothic Modding. Info is there, but it is primarily in German, scattered all over the place, etc. I would like to fix this, and tell people what they need to know to get started modding for Gothic I/II. The compendium is strongly focused on G2 modding, but if you have the basics, you should be able to port your knowledge over to G1 with little trouble.

    NOTE: Due to the purposes of this thread, please do not write any comments, feedback, or suggestions here. PM me, or visit the discussion thread .

    Supplemental Resources:

    Scripting:
    The Daedalus Language
    Scripting Tips & Tricks
    Gunther Tutorial

    Spacer:
    Getting Started with the Spacer
    Spacer- NPC & Dialogue Tutorial

    The videos have English subtitles. Long view, but watch them through and learn.

    Modder-Databank:

    A massive resource containing scripts, models, textures, animations, and a lot of other helpful tools for Gothic modders.

    Basic Tutorials:

    1. Getting Started
    2. Using GothicVDFS
    3. Basic Scripting

    Next Tutorial: Basic Scripting, pt. 2
    Ach Fry, Ich hab dich mehr als der Monde, die Sterne...das...fail.
    Geändert von Tratos (31.08.2010 um 21:01 Uhr)

  2. Beiträge anzeigen #2
    General Avatar von Korianous
    Registriert seit
    Jun 2008
    Ort
    USA
    Beiträge
    3.080
     
    Korianous ist offline
    Basic Tutorial 1: Getting Started
    by Korianous

    Introduction

    Okay, so you've been playing a lot of Gothic II NotR. I'm sure at some point you've wished you could just fix something here, or add some new quest, make some weapon do more damage, etc etc. So, you decide you want to become a Gothic modder, but you've no clue where to start! Well, hopefully, this guide can help you avoid some confusion.

    This first tutorial we will take it slow, and just go through the absolute basics. It won't tell you how to mod, merely how to start to mod. It also won't take you from complete ignorance to expert modder, but will help you get from complete ignorance to newbie modder. However, this is for the best, as in the bit to bit manner, I can cover more things in greater detail.

    Setting everything up:

    Note: This guide will assume you are using Gothic 2/Addon version 2.7(ENG). As such, some info may vary depending on your localization.

    Step 1: The Report Version .exe

    The Gothic 2 MDK is coded to recognize version 2.6 as a valid g2 .exe file. Since you're using 2.7, the MDK will not install over that version. Fortunately, there is a simple fix, the Report Version .exe file.

    Some brief side info, the report version .exe was initially not even intended for modding. From what I've understood, previous error logs were a mass of unreadable binary numbers and code, which were nearly indecipherable even to the trained eye.

    The report version .exe enables Codeview in the error log, so a person examining a crash could see exactly what went wrong and in which part of the code, to enable for a more detailed report. The plus, this .exe is recognized by the Modkit as well, so German and English users can enjoy it alike, and reap many benefits from it .

    The report version .exe is downloadable from the following link:
    http://www.worldofgothic.com/dl/?go=dlfile&fileid=122

    Note: The file you are looking for is called gothic2_fix-2.6.0.0-rev1.exe.Make sure it is this file you are downloading and not the 1.3 version!

    Note: Some users report trouble with installing it in their G2 folder. If you happen to be one of these people, simply manually extract the files from the setup.exe using 7-Zip or Universal Extractor (I prefer 7Zip).

    Step 2: Installing the MDK


    Now that we've fixed our copy of Gothic II, so that it is recognizable by the MDK, our next step is installing it. I know this seems simple, but there is a process involved, which many have problems with.

    First off, you must download the MDK. It is available here:
    http://www.worldofgothic.com/dl/?go=dlfile&fileid=87

    To keep it simple, we are using the version that includes Raw Data, which we will need for modding. Double click the .exe and set it up. Now you can select the files that you will need. I recommend you don't unpack the speech/sound effect files, as you will likely not be using them and they take loads of HD space. If you need them later on for whatever reason, you can always unpack them later with GothicVDFS (we'll get to using that tool in a later tutorial). Now install the MDK.

    Once that's done, grab the 2.6a patch for the MDK (a link can be found to it in the same link provided earlier for the MDK). Install the 2.6a patch. Lastly.
    install the Gothic Starter 2.6a update link here:

    http://www.worldofgothic.com/dl/?go=dlfile&fileid=90

    And with that, the MDK is completely setup and good to go.

    3. The Scripts

    Yup, you aren't done yet . Not quite. There are a few more things you will need before we can truly begin. Namely, English Scripts. The ones provided by the MDK are in German, and we can't use them to make an English mod, not to mention they'll have overwritten your English ones. Therefore, you have to get rid of them. Delete the Scripts folder from your _work/Data directory, and install the ICP v1.0a scripts (available here):

    http://forum.worldofplayers.de/forum...&#post10112468

    Make sure you've gotten the ones listed as the "Spacer Version". We're using these as they have some additional bugfixes, but you can also download the Original English Scripts, available in that same thread.

    Then create a new /Scripts folder in your _work/Data folder. Extract the .7z file to somewhere else on your HD, and navigate the _work/Data directories. There should be three directories here: /_compiled, /content, and /system. Select all three of these directories, and copy and paste them to the /Scripts folder you created.

    Now, I highly recommend you make a backup of your scripts folder in that directory, call it /Scripts_Original in that directory. Now you have a working copy of the English Scripts. To compile the scripts, go to the /system directory in your main Gothic II folder, and click on the gothicstarter_mod.exe file. Hook the Reparse Scripts option, and click Play the Game/Start the Editor, it doesn't matter which. The scripts should compile and build successfully.

    And with that, you are fully ready to begin modding .

    Supplementary Materials:

    You will need a text editor to edit the Gothic II scripts. While Notepad suffices, you will likely want some syntax highlighting. You could use the following tools:

    1. UltraEdit 32: Recommended by most. However, it's not for free :-(.
    2. Crimson Editor: I use this one, as it has some nice functions I like.
    3. Code Edit:
    4. Source Edit:

    IDES(Integrated Development Environments) specifically for Daedalus:

    1) Gothic Text Editor
    2) GothicSourcer

    I have personally not used 3 or 4, but you could give them a shot. Download links for the highlighters are available here, makes reading/editing code less of a pain in the butt.:
    http://www.worldofgothic.com/dl/?go=dlfile&fileid=81
    Ach Fry, Ich hab dich mehr als der Monde, die Sterne...das...fail.
    Geändert von Korianous (12.03.2010 um 17:17 Uhr)

  3. Beiträge anzeigen #3
    General Avatar von Korianous
    Registriert seit
    Jun 2008
    Ort
    USA
    Beiträge
    3.080
     
    Korianous ist offline
    Basic Tutorial 2: Using GothicVDFS
    by Korianous

    Introduction

    So you're all set up with the MDK, and good to begin your journey as a newbie Gothic Modder. This time, we're going to show you one of the most important steps: compiling your work with GothicVDFS. Typically, this step comes at the end, however, I feel this is something important to learn, as some people have problems with it, and it can be useful right away.

    Without further ado, let's get started then, shall we?

    File & Directory Structures

    First off, we must discuss the the structure of the directories. Your compiled mod must follow this structure exactly, as it is the ONLY structure understood by the ZenGine & the Virtual Disk File System (VDFS). If your folders are placed slightly incorrectly, then your mod will not work properly. However, you shouldn't panic, as it isn't hard to get it right.

    First off, notice the root directory _work. This is the root directory that all your files must be contained in. The directories are further broken up as follows:
    /work(root)
    /Data
    /Anims
    /Meshes
    /Music
    /Presets
    /Scripts
    /Sound
    /Video
    /Worlds
    These folders have further subfolders, just open them up to see. For the purposes of our core tutorials, Music, Presets, Sound, and Video are not important.

    Now that we understand the directories, we must understand that only certain files are parsed by the ZenGine. The ZenGine file formats themselves will be covered in great detail further on in this series. For now, understand the basic formats that are recognized by the Spacer:

    • *.dat
    • *.bin
    • *.mrm
    • *.mdm
    • *.tex
    • *.zen


    There are other formats, however, these are the principle compiled formats, more will be discussed later.

    GothicVDFS 101

    Now, let's open up GothicVDFS. Go to the _work/tools directory, and you should find a folder called /VDFS. Click on that and then open up GothicVDFS.exe. This is a handy little tool designed by Nico Bendlin (former PB programmer), and enables you to compile your own .mod/.vdf files.

    Now, a quick summary of what it does:

    (Viewer)- Lets you open and browse .vdf/.mod files.
    (Builder)- Creating build files.

    Viewer Options:
    Filename: Just use this to open up those files .
    The other options are not that important, with regards to the viewer. The Builder options are where we must be attentive.

    Builder Options:
    Filename: Select a filename for your compiled vdfs. By default it will be in .mod format, should you wish to make a .vdf file, just choose to save under the all files option, and add a .vdf extension to your saved filename.

    Root Path: This is the primary directory the VDFs file will look in to compile. you should set this to the directory containing your mod's /_work directory structure.

    Example: Your mod's /_work directory is found in C:\MyMod\_work. Set the Root path to C:\MyMod.

    Comments: Useful for leaving comments about the .mod file, for your fellow developers. You don't really have to do that, it's just something to do.

    Open/Save Script: This is really useful. You can use these commands to save the filemasks you have included/excluded and all other info about your mod file to a script, so you don't have retype everything.

    File(masks) to search for: You can set these to name the file/extensions GothicVDFS should look for.

    File(masks) to include: Basically the same thing, functions as an override option.

    File(masks) to exclude: The same thing, use it if you have specific files you would like GothicVDFS to ignore.
    Now, try opening up some of the .vdf & .mod files you have. See how their directory structure works and how files are contained. This is what you should replicate in your own compilations.

    Compiling your first mod

    Even though you may be modding, I'm sure many of you will still want to play Gothic II NotR every once in a little while. For that, the Piranha Bytes provided the GothicGame.mod with the MDK. However, that comes with German text. And unless you're trying to learn German (like me ), I'm sure you will want to be able to play it fully in English, just as you did before you were modding. Let's do that.

    First off, create a new directory anywhere on your HD, the tutorial assumes C:\G2English for simplicity. Create the _work/Data/Scripts directory structure there. Download the ICP v1.0a English Scripts. Unzip the /_compiled directory and the /Content/Cutscene directories to the /Scripts folder you just created. No other directories are needed.

    Now, open up GothicVDFS, and click the Builder option. Set the root path to C:\G2English. Set the filename to GothicGame_English.mod (make sure it's set to save in the Data/modvdf directory. Now add the following file extensions under the filemasks to search for:
    • *.dat
    • *.bin


    Save the script if you wish, and then click build volume. You should now have a new file in your /modvdf folder called GothicGame_English.mod.

    This is not all you need. Copy the GothicGame.ini file (not to be confused with the Gothic.ini) found in the /system folder, and rename it GothicGame_English.ini. Under the [FILES] section, replace GothicGame.mod with GothicGame_English.mod. Under the [INFO] section, rename the title Gothic II- Night of the Raven. Save your changes and exit. Now, if all went well, click on Gothic Starter, and you should be able to see your newly created .mod. Click it and play .
    Ach Fry, Ich hab dich mehr als der Monde, die Sterne...das...fail.
    Geändert von Korianous (08.10.2009 um 18:53 Uhr)

  4. Beiträge anzeigen #4
    General Avatar von Korianous
    Registriert seit
    Jun 2008
    Ort
    USA
    Beiträge
    3.080
     
    Korianous ist offline
    Basic Tutorial 3: Scripting for Beginners
    By Korianous

    Introduction

    In previous tutorials, we've explained how to get started. You have the MDK prepared for developing mods and you know how to compile .mod files. Now, here comes a real core lesson, utilizing the Gothic scripting language, Daedalus.

    This is the part where most beginners stumble on, as Daedalus is a powerful language, but can be confusing for beginners. But it can be learned rather easily with some perseverance and dedication, and once you do learn it, it's relatively easy and even entertaining to use, as it's quite flexible.

    A common misconception about scripting:
    "I'm not a programmer, therefore Scripting is not for me."

    This couldn't be any further from the truth. Good game-specific scripting languages are made to cater towards the game designers, not the programmers. The reason for this is simple, it is far easier to find a talented game designer who can be taught a scripting language than it is to find a talented game designer who is also a skilled programmer.

    Therefore, while script languages borrow syntax and styling from their programming counterparts (C/C++, Pascal, etc.), they are by no means as complicated to learn, as they are streamlined for game-specific purposes.
    While it may help slightly to recognize some of the syntax and OOP concepts applied, You do not have to be a programmer or have any programming experience to get the hang of Daedalus, and many talented Scripters are not programmers.

    I myself had little programming experience prior learning Gothic Modding, and I managed to get the hang of it after a few pointers. I'm sure with some patience, and this guide, you will be able to as well .

    Before We Begin:

    This thread will not cover everything you can do in Daedalus from start to finish, but it will go over some of the basic concepts and serve as a primer for more advanced tutorials in the future.

    You should already have the following things:

    - MDK fully installed and ready to go:
    - The Scripts
    - Text Editor w/ Daedalus syntax highlighting.

    These were explained in the earlier tutorials, go back and read them if you haven't already.

    Now, open up the Scripts folder, and have a look at the directory structure. Pay special attention to where files are placed and what goes where, it becomes important later on .

    Compiling Scripts:

    Before we really start any editing, it's a good idea to make sure your scripts can compile as intended. So, go to the GothicStarter_mod.exe. Hook the Reparse Scripts/Skripte Parsen option, and then click Start the Editor. Your scripts should compile into .dat files. Now, lets make an Ou.bin with the Spacer. Wait for it to load, and there should be an Output Units toolbox. Click Update, and the Ou.bin should reload from your script info. Now click save, and you've got your ou.bin file. Ou.csl file may be generated as well, but it's not really needed in a mod distribution, just the .bin file is fine.

    PS: Ou.dat/Ou.bin are the same thing, just one is recognized by a report version Gothic II, the other is not.

    Writing Dialogue

    So, now you've compiled scripts, let's have you write some dialog. We'll avoid creating a new NPC for now, that stuff is better handled later on, when you have a better handle on scripting. Since we want something that's easy to test, let's modify the dialogue file of Xardas. Open up the DIA_NONE_100_Xardas.d file in your Story/Dialog folder, and let's take a look. One of the first instances you will find is here:
    Code:
    instance DIA_Xardas_Hello(C_Info)
    {
    	npc = NONE_100_Xardas;
    	nr = 1;
    	condition = DIA_Xardas_Hello_Condition;
    	information = DIA_Xardas_Hello_Info;
    	permanent = FALSE;
    	important = TRUE;
    };
    
    
    func int DIA_Xardas_Hello_Condition()
    {
    	return TRUE;
    };
    
    func void DIA_Xardas_Hello_Info()
    {
    	AI_Output(self,other,"DIA_Addon_Xardas_Hello_14_00");	//There you are again! (smiling) I never thought the two of us would meet again.
    	AI_Output(other,self,"DIA_Addon_Xardas_Hello_15_01");	//I feel like I spent three weeks lying under a load of rocks.
    	AI_Output(self,other,"DIA_Addon_Xardas_Hello_14_02");	//Well, so you did. Only the magic within your armor kept you alive.
    	AI_Output(self,other,"DIA_Addon_Xardas_Hello_14_03");	//I had feared I might not be able to rescue you from the debris of the temple.
    	AI_Output(self,other,"DIA_Addon_Xardas_Hello_14_04");	//But enough of that. You're here now.
    	AI_Output(self,other,"DIA_Addon_Xardas_Hello_14_05");	//There's a NEW threat that we have to deal with.
    	Info_ClearChoices(DIA_Xardas_Hello);
    	Info_AddChoice(DIA_Xardas_Hello,"We've got plenty of time now. The Sleeper has been vanquished.",DIA_Addon_Xardas_Hello_Dragons);
    	Info_AddChoice(DIA_Xardas_Hello,"What NEW threat are you talking about?",DIA_Addon_Xardas_Hello_Man);
    };
    Look familiar? It's the first bit of dialogue Xardas says to you upon starting the game. But what do all these lines mean? Let's explain:

    instance DIA_Xardas_Hello(C_Info)
    {
    npc = NONE_100_Xardas;
    nr = 1;
    condition = DIA_Xardas_Hello_Condition;
    information = DIA_Xardas_Hello_Info;
    permanent = FALSE;
    important = TRUE;
    };
    instance = An object of a certain class, followed by the name and type, in this case C_INFO. See Classes.d for more info.

    npc = the NPC who will be involved in this conversation.
    nr = common sense, just look throughout the scripts .
    condition = the function that determines whether or not this instance will occur.
    information = The output of the instance. This will include dialogue in the case of this instance, but you can also have routines called, have the NPC give the player items, exp, or w/e you deem necessary.
    permanent = If set to TRUE, this event will always occur.
    important = If set to TRUE, the NPC will initiate the conversation instead of the hero.

    WARNING: Never have important and permanent both set to true!

    In other instances, you will see a parameter called description. This accepts a string "", describing what the player will see for this instance in their list of dialogue options.

    func int DIA_Xardas_Hello_Condition()
    {
    return TRUE;
    };
    In this case, the function will always return true, but other functions require certain values to be set to true before the condition returns true. Just have a look through other instances of dialogue .

    func void DIA_Xardas_Hello_Info()
    {
    AI_Output(self,other,"DIA_Addon_Xardas_Hello_14_00"); //There you are again! (smiling) I never thought the two of us would meet again.
    .....
    To understand this, we must define the AI_Output function:

    AI_Output(var C_NPC npc1, var C_NPC npc2, var string speech);

    The first parameter is the NPC who is doing the talking, the second is the NPC being spoken to, the third is the corresponding speech file's name. It's okay if this points to a non-existent speech file, all that will happen is that the line has no voice output, but if you don't have a voice actor saying that line, no big deal.

    The remarks after the two forward slashes // (called a comment), contain the subtitles for the dialogue. These will be processed by the ou.bin file, the only comments that aren't ignored.

    So, now that you know what's going on, let's add a line of dialogue to this:

    Code:
    func void DIA_Xardas_Hello_Info()
    {
    	AI_Output(self,other,"DIA_Addon_Xardas_Hello_14_00");	//There you are again! (smiling) I never thought the two of us would meet again.
           AI_Output(self,other,"DIA_Addon_Xardas_Hello_14_01"); //(frowning) You smell pretty awful though. I kind of hoped that shining blue stuff you appeared in would have handled that.
    	AI_Output(other,self,"DIA_Addon_Xardas_Hello_15_02");	//I feel like I spent three weeks lying under a load of rocks.
    	AI_Output(self,other,"DIA_Addon_Xardas_Hello_14_03");	//Well, so you did. Only the magic within your armor kept you alive.
    	AI_Output(self,other,"DIA_Addon_Xardas_Hello_14_04");	//I had feared I might not be able to rescue you from the debris of the temple.
    	AI_Output(self,other,"DIA_Addon_Xardas_Hello_14_05");	//But enough of that. You're here now.
    	AI_Output(self,other,"DIA_Addon_Xardas_Hello_14_06");	//There's a NEW threat that we have to deal with.
    	Info_ClearChoices(DIA_Xardas_Hello);
    	Info_AddChoice(DIA_Xardas_Hello,"We've got plenty of time now. The Sleeper has been vanquished.",DIA_Addon_Xardas_Hello_Dragons);
    	Info_AddChoice(DIA_Xardas_Hello,"What NEW threat are you talking about?",DIA_Addon_Xardas_Hello_Man);
    };
    Additions/changes are in blue. Now compile, and if all goes well, Xardas should now comment on your BO upon starting the game .

    ...to be continued.
    Ach Fry, Ich hab dich mehr als der Monde, die Sterne...das...fail.
    Geändert von Korianous (06.07.2010 um 18:21 Uhr)

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