No announcement yet.

Ingame mod menu

  • Filter
  • Time
  • Show
Clear All
new posts

  • Ingame mod menu

    Hey guys, i recently added a truckload of cvars to my mod and i have a slight suspicion that they won't stop coming. So i would like to add ingame menus. I know there are two ways, one it the menu.dat, the other is This beuatyful looking thing by avirox
    I read somewhere, that the meu.dat would sometimes crash the game and can be buggy to load. Does anybody has any experience with one of the above mentioned methods? Using one would make the customization of the mod a lot easier and convenient to use. And i could make a fat extra-shield in front of everything that tells people that my mod is not compatible with the "epsilon built" mishmash (i finally downloaded it after getting several pns and had a look at it. It feels like one of these uncooked crappy unity-games that never live up to their promise).

    But back to topic: Me wants menus. Did anybody every modded with one or the other method and could recommend one?

    Kind regards in advance.
    I once was a Ranger like you. But then i took a rocket to the knee.
    My little gore mod :

  • #2
    menu.dat works regardless of whether you're on a server or not. In DP it cannot do any kind of 3d stuff.
    DP's csprogs.dat implementation requires you to be on a server before you can see anything from it. If yours is a singleplayer mod this means that users are unlikely to notice until they try quitting, and that's only if they don't use various direct-quit keybinds, or the console. Yes you can be obnoxious and shove the menu in their face, but good luck with that.
    On the plus side, a mod that uses csqc for menus instead of menuqc is one from which clients will auto-download said csqc without users needing to manually install a menu.dat is my implementation of a menu. adding stuff into an existing menu is fairly straightforward, but you probably don't want to try changing the menusys/*qc files as you'll end up wanting to gouge out your eyes. treat that code like you treat builtins and you should be fine.
    Its made for FTE, but there's some workarounds for cvar names, but as DP is more limited you can expect various parts to just not appear etc. I made some effort to deal with alternative cvar names, but I don't really care to research every DP cvar (and most of them wouldn't mean much to users so why bother). Otherwise its a fairly complete menu.
    menusys can be compiled as either menuqc or csqc, each resulting in different limitations if you're using DP.

    There are other attempts at menus out there
    eg I quite like freecs's approach, but it has some significant input bugs and requires fte exclusively.
    xonotic's is pretty much a nightmare. if you have problems reading menusys then you'll hate xonotic's even more (eg: fte needs 'set pr_csqc_memsize "64m"' just to run it - yes, thats megabytes).

    regarding cross-engine support, this means just dp and fte. menuqc was first implemented in DP, while csqc was first implemented in FTE. This means that menuqc works about the same (barring some extra extensions) while dp's implementation of csqc is significantly different and almost a nightmare to support both equally.
    Either way, the two engines have many many differing cvars, many of them diferent names, many different values, and many more that are specific to only one engine. Simply put, cvars are a nightmare when it comes to engine compat, regardless of what you do.
    Some Game Thing


    • #3
      Thanks for he detailed and helpful answear and the link to your menu mod! I took a quick look at the files and also the menusys folder. And yes, my eyes instantly started to itch - the menusys stuff is, i think, way above my abilities. When i boil it down my mod is codewise very, very simple and wouldn't be what it is without so many peoples resources and code-examples. Yes, this mod is mainly for singleplayer, though i work at the multiplayer part too.

      By the way, if i try to start qore with FTE it says that denormalised floats are disabled and closes afterwards. I think it has something to do with the DP floats.

      i'm using

      void(vector org, vector velocity, float howmany) te_blood = #405;
      float TE_BLOOD = 50;
      float(string effectname) particleeffectnum = #335;
      void(entity ent, float effectnum, vector start, vector end) trailparticles = #336;
      void(float effectnum, vector org, vector vel, float howmany) pointparticles = #337;
      void(entity from, entity to) copyentity = #400;
      .float traileffectnum;
      .vector punchvector;
      .float alpha;

      in the defs.qc and threw the unused DP definitions out of the window. Now my question is, is it possible to just use their counterparts in FTE (mainly the same with a DP_ prefix as i see it) to make Qore run on FTE instead of DP? Because the more i play stuff with FTE the more i grow to like it more than DP. I never played xonotic, because i am a singleplayer-based entity .

      The only thing i was not able to find in the fteextensions is

      .vector punchvector;

      which wouldn't hurt to loose, because i use it purely for cosmetic stuff. Nonetheless, does your engine have any equivalent? I found none and as i said it wouldn't hurt to loose the functions i used it for, but if i could keep them why not.

      Thanks again and kind regards :-)
      I once was a Ranger like you. But then i took a rocket to the knee.
      My little gore mod :


      • #4
        This is exactly where I thought you might end up: switching to FTE.

        I really don't know why DP draws so many people to it. More information floating around for it? I think FTE has a slightly higher learning curve for modders, but it's well worth it. Either way, it's great to see this because FTE runs on my computer so much better than DP.

        Your mod may just be what starts "converting" people to FTE. Actually, a better word would be "graduating". No disrespect to DP of course, I bet if it was being actively developed with the care spike still puts into FTE it would be a much more polished engine.
        'Replacement Player Models' Project


        • #5
          This is exactly where I thought you might end up: switching to FTE.
          Dutch fragged TheKillingJoke with the Predicted-Fact Gun !

          I used it at the start because it was what i knew and i already started modding without giving thought to which engine i use for what reasons and to which purpose. Seven tried to make me consider that but i didn't understood what he meant. Slow, slow brain that i have. I don't know why the most people prefer DP too. Maybe because it's the equivalent of a cheap 2 kilo pack of flesh for two dollars (must be quality, eh?) and FTE is the 10 dollar 1 kilo thing of real substance. I can't get my head around a lot of FTE stuff, but as slow as i learn - i learn steady.

          I doubt that my mod will have any impact on the prefered engine the people use. It has 114 followers on moddb, 9 votes and maybe 10-15 people who actually play it. Also i don't advertise it and try to preserve as much original game balance and atmosphere as i can manage (I like Quake being Quake), which in return probably means, it will never be as flashy or overexaggerated as Brutal Doom, which Qore is here and there referred to (Nothing against brutal doom, but it seems to become some kind of Space-Call of Duty). I mainly mod for the fun of modding. ceriux and 2 other people on moddb are a real help with bugs that i don't see (i accidently doubled the jump height for example and forgot about it) and well... it's all around still very rough. Also, i think it drew a bit of interest because i started it at a point when a few game got "brutal" mods. At least people stopped refering to Qore as Brutal Quake

          If i switch over to FTE Qore will be much more easy to adjust and people could set it up more easy. Also i could play around with a lot more stuff, which is, why i'm into modding. FTE has some great features that DP misses. And that starts in the options menu, which i find a bit harder to configure but a lot more complete and thought-through.

          Cheers :-)
          I once was a Ranger like you. But then i took a rocket to the knee.
          My little gore mod :


          • #6

            Regarding the small amount of people playing your mod...that should increase drastically when its in a more completed state. People like finished products.

            Keep up the good work.
            'Replacement Player Models' Project


            • #7
              denormalised floats rant:
              these are floats where the exponent bits of the float are all 0. this means that they're really small floats that are so small that they need special handling. this means that many cpus don't bother to handle them and instead fall back on microcode or even software emulation. This makes them really really slow on eg Intel. As a workaround, Some SSE revision added a denormals-are-zero flag that situationally significantly improves performance by just ignoring them entirely, thereby avoiding all emulation.
              What's interesting about these floats is that they basically have just the lower 23 mantissa bits set. This makes them look exactly like integers in eg a hex dump.
              So evil mods that do evil things can exploit this by using floating-point instructions instead of (unsupported) int instructions (within tolerances, of course). conversion is easy enough, just multiply or divide by 1. This allows various offsetting tricks like frikqcc's arrays.
              Naturally, this all explodes if the compiler preconfigured the SSE stuff to treat all of these numbers as 0. Bad things happen in that case.
              None of this should affect FTE itself, but if a mod attempts to exploit denormals in this way then they will start failing in weird ways - but they will be QC crashes, and the QCVM should catch them with an error message+stack trace rather than a segfault.
              Typically they're exposed only by qccx's syntax (and fteqcc will warn about such syntax, if used), but you can also use various kinds of type-punning that a compiler won't so easily spot (the classical way is via unions, but you can also use (float)(__variant)1i for instance, note that such things usually require explicit/awkward syntax for a compiler to not notice).

              With all that said, the crash you're getting is likely something else completely.
              Try a different renderer?.. +set vid_renderer d3d9 or +set vid_renderer vk

              Regarding punchvector, looks like the client part already supports it, just not the server.
              Regarding fooextensions.qc, if you want to target both engines then that generally means using the feature set of the lowest common denominator - eg: dp's. I keep meaning to make some sort of 'anyextensions.qc' that includes everything possible (without conflicts), but tbh I expect that'd just result in mods that need everything and work on nothing... besides, I'm too lazy to maintain such a thing.

              Back on topic:
              menusys/*.qc is quite cryptic, yes. Just stick to the menu/*.qc files instead, as those are the files that define the actual menus and options listed etc. You should be able to add whatever items you want that way, just treat the menusys/ subdir as a third-party black box.
              I would really like to promote freecs's menus a bit more freely... In terms of simplicity they're really nice - all the state is in the hands of the caller, not the widget code which simplifies reading it at least, the use of static locals keeps everything in place. However, because of that there's no real way to track which element is currently active, etc, which is what results in the inputs awkwardness. But yeah, you'd also need to build everything from scratch to avoid the cstrike/halflife content expectations, so while its an interesting read, its not much more than that.

              If you want to make really simple menus, then you can just arrange things as a list of items. The mouse cursor is the item at (mousepos_y-top)/8 or whatever, and the rest is a load of drawstrings.
              the real complications only appear when you want resizing, vertical scrollers, any kind of click+drag, etc. Until then its just a case of tracking which menu is open, and what the currently active menu item's index is. That's basically what quake did, hence why so few engines bothered to add mouse support.
              Some Game Thing


              • #8
                Spike The Menüs i have in Mind are really very simple, Just to change some cvars. 10 on/off and 10 sliders. Not more. I would Like to completely Switch to fte because it makes things a Lot easier. The renderselection for example. It is even easier to Install it, it's a 1file engine.
                The mentioned Crash occurs right in Startup, even before the Main Menu appears. I will try to Run Quake+fte+qore with a fresh Install of Quake (the offering from GOG) and Exchange the floats. Should Run then. Now that i wrote it... Why did i Not so that earlier? Oh man...

                Thanks again Spike, you are truly a helping hand

                Dutch Thanks, i will keep it Up. I think i even found a way to let the nailguns nail enemies to the wall. Next week i will start to make that Work. I hope it does, it would be tremendously cool.
                Last edited by TheKillingJoke; 12-02-2017, 06:04 AM.
                I once was a Ranger like you. But then i took a rocket to the knee.
                My little gore mod :


                • #9
                  Spike Ok, so deleting all settings regarding the video settings did the trick, you were right! it runs good with Qore, i thought it wouldn't do. The only thing i seem to have to rewrite is the effectinfo.txt. Everything else works great, all extensions are compatible and even my framerate is a bit higher. Didn't expect anything else, tbh. After fiddlling around with the video settings it looks nealry exactly like Quake. Now i have to get this Nail-Them-To-The-Wall stuff running and then i can switch engines
                  Byebye Darkplaces, thanks for everything! No, no, It got nothing to do with you, it's me who changed, You will find other modders, i'm sure
                  I once was a Ranger like you. But then i took a rocket to the knee.
                  My little gore mod :


                  • #10
                    the crash you were getting may have been due to r_novis (assuming a demo was starting). which has since been fixed in the svn version.
                    regarding effectinfo, you can try r_particlesystem script;r_particledesc effectinfo, but its probably best to use eg particleeffectnum("") instead. if you're going for fte-exclusive stuff, try using r_converteffectinfo (and rename the output or whatever) and then you can use the fte-only stuff too (like spawn patterns instead of lame puffs).
                    Some Game Thing


                    • #11
                      Yes, a demo was indeed the first thing that the engine tried to load.

                      You must have invested a gigantic effort into your engine. I will use that and use the outputfile as a base for the next particle uptdate. My brain starts to go all Jackson Pollock on the blood effects. I watched some videos of some things fteQW is able to do and i'm stunned. I don't think i can make quake look that much better (shaders are a book with seven seals to me yet) but i'm eager to play around with the things that i can do with your particle system and the massive extensions.

                      (like spawn patterns instead of lame puffs).
                      And that's what i'm after! Simple puffs are ok and can look nice, combined with the spark orientation it was ok but limiting. Back when i modded Fallout 3 i was able to make pretty nice effects with the .nif files and their possibility to make such particle spawn-patterns (if you mean the thing i think you mean).

                      I'd say the enginge switch is sealed.
                      I hope i have enough time this week to go start this whole enterprise.

                      Greetings :-)
                      I once was a Ranger like you. But then i took a rocket to the knee.
                      My little gore mod :