|
Posted by metlslime on 2007/08/08 04:57:56 |
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. |
|
|
That Was The Solution, Yup
#1944 posted by aDaya on 2016/01/12 19:40:23
Gotta thank CZG for that
Actually,
#1945 posted by aDaya on 2016/01/13 08:18:54
When the compilation went with no errors this time, bullet hole sprites still don't appear on brushes.
Even though I made sure to place the bullethole code in weapons.qc as well, so I really don't know what's wrong here.
In the end I can overlook that while developping the mod, but it's still annoying.
Issues With Fteqcc
#1946 posted by kalango on 2016/01/14 16:12:50
Ok so i'm trying to compile a hexen 2 and csqc project with fteqcc.
So, i can compile a standard hexen2 code normally, but if i try to put some csqc in it and link it with
#pragma sourcefile csprogs.src
in 'global.hc' the compiler complains with the following error:
": werror Q208: progs CRC not recognised from quake nor clones"
The thing is that if i compile the CSQC separately its all good, but i really dont wanna to have to do two compiles each time i want to compile the whole project.
Btw i'm using the command line fteqcc (same happens with GUI)
my compilation command:
>.fteqcc -src hc -Thexen2
And also, i'm using Hammer of Thyrion's HCode since i couldn't find anything better or updated...
#1947 posted by Spike on 2016/01/14 21:02:07
put this in your hexen2 code (before any functions are processed):
#pragma target h2 //or fteh2, if you're going fteqw-only.
#pragma keyword enable thinktime
#pragma keyword enable loop
#pragma keyword enable until
and then remove -Thexen2 from your commandline.
alternatively, you can use
#pragma target id //or fte, because you might as well
in your csprogs.src, again before any statements are execed (keep the -Th2 bit if you're leaving the progs.dat code alone).
Alternatively, as you're not using fteqccgui anyway, you might as well just run fteqcc twice, with a batchfile or whatever.
fteqccgui is good for debugging though (which pragma sourcefile was implemented to simplify).
Great!
#1948 posted by kalango on 2016/01/15 13:56:59
I appended
#pragma target id
to the beginning of csdefs and it all went fine.
Thanks man!
Darkplaces Water Twist/Movement
#1949 posted by Qmaster on 2016/01/20 06:54:50
I can't for the life of me figure out how to enable the correct software quake style of rendering water with all its twisting and writhing in the Darkplaces engine. All the water does is scroll back and forth. I'm trying to dig through the engine code to find it. Its got to be somewhere...just disabled or commented out, right?
Anyone know where it is?
#1950 posted by Lunaran on 2016/01/20 07:03:46
gl_subdividesize to 16 maybe?
Something I'll Do In The Near Future
#1951 posted by aDaya on 2016/01/20 18:53:54
...cause right now I'm working on that BFG, but:
I'm planning on doing a Berserk power-up where attack speed is increased by 3 (weapon animation would speed up to reflect that) and ammo consumption divided by 2.
The question is, would such a thing be possible with something similar to SuperDamage? Especially with guns who are tied with their model animations (nailgun, super nailgun, thunderbolt)?
Combining Shotgun Blasts?
Was just reviewing the old Qc src here: http://www.gamers.org/dEngine/quake/Qc/combat.htm
the part where it mentions combining shotgun blasts (in T_damage ()), seems to be related to the dmg_take field I was working on earlier. I know there is a multidamage work around on another forum.....but what was the original intent of multidamage? Its spawning an ent that basicly collects the damage and distributes it?
#1953 posted by necros on 2016/01/23 21:47:27
the whole code is designed to reduce the amount of data being sent from clients and servers. instead of sending 50~ damage messages for small amounts, it sends 1 damage message with a large amount. if a shotgun blast hits multiple entities, then multiple damage messages are needed, but they still wanted to collect everything up as much as possible.
as a side effect, it basically lets shotguns gib monsters.
#1954 posted by necros on 2016/01/23 21:49:48
edit: sorry, should have actually looked at the code you were quoting.
this is to make sure the screen tint looks the right brightness.
imagine you took damage from 2 sources in the same frame, A was 50 damage and B was 5 damage.
if you just set .dmg_take to whatever the damage was, and B was processed after A, then you'd take 55 damage but have a very faint red screen effect.
Necros, Are You Implying Shotguns Gibbing Enemies Is A Bad Thing?
#1955 posted by aDaya on 2016/01/23 22:29:11
Going back to my last request, I know one way would be to have a (if BERSERK is active) check for each self.attack_finished, self.nextthink and ammo_counts for each weapons, but isn't there a more flexible option where potential added weapons could just benefit of just a function call, like what vanilla weapons do with the Quad Damage with SuperDamage(); ?
@Necros
Yes, I was wondering more about the multidamage function moreso, but you answered both questions, thanks.
I'm futzing a bit with some QC that checks each bullets impact point on the client, and determines a rough "hitlocation" guesstimate based on some code that Muavebib made and posted a long while back. Its counting up the correct number of impacts to each body part ok, however I am also wanting to separate out the possibility its contacting multiple targets.
Basicly Im floating 2 local ents - a,b and c and put this code in the loop if we hit a .FL_CLIENT ent:
if (a == world)
a = trace_ent;
else
{
if (trace_ent != a && b == world)
b = trace_ent;
else if (c != a && c != b && c == world)
c = trace_ent;
}
...it sorta crudely works and isolates the correct trace_ent near the end of the function where I count up location impacts, but I suspect this wont work well on more than 2 clients. Its hard to hit a group of more than 2 usually , but just in case Id like to cover that possibility somehow.
Is it easier to modify the multi_ent in multidamage to do this?
BFG Help
#1957 posted by aDaya on 2016/01/25 14:40:32
So I'm in the final stretch on doing that BFG, and that's its coding.
The idea here for the attack is for the sphere itself to drill through enemies who gib through its direct impact, and to explode against a non-gibbed dying enemy on impact.
During its travel, the sphere would spawn lightning attacks to nearby enemies (let's say 200/250 map units max).
And the explosion impact, instead of generating an explosion radius, would spawn a different lightning attack, one that would last an instant and generate more damage and an impact sprite at the end of the traceline, and its radius would be as long as vanilla thunderbolt.
Thing is, even though I have all the assets in place (models, sounds, sprites for the bfg sphere, big impact, and blast impact) I don't know how to properly code all of that.
I'm following these: http://www.insideqc.com/qctut/lesson-22.shtml http://www.insideqc.com/qctut/lesson-51.shtml
But I don't think I see anything related to "while bfgshot is in world" as a check to launch the nearby-lightning code.
Think Fast
#1958 posted by Preach on 2016/01/25 21:36:34
The trick is similar to the problem of the looping animation you had previously. You need to create a think function like
void() bfg_ball_think =
{
//insert lightning bolt code here
self.nextthink = time + 0.3; //how often lightning strikes
self.think = bfg_ball_think; //keep repeating
}
Then when you create the ball you need to add
missile.think = bfg_ball_think;
missile.nextthink = time + 0.2;
This gets you lightning shooting out as it flies, which is a good start.
BFG Help Part2
#1959 posted by aDaya on 2016/01/27 00:28:10
Thanks again for Preach's help.
Now, for the lightning blast coming from the impact, the idea is to generate an impact sprite at the end of the lightning line generated. I know trace_endline has a role to this, and this is where the blast sprite function will be called, but I doubt "trace_endline = BFGBlast();" would work, as trace_endpos seems to be more attached to particle work.
Just for reference, here's what I wrote for the entire BFG (not including weapon animation, which aren't made yet): http://pastebin.com/E82MgGTy
You'll Want To...
#1960 posted by Qmaster on 2016/01/27 18:42:11
First remove the local variable org from within BFGBlast(), then add an argument so: BFGBlast(vector org) = {...
Then in your code where you do your head finding and t_damage, you can add just after that t_damage() a call BFGBlast(head.origin); to pass the location on to that spawn function for the explosion. In BFGBlast() you'll want to change it from self to be a newent so:
local entity newent;
newent = spawn(); //create new entity to become the blast
newent.origin = org; //set location to the ending of the lightning
newent.movetype = MOVETYPE_NONE;
newent.velocity = '0 0 0';
newent.touch = SUB_Null;
setmodel (newent, "progs/bfgblast.spr");
newent.solid = SOLID_NOT;
bfgexpl1 ();
sound (newent, CHAN_WEAPON, "weapons/bfgblast.wav", 1, ATTN_NORM);
BFGBlast(vector Org) = {...
#1961 posted by aDaya on 2016/01/28 00:26:33
I don't get this part. This sure is not the start of a declaration (and isn't supposed to replace "void() BFG_Blast ="), as FTEQCC pointed out, but you said it's an argument... where should I put it? What should I put inside?
The Argument...
#1962 posted by Qmaster on 2016/01/28 02:25:13
The argument goes inside the parenthesis so:
void () BFGBlast becomes:
void (vector org) BFGBlast
OR
void BFGBlast (vector org)
either way you like at the start of your function.
The newent stuff is so you create a new entity for each lightning endpoint effect rather than keep moving only one otherwise if the main blast shot out at multiple targets you would only see the sprite effect on one of them.
...
#1963 posted by Qmaster on 2016/01/28 02:32:09
Inside your BFG_Expl function is where you would call your BFGBlast function, rigt after T_damage. Whenyou put head.origin inthe parentheses: BFGBlast(head.origin); you are telling it to use the end position of your lightning as the value of "org" inside your BFGBlast function.
DP Crash With The BFG
#1964 posted by aDaya on 2016/01/28 10:37:13
Thanks for your help QMaster. Now I'm testing it on Darkplaces, I get the gun, I fire it, the charging animation goes on, as just 0.1 second after the orb is fired, it crashes:
http://image.noelshack.com/fichiers/2016/04/1453973467-razenkrauft20160128102949-00.jpg
I also noticed it fired from off-center, somehow.
Here are the codes related to the BFG9500:
http://pastebin.com/5FdLg59C
Another Thing, Related To Item Slots
#1965 posted by aDaya on 2016/01/28 11:23:41
The BFG's item slot is stored at the value of 16777216 (Infantry Gun is 128, Gatling Gun is 8388608), but when I pick it up, both shotguns disappear from my inventory and the original nailgun pops in it. Which value shouyld I put it? 16777216 is nowhere else to be found in defs.qc btw.
#1966 posted by Spirit on 2016/01/28 11:38:22
Sounds like a integer overflow.
Ok, So How Do I Fix It?
#1967 posted by aDaya on 2016/01/28 13:36:05
ALLCAPS - Quake Maps In Unity?!
#1968 posted by khreathor on 2016/01/28 15:40:21
Dude I can test shit for you!
|
|
You must be logged in to post in this thread.
|
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.
|
|