Announcement

Collapse
No announcement yet.

Progs.dat Help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Progs.dat Help

    Hi, I'm making a quake map in worldcraft 3.3 with the quake adapter. I have about 5 rooms done with no leaks, warnings or anything else. I'm using the rogue pak for some of it's monsters and weapons but, I need the functionality of the hipnotic pak for some rotations. (opinion) I'm really good at making maps and navigating in Worldcraft but (fact) I suck at quake c. Does someone have or can someone make me a progs.dat that has all the monsters, guns and functionality of both paks combined. Since the .fgd's are just text and no compiling necessary, I'm pretty sure I could make my own .fgd. I have the hipnotic and rogue .fgd's and I get (more or less) how I would have to "smoosh" them together.

    I would like to say that, whereas this is my first map - I haven't just made a bunch of boring square rooms. I have vaulted ceilings, plenty of lifts, secrets, triggers, buttons.. etc. I'm a carpenter and a painter by trade and I think my map illustrates that well. I say this so whomever may read this (and can help me) will understand that I'm really pretty passionate about making this map (and making it high quality).

    My e-mail is [email protected]. Feel free to mail the progs.dat there if you choose to help me.

    Thank you,
    MadGypsy
    http://www.nextgenquake.com

  • #2
    Originally posted by MadGypsy View Post
    Hi, I'm making a quake map in worldcraft 3.3 with the quake adapter. I have about 5 rooms done with no leaks, warnings or anything else. I'm using the rogue pak for some of it's monsters and weapons but, I need the functionality of the hipnotic pak for some rotations. (opinion) I'm really good at making maps and navigating in Worldcraft but (fact) I suck at quake c. Does someone have or can someone make me a progs.dat that has all the monsters, guns and functionality of both paks combined. Since the .fgd's are just text and no compiling necessary, I'm pretty sure I could make my own .fgd. I have the hipnotic and rogue .fgd's and I get (more or less) how I would have to "smoosh" them together.
    That is a neat idea and quite tough. QuakeC is a dark art, most of the people with type of mastery in single player reside at forums.inside3d.com and Func_Msgboard at Func_Msgboard: Latest News
    Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

    So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

    Comment


    • #3
      I just gave it a shot. I got the two source .qc's from the devkits on quake navigator/ quake c... LOL, I got error after error after error. I have programmed in ActionScript (flash) for years, so I sort of understand the code. The problem is I don't have a scope of the entire code. So if I mix a few lines from (hip) AI.Qc with (Rog) AI.Qc.. in that script it seems fine but who knows where I am effecting a different script. One way or another I am going to make this happen though. I think the trick lies in ONLY including hipnotic functionality into the rogue pack (skip monsters and weapons). But then again - what do I know, I've been creating "in" Quake a whole 2 weeks and haven't even begun with quake c.

      C'mon.... someone hook me up with a Roguenotic progs.dat

      Edit: I said above that I need both packs combined in their entirety. This was an error. I need {hiprot, hippush, hipbrk, hiptrain} compiled into the rogue progs.dat. I want to make a huge "transformer" out of doors, traps and trigger_hurt to fight at the end of my level (sucks that I had to give that away but maybe someone will help me if they know this). Whoever helps me can have my full source .rmf (which i have broken down into very neat and orderly visgroups). Wish I had something better to give ya' but I don't .
      Last edited by MadGypsy; 02-04-2011, 11:08 PM.
      http://www.nextgenquake.com

      Comment


      • #4
        C'mon.... someone hook me up with a Roguenotic progs.dat
        It's simply not that easy, otherwise someone would have done it long ago.

        Like you say, you need good understanding of what the entire code does and what depends on what.

        That said, you can take the Rogue progs.dat source and integrate additional features / entities from hipnotic one by one. You just need to cover the entire dependencies.

        May I suggest you look at the extended progs.dat / mods / mapping toolkits that teams of people have already done for this community... there are several of them that contain Hipnotic rotation and breakables etc., although to my knowledge none of them includes any features from the Rogue pack (because a lot of people who are able to do what you want simply don't think it's worth it).

        So if you are hell bent on using Rogue, you're on your own. It would be wise to use one of the existing extended mods though, to save yourself a lot of programming work and just focus on your map. I suggest you look at the following mods:

        Quoth (contains hiprotate and breakables);

        Extras R4 (contains gobs of crazy stuff including hiprotate and breakables;

        Custents (similar).

        I dunno what mod contains the above PLUS pushables; Quoth has no pushables. There is Remake Quake, which has breakables, rotation, pushables and gobs of other stuff, but we have no features from Rogue (monsters/weapons).

        I said above that I need both packs combined in their entirety. This was an error. I need {hiprot, hippush, hipbrk, hiptrain} compiled into the rogue progs.dat.
        The Rogue requirement is the problem; the other stuff is all readily available in a lot of existing mods. It's doable though, but the people who can do it in theory are usually preoccupied with their own stuff and only do what they want to.

        Best bet is starting it yourself and asking for specific help at inside3d.com. Another good place to get QC help is on IRC; a lot of people hang out in #qc on irc.anynet.org.
        Scout's Journey
        Rune of Earth Magic

        Comment


        • #5
          Thanks for the info Golden_Boy . I spent many hours last night going over the code for both packs and I think I have a pretty good idea of the syntax in quake c. I keep getting a "type mismatch error for ." error in HIPSUBS.qc. The line is for srcent.th_turn/destent.th_turn (I don't remember the exact syntax). If I understand this correctly void() th_turn means th_turn is a function that returns no variables. srcent and destent should be objects (considering the dot syntax). But the names themself srcent (source entity) / destent (destroy entity) lead me to believe that the objects are expecting ?a .float?....ohhhh wait haha I wonder if there is a .void(). I gotta see, I may have just figured this out....

          Thanks for responding, If this is right, your response propelled me to my answer.

          Gypsy

          EDIT: Woo Hoo - I got everything to compile with no errors!! Not bad for someone that has no clue what they are doing right (lol)? Now Imma make an .fgd and test everything. Y'all wish me luck. If this actually works - I'll upload my fgd & dat to megaupload or something and post a link here so more people can use it (if they want to).

          On a side note this is how I worked through it:
          1) dumped all the extra hip.qc's into the roque folder and compiled
          2) checked the error log
          3) opened the most realistic file(s) in wordpad and used the {edit/find} option for the variable I needed
          3a) If I couldn't find it in the "obvious" files, I just checked them all til I found it
          4) pasted that variable in the corresponding rogue file (.qc)
          4a) in the case of functions I compared the rogue file to the hip file and made all the appropriate changes
          4b) in the case where the variables were found in a hip specific .qc I considered that file a dependency and included the entire file
          5) compiled again
          6) repeat steps 2 through 6 until you get no errors

          I hope this helps someone... on to the .fgd
          Last edited by MadGypsy; 02-05-2011, 11:39 AM.
          http://www.nextgenquake.com

          Comment


          • #6
            In stuff like self.enemy, self is an entity and .enemy is a field. Entities have a lot of fields that hold a lot of information. Fields can be of types like .string, .float, .void etc.

            Look in defs.qc.

            Stuff like th* are think functions that are called under certain circumstances. Look at monster qc files. This should be helpful:

            Quake-C Specificacions v1.0

            Inside3D

            Also, for a QuakeC compiler, I heartily recommend FTEQCC. It supports a lot of nice stuff like C-style switches that you don't usually get in QC.

            Countrary to the other types, the entity type is a reference to an instance of a structured object, that contains many informations of totally different kinds.

            To access all these informations conveniently, they are stored as fields of the entity object, and each field is given a name and a type, that makes it distinct of the others.

            Some of the fields do not store value, but instead they store the function to be executed in certain conditions. They are called the methods that can be aplied to the object.
            Notice how

            float blah;

            is a variable, while

            .float blah;

            is a field that's attached to entities. It's a difference.
            Last edited by golden_boy; 02-05-2011, 10:50 AM.
            Scout's Journey
            Rune of Earth Magic

            Comment


            • #7
              good stuff.. I've been programming in AS3 using design patterns to produce good OOP since AS3 came out and (AS2/AS1) before that. It seems that it is being treated like an object. Where bar contains everything that is put in it and in order to access a certain var you must use .syntax. For instance:

              ent1{ //object notation that represents an entity's vars not an attempt at actual QuakeC
              var1: 2;
              var2: 4; //all vars are float but recognized as .float because they are nested in an object
              var3: 8;
              };

              void (entity bar) foo; //defines the foo function and types its param

              bar = ent1; //assigns all the ent1 properties to the blank entity bar for processing

              void (bar) foo = { //declares the foo function and its processes
              trace bar.var1; // 2 - not sure if trace is a qc command but in other languages it returns the value to the output window for debugging
              };

              Is this correct?

              Gyspy
              Last edited by MadGypsy; 02-05-2011, 02:09 PM.
              http://www.nextgenquake.com

              Comment


              • #8
                The basic idea is correct yes.

                If you look at a typical spawn function, as for a monster (monster_army etc), you'll see how a lot of fields are set for that entity, like self.health, self.think, self.model, self.movetype, self.origin and so forth.

                Many entities are already predefined, like world, or relative (self, other). It's very strongly geared towards running the actual game, it's not a general purpose programming language.

                Similarly, many fields have a fixed meaning, like .angles and so forth, and a lot of functions exist for doing very specific things like creating a vector of length 1 for using dot products to determine which way something is facing etc.

                There is also bitwise stuff like .spawnflags or .items.

                if (self.spawnflags &

                self.spawnflags = self.spawnflags | SOMENUMBER

                Think functions are kinda important (self.think = something) and thinking and animations happen at certain intervals, like 10 times per second usually (self.nextthink) so you can set up a thinking "loop" for an entity (monster waiting for enemy, etc). There is more stuff like that, like touch functions (triggers!). Again very specific stuff that entities might want to do while the game runs.

                You can spawn new entities if you need them for some reason. Many entities enter the game via loading of a map though, others are created when a weapon is fired (projectiles) and so forth.

                QC has certain habits like you have to precache models and sounds before they can be used.

                void() W_FireRocket =
                {
                local entity missile, mpuff;

                self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;

                sound (self, CHAN_WEAPON, "weapons/sgun1.wav", 1, ATTN_NORM);

                self.punchangle_x = -2;

                missile = spawn ();
                missile.real_owner = missile.owner = self;
                missile.movetype = MOVETYPE_FLYMISSILE;
                missile.solid = SOLID_BBOX;
                missile.classname = "missile";

                // set missile speed

                makevectors (self.v_angle);
                missile.velocity = NoAutoAim(self); // DrS's Aim fix
                missile.velocity = missile.velocity * 800; // ...
                missile.angles = vectoangles(missile.velocity);

                missile.touch = T_MissileTouch;

                // set missile duration
                missile.nextthink = time + 5;
                missile.think = SUB_Remove;

                setmodel (missile, "progs/missile.mdl");
                setsize (missile, '0 0 0', '0 0 0');
                //setorigin (missile, self.origin + v_forward*8 + '0 0 16');
                setorigin (missile, GetShOrg(-6, 1, ); //ijed // Supa, readjusting orgs
                You can see how a new entity "missile" is spawned in the function that fires a rocket, and several fields are set on that missile. Certain things are needed like setorigin and setsize. See how the missile's nextthink is set to 5 seconds, and the think function is actually SUB_Remove, which means it's removed after 5 seconds of flight if it hits nothing...

                "self" refers to the entity that calls the function, in that case the player. Player's rocket ammo count is reduced by 1, for example.

                .velocity in missile.velocity is a vector... there is quite a bit of vector math in QC since the game needs a lot of directions, velocities and view angles etc.

                The missile has a touch function as well as a think function. The touch function probably makes it explode and deal damage. These two, think and touch, are used a LOT. Monsters also have several kinds of "think"/AI functions that are called under special circumstances, such as self.th_die, self.th_pain and so forth; these, when executed, will in turn call the relevant animation functions (death animation, pain animation).

                But you only need non-AI entities, right. Hiprotate should be easy enough to port, it's been done a lot. Just be sure to port all relevant think etc. functions along with it, and also the definitions from defs.qc.

                If you add new .qc files to the source, you must put matching entries into progs.src to tell the compiler about them!

                The order in which files are listed in progs.src is important, because something in a file might depend on something that's defined in another file... put yours at the end if unsure.

                Also put new global variables at the end of defs.qc. There are parts of that file that the engine expects in a certain order afaik.

                Ask more specific questions at i3d though. I'm not really a programmer.
                Scout's Journey
                Rune of Earth Magic

                Comment


                • #9
                  you have to remember that quakec is not actually an object-oriented language, which makes it quite different from 90% of the languages out there nowadays... Its just used as if it is, and thus has a few gotchas.

                  Anyway...
                  fields are globals, in a way. confusing but whatever. okay, restate that. there is only one class type, and all ents thus have a complete set of every field. messy, but gets the job done. thus new fields can be defined as .float or whatever, same as a regular global but with a leading dot.
                  because qc is not object orientated, self is in no way special, other than its common useage, thus:
                  self.foo();
                  does what you would expect, if you consider that self=this, however...
                  other.foo()
                  will break every time (foo is of course defined as .void() foo; in this case, whereever you want, just outside a function, having said that, fields defined inside a function are just regular indexes and can be assigned to, but not advisable for most things), and it'll break because self=something other than other. bah.

                  use bprint for debugging output. bprint("val=");bprint(ftos(somefloatvalue)); bprint("\n");for instance. again messy. (disclaimer, dprint can be better than bprint, but needs the 'developer' cvar set to 1
                  Some Game Thing

                  Comment


                  • #10
                    I totally got the {self is this} thing. ?ftos?... float to string? That has to be what it is cause you are "tracing" a number value. You guys are a lot of help. I understand everything you both have told me perfectly. So basically quake c is a big messy language where everything knows what everything else is doing and therefore there is virtually no encap what-so-ever (other than maybe {local foo}). Then again I pretty much figured that out when I noticed that all the variables were declared in one "class" for the entire rest of the scripts to access..nutty.

                    Thanks for all your infos,
                    Gypsy
                    http://www.nextgenquake.com

                    Comment


                    • #11
                      ftos() is used to turn a float into a string so you can print it to a player. Normally, you have to print out the resulting string before calling ftos again on another float, due to things that would take too long to explain.

                      'self' (and 'other') are simply global variables, so they can be any entity, but sometimes they have expected values. For example, when an entity's .touch() function is called, 'self' will be the entity being touched, and 'other' will be the touching entity. Overall, there aren't many functions where self is an unknown entity, but sometimes, what's "in" 'other' isn't clear.

                      I believe .dest is short for destination, which holds a vector. A vector, in quakec, is a defined type that holds three floats to represent something in three dimensions.

                      Comment


                      • #12
                        I'm glad you said that about vector cause I was a little stumped as to what that was. I get it now though.

                        vector foo = x,y,z

                        here's a question: I noticed that weapons, monsters etc are all assigned a unique float that is double of the one preceding it. But this float is reused

                        float IT_SHOTGUN = 1;
                        float IT_SUPER_SHOTGUN = 2;
                        float IT_NAILGUN = 4;
                        float IT_SUPER_NAILGUN = 8;
                        float IT_GRENADE_LAUNCHER = 16;

                        float IT2_ARMOR1 = 1;
                        float IT2_ARMOR2 = 2;
                        float IT2_ARMOR3 = 4;
                        float IT2_LAVA_NAILS = 8;
                        float IT2_PLASMA_AMMO = 16;

                        what is the point of this? Is this sort of like an ID for that item? Does it become unique by appending the prefix (IT_/IT2_) to the float when compiled? I understand that IT = item and IT2 = item 2. I dont understand the point of the float or how floats could be reused (unless the prefix is taken into consideration)

                        Gypsy
                        http://www.nextgenquake.com

                        Comment


                        • #13
                          Originally posted by MadGypsy View Post
                          I'm glad you said that about vector cause I was a little stumped as to what that was. I get it now though.

                          vector foo = x,y,z

                          here's a question: I noticed that weapons, monsters etc are all assigned a unique float that is double of the one preceding it. But this float is reused

                          float IT_SHOTGUN = 1;
                          float IT_SUPER_SHOTGUN = 2;
                          float IT_NAILGUN = 4;
                          float IT_SUPER_NAILGUN = 8;
                          float IT_GRENADE_LAUNCHER = 16;

                          float IT2_ARMOR1 = 1;
                          float IT2_ARMOR2 = 2;
                          float IT2_ARMOR3 = 4;
                          float IT2_LAVA_NAILS = 8;
                          float IT2_PLASMA_AMMO = 16;

                          what is the point of this? Is this sort of like an ID for that item? Does it become unique by appending the prefix (IT_/IT2_) to the float when compiled? I understand that IT = item and IT2 = item 2. I dont understand the point of the float or how floats could be reused (unless the prefix is taken into consideration)

                          Gypsy
                          I'm not Mr. QuakeC, but even I know that any attempt to combine Rogue ammo and weapons with Hipnotic ammo and weapons is going to result in an epic fail.

                          They use overlapping numbers. And they are hardcoded in the engine.

                          You will have to approach your project from the mindset that either Rogue or Hipnotic weapons will be used, but not both. Adding Rogue monsters to Hipnotic or adding Hipnotic monsters to Rogue shouldn't be an engine conflict, but in the end you will have to either use Rogue or Hipnotic weapons and ammo (and items).
                          Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

                          So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

                          Comment


                          • #14
                            That is all from the rogue defs.qc. There is no hipnotic code in my example. This is why I said the prefix (IT_/IT2_) must be taken into consideration. I already made a working Roguenotic progs.dat. But I just pasted all the hip .fgd code into the rogue .fgd code and I need to go back and cut out the hip .fgd code that doesn't apply so there aren't a bunch of bogus hip options in the Worldcraft entity list. Aside from that, the only reason I haven't shared it here is I want to test it a little longer to make sure there are no glitches further down the road. I'm probably going to make a room with one of every entity in it all at one time. If everything works then it's probably safe to assume that there aren't any glitches.

                            So far everything works though. I added hipbrk, hippush, hiprot, hiptrain appended hips trigger additions to rogue's trigger.qc (basically MED added counters) and included any other hipXXX.qc that those files seemed to have a dependency on (which so far seems to only be HIPSUB)

                            so my original question still stands - why are entities assigned a float and how is it that that float can be re-used?

                            Gypsy
                            http://www.nextgenquake.com

                            Comment


                            • #15
                              I think you got it backwards.. those are all different variables (or constants for that matter) that happen to have the same value.. float is just a type of value (floating point number e.g. 1.0 or 3.1415 etc. etc.)

                              Comment

                              Working...
                              X