Necros
Google for flatbuffers.
Then Become FB Friends With Aardappel
#1786 posted by Lunaran on 2015/11/11 07:53:37
MadFox
#1787 posted by Spike on 2015/11/11 08:07:25
cvars...
sv_sound_watersplash ""
sv_sound_land ""
these two cvars exist in dp+fte, probably not other engines.
self.contentstransition = someemptybutnotnullfunc; can be used as an alternative for the watersplash sound, but its more awkward and probably no better supported.
@necros: just use base64 on a text file or something. key+value pairs are good for forwards compat (even if were to use key+valuelen+valuedata blocks in a binary format, embed the version of data as part of the key or something).
Maaaaaaaaaaadfox O____O
#1788 posted by necros on 2015/11/11 15:37:30
I replace those sounds with silent .wav files!
...anyway
#1789 posted by necros on 2015/11/11 19:17:36
settled on a pretty simple method. i have just assumed that the order of stored prefs will always be the same, and anything new will be added to the end.
this way, i can just go ahead and read things in with default values if we're at EoF as in metl's suggestion. but this way i don't need any kind of headers or whatever.
FlatBuffers looks cool, but I like to avoid using extra libs when possible, although that looks like it'd be very useful for more complex systems (eg: games) so thanks for the heads up!
Necros
Yeah, that sounds like proper YAGNI design ;-). However, I wonder why you don't want users to be able to edit the prefs?
Also
Of course they're still able to do so, you're just making it a bit harder for them.
#1792 posted by JneeraZ on 2015/11/12 12:59:15
There's a thin layer of amusement in the concept of someone on a Quake editing message board talking about ways to prevent users from tinkering with their settings and preferences. :P
#1793 posted by Kinn on 2015/11/12 13:36:16
What's it got to do with Quake?
The Best Thing I've Read Once Upon A Time
Advocating for removing console access for the player.
#1795 posted by JneeraZ on 2015/11/12 13:49:53
Nothing, directly. But the openness of Quake and how it allows hacking at pretty much every level, which makes this community possible in the first place ... And then necros is determined to lock his users out.
THAT'S ALL! Just found it slightly amusing.
Pfft entitled quakers thinking they should be allowed to change stuff
#1797 posted by Kinn on 2015/11/12 13:59:37
Maybe the idea is to edit the prefs via the program interface (won't break things) instead of typing whatever in a text file? (will break things)
Yeah, Pretty Much
#1798 posted by necros on 2015/11/12 14:02:05
You guys should see it soon anyway. :P
Cvars
#1799 posted by madfox on 2015/11/13 06:29:38
I searched for the use of this statement, but didn't get much further in QCman or Quakewiki.
I have no idea how to use it or where I should place it in the qc to make the two sounds silent.
It's about a dopefish, that tumbles in and out of the water, but the side effect is, that it produces the landing bounce of the demonfiend and the watersplash in quiet an anoying way throughout the level.
I could replace these sounds with silent.wav, but then other use for entities gets lost and that is not my intention.
#1800 posted by Spike on 2015/11/13 09:12:29
tweaking those two cvars (via the cvar_set builtin or via default.cfg) is basically equivelent to replacing the wavs with silence.
and silence works in more engines, so either go with silent wav files or just live with the noise.
"while" Loop On A Monster Attack As Long As The Target Is On Sight
#1801 posted by aDaya on 2015/11/13 10:28:48
I'm continuing on my singleplayer mod, and after the two guns I made I finished doing the assets of the Nail Infantry (now reduced to an enforcer reskin, trying to fuse the original model with another one spawns more difficulties than necessary), all I need is a tweak for the attack so that he attacks like the ChainGunner in Doom 2, as in he continues firing as long as the target is on sight.
I know for one thing it's something like "while ["target" is on sight"]=>[attack sequence]", but how should I write "while ["target" is on sight"]"?
#1802 posted by Lunaran on 2015/11/13 18:49:36
if(visible(self.enemy))
don't use while, or he'll dump all his ammo in a single frame. or, use while just to see that happen first.
Personally
#1803 posted by ijed on 2015/11/13 18:57:28
I'd have him cycle between a few frames of animation - one which fires the projectile and one which checks to see if his target is visible. And then either some padding frames in between to make it less likely that he stops afiring s soon as the player is out of sight, or store a value and use a counter to do the same, resetting the count each time he starts firing again.
You might want to look at the scrag shooting - it has a couple of clever ideas in there, like firing at where the player was before they went out of sight.
You could get leading from chthon as well, but leading sucks.
Paralyze
#1804 posted by madfox on 2015/11/14 20:35:29
Maybe I'm not the first one that comes up with the idea, but would it be possible to give a monster an attack that freezes the player?
Just for a few frames, one second would be enough. I imagine it would be strange effect, because for the player it would be as if the game screen blocks, while after that time monsters would be on a different place. If the player survives the damage meanwhile.
Maybe it is just an insane idea, with all that crap like server messages and all, but anyway.
Would it even be possible?
#1805 posted by necros on 2015/11/14 20:54:17
It would be, but would probably be quite complex.
If you just need to make it look like monsters have moved while you were standing still, you could duplicate all monsters and replace them with stationary models with the same frame, angles, etc...
Then, make the real monsters temporarily have no model (change to a sprite with 255 frames and a transparent image) and keep running ai functions as normal.
then, when the effect ends, remove all the fake monsters and restore the normal models to the real monsters.
but yeah, very complex.
Ah
#1806 posted by madfox on 2015/11/14 21:33:44
feels like an Alice touch.
I think I first go for a bucket of coffee in the AIcafe before I start that!
Thanks anyway!
Rotten Cells
#1807 posted by madfox on 2015/11/14 22:55:54
I made a cell ammubox bsp that leaks.
It shows up in game by adding it to items.qc.
What does it need to fool the player, so it won't charche an amount,
or better make the amount less?
For now it works just like ammu_cell adding 5.
Monster Spawning Properly In Maps
#1808 posted by aDaya on 2015/11/15 14:16:09
So I've done coding for my chaingunner-like, he's visible in TrenchBroom, but when I play the map he's nowhere to be seen. I assume it's because I missed some qc file that stores monster classes, or at least a qc file that stores the qc files themselves, but as far as I know I can't find such a thing.
I followed this tutorial: http://www.insideqc.com/qctut/qctut-49.shtml and instead of telling what's the proper way to spawn an independant monster, he just tells to just replace a monster. That's shitty.
Classnames
#1809 posted by Preach on 2015/11/15 15:00:54
Hi Daya, I may be teaching you to suck eggs or whatever, but here's the basic idea that lets you spawn an entity in Quake:
classname in the map editor corresponds to a function name in QC
So if you look at the function called monster_shambler (in shambler.qc), the instructions there are followed at every point that you add an entity to your map whose classname is monster_shambler.
So if you've already written the code for your monster, you should have an equivalent function in your qc which sets the health, model, animations etc for your chaingunner. If you have called this function monster_chaingunner, you need to add an entity whose classname is monster_chaingunner. If you can't get that working, rerun your map with "developer 1" in the console and look out for the error message
|