Some questions about qc...

Discuss programming in the QuakeC language.
Post Reply
SusanMDK
Posts: 601
Joined: Fri Aug 05, 2005 2:35 pm
Location: In The Sun

Some questions about qc...

Post by SusanMDK »

I'm starting a mod for DarkPlaces and now I want to know what's possible to do with qc and what is not possible.
Here comes the list of stuff I've thought about modifying/adding:
* Player speed increase/decrease
* Player classes with different starting weapons/abilities
* Self recharging shield that can be used to boost damage, speed, weapon accuracy
* Crouching
* Alternate firing
* Light amplifying vision mode
* Use button
* Scope
* Distort model polygons, because some weapon hit the monster/player
* Some projectiles that stick to world and entities
* Ability to move in walls and ceilings for players and monsters
* Foot step sounds that interact with the world material
* Monsters who help player
zbang!
Dr. Shadowborg
InsideQC Staff
Posts: 1120
Joined: Sat Oct 16, 2004 3:34 pm

Post by Dr. Shadowborg »

I'm not sure how many of these can be done in darkplaces, but the ones I do know can be done in the order listed:

* Player speed increase/decrease (Yes, though it's somewhat controlled by the engine, it depends on what you specifically want)

* Player classes with different starting weapons/abilities (Most definately yes via QC)

* Self recharging shield that can be used to boost damage, speed, weapon accuracy (Yes via QC)

* Crouching (Unknown. Probably yes for Darkplaces via QC)

* Alternate firing (Yes)

* Light amplifying vision mode (No, unless Darkplaces has something I don't know about)

* Use button (engine specific, but can also be done from QC)

* Scope (Yes via QC, though this too is dependant on what you want)

* Distort model polygons, because some weapon hit the monster/player (No)

* Some projectiles that stick to world and entities (yes via QC)

* Ability to move in walls and ceilings for players and monsters (Unknown)

* Foot step sounds that interact with the world material (Unknown)

* Monsters who help player (Yes, via QC though somewhat AI dependant)

Hope these help a bit.
Preach
Posts: 122
Joined: Thu Nov 25, 2004 7:20 pm

Post by Preach »

Darkplaces supports reading the texture name from the surface that a traceline hits, so if you compile a list of texture names and the type of surface they represent, then you can do footsteps that match the surface. But it would be a lot of work. I did a similar thing with a mod where wood splinters flew off a few set textures when shot at, so it's technically doable.
Wazat
Posts: 771
Joined: Fri Oct 15, 2004 9:50 pm
Location: Middle 'o the desert, USA

Post by Wazat »

* Player speed increase/decrease
Very easy, in fact you have absolute control if you use SV_PlayerPhysics.

* Player classes with different starting weapons/abilities
Yea, there are lots of mods like this such as Team Fortress.

* Self recharging shield that can be used to boost damage, speed, weapon accuracy
Yup

* Crouching
Yes, darkplaces supports crouching -- Nexuiz uses it for example.

* Alternate firing
Yup

* Light amplifying vision mode
Hrm... this I don't know.

* Use button
Yes

* Scope
Like a sniper scope? Yea, Nexuiz has one, and I made one for my sniper rifle in Conquest.

* Distort model polygons, because some weapon hit the monster/player
You mean, change the model when the target gets hit? No, there isn't that ability atm.

* Some projectiles that stick to world and entities
Yup.

* Ability to move in walls and ceilings for players and monsters
Like moving right through the wall as if it's not there? Well, yes, but you have to be careful where they go in doing so. If you limit them to only going through certain walls that you specify, it'll be a lot better.

* Foot step sounds that interact with the world material
Yes, though I really recommend that you use textures with some kind of naming convention, such as "metal_<texturename>" for metal textures, "wood_<texturename>", etc. This will make it so you can just test what the prefix is to find out what kind of surface the player is walking on. The normal quake textures do not really consistently follow such a convention as far as I know.

* Monsters who help player
Yes, various mods like Archmage have done this. You can summon monster helpers, or have computer-controlled (though admittedly stupid) humans helping you out. I believe another person on the IRC chat rooms is doing monster summons as well, and I've done them myself.

If you have questions on how to do these, just ask. :D
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.
Supa
Posts: 164
Joined: Tue Oct 26, 2004 8:10 am

Post by Supa »

Just a quick post, light amp can be accomplished by using DP_SV_DRAWONLYTOCLIENT. Attach an entity with some kind of light effect (such as EF_BRIGHTLIGHT) to a player, then set '.drawonlytoclient = foo' on the entity. ie, if the light entity is named 'thwacky' you would use 'thwacky.drawonlytoclient = (put your client pointer here)'.

I haven't actually *tried* this, but it should work. :P
aut viam inveniam aut faciam
MauveBib
Posts: 634
Joined: Thu Nov 04, 2004 1:22 am

Post by MauveBib »

Distorting model polygons has been done in quake, but not in darkplaces and not in a released engine. IIRC Rich Whitehouse was writing a tutorial on how to do it, but couldn't release it due to contractual obligations with his job.
Apathy Now!
SusanMDK
Posts: 601
Joined: Fri Aug 05, 2005 2:35 pm
Location: In The Sun

Post by SusanMDK »

Aha, so about everything can be done, great thanks to you all!

Oh yea, the ability to move in walls and ceilings.. I meant Alien style wall walk thing, should I said on the walls and ceilings?
If something can walk in the floors, walls and ceilings, can the model rotate to match the floor, wall and ceiling angle?
Can I change the max slope angle objects can walk up?
Can I change the slope sliding not to happen on some slopes less than 45 degrees or something like that?
zbang!
RenegadeC
Posts: 391
Joined: Fri Oct 15, 2004 10:19 pm
Location: The freezing hell; Canada
Contact:

Post by RenegadeC »

Too bad there isn't a way yet to send lightstyles to one client, that'd be a good solution for full light amplification!

lightstyle(0, "a");

etc..
pud
Posts: 5
Joined: Fri Jun 17, 2005 3:05 pm

Post by pud »

there is. just do

Code: Select all

WriteByte(MSG_ONE, SVC_LIGHTSTYLE)
and etc.
Error
InsideQC Staff
Posts: 865
Joined: Fri Nov 05, 2004 5:15 am
Location: VA, USA
Contact:

Post by Error »

LTH did wall walking on one of his mods... Fiend Hunted was it?

find the command hq for this
Post Reply