Forum

New "dpextensions.qc" Update

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

New "dpextensions.qc" Update

Postby Seven » Fri Jul 01, 2011 11:27 am

Hello,

Just to let you know, if you not already aware of it.

LordHavoc implemented a new feature/function into DarkPlaces / dpextensions.qc (date: 26.06.2011)

It opens modders of QC a wide door with almost infinite possibilities.

You can now attach/stick a custom effect to an entity. Similar to:
self.effects = xxxx;

Before it was only possible to call a custom effect via DP_SV_POINTPARTICLES,
but you could not attach a custom effect to an entity.
(that will follow the entity and is spawned permanently like 'self.effects =' does it)

Now this is possible.
Before I could only "misuse" 'EF_FLAMES' and 'EF_STARDUST' for it.

Thank you LordHavoc for making this possible !!
I already have some crazy new ideas :)

Kind regards,
Seven

//DP_ENT_TRAILEFFECTNUM
//idea: LordHavoc
//darkplaces implementation: LordHavoc
//field definitions:
.float traileffectnum;
//description:
//use a custom effectinfo.txt effect on this entity, assign it like this:
//self.traileffectnum = particleeffectnum("mycustomeffect");
//this will do both the dlight and particle trail as described in the effect, basically equivalent to trailparticles() in CSQC but performed on a server entity.
Seven
 
Posts: 301
Joined: Sat Oct 06, 2007 8:49 pm
Location: Germany

Postby toneddu2000 » Fri Jul 01, 2011 12:55 pm

Lord Havoc is a genius.
Do you know if this feature could be used to realize a monster on fire?
(a fire particle attached to a monster entity)?
toneddu2000
 
Posts: 1352
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Postby Nahuel » Fri Jul 01, 2011 1:01 pm

Infinite EF_*!!!!!!!! :shock: :shock:
IT IS GREAT!!!!!!!!!!!!!!!!!!!!!
hi, I am nahuel, I love quake and qc.
User avatar
Nahuel
 
Posts: 492
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Postby Seven » Fri Jul 01, 2011 2:08 pm

toneddu2000,

That was exactly my idea, when I first contacted LordHavoc regarding this.

You can do it in 2 ways:
1.) Create your effect in effectinfo.txt with usage of "originoffset <x><y><z>" and "originjitter <x><y><z>".
In this way you can set the effect spawningpoint coordinate into monsters head for example and make the fire effect a little "spherical".
2.) Use DP_GFX_QUAKE3MODELTAGS to create a dummy entity inside the monster and spawn the effect on the dummy entity with DP_ENT_TRAILEFFECTNUM.

Option 2 is the more complex option, but gives you the advantage to set every part of the monster on fire.
If you want even with a different fire effect:
Head only smoke, while body with flames.
Option 1 should be enough for most cases though.

Kind regards,
Seven
Seven
 
Posts: 301
Joined: Sat Oct 06, 2007 8:49 pm
Location: Germany

Re: New "dpextensions.qc" Update

Postby Nahuel » Fri Jul 01, 2011 2:16 pm

Where can i find this dpextension.qc? I
I looked in this version http://icculus.org/twilight/darkplaces/files/darkplacesengine20110628.zip and did not find this extension!
where can I find it? Thank you!
hi, I am nahuel, I love quake and qc.
User avatar
Nahuel
 
Posts: 492
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: New "dpextensions.qc" Update

Postby Nahuel » Fri Jul 01, 2011 2:47 pm

Yes! this feature is great! I achieved 4 different EF_FLAME!
Image
hi, I am nahuel, I love quake and qc.
User avatar
Nahuel
 
Posts: 492
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Postby Nahuel » Fri Jul 01, 2011 2:56 pm

toneddu2000 wrote:Lord Havoc is a genius.
Do you know if this feature could be used to realize a monster on fire?
(a fire particle attached to a monster entity)?

you also can add an specific to the entity in the map, without any work in qc.
"effects = 1024"
this works fine using "EF_FLAME"
hi, I am nahuel, I love quake and qc.
User avatar
Nahuel
 
Posts: 492
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Postby thorn3001 » Fri Jul 01, 2011 3:05 pm

I think dpextensions.qc is in darkplacesengine20110628 -darkplacesenginesource20110628.zip -darkplaces - dpdefs

Thorn3001
User avatar
thorn3001
 
Posts: 29
Joined: Tue Jun 28, 2011 6:09 am
Location: Bogotá, Col

Postby toneddu2000 » Fri Jul 01, 2011 3:33 pm

Wow, thanks a lot Seven and Nahuel! It's very impressive what is possible to do. But, just a question: I never used effectinfo, is it possible to create an effect using image?
For example, fire - made of 15 tga images looping instead of code?
toneddu2000
 
Posts: 1352
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Postby Nahuel » Fri Jul 01, 2011 3:58 pm

toneddu2000 wrote:Wow, thanks a lot Seven and Nahuel! It's very impressive what is possible to do. But, just a question: I never used effectinfo, is it possible to create an effect using image?
For example, fire - made of 15 tga images looping instead of code?

Darkplaces reads the effects from Effectinfo.txt . Effectinfo.txt have differents scripts inside, if you have the tgas you can make a sprite with 15 frames,and after assign the tga´s like external skins.
For example you can create a sprite called "effect.spr" with 15 frames using this awesome tool http://www.quaketerminus.com/tools/fimg_v02.zip . this sprite can be to use any image for the frames in fact, does not matter really.
Put the sprite in the folder progs. Now You must assign the skins in this way; Put the tgas in the folder progs also and rename the images
"effect.spr_0.tga" to the frame 0
"effect.spr_1.tga" to the frame 1
"effect.spr_2.tga" to the frame 2
Etc...
Now you have the "sprite" with the external skins.

*****************************************************
for the Effectinfo.txt read this tread


http://forums.inside3d.com/viewtopic.php?t=1069&highlight=effectinfo
The "FOC" of chip is really great.
*****************************************************
Also you need the "particlefont" located in the folder particles

read this tread of Seven
http://forums.inside3d.com/viewtopic.php?t=2463&highlight=particlefont
hi, I am nahuel, I love quake and qc.
User avatar
Nahuel
 
Posts: 492
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Postby toneddu2000 » Fri Jul 01, 2011 4:44 pm

ok, got it. Thanks
toneddu2000
 
Posts: 1352
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Postby Error » Fri Jul 01, 2011 8:46 pm

ahem, this isn't new. http://dpwiki.slipgateconstruct.com/index.php?title=Effectinfo_Scripting_Reference

it's great to see more people using Darkplaces nowadays. It truly is a work of art for Quake modders and game devs alike.
User avatar
Error
InsideQC Staff
 
Posts: 865
Joined: Fri Nov 05, 2004 5:15 am
Location: VA, USA

Postby Seven » Fri Jul 01, 2011 8:57 pm

Hello Error,

Nahuel only wanted to explain in detail to toneddu2000 how effects are declared via effectinfo.txt (in Darkplaces).
That is of course not new. :)


The NEW thing is this (explained in 1st post):

//DP_ENT_TRAILEFFECTNUM
//idea: LordHavoc
//darkplaces implementation: LordHavoc
//field definitions:
.float traileffectnum;
//description:
//use a custom effectinfo.txt effect on this entity, assign it like this:
//self.traileffectnum = particleeffectnum("mycustomeffect");
//this will do both the dlight and particle trail as described in the effect, basically equivalent to trailparticles() in CSQC but performed on a server entity.


Anyway,
I want to thank you very much for creating the dpwiki Error.
I dont know how many times I visited your great wiki already.
It helped me very much.

Regards,
Seven
Seven
 
Posts: 301
Joined: Sat Oct 06, 2007 8:49 pm
Location: Germany


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest