News | Forum | People | FAQ | Links | Search | Register | Log in
Coding Help
This is a counterpart to the "Mapping Help" thread. If you need help with QuakeC coding, or questions about how to do some engine modification, this is the place for you! We've got a few coders here on the forum and hopefully someone knows the answer.
First | Previous | Next | Last

I heard about this earlier. Can you give more details where and why this happens? 
the explobox's th_die function calls T_RadiusDamage which calls findradius, which calls another explobox's th_die which calls findradius again, which clobbers the first findradius's chain causing it to not see the ents that it should have. You can see this on e3m1 I think it was.
The solution is to add a small delay between the th_die and the T_RadiusDamage.
This additionally fixes a stack overflow crash, as well as this fiend bug, and imho looks a little nicer when a group explodes over time, instead of all at once.

Unfortunately there's not really anything an engine can do to fix this (short of ugly hacks that rewrite the qc at load time). Increasing max stack depth delays the crash but still doesn't allow you to have 10000 exploboxes in a domino-run sort of layout...
I guess you'll have to do that with spawns instead... 
This bug is fixed in URQP. I'd suggest looking at its source, especially misc.qc and combat.qc. 
No More Zombie Fiends 
Thanks a lot for your help, Spike and c0burn!

Since my map already has custom code in it (to enable some custom decorative models), I solved the problem the qc way: I simply copied the explobox-related code from the URQP misc.qc, so now my barrels explode in a cool domino style (but still almost instantaneously for it to feel vanilla enough)! B)

The only problem is that the fiends no longer deliciously gib to pieces when they kill themselves by leaping into a bunch of barrels. :'( I did lazily check if URQP had a more "vanilla" solution, fixing the zombie fiend issue while still retaining the instantaneous explosion chaining, but I couldn't be bothered enough. Did you have something in mind, c0burn, when you referred to combat.qc? o: Oh well, better having less gib-inducing barrel clusters than having some solid "ghost" fiends (or their heads) leaping about.

I also gave Spike's "clip shield" workaround a try, but my memory served me well as I recalled that the clip texture can only be used on world brushes and func_details, it seems. Not even info_notnull or InitTrigger trickery fooled qbsp to compile the brush. :/ I even tried giving the func_detail brush a targetname and tried to killtarget it with a trigger, but nothing worked.

Anyway, the delayed barrel chain explosion fix is a good enough workaround for me. Thanks again! :) 
Best Darkplaces Controller Analog Config? 
So, I'm trying to fine tune the analog stick movements so they aren't so twitchy. However, everytime I try to edit the config, it just doesn't do anything. I think I'm using the wrong commands. Darkplaces joystick config commands are so confusing so I don't know which one to use! Basically, I need it so that the character always moves slowly when the left analog stick on the 360 controller moves around. I'm using chase_active for my game, so if they need to see the player and it can't be too fast. If someone could give me the base settings and new better settings that I can tweak to fit the game, please do! 
iiuc, you can build clip brushes into non-world entities, but you do have to include a non-clip brush somewhere in the same entity.
But yeah, better to fix it via qc, if you have that option. 
Try using the fixed T_RadiusDamage from URQP (you can skip the dtype stuff though). 
Hmm just had a though they're probably not gibbing because the demon gib check is for less than -80 health. You could try increasing it. 
Garbled Centerprint Text 
Hi. I'm trying to get back into quakec so I can finally finish my mod I started ages ago. Anyways, trying to brush up and some things by starting simple. I added a reverseweaponcycle to Malice ( I found a source on github). I seem to be getting some garbled text when shooting buttons which activate secrets. For instance, in level 2, there is a button which is supposed to display "there are more to go) after you shoot it. But now it displays some sort of garbled text which includes some of the brown text. Any idea where I would look to see about fixing this? As in which source file? Thanks. 
The Malice src. is decompiled. So don't expect everything to work. 

I get that, but I don't know which of the files to look in to try and fix it. :( Been looking through other info to try and figure it out, but no luck yet.

I can't seem to register on insideqc and since quakeone changed, it won't let me enter text to post over there. :( This is the only other place I know to ask. 
Legend, Open Up Your Mind! 
The source is alright. The only thing your Quake engine cannot do is to print russian letters.

You might have noticed that EVERY print is like that. Not just the secret button text.

The fix is really easy. Just copy the english phrases into your Malice source. Overwriting the russian text and you are done. Use the ones from vanilla 1.06. It works like a charm.

Or you can switch from english to russian in your engine if it supports it :P

To give you a start: For your specific secret button issue replace the russian words in the function: void() counter_use into english. The function starts in line 170 inside triggers.qc in the Malice source.

The rest we can discuss at if you prefer. 
Wow. Thanks. I didn't notice the rest of the text because I kept testing off of a save file. I'll start poking around. Thanks again.

Unfortunately, I can't use quakeone anymore. I think it may be because my computer is too old and therefore my chrome version is outdated. I'm on xp. I can't enter any text in quakeone for some reason in order to make posts or replies. 
Any idea what this one is supposed to mean? "предмет выпал с уровня на". Using google translate, it comes out as "the subject fell from the level on". But I have no idea what that should really say or what the context is. It's in line 157 of triggers2.qc. Void() The_plant. 
Something To Do With Map Testing? 
I'm no expert, but as I understand, Quake has some tools for map testing. For example, if you place one of your entities like health/ammo boxes etc. too close to the floor when creating the map, there's a chance the entity falls of the level when you run it and get a message in your console for every entity that had fallen off the level. Maybe the line of code is referring to that? 
Malice Source Tweaks 
Thanks for the tips. Spent a few hours getting most pertinent messages translated back into English correctly. The last one I posted still escapes me. As well as one I find that translates into "Splitter" But no idea what it actually does.

Other than the translations, I have managed to add reverse weapon cycling and reverse item cycling. Is there anywhere I can post it when I'm finished so that an English source is available for all?

Also, any ideas on a fix for the probe not moving when selected? Is there a quakec fix for this or only an engine side fix within quakespasm?

Legend Is Everywhere 
Hello again my friend,

I noticed that you posted about your Malice issues in the Quakespasm thread as well. I would like to stay here in the coding help section to better keep topics together. Also because it is not an Quakespasm-only bug.

First of all I am glad that the russian-english tip brought you further in your project.

You brought up some other related questions which I would like to try to answer.

- Chrome is outdated:
You would be suprised who else is still using XP. Why not try and install firefox if chrome doesnt work. You can install and use multiple browsers.

- "the subject fell from the level on":
Like Esrael already wrote, this is a developer message. Please look at the vanilla function inside items.qc: void() PlaceItem
It is exactly the same. You can even use the original english text from there. Which is: "Item fell out of level at "

- minigun texture misalignment:
Please find a fix for it here:

- spy probe not flying in Quakespasm:
Never use setmodel() without setsize()
That is the main culprit here.
So, what you want to do is, open probe.qc and add after: setmodel(self, "progs/probe.mdl");
this line: setsize(self, VEC_HULL_MIN, VEC_HULL_MAX);
That will fix the basic issue and the probe works again.
But there is another issue with the code: Malice spawns it in relation to the players view and angle. That needs another fix to make the probe also work when it is spawned while the player is looking upwards:
Change this line: self.origin = self.origin + v_forward * 40;
To this: self.origin = self.origin + v_forward * 40 + v_up * 10;
That should do the trick for most angles and situations. The ceiling is normally always 10 units higher than the player. So that is no problem.

Best of luck with your version of Malice. 
Cool. Thanks again for the probe and message help. I was hoping the probe could be fixed with qc. :)

As for the browser, I do have firefox installed as well. Unfortunately it doesn't wanna work either as far as quakeone goes. :(

I came across that minigun skin you pointed out and it does indeed fix the issue. Though, I suspected it could have been an engine thing since messing about with graphic settings does temporarily fix it without the need of the new skin. Though I'm happy to just go with the skin for simplicity sake.

I posted in Quakespasm thread cause I believed the probe to be an engine issue.

Thanks again. 
Thanks I got the probe working now with your code. One odd thing is that it won't start moving until the player looks up first. As in, you can't activate the probe and immediately start moving forward. Is this how it originally was supposed to work? 
That Dang Probe! 
Something is eluding me here. I can make it it function, but only after the player looks straight up. I've even tried using code from spawning rockets to try and make it begin further out. I'm missing something. Any other ideas? 
No problems here, Legend.
I push the use button and right after that the fire button and it starts flying without even moving the mouse. It doesnt matter if I look straight, a little down or upwards.
Sorry, you must have done some wrong copy/paste.
I used the exact same lines I gave you.

Just in case, be sure to not use a previously saved game with your new progs.dat as the gamecode has been changed. Always start a new game/map and test.

Even in that tiny place at the start of map d2 it works as it should. I am using QS 0.93.
Try harder Legend :) 
Malice Probe Code 
Thanks. I'm using the same version of QS. Could you possibly look at my code and let me know where I went wrong?


self.probe_sound = time + random() * SVC_SETVIEWPORT;

Gotta love decompilers. :)
All those assignments to unrelated constants from defs.qc makes it really hard to read. Consider changing them because that'll be way more appealing for anyone willing to help. 
C´mon Legend ... :) 
I wrote:
So, what you want to do is, open probe.qc and add after: setmodel(self, "progs/probe.mdl");
this line: setsize(self, VEC_HULL_MIN, VEC_HULL_MAX);

Unfortunately you added the new line at the wrong place. You must read more carefully.

You added the line after:
setmodel(probe, "progs/probe.mdl");
That is NOT:
setmodel(self, "progs/probe.mdl");
You set the model to the wrong entity.
probe is not self and self is not probe. ;)

You should not change model or size to different entities in one code block. That awakes evil things and the shamblers will hunt you for that :P

I am sure you can fix it by yourself now. Just reread post #2448.

Also, you still have the russian text inside your code...

Best wishes my friend.
And many greetings to osjclatchford. 
Ugghh. Of course it was just a simple silly oversight by me.

I cannot find any more russian in the probe.qc. I'm sure I may still be missing some in the rest of the files. Though. Which is my blind ass missing in the probe.qc though?

And btw, who is you is? Seven? Dutch? And how do you know I've been talking with osjclatchford? Are you psychic? A sorcerer? :O

Anyways, thanks again for all your help and explanations. 
What's up Legend!

Nope, it's not me. But I happened to see my name pop up, thought I'd say hi. I haven't been on the quake scene much anymore since Quakeone took a nose dive. I might jump back in after a while. Good to see you're still honing your code skills. 
A Newbie Here 
As some of you may know (including otp),this is ijazz2,except it's been a long time,with me having school and also getting selected for some NASA competition which means I go to LA from India in 2 months.Did I mention I forgot the password for ijazz2?

I have a small question.

How do I get weapons to replace other weapons?
(examples:Warhammer from Quoth,Axe<->Sword->Mjolnir from Drake)

I understand that this may take me a very long time to learn,but I am willing to do this.

I'm sorry for trolling. 
are you asking how would you put a different weapon in game? or are you asking how do you have multiple weapons bound to the same key on the keyboard? 
I am asking this:
If Ranger has an axe and he finds a sweet chainsaw,he picks it up,right?
But he has to drop the axe to have the saw.

In straightforward language:
How do I make the player replace the axe with another weapon on pickup?

As I mentioned,examples:
In Quoth,when you pick the Warhammer up,you lose the axe.

In Arcane Dimensions,you lose the regular axe when you pick the shadow axe up.Same goes for the SSG to Widowmaker and Thunderbolt to Plasma Gun.

In (whatever has been released) Drake, the chainsaw replaces the axe.
The sword and the axe replace each other on pickup(both have the same stats;only model differs)

Nailgun is replaced by Super Nailgun

Blaster is replaced by Laser Cannon

Weapons bound to the same key are there in an InsideQC tutorial,so I don't need to worry abotu that.Anyway I'm not gonna have multiple weapons on one key. 
self.items is where an entities items are stored.

What you'll want to do is remove the existing (to be upgraded) weapon from the players inventory, and then add the new weapon.

items.qc is where this is handled and item names are defined in defs.qc.

it should be fairly simple to do. 
It is a bit more involved than that.

For a custom warhammer/axe/whatever you will need the following... (using JazzAxe for example)

•Add a line float IT_JAZZAXE = 128; (assuming ID1, otherwise use next available value)

•Add a W_FireJazzAxe function that is a duplicate of W_FireAxe with damage you want instead of 20 and any other special effects you might want
•Above W_Attack add a line "void player_jazzaxe1 ();" without quotes
•Inside W_Attack add an if statement that checks to see if (self.weapon == IT_JAZZAXE) that then goes to player_jazzaxe1 ();

•Copy and paste all 4 functions of player_axe1, player_axe2, player_axe3, player_axe4
•Add "jazz" (without quotes ofc) in front of axe1, axe2, axe3, and axe4 in the function names
•Change W_FireAxe inside player_jazzaxe3 function to be W_FireJazzAxe();

•Copy weapon_nailgun function (or any other weapon), paste, and rename to weapon_jazzaxe
•Change inside weapon_jazzaxe self.weapon to be IT_JAZZAXE, self.netname = "ijazz2's bane";
•Inside weapons_touch add an if (self.classname == "weapon_jazzaxe") new =IT_JAZZAXE;

I probably missed something. 
You forgot W_SetCurrentAmmo?

Anyway,thanks for helping.You probably should changed your username to QCMaster. 
An Unnecessary WIP 
you shouldnt need to do any ammo checks with melee weapons, unless you're building a melee weapon that uses ammo, which would be pretty cool too. 
Sorry For Multi-post 
QMaster,I have a problem.
I'm using the AD Shadaxe model for jazzaxe.
FTEQCCGUI compiled without error,but when I try to select the weapon (after picking up) it just switches to the shotgun.The model appears for a split-second then the shotgun appears.I cant use it.

Then I tried (using an InsideQC tut) to make the weapon switchable by selecting axe twice.
Problem is still there.

I've ran into that before...might be a conflict with whichever bitflag value you used for IT_JAZZAXE. Can you upload a zip of your qc files? I might be able to take a look at it. 

This one has a few changes from standard id1,including the code which seems to be wrong for the Jazz Axe and some AD-inspired health model changes (.bsp to .mdl) 
Add if at the bottom
if (self.items & IT_JAZZAXE) return IT_JAZZAXE; else return IT_AXE;

And just below that in W_CheckNoAmmo:
inside the if (self.weapon == IT_AXE add "|| self.weapon == IT_JAZZAXE") 
Something is not right.

CheckNoAmmo does not have if (self.weapon == IT_AXE) part! 
i'm out of axe ammo! 
? From The Weapons.qc In The Zip You Sent Me... 
float() W_CheckNoAmmo =
if (self.currentammo > 0)
return TRUE;

if (self.weapon == IT_AXE)
return TRUE;

self.weapon = W_BestWeapon ();

W_SetCurrentAmmo ();

// drop the weapon down
return FALSE;
Never mind,found it.FTEQCCGUI has no Atrl+F combo!!! why!!!!! 
QMaster,the problem is still there.
I did some checking but I can't find anything wrong. 
in checknoammo shouldint you also add if(self.weapon == IT_JAZZAXE) return; ? 
otherwise it says you have no ammo jump to SG 
otherwise it says you have no ammo jump to SG 
if ((self.weapon == IT_AXE) || (self.weapon == IT_JAZZAXE))
return TRUE; 
Yes,I added that.It sill switches to SG after showing JAZZAXE for a split second. 
hmm what about ‘rankforweapon’ function?
im just thinking off the top of my head been awhile since i did the ol double tap
impuls to switch weapons; i had once made the lg
double as a flame thrower
you might need to add your axe there too 
Have you looked at client.qc?

There's a line

if(time > self.attack_finished && self.currentammo == 0 &&
       self.weapon != IT_AXE)
   self.weapon = W_BestWeapon ();
   W_SetCurrentAmmo ();

I suspect you need to change that last test to also consider IT_JAZZAXE
I am sorry.It does not work.Still switching after a second.

I am going to try and hunt down the warpspasm decompiled code I gave someone when I played Quake 2 years ago before going to Half-(my)-Life.

But please,try helping me.I might feature you in my mod. 
Just Checking 
What did you change it to? Was it this:

if(time > self.attack_finished && self.currentammo == 0 &&
self.weapon != IT_AXE && self.weapon != IT_JAZZAXE )
Thank You Sir 
You have saved me a complete rewrite.
Now,the world shall remember you as the savior of QuakeC.

Go Preach! 
Lol, Preach Is Always The Qc Master 
You Guys Might See 4 Teens Around 14-15 Age. 
They also will ask questions like these.Why?

Those idiots are my classmates! 
PDF For Beginners 
I created this PDF from a forum post on QuakeOne. This may be useful information for users new to QuakeC. 
Seconded That 
The way I found the problem line for the jazz axe was searching the entire sourcecode for every example of the keyword IT_AXE, which lead me to the one you hadn't changed yet. 
(from discord chat, I've chopped it down to just give the salient points)

Kinn - Today at 10:19 AM
I've had the "grenades occasionally clip straight through shamblers" bug plenty of times in vanilla quake. I'd totally forgotten it was a thing. Is it still a thing in QS etc?


c0burn - Today at 8:18 PM
entities are re-used
when an entity is removed, not all fields are cleared
the shambler code sets self.owner = lightningbolt


[editors note: player then fires a rocket/grenade, spawning a new entity just after the lightning ent has been removed]

c0burn - Today at 8:21 PM
the shamblers .owner field is set to your rocket
so it passes straight through


c0burn - Today at 8:21 PM
you can just set self.owner = world to fix it
when the bolt is removed
or not set self.owner
really it should be bolt.owner = shambler


Kinn - Today at 8:27 PM
holky fuck 
c0burn gets the Preach award for April. 
The Shambler needs to store a "link" to the lighting flash, just so that it can refer to it over the next few frames in order to animate it. There is no special reason why the Shambler has to use the ".owner" field to create this link. It could have used another entity field. Using .owner for this is a pretty dumb hack and as we can see, just invites bugs.

IMO however, the cleanest fix would be to not actually require the Shambler and flash to be linked like this - I would personally simply spawn the flash, and make it animate by thinking for itself (like the rocket explosion does.)

BONUS POINTS: notice also that whilst this is all kicking off, the Shambler sets self.effects = self.effects | EF_MUZZLEFLASH;

This has the (probably unwanted) side effect of disabling animation interpolation on the Shambler during its lighting attack.

If you made the lightning flash animate itself, as suggested earlier, you could also throw the muzzleflash effect on the flash ent instead of the shambler, controlling it through the flash anim functions. This will re-enable anim interpolation on the Shambler, and disable it on the flash - which is kind of what you want. 
Some Extra Detail 
when an entity is removed, not all fields are cleared

To expand on this part a bit: behind the scenes entity variables store a number. That number represents how far down that entity is in the list of entities - it's also the number you'd use with the edict command to print it, so the number isn't entirely hidden.

Suppose the lightning entity is number 666 on the list*. When the shambler spawns the lightning, it stores the number 666 in its owner variable. When the lightning gets removed, all of the data in slot 666 is cleared**, but the shambler entity isn't modified in any way. So the number 666 stays in place.

The only thing that will ever clear the value 666 is if the shambler spawns another lightning bolt, which will replace 666 with a new entity number. Until that happens, any entity which spawns in position 666 will be the shambler's owner (and so noclip through it). An entity slot won't be reused until 0.5 seconds has passed since the previous occupant was removed, so firing a rocket half a second after the lightning disappears is the easiest way to reproduce the bug.

The only reason this is really a problem is because the engine does special things with the owner field. In a normal entity field, the value 666 hanging around would be completely benign, as the shambler never does anything with the field except during the window where the lightning is spawned. So just changing the entity field the value is stored in will be enough to handle the bug.

*pedants corner: assume we're using an engine with raised limits so that entity 666 is valid.

**in fact in the original implementation, only a small amount of the data is cleared at the point when the entity is deleted - just enough to prevent it affecting the game further. The real deep clean of the data only takes place when the slot is reused. Until then you can access most data from the "ghost" of the previous entity - but don't ever depend on that behaviour as engines are liable to change it. Just something to be aware of when trying to debug issues. 
Quick and dirty memory management? in MY C code? It's more likely than you think! 
Concatenate Strings? 
I'd like to make an entity's targetname consist of two strings that both contain targeting information, but there doesn't seem to be an obvious way to concatenate strings. strcpy() and strcat() are unavailabe, and I haven't found a single example in the id code where concatenation is used.

Is there any other way to create a targetname from two strings I'm unaware of, or do I have to use a seperate field for the second string? 
Separate Fields 
Standard QC doesn't contain a way to concatenate strings, all strings are immutable things that you have to just take as they come. There are some complicated ways to output combinations of strings or characters to the console or the screen, but they can't be employed for logical string comparison in a sensible way. 
Abandon All Hope Ye Who Concatenates Strings 
the vanilla engine has only two ways to concatenate strings.
The first is that some of the builtins that accept a 'single' string argument will perform an implicit strcat. this is useful primarily for centerprint, but also works with bprint+sprint+error+objerror too.
The second is that console prints don't have any implicit new-lines, so you can just call sprint 50 different times to construct a single line. There are numerous mods out there that do things like this in order to try to print various numbers etc.

Other than that, you're screwed. Have a nice day.

If you're okay with requiring engine extensions, fte+qss+dp all have strcat builtins, and are all mostly compatible.
However, note that each of these engines have different temp-string behaviour. Strings in QC are essentially just pointers, so the memory that the pointer/string refers to can actually change and contain some other string entirely (usually as a result of calling other builtins that return temp-strings).

vanilla: ftos and vtos both return the exact same bit of memory, with every single call.
qs/qss: multiple temp strings - after 16 different temp-string-returning builtins have been called (from anywhere) it'll start reusing
the oldest temp-string. Use strzone if you want it to last longer.
dp: unlimited temp strings - call strcat or whatever as much as you want, but they'll ALL be forgotten once the QC returns to the engine, so ANY field or global that contains a tempstring will cause warnings when saving the game, etc. Use strzone still to avoid that.
fteqw: persistent temp strings - call strcat or whatever as much as you want. Store them in fields too, if you want.

Actually, there is a way to do strcat even in vanilla, but its so evil, obtuse, and just generally annoying that I'm not going to describe it. It also breaks compatibility with almost every other engine too, and can even be broken by just the C compiler that the engine was compiled with!

So if you're explicitly targetting vanilla and your targetname thing, just use two fields.
Whereas if you're doing more complex stuff, then you'll need to get people to stop using vanilla or quakespasm, and start using a decent engine instead that actually supports strcat (probably qss, because its basically just a super-set of quakespasm making it an easier engine to 'sell'). 
get people to stop using vanilla or quakespasm, and start using a decent engine instead

Eat shit, you gigantic self-fellating cuntflap of a non-person. 
OTP, if your definition of 'decent' is one that leaves things crippled and requires obtuse workarounds, then that's your problem, not mine. 
Your engine can have every thing ever requested by mappers and players alike and itd be nullified by the lack of documentation.

Want us to make the switch? Create some documentation. Make the source easier to access. I have reasons to use your engines but the lack of documentation is a huge turn off 
Use the pr_dumpplatform command and then just read through the resulting qsextensions.qc file if you want a list of the added qc extensions. Read the included comments if you want to figure out how to actually use it.

For particle effects, you can find some specs on fte's svn, or if you're sticking to dp-compatible stuff then you should be able to find info on that stuff on dp's site somewhere. 
Use the pr_dumpplatform command and then just read through the resulting qsextensions.qc file if you want a list of the added qc extensions.

Does this actually work in QSS? I can't find the resulting qc file 
you mentioned once that CSQC for custom HUDs could be coming for QSS - is this still planned? 
Another Question 
Now here is another thing:
Today I was testing and I noticed that no matter what ever T_Damage value I set for W_FireJazzAxeJazzaxe deals the same damage as in FireAxe.

I had set damage 40 for jazzaxe earlier and today I noticed it took me the same amount of hits to kill a shambler with the regular axe and jazzaxe.

Then I changed the regular axe damage to 600 and both axes kill the shambler instantly.

How do I fix this?
I want the jazzaxe to replace the normal axe like with the hammer in quoth and the jazzaxe should deal its own damage.
How do I do that?

(also I seem to have figured out how to add sounds like when you hit an enemy in AD and Drake.) 
I can't be sure without seeing the code but it sounds like W_FireJazzAxe isn't being called.

First step would be checking W_Attack further down in weapons.qc and checking that your (presumed) if (self.weapon == IT_JAZZAXE) clause is pointing to a different player animation function than the normal axe.

If it is, then check that the relevant function in player.qc contains W_FireJazzAxe() instead of W_FireAxe() 
add a call to error("function name here"); into both functions.
then you'll see which one is actually getting called.
it should also give you a stack trace, so you can figure out where its getting called from too.

(or if you're using fteqccgui+fteqw, you can just set a breakpoint and then step through the code.) 
I Got It! 
The problem was this

void() player_jazzaxe1 = player_axe,not jazzaxe! 
I Would Like A Little Bit Of Help 
So now I migrated to Rubicon Rumble Pack's code.With some of my changes.

I have some questions.Again.

1.How do I add a weapon? All the bit values upto 8388608 are used.And I tried 16777216 but it doesn't seem to work.

2.How do I do that subtraction thingy with self.items?
How does it work,anyway?

3.I checked out the Keep mod by QMaster,and it has a self.items2.What is the self.items2?
How do I add it in my mod?

I know I can just do a .float self.items2,but how can I manipulate it?

I Would Like A Little Bit Of Help 
So now I migrated to Rubicon Rumble Pack's code.With some of my changes.

I have some questions.Again.

1.How do I add a weapon? All the bit values upto 8388608 are used.And I tried 16777216 but it doesn't seem to work.

2.How do I do that subtraction thingy with self.items?
How does it work,anyway?

3.I checked out the Keep mod by QMaster,and it has a self.items2.What is the self.items2?
How do I add it in my mod?

I know I can just do a .float self.items2,but how can I manipulate it?

I don't want to clog this thread with my questions so I gave my email. 
Use Notepad++ 
It has a search in folders option to let you find every instance of .items2

.items2 was derived from the rogue mission pack since .items ran out of bits. 
So in which file can I find a way to derive?

Do I just add

.float items2 in defs.qc?

Then how do I add stuff to it? 
Treat It The Same As Self.items 
Ya just add it to defs.qc or anywhere in the compile order before you use it.

Add in any IT2_JAZZYSTUFFBITS = 1, 2, 4, 8, 16, etc flags. The only really tricky bit is in situations like weapons where you need to know when to check .items and when to check .items2 or you'll be able to switch to weapons you don't have, or accidentally give yourself quad or something. 
Can Teleportation To A Random Destination Be Done In Qc? 
if a trigger_teleport has multiple destinations with the matching targetname, it will always pick what I assume is the the one that is loaded first in the map and therefore has the lowest index of some sort that the find function looks for. I'm not really sure how it works since find is only defined as #18 in the code. I'm not very well versed in qc or regular c for that matter. I implement stuff by deriving heavily from existing code, so I'm at a loss here.

I need a more thorough find function that takes an additional index parameter that returns the first entity whose targetname and index match the given arguments. Then I would only need access to the amount of entities with that targetname and could generate a random number between 0 and that amount to use as the index argument.

I assume the reason find isn't defined in qc is that the the finding process can only be done by the engine, which would be a death sentence for my mod. I stand even less of a chance of understanding complex engine code than qc, and even if I did manage it the mod would be dependent on my custom engine branch which would make it an even harder sell to potential players.

I'm pretty much ready to throw in the towel, but I figured I'd try consulting the mighty code wizards first. Is there a way you could see making random teleportation work without engine modifications? 
just call find in a loop with the first arg set to the previous call's return value, until it returns world.
you then know how many matches there are, and you can pick a random index and select that destination with a second find loop.
no engine changes necessary. 
Thanks Spike 
works like a charm 
Here's a sneaky way to randomly select while only looping through the list once 
Post 2513 
If my memory serves me well,
Custents has a random teleport code.
Or was it nsoe_devkit? 
It's Getting Annoying 
I keep getting this error
Warning Q208:progs CRC not recognised from quake or clones.
This always happens.
If I make a new weapon to add to RRP?
Copy the fx_beam and telefrag?
Part of my code is copied and modified from RRP,Custents and some other sources.

Today I had to reset all my code because of their error.I call it an error because it compiles,but you can't run the game.

How does this warning happen and why?
How should I fix it? 
Warning Q208:progs CRC not recognised from quake or clones.
This can be translated to:
Don't fuck with the initial part of defs.qc

NEVER change 'ANYTHING' before the 'end_sys_fields' line of defs.qc or you get that warning.

(actually, you can change comments, add some preprocessor (like #pragma warning error Q208 etc), etc, but if any of the basic types or names changes, or any symbols are added or removed, then you will have problems as the interface between the engine and progs will end up incompatible.)

(one option is to just include [fte|qs]extensions.qc (not dp's though) before your defs.qc, as it includes systemdefs appropriate to its configured target. you'll also get extension builtins defined for you.) 
Or Use A Separate Defscustom.qc For Your Mod Variables. 
Thanks Qmaster and Spike.
I'm using a custom Def's.qc called astaf.qc,which was the name of my cancelled Half Life mod. 
Sorry For Double Post 
How do I use the Gyro library?
I've added it to my mod,but it's a little confusing.
I think I'm going too fast,this is my first mod after all. 
Sorry For Double Post 
How do I use the Gyro library?
I've added it to my mod,but it's a little confusing.
I think I'm going too fast,this is my first mod after all. 
Sorry For Double Post 
How do I use the Gyro library?
I've added it to my mod,but it's a little confusing.
I think I'm going too fast,this is my first mod after all. 
It's Been A While 
I haven't messed with Gyro in ages, but you might be able to take a look at how things were done using it in the SMC (Small Mod Compilation) created by sevin:

I'm stuck in an airport for a few hours so maybe I can poke around and let you know what I find. 
bumpity bump bump 
I Haven't Found A Working Link For Gyro Yet So... 
..a Mammuth Sized Shambler ! Headed To Preach..but Not Only 
Hi.. is it possible to create a huge Shambler (10 times the player size) ? What about bouncing-box issues ?
What qc changes needed ?
My map is called "Hunt 4 The Great White" 
Komagama Muth 
Here's one. I made it eight times as big as the original.
Bouncing box extends automaticly.
If you use it without changes it flashes from its heels, and can only be hit when you hit it in its foot.

Just for try out, replace it in your progs with the original one and give it enough space.
The best way to make it addepted is by mulyiplying all counts of walk and run with 8. Also the magic lightning will need that number.

I included a mdl and a probable qc, no idea what will happen.
Didn't test the beast. 
Some Adds 
I made a quick try and it seems to work, unless...,
you delete the original shambler out of your qc as all names are the same.
If you need small shamblers too, then give all related names for shambler in the new qc file another name, ie mamuth.

The bouncing box doesn't fit, it's way too small. Although I altered them too. Also the lightning emerges so high its inside its corps. So some alterations are needed here.

I was afraid the skin would look horrible, but that isn't the case.
I just can't escape from it as it moves that incredible fast. 
Bouncing Box? 
Is that what we are calling the bullet interactable box now to distinguish from the physical box?

BounDing box max is hull 2 size of 64x64x80. However, setting the size of a monster to something larger in qc allows bullets to hit it at the larger size even though its physical size is the same. E.g. It could still fit in 81 unit high spaces however, and have its model sticking through the ceiling. 
Oh Thanks To All.. Another (fancy) Question 
supposing I make a total conversion eligible for sale commercially.. what exactly is gpl ?

-I've read that qc code(progs.dat)also is an "asset" because is read by engine as data ?!
Then should I rewrite it all from scratch ?

-And what about the .exe's(glquake.exe,winquake.exe,darkplaces.exe,fitzquake.exe) since are not included in id released source code ! 
My Name Is Madfox And I Want My Money Back! 
GPL is a copyleft license for software, devised by Richard M. Stallman of GNU, who (in short) states that you can use the software to do what you want, including customizing and selling, provided you pass that right on to others and the author. (s) of the software. In concrete terms, the foregoing means that if you want to distribute software that has been published under the GPL, the source code will have to be added. This source code may then be further distributed under the GPL. Anyone can choose to publish his or her program under the terms of this license.

You don't need to rewrite it, as long as you include the code you might have read the scripts that are in the qc that state:
Copyright (C) 1996-1997 Id Software, Inc.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

See file, 'COPYING', for details.

But seriously komagama, I thought you were mapping for fun. I understand your considderation of making a commercial project but then why not start with something like gamemaker?

I'm mapping for several years now, I have only the love for the game, and when I ever had the intention to sit on iD's hat for making a commercial addon I probably had stopped many years ago.

Don't get me wrong, I don't want to disappoint you, but I've seen it before. People with the best intentions to make a coin out of hard earned worked getting screwed off by others who just wanted a piece of the (qc)ake.

Anyway, it is your decision. But watch out, I would love to play your map for free, but if you would ask money for it I would become so critical you wouldn't like your own map anymore.

So I'll start with ten bitcoins for the advice I gave.
Just Kidding Komagama 
You can find the correkted file here.
It's the mamuth.mdl of the super shambler, the h_mamuth.mdl of its head and the mamuth.qc.

If you compile this file you can use it with the normal shamblers in your map, with this result. The bouncing box is right his size.

Only thing left is tweaking the size of its lightning, but I supose it will always be beyond the player view, due to its size.

Succes with it, curious to your map. 
Thank Madfox.. But 
i'm not a noob in game-designing, sorry if I gave that impression.. Fact is there's something in gpl quake code that I cannot understand:
help me if you can:
-may I use big portions of Id qc unmodified (ai.qc, buttons.qc, monsters.qc) ? Carmack stated that you can create your standalone game based upon that code.. 
Would you look at that mammuth shambler! :3c It's so big and clumsy. He'll never be able to reach the "mouseholes" the player escapes into.

Which reminds me, compared to the regular shambler, has the movement speed been increased for this adorable little monstrosity?

Nice work, btw! ;) 
@komagama- well, I'm a noob in gpl code, so I can't help you out.
Maybe someone else.

@Esrael- Mouseholes? That's where the little Shambs come in.
I'm more concerned when it dies the player walks 96 units in shamb space nothingness.
And as I wrote: I just can't escape from it as it moves that incredible fast. 
The QC code is not under the GPL. However, when I talked to someone at id before they were sold to Bethesda, they expected people to handle the original QC code in the same way as the engine code, which means keeping the source open. 
You Heard The Man 
QC please! Chop chop. That means you. Haha. 
Broken English 
mamuth groans I'm too Q to see. 
Oh.. My Headache.. 
now I know why nobody made commercial tc based upon this engine.. aha
Anyway the official released from github includes qc files so they must be gpl as well :) 
The ogre has a pull pose of 11 frames which won't be used in the qc. What should have been its purpose?

I'm retrieving the Qtest1 qc, without any luck.
I'm using the one from Megalol, which luckely has a progs.src
Only problem is that it is casting more than eighty nine warnings.
It seems to me that a lot of it is just a replacement of the original qc.

I spent a whole evening just to get rid of the first moveangles to moveangles2. Is it realy that bunch of spagetthi? 
First | Previous | Next | Last
Post A Reply:
Website copyright © 2002-2018 John Fitzgibbons. All posts are copyright their respective authors.