Forum

statue code from doe

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

statue code from doe

Postby Madfox » Fri Jul 13, 2018 12:52 pm

For some days now I'm trying to add the statue.qc from DOE to my own monster.
I'm not sure, there are two monsters knight and hellknight, that have this code.
So I tried to extrackt the code from the doe.qc, but it is tricky.

My own monster with a walk routine doesn't seem so hard and triggers like one.
With a fly monster I ain't lucky, added the same code but for some reason
"void() monster_pause" is rejeckted.

Isn't there a code that has a solution for Statues, I can't find a trace in the doe.qc.
User avatar
Madfox
 
Posts: 105
Joined: Sat Jan 15, 2005 3:13 pm
Location: Holland

Re: statue code from doe

Postby Spike » Fri Jul 13, 2018 3:13 pm

I don't know what the problem would be... unless this is something basic like not prototyping things as needed (order matters, and if the order cannot be satisfied then you can always just prototype with eg: void() monster_pause; <- shove that above the function its referenced in and the actual version of the function that's defined later will update its value properly).

the monster gets enough .th_* functions to stop the thing from crashing, just no-ops that make the monster do nothing (and take no damage). It also gets a .use function that sets the .th_* stuff to their normal values, so that you can trigger it to wake it up. nothing that wouldn't work in vanilla.
Spike
 
Posts: 2883
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: statue code from doe

Postby Dr. Shadowborg » Fri Jul 13, 2018 8:31 pm

Madfox wrote:For some days now I'm trying to add the statue.qc from DOE to my own monster.
I'm not sure, there are two monsters knight and hellknight, that have this code.
So I tried to extrackt the code from the doe.qc, but it is tricky.

My own monster with a walk routine doesn't seem so hard and triggers like one.
With a fly monster I ain't lucky, added the same code but for some reason
"void() monster_pause" is rejeckted.

Isn't there a code that has a solution for Statues, I can't find a trace in the doe.qc.


Flymonsters are kinda wierd vs. normal walkmonsters, IIRC. (its been a while since I last looked at them) To make matters worse, Flymonsters got some changes in mods like Contract Revoked: Chapters, Quoth, Arcane Dimensions, etc. (i.e. vanilla flymonsters act more like walkmonsters, whereas CR:C / Quoth / AD actually fly around I believe)

You might try looking at the source for AD, specifically the Gargoyle, as it has a statue mode.
User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1105
Joined: Sat Oct 16, 2004 3:34 pm

Re: statue code from doe

Postby Madfox » Sat Jul 14, 2018 12:21 am

I had no problems with another walking monster to turn it into a satatue.
(well, that is..,) :cry: I had problems with turning the grey skin off to natural.
I can target them the same way as the doe monsters.
So is the statue code only impemented in the entity code, or on other places too.

The flying monster is something that won't compare the action in qc some where.

Image

Here is what I wanted to obtain.
Making use of a static entity of a flying monster in frame 127.
Then, as soon as the player tries to use it, it turns into a flying model of the original.
A kind of morphing state from an item to an entity statement.

Maybe a bit weird, but when I made the monster, I was planning to do so.

:mrgreen:
User avatar
Madfox
 
Posts: 105
Joined: Sat Jan 15, 2005 3:13 pm
Location: Holland

Re: statue code from doe

Postby Dr. Shadowborg » Sat Jul 14, 2018 10:29 pm

Madfox wrote:I had no problems with another walking monster to turn it into a satatue.
(well, that is..,) :cry: I had problems with turning the grey skin off to natural.
I can target them the same way as the doe monsters.
So is the statue code only impemented in the entity code, or on other places too.

The flying monster is something that won't compare the action in qc some where.

Image

Here is what I wanted to obtain.
Making use of a static entity of a flying monster in frame 127.
Then, as soon as the player tries to use it, it turns into a flying model of the original.
A kind of morphing state from an item to an entity statement.

Maybe a bit weird, but when I made the monster, I was planning to do so.

:mrgreen:


Okay, that is downright evil...and absolutely awesome. :shock: Quake needs more tricksey ambush monsters like this. (I still haven't gotten around to making the cabbagemouth with the model I got from chillo yet, I keep forgetting about it, argh.)

Back to your problem, if that is what you want it to do, you'll need to give it some custom AI + spawnflag and stuff to make it start as an ambush statue. Think something along the lines of a proximity mine, only instead of exploding, it does it's morph anim and starts behaving like a normal flymonster.

I'd write the code for you, but lacking the model and the source, I'd have to cobble something together using the scrag instead...
User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1105
Joined: Sat Oct 16, 2004 3:34 pm

Re: statue code from doe

Postby Madfox » Sat Jul 14, 2018 11:00 pm

Ah! So it is the ai.qc I should look for first.
The proximity mine, sounds like doe.qc.
Thanks for the help. The code from the Serpent.
You can find it here https://home.kpn.nl/lo2kf8/quake/models/serpent_study1.zip
The Cabbagemouth.., hungry feeling.
:neutral:
User avatar
Madfox
 
Posts: 105
Joined: Sat Jan 15, 2005 3:13 pm
Location: Holland

Re: statue code from doe

Postby Dr. Shadowborg » Sun Jul 15, 2018 12:16 am

Madfox wrote:Ah! So it is the ai.qc I should look for first.
The proximity mine, sounds like doe.qc.
Thanks for the help. The code from the Serpent.
You can find it here https://home.kpn.nl/lo2kf8/quake/models/serpent_study1.zip
The Cabbagemouth.., hungry feeling.
:neutral:


Okay, got it. I'll get to work on it, you can probably expect something in the next day or two. :wink:

Once I get what you need working, I'll cobble together cabbagemouth. After all these years he deserves to be let out to prey, er uh play. >=D (I conceived of him sometime slightly after RMQ's development began, IIRC, after conversations with gb about "garden of evil" plant monsters which were stationary, blended in to the enviroment, and could attack the unsuspecting.)
User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1105
Joined: Sat Oct 16, 2004 3:34 pm

Re: statue code from doe

Postby Dr. Shadowborg » Mon Jul 16, 2018 6:51 pm

Update:

Gonna need a few more days, some stuff in RL came up and I gotta build out the basic monster first before I can properly test the special features.

Examining the framegroups reveals that this is a rather interesting monster to work with. Initial .qc version will probably feel like a vanilla quake flying deathknight; Full potential will require some more work, and will result in a much more varied (and deadly) monster. :shock:
User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1105
Joined: Sat Oct 16, 2004 3:34 pm

Re: statue code from doe

Postby Madfox » Mon Jul 16, 2018 11:33 pm

Ah, so the cabbagemouth stays hungry!

Here is the code I have in game, it has no alteration in the othe qc.
That's probably how to make it smarter.
For now the code is smarter then me.

http://home.kpn.nl/lo2kf8/quake/models/serpent_study1_qc.zip

Take your time, I'm puzzling already longer for it, and just started coding.

:neutral:
User avatar
Madfox
 
Posts: 105
Joined: Sat Jan 15, 2005 3:13 pm
Location: Holland

Re: statue code from doe

Postby Dr. Shadowborg » Mon Jul 23, 2018 11:25 pm

Update:

Monster code v1.0 is complete and working. Final debug now in progress, once it's done I'll stick the .qc file 'n stuff up for you. (probably be sometime tomorrow) :wink:
User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1105
Joined: Sat Oct 16, 2004 3:34 pm

Re: statue code from doe

Postby Madfox » Tue Jul 24, 2018 5:21 pm

Thanks shadowborg!

I tried with placing an mdl frame 146 static in game, and then teleport another serpent to the same place, while killtarget the static.
It only works with a teleport_dest above the original.
That way it doesn't look the same monster anymore.

Great you managed it with qc.

For now I'm trying to make the squad_serpent look like the original quaddamage.
It still doesn't look convincing enough, and how to make a static frame turn?
(flag~all serpent poses start turning)
:smile:
User avatar
Madfox
 
Posts: 105
Joined: Sat Jan 15, 2005 3:13 pm
Location: Holland

Re: statue code from doe

Postby Dr. Shadowborg » Wed Jul 25, 2018 1:39 am

Sorry, its gonna have to be tomorrow, I got dogpiled by some chores today and theres a couple more bugs that need squashing. :cry:

Madfox wrote:For now I'm trying to make the squad_serpent look like the original quaddamage.
It still doesn't look convincing enough, and how to make a static frame turn?
(flag~all serpent poses start turning)
:smile:


Thats not a problem, I've already gotten the .qc to do it via .avelocity, though I need to do a quick function to test for certain special cases such as being dropped in from a ceiling door. :wink:

There will have to be a few tweaks to the model anims though as q1bsp can't handle 48x16qu bbox size against world geometry. (death frames)

A neat trick for this monster to have in the future would be a "start as wall decoration" type feature, to allow it to work like Quake4's Iron Maiden, starts out as a quad, then pushes away from the wall and morphs into the monster. :smile:
User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1105
Joined: Sat Oct 16, 2004 3:34 pm

Re: statue code from doe

Postby Dr. Shadowborg » Thu Jul 26, 2018 12:37 am

It's done! Go get it! :smile:

EDIT: v1.0 removed, link now points to v1.1
https://drive.google.com/open?id=1OjRko ... HHQL6HPJXV

The .qc is all self contained in src/monsters/sserpent.qc. Should pretty much drop into any normal quake sourcebase.

I had to modify the model (serpent.mdl) a bit to make it all look good. You can test the monster out in serptest.bsp, I included the .map and .jmf (jack) file.

Its built on a codebase I'm messing around with because I am too lazy to build on a stock vanilla qc, so just ignore everything but:
Code: Select all
src/monsters/sserpent.qc - qc file and docs for the  monster
maps/serptest.bsp (and .map, .jmf if you want the poopy testmap)
progs/serpent.mdl - modified to look right, added a frame for walltrap
progs/spevil_o.spr  - lavastream spell sprite
sound/serp/dsfirsht.wav - lavastream spell spawn noise


I can't remember if it uses anything fte specific, so if it doesn't work right away, try it in fte, or just compile the sserpent.qc with a stock vanilla qc.

Have fun!

EDIT: Poop, I just forgot I had to make some special ground checking code for ceiling hatch drop cases. :oops: Well, theres always v1.1. I'll add the code for fixing that case when its done on the forum.
User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1105
Joined: Sat Oct 16, 2004 3:34 pm

Re: statue code from doe

Postby Madfox » Sat Jul 28, 2018 11:29 pm

That's great, Shadowborough! I will try that out.
I am curious to see what will happen. I'm changing the skin to match the Quaddama.
It's still a mistery how to get the skin changed, something in the last death frame.

Thanks for your help, I'll check it out.
Succes with the Cabbagemouth!

:smile:
User avatar
Madfox
 
Posts: 105
Joined: Sat Jan 15, 2005 3:13 pm
Location: Holland

Re: statue code from doe

Postby Dr. Shadowborg » Sun Jul 29, 2018 12:06 am

Madfox wrote:That's great, Shadowborough! I will try that out.
I am curious to see what will happen. I'm changing the skin to match the Quaddama.
It's still a mistery how to get the skin changed, something in the last death frame.

Thanks for your help, I'll check it out.
Succes with the Cabbagemouth!

:smile:


No Problem, it was / is a challenge to write, but I had fun working on it! :wink:

On the ceiling hatch drop / func_trains, I'm almost done with the code for those, just gotta fix the "pushed off platform" when blocked while riding trains.

Regarding skin changes:

Code: Select all
self.skin = x;


Where x = skin number you want. Remember that the usual rules apply, 0 = skin1, 1 = skin2, etc.

To set monster skin to quaddamage skin, first put a self.skin = quaddamage skin; in the spawnflag block:

Code: Select all
if(self.spawnflags & 4)


Remember to do it for every spawnflag check block, if you want them all to look like quaddamage. (except the trog block, you don't want that...or maybe you do! :shock: )

Then, make sure to put a self.skin = 0; in serpquad_wake();

Also if you want to keep the "transforms into takeable quad" death, but want it to look like a quad, make sure to put a self.skin = quaddamageskin; in whatever frame of sserp_diequad you want it to go back to looking like a quad.
User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1105
Joined: Sat Oct 16, 2004 3:34 pm

Next

Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest