Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Heretic Resource Pack Problem

So I downloaded a resource pack for Heretic. It comes with high res textures, models, particles, redone weapons, all that good stuff. There is a big problem though and I've had this before when I played with a resource pack years ago. Ok here's an example. When I have the crossbow and Im firing there's nice particle effects on the arrows as they travel. When I'm in a large area however the particles dont exist and only the 3d model of the arrows. The big problem is that some of the enemies only throw 3d model objects and in a large area become invisible. So the only thing I can see coming is a flare. It's really hard to explain this. I provided a link to 2 screenshots side by side. You can see what I'm talking about then. Anyone else have this problem or seen this before? Any help is much appreciated!


https://sites.google.com/site/c1rcu1tn3 ... edirects=0


-Matt

Comments

  • It's not really a bug as much as it is a human error. There is a problem with the definitions in the particles all throughout the pack. There is a person whose name I won't mention who is working on tidying everything up, but they may not get it completed too, too soon. However, it's due to the max number of generators being hit, because in the definitions, ones that are spawned based on states are being given a never-ending maximum lifespan, keeping them in the queue; since they're based on the states which already passed, then they're neither used nor cleared until the level ends. :( Some levels it's really bad, like in E5M1, where just about as soon as you begin, the generators are completely eaten up.
  • Let me know which files to change, what needs changing and which pack they're in and I'll do it fairly quickly.
  • Let me know which files to change, what needs changing and which pack they're in and I'll do it fairly quickly.
    The entire jHRP is riddled with them.
    A few off the top of my head: the old gargoyle (not the one I put out), the Disciple of D'Sparil, the Ophidian (probably the worst one), the Iron Lich whirlwind, and others which I forget. I tried to go through systematically and fix them once, but I ended up not fixing it and so there are probably generators in odd places like perhaps the teleport (I haven't look at it) and such places that I had not seen. Go ahead and see what you can do, and thank you for volunteering your help! :)
  • Can you give me an example of what needs changing in the files please, just to make sure I'm not going to change the wrong values. I may write a little utility that does the job for me if it can be automated.
  • Can you give me an example of what needs changing in the files please, just to make sure I'm not going to change the wrong values. I may write a little utility that does the job for me if it can be automated.
    Sorry for not getting back earlier...

    In any case, it's when state-based generators have a -1 max age and especially are static. The "static" flag means that they will not be destroyed by other generators, and the -1 max age means they will not run out during the level, which is actually GOOD for mobj-based and flat-based generators! The problem is that each time a state occurs, a state-based generator is made, and so if you have a bunch of unlimited state-based generators, it will only take 128 states to break it. That is, I think there are 128 maximum generators at one time, anyway... The trick would be to have only one generator for all instances of the map object in question, rather than a million state-based ones.

    Here's an example from M-Ophidian.pk3 - more specifically, Snake-Projectile.ded:
    Generator {
      State = "SNAKEPRO_A1";
       ### It's state-based - cool!
      Flags = "gnf_static gnf_blend gnf_srcvel";
      ### ...and it must be important, 'cause static won't allow it to be terminated while it's running
      # Room for 10 sources.
      Particles = 200;
      Center { 0 0 0 };
      Speed = 0.5;
      Speed rnd = 0.5;
      Spawn radius = 1;
      Spawn age = -1;
      Max age = -1;
      ### ...but it doesn't end? WHAT?!
      Spawn rate = 3;
      Vector { 1 1 0 };
      Vector rnd = 10;
      Stage {
        Type = "pt_point";
        Flags = "ptf_bright";
        Radius = 7;
        Tics = 12;
        Rnd = 0.2;
        Color { 0 .5 .9 .3 };
        Gravity = 0;
        Resistance = 0.0;
      };
      Stage {
        Type = "pt_point";
        Radius = 5;
        Color { 1 .1 .1 .1 };
        Gravity = 0;
        Resistance = 0.0;
      };
    } 
    
    Generator {
      State = "SNAKEPRO_B1";
      ### State-based again...
      Flags = "gnf_static gnf_blend gnf_srcvel";
      ### ...and not able to be freed from memory this level until the generator is finished...
      # Room for 10 sources.
      Particles = 200;
      Center { 0 0 0 };
      Speed = 0.5;
      Speed rnd = 0.5;
      Spawn radius = 1;
      Spawn age = -1; 
      Max age = -1;  ### ...and will NOT be finished until the level ends, never giving you a chance to escape this on levels with ophidians
      Spawn rate = 3;
      Vector { 1 1 0 };
      Vector rnd = 10;
      Stage {
        Type = "pt_point";
        Flags = "ptf_bright";
        Radius = 7;
        Tics = 12;
        Rnd = 0.3;
        Color { 1 0.6 0 .4 };
        Gravity = 0;
        Resistance = 0.0;
      };
      Stage {
        Type = "pt_point";
        Radius = 5;
        Color { 1 .1 .1 .1 };
        Gravity = 0;
        Resistance = 0.0;
      };
    }
    

    I'll deal with the first generator, the ' State = "SNAKEPRO_A1"; ' one.

    To make it a mobj-based generator, you would change the type by specifying "mobj" rather than "state"; also, if defining flat-based, you would define it by "flat":
    State = "SNAKEPRO_A1";
    ### Original
    Type = "SNAKEPRO_A";
    ### This is the Thing ID to which the state belongs, and the projectile in question!
    Flat = "F_SKY1";
    ### The place you would define for a rain particle generator, for instance!
    

    Now, then! It's important to remember that, if you're changing from state- to mobj-based generators, that they will always be in effect, so if you're trying to make an exact change over, you'll have to mess with some values. For instance, see how there are two generators, one for each of the projectiles. Now these are generated each time the first state of each missile occurs. (you can check the objects.ded for reference on the objects and their respective states and the game tics for each one of them, etc.) So you'd have to calculate what the new spawn rate should be for the state. The current spawn rate is 3:
    Spawn rate = 3;
    

    According to objects.ded, the Thing, "SNAKEPRO_A" has four states, SNAKEPRO_A1 - SNAKEPRO_A4, and they are each 5 tics in length, looping. So you have five tics of generation each loop with state-based, being that it's based on only one of the states. All together, it's 20 tics, and so the 5 tics of SNAKEPRO_A1 at a Spawn rate of 3 makes 15 particles each cycle of states. Thus, it's 15/20, which is 3/4 or 0.75.
    Spawn rate = 0.75;
    

    The spawn age for a mobj-based generator is good at -1, because it shouldn't stop generating particles.
    Now, the "Particles" line is how many are to be cached to be generated at one time.
    # Room for 10 sources.
    Particles = 200;
    

    The amount should be as follows:
    Maximum particle life in tics multiplied by the spawn rate. For mobj-based generators, multiply this by the amount of sources you think should be visible at one time. Tics * Spawn rate * sources.
    For this generator, the spawn rate is 3, and the total tics between the two stages is 12. Notice how the second stage isn't defined, but since the stages interpolate, this is obviously meant to cause the first generator to interpolate towards the null-time state in its values. Now, think about it: the Ophidian shoots 3 of these projectiles, followed by a SNAKEPRO_B projectile. That's three sources at a time for each one. What if he's far away and shoots twice? Then that's six! How many do you think you will see at a shooting? 3, 4, or perhaps 5? So 5 * 2 * 3 would be 30 sources max, and the reason I'm not promoting skimping here is because it's replacing the actual model itself. Otherwise, all you see are dynamic lights flying at you!
    So 12 Tics * 0.75 Spawn rate * 30 sources = 1,080 particles. So, to make sure you don't have invisible or limited particles, (as particles are evenly distributed and, once the limit is hit, half-way-done particles will disappear and return to start states over) set the particles to 1,080 (or whatever good judgement says in such a case).
    Particles = 1080;
    

    Apparently, the particles are used as a soft, plasma-like replacement for the fireball itself, so the model is nullified by defining a blank model for it:
    Model { State = "SNAKEPRO_A1"; MD2 {File="";};}
    Copy Model {State = "SNAKEPRO_A2";}
    Copy Model {State = "SNAKEPRO_A3";}
    Copy Model {State = "SNAKEPRO_A4";}
    Copy Model {State = "SNAKEPRO_AX1";}
    Copy Model {State = "SNAKEPRO_AX2";}
    Copy Model {State = "SNAKEPRO_AX3";}
    Copy Model {State = "SNAKEPRO_AX4";}
    Copy Model {State = "SNAKEPRO_AX5";}
    

    Notice the explosion frames? They are SNAKEPRO_AX1 - SNAKEPRO_AX5. Mobj-based generators will spawn during all states, even during the death states, so it's important to disable the particle generator for a particular thing once it reaches the death states, or whichever other states that it needs to not occur. An example is in the Wight, which has particles for his axe, but not while he throws it! The generator is disabled when he throws it, because it would look dumb if he threw an axe, not holding one, but yet the particles were still being generated!
    There is a catch, though: how do you leave the state-based explosion system, which naturally is destroyed since it's not -1 max age and doesn't need to be altered? Well, since it's based on the first frame, just set the particles to stop on the second frame of the explosion - that should be simple enough:
    Model { State = "SNAKEPRO_A1"; MD2 {File="";};}
    Copy Model {State = "SNAKEPRO_A2";}
    Copy Model {State = "SNAKEPRO_A3";}
    Copy Model {State = "SNAKEPRO_A4";}
    Copy Model {State = "SNAKEPRO_AX1";} ### <- where the explosion generator occurs
    Copy Model {State = "SNAKEPRO_AX2"; Flags = "df_noptc";} ### <- new particles stop being spawned here on out
    Copy Model {State = "SNAKEPRO_AX3";}
    Copy Model {State = "SNAKEPRO_AX4";}
    Copy Model {State = "SNAKEPRO_AX5";}
    

    In summary, this is how everything should for the first projectile generator definitions:
    Generator {
      Mobj = "SNAKEPRO_A";
      Flags = "gnf_static gnf_blend gnf_srcvel";
      # Room for 30 sources.
      Particles = 1080;
      Center { 0 0 0 };
      Speed = 0.5;
      Speed rnd = 0.5;
      Spawn radius = 1;
      Spawn age = -1;
      Max age = -1;
      Spawn rate = 0.75;
      Vector { 1 1 0 };
      Vector rnd = 10;
      Stage {
        Type = "pt_point";
        Flags = "ptf_bright";
        Radius = 7;
        Tics = 12;
        Rnd = 0.2;
        Color { 0 .5 .9 .3 };
        Gravity = 0;
        Resistance = 0.0;
      };
      Stage {
        Type = "pt_point";
        Radius = 5;
        Color { 1 .1 .1 .1 };
        Gravity = 0;
        Resistance = 0.0;
      };
    }
    
    Alternatively, you could just take out the static flag and change the max age to 12 (the maximum length of the particles generated)
  • Very comprhensive - thanks for the detailed post. I'll get onto it shortly - I've got a project on this weekend but I'll get back to you soon if I have any more questions other than the one below. There's nothing like developing a utility to bring out more questions. ;)

    Do you have a link to the pack you're using - the one I have doesn't exhibit this problems on E5M1 but I suspect I may have an older pack. In any case, I'll compare the one I have to the one referred to here before making any changes to make sure mine is older.
  • Very comprhensive - thanks for the detailed post. I'll get onto it shortly - I've got a project on this weekend but I'll get back to you soon if I have any more questions other than the one below. There's nothing like developing a utility to bring out more questions. ;)

    Do you have a link to the pack you're using - the one I have doesn't exhibit this problems on E5M1 but I suspect I may have an older pack. In any case, I'll compare the one I have to the one referred to here before making any changes to make sure mine is older.

    I downloaded the one on this site. I went to "Wiki" on the main page, then to "Addons" and then down to the jHRP link. Are you using the 2004 one? This one is called "jhrp1_01.box_FINALv4"
  • I'm using JHRP.pk3 - most of the .pk3 files within there are dated 2008/2009. Specifically, that portion of Snake-Projectile.ded in there is as follows:
    Generator {
      State = "SNAKEPRO_A1";
      Flags = "gnf_blend gnf_srcvel";
      # Room for 10 sources.
      Particles = 200;
      Center { 0 0 0 };
      Speed = 0.5;
      Speed rnd = 0.5;
      Spawn radius = 1;
      Spawn age = -1;
      Max age = -1;
      Spawn rate = 3;
      Vector { 1 1 0 };
      Vector rnd = 10;
      Stage {
        Type = "pt_point";
        Flags = "ptf_bright";
        Radius = 7;
        Tics = 12;
        Rnd = 0.2;
        Color { 0 .5 .9 .3 };
        Gravity = 0;
        Resistance = 0.0;
      };
      Stage {
        Type = "pt_point";
        Radius = 5;
        Color { 1 .1 .1 .1 };
        Gravity = 0;
        Resistance = 0.0;
      };
    }
    
    All seems to work well for me, well into playing the level E5M1.
  • I'm using JHRP.pk3 - most of the .pk3 files within there are dated 2008/2009. Specifically, that portion of Snake-Projectile.ded in there is as follows:

    All seems to work well for me, well into playing the level E5M1.
    Well the static flag isn't there, so it will be overwritten when a new generator comes and it hits the limit. Sometimes you don't want this, so that's not necessarily the best fix, but it's good that at least it's working for you on some levels. :) Still though, because of things like this, you're having problems in the other levels, right? Which level in particular is it worst in? You might be able to pinpoint the particular problem enemy that way.
    If there's a mobj-based generator, it doesn't matter how crowded the level gets, there should be no disappearing of generators - the only thing is that there will be a spreading out or halting of active particles to generate new ones if the particle limit is hit, but that can be upped with consideration to general gameplay and all of that. There's got to be a static generator somewhere in the pack you've got that's filling all the spaces for the particle system to get broken like it did. It would be best if all the state-based generators had max ages EXCEPT for the D'Sparil death particles, where it's activated upon a death frame of his (only going to happen once) and it's necessary for it to be state-based for it to occur like it does. I remember that the D'Sparil system had no problem whatsoever, so I was just mentioning that in case it didn't cross your mind about the -1 max age on that particular generator! :D
  • I don't have the problem personally - it was the original poster. I'll do some more game playing to see if I hit the limit on other levels.

    I got the pack I'm using from here: http://www.mediafire.com/?tuwc4kdmyun
  • Well, then! Yeah, I think that pack you have is newer. That's really strange, considering how the one on the addons page is supposedly the most updated one. Well, this link can be open for any and all people I suppose! :)
  • I have a problem. jHRP (packaged) 2009.07.03 will not load even though it is ticked. It's the only pack I have for Heretic so it's not a conflict, it just wont show models or high res textures in game. I'm using this engine http://dengine.net/build721 on Vista 64. All other games work fine with their resource packs.
  • You have to extract the zip and put the folder into addons folder, I did that at first too.
  • yes that did the trick, thanks.
Sign In or Register to comment.