Willkommen ~Gast!
Registrieren || Einloggen || Hilfe/FAQ || Staff
Probleme mit der Registrierung im Forum? Melde dich unter registerEin Bild.
Autor Beitrag
000
25.04.2003, 17:47
Smeagol



hiho dat :)
ich steige im moment von hammer auf Tread3D (http://www.planetquake.com/tread/) um ...
da war auch ne GDF für cs/hl/ahl dabei, allerdings sind die ziemlich veraltet :/
da ich selbst eigentlich keine (sehr wenig) ahnung von sowas habe, wollt ich mal fragen, ob sich ein netter (begabter usw *schleim =)) coder dazu bereit erklären würde, die neusten FGDs von hl und cs in das GDF format zu bringen .... oder (wenn derjenige ganz begabt ist und nix zu tun hat) nen kompiler zu schreiben :)

greetings
Smeagol

ps: wenn ihr auf der tread page was runterladen wollt, wirds ein bisschen tricky ... der link ist nämlich veraltet und ihr müsst das ganze per hand umschreiben, zb der link auf "brushes.zip" lautet dann so: http://www.fileplanet.com/dl.aspx?planetquake/tread/brushes.zip .. dürfte kein prob sein (ich habs auch geschafft :))

--

zum Seitenanfang zum Seitenende Profil || Suche
001
25.04.2003, 18:10
Onkel Dittmeyer



Ähm WTF, 1999-2000, was findest du so toll an diesem alten Schund!? =) Das Dingen sieht aus wie ein abgespecktes WC 2.1 ... Naja is ja auch egal. Guck dir doch einfach das Format von diesen Dateien an und machs selber, so komplex kann das net sein. Ich glaube leider kaum, dass dir irgendwer einfach so nen Compiler dafür schreibt...

--

zum Seitenanfang zum Seitenende Profil || Suche
002
25.04.2003, 18:11
Smeagol



des teil hat schöne funktionen :)

und zum selbermachen ... mit 0 vorwissen :/ bäh ... hilfe

--

zum Seitenanfang zum Seitenende Profil || Suche
003
25.04.2003, 18:21
Smeagol



hilfe hilfe ? komm schon ... sei nett :( für dich wäre das 0 arbeit ...
ich habs grad selbst probiert und krieg nur fehlermeldungen =))

ja, danke ngz ! setz meinen post doch NOCH höher

--


Dieser Beitrag wurde am 25.04.2003 um 18:21 von Smeagol bearbeitet.
zum Seitenanfang zum Seitenende Profil || Suche
004
25.04.2003, 18:21
Onkel Dittmeyer



Narf, wenn du bei allem so argumentierst - "mit 0 vorwissen" - wird des nie was...

Zitat:
für dich wäre das 0 arbeit ...
Hrrrrm, ich weiß zwar net wieviele Entities CS/HL ungefähr haben aber über 30 werdens sein und das _ist_ arbeit.

--


Dieser Beitrag wurde am 25.04.2003 um 18:30 von Onkel Dittmeyer bearbeitet.
zum Seitenanfang zum Seitenende Profil || Suche
005
25.04.2003, 19:19
Smeagol



wär denn ein compiler für zb ... dich(? :-)) viel arbeit ?

--

zum Seitenanfang zum Seitenende Profil || Suche
006
25.04.2003, 19:29
Onkel Dittmeyer



Hrrrrrrrrrrrm, ein Compiler wäre die 5-Fache Arbeit als dass mans manuell machen würde, sorry das is einfach unverhältnismäßger Aufwand...

--

zum Seitenanfang zum Seitenende Profil || Suche
007
25.04.2003, 19:29
Smeagol



sehr schade :(
nagut dann probier ichs eben alleine :)
aber wenn ich hilfe brauch darf ich fragen hm ?

--

zum Seitenanfang zum Seitenende Profil || Suche
008
25.04.2003, 20:10
Smeagol



so, hab schonmal ne frage :) bezogen auf das fette:

Zitat:
def_flg : “NAME” : NUMMERIC-VALUE : true/false

Used in both options and flags blocks.

NAME: The name displayed to the user.
NUMERIC-VALUE: The value of this flag. If in an options block, the key will become this value if this is chosen. If in a flags block, the bits in this value will be set on/off. TRUE/FALSE: This is the default value of the flag. If in an options block, the first one set true will be the default value of the key. If in a flags block, the bits in the number will be set adding to the default value of the key.

was heißt das ? =)

--

zum Seitenanfang zum Seitenende Profil || Suche
009
25.04.2003, 20:19
Onkel Dittmeyer



Das heißt dass wenn du dieser Variable einen numerischen Wert zuteilst und sie als Flag benutzt, wird die entsprechende Bitmaske für die Zahl gesetzt. Nehmen wir mal an das Ding ist 1 byte also 8 bits groß:Quellcode:Binär                  Dezimal
0 0 0 0 0 0 0 0     0, boolscher Wert false
0 0 0 0 0 0 0 1     1, bin mir unsicher wie das hier booleisch gehalten wird
0 0 0 0 0 0 1 0     2
0 0 0 0 0 0 1 1     3
...
1 1 1 1 1 1 1 1     255, boolscher Wert true
Du könntest mit zweierpotenzen bis 2^Bitgröße Flags setzen, also z.B. wäre 2^4 = 16 = 0 0 0 0 1 1 1 1 die Zahl für die ersten 4 Bits.

--

zum Seitenanfang zum Seitenende Profil || Suche
010
25.04.2003, 20:28
Smeagol



uuh ... an einem beispiel pls ? hier die flags von nem ambient_generic

Zitat:
$DefFlags [ "spawnflags" : "Spawn Flags" ]
{
def_flg : "Play Everywhere" : 1 : false
def_flg : "Small Radius" : 2 : false
def_flg : "Medium Radius" : 4 : false
def_flg : "Large Radius" : 8 : false
def_flg : "Start Silent" : 16 : false
def_flg : "Is Not Looped" : 32 : false
}
was bedeutet es hier, dass die in 2-er potenzen (angefangen bei 2^0) aufgelistet sind ? würde es nen unterschied machen, wenn ich sie zb 1-2-3-4-5-6 auflisten würde ?

[edit]das "false/true" am ende scheint überhauptnichts zu bewirken ... dafür die zahl ! wenn sie ne eindeutige potenz von 2 ist, dann ist es standardmässig deaktiviert, wenn nicht, dann ist es aktiviert ... kann das stimmen ? [/edit] [edit#2]stimmt net ganz =) kA ... was meint ihr ? helft mir doch bisserl =( [/edit#2]

--


Dieser Beitrag wurde am 25.04.2003 um 21:24 von Smeagol bearbeitet.
zum Seitenanfang zum Seitenende Profil || Suche
011
25.04.2003, 21:25
Smeagol



*bump*
kann mir jemand sagen, was der "intvalue" von einer zahl ist ?

[kommt jetzt vielleicht jemand auf den gedanken, es wäre doch besser gewesen, es für mich zu machen, anstatt meine dummen fragen am hals zu haben ? :)]

--

zum Seitenanfang zum Seitenende Profil || Suche
012
25.04.2003, 22:16
Onkel Dittmeyer



Sorry hab das falsch aus dem Context eben verstanden, es scheint ganz einfach nur die Bitnummer der Flag anzugeben, also von 0 (1?) - 32 (31?). Intvalue - würde ich einfach mal behaupten, dass damit integer gemeint ist, also der ganzzahlige Wert dieser Zahl ohne dezimalen.

--

zum Seitenanfang zum Seitenende Profil || Suche
013
25.04.2003, 22:27
Smeagol



bedeutet das also, dass die zahl im binärsystem hinten ne 1 für an oder ne 0 für aus haben muss ? *verwirrt* =)

und ja, es geht von 1-32

und was meinst du mit "ganzahligem wert dieser zahl" ? hmm *newbie-style*

--


Dieser Beitrag wurde am 25.04.2003 um 22:35 von Smeagol bearbeitet.
zum Seitenanfang zum Seitenende Profil || Suche
014
25.04.2003, 23:01
Onkel Dittmeyer



Äh, nein das gibt einfach nur dein Bit an welches du setzen willst.
Ganzzahlig mein ich so wies da steht =) Es gibt Ganzzahlwerte [1,2, 1000 ...] und Fließkommawerte [1.5, 5.978 ...]. In welchem Zusammenhang taucht denn der Begriff auf?

--

zum Seitenanfang zum Seitenende Profil || Suche
015
26.04.2003, 00:32
Smeagol



Zitat:
$DefEnt

The $DefEnt block defines an entity. Here's the basic syntax:

$DefEnt [ CLASSNAME : (SMARTNAME|@VIRTUAL) : CATEGORY|@NULL] { [ BASE_CLASS ], [] }
{
keys...
}

CLASSNAME: The classname of the entity. This MUST always be a valid string. This is written out to a .map file as the classname key.

SMARTNAME: The name displayed to the user.

@VIRTUAL: Specifies that the class is purely virtual. It will never show up in a list of valid entities. GDF supports class inheritance, as will be discussed in the next line. If the class is purely virtual, then the smart name MUST be @NULL.

CATEGORY: The category the entity is in.

BASE_CLASS: The base class of this class. If a base class is defined then this class inherits all the keys and attributes of the base class. If there is no base class for this class, there should be [] in place. For example, here is an entity with no base class:

$DefEnt [ "MyAss" : "Joe's Ass" : "Hairy Asses" ] []

In between the opening and closing braces can be any number of def_att, def_key, $DefFlags, or $DefOptions blocks. I will discuss these next.

def_att : "name" : "value"

The def_att defines an "attribute" of an entity. Attributes are things that govern the way Tread deals with entities. They govern how they are drawn, and they govern how Tread allows users to use the entities. There are currently only two attributes you can define: size, and owner.

The size attribute tells Tread the size to draw the entity. It should be in the form "X Y Z", as follows:

def_att : "size" : "32 32 32"

The owner attribute tells Tread a very important piece of info: whether the entity can own brushes. If it can, then Tread only displays the entity in the link dialog. An entity that can own brushes is called a solid entity. An entity that cannot own brushes is called a point entity. The way point entities are created vs. the way solid entities are created differ greatly.

Switching into entity mode, and clicking to drop entities of the selected class type creates point entities.

Right clicking on a group of brushes and selecting "link to entity" creates solid entities.

def_att : "owner" : true/false

def_key : type : "name" : "smartname" : "value"

Defines a key. A key can have the following types: string, integer, vector, color, color_hl. These types do not effect the resulting key written to the map file. In a map, all keys consist of two string, a name and a value. Instead these types tell Tread how to assist in editing the keys.

string: Allows the user to enter the key into an edit box. No input is restricted.

integer: Allows the user to enter only numbers as the key value.

vector: The key is a Q/Q2 direction. That is 0-360 specifies an X/Y angle, -1 is straight up and 1 is straight down. Or maybe that's backwards, I forget, but you get the idea. Tread presents the user with a moveable angle dialog.

color/color_hl: Tread presents the user with the standard windows color picker to choose the color. The differences in these two formats has to do with how the values are expressed. The normal "color" is a Q2 type RGB triplet color with each channel being from 0-1. The "color_hl" type is named after the Half Life style of colors: An RGB triplet followed by the brightness. The channels can be in the range of 0-255.

NAME: Defines the keyname.
SMARTNAME: The name the user sees.
VALUE: The default value the key is given. If no default value is desired "" (empty quotes) should be used.

$DefOptions/$DefFlags

The blocks define a key with specific predefined values. These values can be either bit flag combinations, or the key can have just one value out of a set of predefined values.

The $DefOptions and $DefFlags blocks are exactly the same syntactically. However, they present the user with different things. If a $DefOptions is used, the user can select a single key value out of a drop-down list. If a $DefFlags block is used, then the user can toggle each key bit in the value.

I will use $DefFlags for the examples.

$DefFlags [ "NAME" : "SMARTNAME" ]
{
def_flg...
}

NAME: The name of the key.
SMARTNAME: The name presented to the user.

def_flg : "NAME" : NUMMERIC-VALUE : true/false

Used in both options and flags blocks.

NAME: The name displayed to the user.
NUMERIC-VALUE: The value of this flag. If in an options block, the key will become this value if this is chosen. If in a flags block, the bits in this value will be set on/off. TRUE/FALSE: This is the default value of the flag. If in an options block, the first one set true will be the default value of the key. If in a flags block, the bits in the number will be set adding to the default value of the key.

CHANGE: @FORCE-DERIVATION is no longer used.

Automatic Script Upgrading: Entity Rekeying

Tread does an automatic update to maps we call entity re-keying. Essentially as entities are loaded each key is checked for a corresponding key in the definition. If there is a missing key in the entity, it is added with its default value.

CHANGE: Tread no longer deletes keys or entities with no definition.

Scripted build steps

One of the biggest additions to the language is the ability to code your own build steps and command line parameters. In 1.12 the steps were actually hard coded. The block of GDF2 code that does this is the $DefBuild block and it should be located in the $DefGlobal section of the script.

Basically the build section allows you to pragmatically build strings and then execute them as a command line. It does nothing more. The basic syntax of a module looks like this:

$DefModule [ "ModuleName" : "Game Settings String" : "Build Options String" ]
{
def_type : @RUNNABLE or @NOT_RUNNABLE
def_pathtype : @FILE or @DIR
def_path : "Default Path"

$DefParams
{
def_param : "BuildString" : (@ABORT/@ALWAYS/"StringValue") : intvalue : true/false
}
}

The $DefBuild section contains any number of $DefModule blocks. These $DefModule blocks are what actually defines the sequence of string procedures. DefModules are strings. They contain a string value, and can optionally have a list of steps that builds the string value. There are two basic types of $DefModule blocks: runnable and non runnable. A non runnable block never actually gets executed, it simply stores a value.

The first thing to understand that the value of non runnable modules get saved with the rest of Treads settings. They are restored when that game is loaded. That is essentially their entire job: to keep track of the path of build programs. Non runnable modules make use of the def_pathtype specifier. Tread allows the user to set the value of the non runnable modules with handy dialogs. If the module specifies @FILE then Tread will allow the user to pick a file for the value of the module, otherwise it lets the user pick a directory. If Tread does not find a saved value for the module it loads the value of the module with the value of the def_path specifier.

If the module is runnable then the $DefParams section will be executed every time the user clicks the build button. Each def_param inside the DefParams block is executed. Let's take a closer look at the def_param specifier:

The "BuildString" is simply a string that the user sees in that build section when they are filling out the build dialog. It has a check box next to it that allows the user to set its value on or off. If the string is blank "" or @NULL then it will not show up under the list of selectable options.

The next field can be one of three values: @ABORT, @ALWAYS, or a string value. If this value is @ABORT, and the param evaluates to true, then the execution of this build section is aborted. If this value is @ALWAYS then this param is always true regardless of whether it is marked on or off by the user. If this value is a string and the param evaluates to true then this string is appended to the value of this module.

The way values get evaluated as true has to do with the intvalue part of the def_param. Tread maintains an integer representing the value of the Module, or it's toggle state. Typicall each def_param's intvalue is a number that corresponds to a single bit. The maximum number of unique def_params you can have in a $DefParams block is 32. If the user turns the def_param bit value on then that bit is ored into the module. If they turn it off then it is anded out of the module state (this is similar to the $DefFlags block). A def_param line is true if the module anded with the def_param value is true.

The true/false option tells whether the def_param is true by default.

Once the value of the module has been evaluated several other things can happen. A map or maps can be exported and one or more programs can be launched.

To export a map use the following command:

$ExportMap : "Filename To Export To" : "Console Message"

This command exports the currently open map to the requested filename, and prints out the specified console message. The defined game file type determines the format of the map file. See the def_gamemaptype specifier in the $DefGlobal block.

To spawn a process, use the following command:

$SpawnWait : "Program" : "Working Directory" : @CONSOLE/@NO_CONSOLE : "Stat Message"

This spawns the requested program and gives the new process the requested working directory. Specifying @CONSOLE attaches the stdout and strerr streams of the new process to Treads console, allowing users to see the output. Specifying @NO_CONSOLE doesn't attach the output this way. The user won't see anything. There is another option to spawning things and that is using: $SpawnNoWait. This completely detaches the process from Tread. Once the process is started Tread moves onto the next build section and executes it, as opposed to waiting for it to finish.

The $SpawnWait/NoWait and $ExportMap commands can reference module names instead of string values. This allows DefModules to evaluate their values and then other modules to use those values to execute with.

--

zum Seitenanfang zum Seitenende Profil || Suche
016
26.04.2003, 00:39
theDon



das war wohl ein bisschen zu viel kontext.

:D

--

\o tanz den naziprau! o/

And more than ever, I hope to never fall,
Where enough is not the same it was before

zum Seitenanfang zum Seitenende Profil || Suche
017
26.04.2003, 00:42
Smeagol



kA was ihr braucht :/ erbarme sich einer =(

--

zum Seitenanfang zum Seitenende Profil || Suche
018
26.04.2003, 01:48
Retro



für 60eur mach ichs dir, ansonsten halt endlich die klappe

--

shielding people from their own stupidity is an evolutionary step backwards anyway.

/* God is dead!............Nietzsche */
/* Nietzsche is dead!......God */
/* Nietzsche is God!.......The Dead */

zum Seitenanfang zum Seitenende Profil || Suche
019
26.04.2003, 01:49
Smeagol



sei net so fies retro. ich will ja inzwischen garnicht mehr unbedingt, dass es n anderer macht, der damit besser zurecht kommt, und dem es viel leichter fällt. ihr sollt mir nur bisserl helfen :P

--

zum Seitenanfang zum Seitenende Profil || Suche
020
26.04.2003, 01:57
Retro



--

shielding people from their own stupidity is an evolutionary step backwards anyway.

/* God is dead!............Nietzsche */
/* Nietzsche is dead!......God */
/* Nietzsche is God!.......The Dead */


Dieser Beitrag wurde am 26.04.2003 um 01:58 von Retro bearbeitet.
zum Seitenanfang zum Seitenende Profil || Suche
021
26.04.2003, 01:57
Retro



schau dir den verdammten syntax der files von deinem editor an und ziehe vergleiche zu denen von worldcraft, dann nimmst du das notepad zur hand und überträgst die entitäten... so groß können die unterschiede nicht sein, als dass man sie nicht erkenne. hilfe? hilfe!

ich könnte dir auch zu logischem denken raten, aber ich glaube dass hilft dir ebenso wenig..

--

shielding people from their own stupidity is an evolutionary step backwards anyway.

/* God is dead!............Nietzsche */
/* Nietzsche is dead!......God */
/* Nietzsche is God!.......The Dead */

zum Seitenanfang zum Seitenende Profil || Suche
022
26.04.2003, 03:34
Smeagol



ich hab da oben eine konkrete frage gestellt ... wieso beantwortest du sie nicht einfach (oder eben auch nicht, wenn dus net kannst) anstatt mich hier so anzufönen ... damit schaust DU auch nicht gerade schlau aus :)

--

zum Seitenanfang zum Seitenende Profil || Suche
023
26.04.2003, 03:40
Retro



"bedeutet das also, dass die zahl im binärsystem hinten ne 1 für an oder ne 0 für aus haben muss ?"

nein - zufrieden?

--

shielding people from their own stupidity is an evolutionary step backwards anyway.

/* God is dead!............Nietzsche */
/* Nietzsche is dead!......God */
/* Nietzsche is God!.......The Dead */

zum Seitenanfang zum Seitenende Profil || Suche
024
26.04.2003, 03:41
Smeagol



nein.
was bedeutet es dann ?

--

zum Seitenanfang zum Seitenende Profil || Suche