Announcement

Collapse
No announcement yet.

Small Mod compilation

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

  • Thanks for the response, Seven! I went back and looked through all the code changes I made (by comparing to the original SMC code in a compare text edtior). I found nothing that stood out in the way of self, owner, or other properties. Of course, I could have missed something and this could still be the issue. Whenever I added something to the mod, I was pretty careful to use the same language you used in your existing code.

    I am starting to wonder if the bug is related to something with save games. I played through a larger singleplayer map in my compilation, and it seemed to be getting more bugged as I played. There were also invisible monsters toward the end of the level. I'm not sure what would cause that.

    I noticed in this comment in all your new monster files before precache:
    Code:
    // all files precached in worldspawn() due to savegame-bug
    I noticed this comment months ago and duplicated what you did exactly by moving all the precache information to world.qc rather than the monster.qc file, such as this:

    Code:
    if ((world.model != "maps/start.bsp") || ((autocvar_wyvern_replace_wizard)||(autocvar_wyver n_replace_hknight)||(autocvar_wyvern_replace_demon )||(autocvar_wyvern_replace_ogre)))
    {
    precache_model ("progs/wyvern.mdl");
    precache_model ("progs/h_wyvern.mdl");
    precache_model ("progs/wyvflame.mdl");
    precache_model ("progs/fball.mdl");
    //precache_model ("progs/wyvern1.mdl");
    //precache_model ("progs/h_wyvern1.mdl");
    precache_sound ("wyvern/wyv_sight.wav");
    precache_sound ("wyvern/wyv_sting.wav");
    precache_sound ("wyvern/wyv_pain.wav");
    precache_sound ("wyvern/growl3.wav");
    precache_sound ("wyvern/growl2.wav");
    precache_sound ("wyvern/growl1.wav");
    precache_sound ("wyvern/flapup.wav");
    precache_sound ("wyvern/flapdown.wav");
    precache_sound ("wyvern/wyv_fire.wav");
    precache_sound ("wyvern/wyv_death.wav");
    precache_sound ("demon/dhit2.wav");
    precache_sound ("wizard/hit.wav");
    }
    But I don't know if there is something else I missed with precache that is messing up save games. I'm just trying to brainstorm since I have not been able to consistently duplicate the bugs (they seem to be happening at random).

    The corpse bug definitely appears when I fire a gun for the first time. It seems to replace rockets, nails, or ejecting casings. When the corpse disappears, the gun will fire another corpse. It's almost always a corpse with a painskin applied to it.

    Comment


    • I think I might have resolved the invisible monster bug. I moved the "precache_model ("progs/sword1.mdl");" etc. lines from Invis_sw.qc under the MultiSkin section to world.qc instead. So far I haven't seen an invisible monster since. I don't know why that would cause issues since all the new monsters have their second model precached under the MultiSkin section, but in this case it seemed to fix the problem (or I just haven't seen it yet).

      I haven't found the source of the "shooting corpse" bug, yet. I can't consistently replicate the bug at all. I just know that when it happens, a nail or casing will be replaced by a corpse that has a painskin for a skin. When the corpse disappears along with the other nails/casings, I can then shoot another corpse. It only allows me to shoot one at a time. Very odd bug.

      Comment


      • So I took a decent break from this, but I've been back at it the last month here. I have basically added support for all custom made maps from 1997 to 2002 that have over 3 stars on Quaddicted (I imported custom monsters, hipnotic/rogue functions along with other major custom code that is available online, which most maps of this era use). However, I have encountered a problem. FTEQCC refuses to compile anymore with the error "Too many types". I've read this is a limitation of older compilers, so I downloaded the latest version of FTEQCC. It does indeed work without giving me that error, but it also seems to interpret some code different. In particular, the monster death effects with the randomness command no longer works. The Demon no longer has the vengeance death, for example. Have you encountered this before Seven, and do you know a way to fix it?

        Edit: So it does seem that the version of FTEQCC named "fteqccgui 2015-06-17.exe" that comes with SMC will compile. But, it still compiles some stuff different. If I set demonrandomness to "100" and "demon" to "3", the demons will only have the vengeance effect about 25% of the time. If I use the original compiler, they have it 100% of the time as they should. I'm not sure why this block of code is being compiled in a different manner.
        Last edited by Lightning_Hunter; 12-07-2024, 07:36 PM.

        Comment


        • @ Seven - You are a magnificient bastard and I am still learning from your work. I have been dissecting some of your torch work to further understand and you keep on amazing.

          @ Lightning Hunter -- I have to use a specific fteqcc compiler from 2021 for my projects because if I use a later one, it complains about macros or sometimes other things (and it is never a big enough deal to contact Spike/Spoike) ... although I have to say that might be specific to fteqccgui version only because if I recall the non-gui one worked fine last time, but sometimes I need the gui version (if there are errors, WAY better).
          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


          • Hello Lightning_Hunter,

            It is great to see your passion and still working on your mod.

            I am sorry, that your reached/hit a wall with QC (type) size.
            I remember when I hit such a wall with particle effect amount and LordHavoc has increased its amount just because the SMC needed it.


            Now, what might help with oyur problem could be this:

            I remember Spike once told me, that compilers do NOT like setting a value (espacially "0") when declaring it (mostly in defs.qc).
            I am no expert, so maybe my words are not correct or specific, that is why I give you an example:

            float test; works
            float test = 0; doesnt work


            I remember this discussion with Spike, from the time we decompiled Mission Pack 2 for the first time and could not recompile it.
            Reason: The decompiler made many of the float declarations with a "0" (like shown above)
            Removing the "0" solved it and we could recompile the "sauce" with Spikes compiler.


            So, what you could do to test:
            Start with 1 monster (lets take Demon) and remove the first time your mentioned autocvar is declared the digit behind it (like shown above).
            As the mandatory file: smc_config.cfg is always present and from within the cvar is always declared.

            Now compile and test (without altering any other code).
            I hope this wil fix it.

            And as Baker said:
            Try to use non-gui compilers (but I am sure you already did).
            There are several inside SMC source (and I might also have some additional from that time)


            If it doesnt help, feel free to contact Spike, as he is the godfather and our knowledge is tiny compared to his

            Best of luck and keep up the good work.



            Hello Baker,

            Ohh my...
            If you mean the tilted torch code: That code made me several white hairs (that is a saying in germany, I hope you understand the meaning )
            But it works pretty robust. Even in almost every fan made map, that I found.

            I always disliked the straight torch handles and came up with the idea.
            Using a 3rd party torch handle model improves it of course in addition.

            Keeping all 3 flame types compatible was always another challenge:
            - polygon
            - sprite
            - particle (my favorite)

            The SMC has so many cvars, that it became harder and harder to test them.
            I could never test all combinations and so, as Lightning_Hunter described, some unexpected behavior may arise, hahaa.

            Thank you very much for your kind words.


            Enjoy your christmas time everyone,
            Seven

            Comment


            • Seven, Lightning_Hunter

              Seven as you pointed out ...
              > float test = 0; doesnt work // Baker adds: because fteqcc treats assignment to a global as constant

              This will work ...
              > var float test = 0; // "var" tells fteqcc that it is variable (not a constant)



              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


              • Thanks for the help, but I found the issue, and I believe it was a combination of two things. I noticed that some global values were redeclared in multiple locations. For example, "var float autocvar_demonrandomness = 25;" is declared twice in demon.qc. I went ahead and moved it to customeffects.qc only once. The previous compiler was fine with this, but the new one is not.

                Also, the new compiler does NOT like this bit of code:
                "autocvar_demonrandomness = autocvar_demonrandomness * 0.01;"

                For some reason, the compiler will over-rule other instances of this code and ignore the SMC_config file. Instead, I went through and modified all the calls for this command individually, like so:

                "if (randomness <= autocvar_demonrandomness * 0.01)"

                I am currently applying these two changes to all the monsters. Lets just hope I don't miss anything. Lol

                Thanks again!

                Comment


                • Originally posted by Lightning_Hunter View Post
                  Also, the new compiler does NOT like this bit of code:
                  "autocvar_demonrandomness = autocvar_demonrandomness * 0.01;"
                  !
                  That code is "bad" (at least for DarkPlaces engines).

                  That code reads from cvar and writes to VM memory without updating the cvar.

                  What would be correct:

                  cvar_set ("demonrandomness", ftos(autocvar_demonrandomness * 0.01) );

                  Autocvars read from cvar but if you change the value in QuakeC, it only changes the local variable memory and does not perform a cvar update. cvar_set should be used.

                  It kind of sucks that you have to know exactly what the engine code is doing to know the mechanics of what is going on there, no one can be expected to know that so the warning in the newer fteqcc is good.
                  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


                  • Well, the good news is that all seems to work fine now. In reality, I just needed to "dumb down" the code so that all compilers and all engines can read it (and believe me, dumbing something down is what I'm good at since I'm not really a coder).

                    Comment


                    • Why are the leg model textures not loading when enabled?
                      Attached Files

                      Comment


                      • Originally posted by Avenger View Post
                        Why are the leg model textures not loading when enabled?
                        I load SMC with all patches ... (I repacked SMC with all the patches into a single .zip file, but it is all the same result ... SMC All Patches Download )

                        I look down ..

                        I see leg textures.

                        Does your console have a message like texture not found if you scroll up?

                        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


                        • Originally posted by Baker View Post

                          I load SMC with all patches ... (I repacked SMC with all the patches into a single .zip file, but it is all the same result ... SMC All Patches Download )

                          I look down ..

                          I see leg textures.

                          Does your console have a message like texture not found if you scroll up?

                          For some reason I just got an email notification that my post had a reply yesterday even though you apparently did so on January 1st... Forgive my delayed response.
                          ​​​​​​
                          Anyway, I figured out what the problem was. Turns out I accidentally moved the PNG library file "libpng15-15.dll" when removing other mods from the darkplaces directory prior to installing SMC and that file is a dependency for this specific setting.

                          For the sake of consistency though, why are the leg textures red/yellow when the suite/armor has clearly been defined as white/grey in all other reflective surfaces? This doesn't really make sense...



                          Comment


                          • Originally posted by Lightning_Hunter View Post
                            So I took a decent break from this, but I've been back at it the last month here. I have basically added support for all custom made maps from 1997 to 2002 that have over 3 stars on Quaddicted (I imported custom monsters, hipnotic/rogue functions along with other major custom code that is available online, which most maps of this era use).
                            Is there an update on this?

                            Any plans to make SMC compatible with newer map packs?

                            Comment


                            • I was interested in looking at the player color thing.

                              I typed "color 12 4" in the console and then my color switched to "2 0" after a second. I can't get it to stay.

                              Either way, my leg textures don't seem to match my player colors. I would guess that the leg model is not considered part of the player, so does not get the player color.

                              Sometime I'll look at this deeper.
                              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


                              • Originally posted by Baker View Post
                                I was interested in looking at the player color thing.

                                I typed "color 12 4" in the console and then my color switched to "2 0" after a second. I can't get it to stay.

                                Either way, my leg textures don't seem to match my player colors. I would guess that the leg model is not considered part of the player, so does not get the player color.

                                Sometime I'll look at this deeper.
                                The "Quake 1.5" mod uses the correct colors for the leg model and since that mod was created using parts of SMC, I don't see why it would be a problem to just borrow it to update the public build. This is probably what I will do for my personal use.

                                Comment

                                Working...
                                X