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
@Mukor 
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 
Also 
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.) 
Axes 
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 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 
Alternative 
Here's a sneaky way to randomly select while only looping through the list once

https://tomeofpreach.wordpress.com/2013/10/19/random-entities-find/ 
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?
Happens.
Copy the fx_beam and telefrag?
Happens.
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 
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. 
2 posts not shown on this page because they were spam
First | Previous | Next | Last
You must be logged in to post in this thread.
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.