Forum

statue code from doe

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Re: statue code from doe

Postby Madfox » Sun Jul 29, 2018 2:24 am

Ha! That's a scary sprite there! Thanks Kell!
I'm really surprised how much coding you put into it.
Like making a flying duck go walzing the foxtrot! :biggrin:

Image

That will make it as strong as the new dragons in my qtest mod.
Thanks a lot for your effort making this creep work!

Now I'm hoping I can intergrate this code in the already overpacked qtest.qc.
Here is as far as I have come making the q1test the original monster SinglePlayer.
Deathmatch too, but OK. Accessable for SP.

http://home.kpn.nl/lo2kf8/quake/maps/MF_QTest00.zip

I was trying to use the extra frames of the xogre to make him pee and laugh,
when the player dies by his hand.
I tried some starts in ai.qc PlayerDeathThink, but it doesn't work out.
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 11:11 pm

Madfox wrote:Ha! That's a scary sprite there! Thanks Kell!
I'm really surprised how much coding you put into it.
Like making a flying duck go walzing the foxtrot! :biggrin:

...

That will make it as strong as the new dragons in my qtest mod.
Thanks a lot for your effort making this creep work!



While examining the animations I could tell that a lot of love went into them. It seemed only fitting that the received the same on the .qc side. :wink:

Madfox wrote:Now I'm hoping I can intergrate this code in the already overpacked qtest.qc.
Here is as far as I have come making the q1test the original monster SinglePlayer.
Deathmatch too, but OK. Accessable for SP.

http://home.kpn.nl/lo2kf8/quake/maps/MF_QTest00.zip

I was trying to use the extra frames of the xogre to make him pee and laugh,
when the player dies by his hand.
I tried some starts in ai.qc PlayerDeathThink, but it doesn't work out.


Yeah, looks like there are a few bugs in there that need fixing.

xogre's charge is...somewhat disturbing. Examining the model animations reveals that the real charge animation doesn't make sense either, given that he isn't charging at the player with his shield up, he's hitting his axe on his shield instead.

Getting him to pee and laugh should be pretty easy to do. I'll take a look when I have time.
User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1106
Joined: Sat Oct 16, 2004 3:34 pm

Re: statue code from doe

Postby Madfox » Mon Jul 30, 2018 5:58 pm

The new squad frame for the serpent looks good.
A bit hard to make the texture the same shape.
Image

When I try to compile the mad_serp src with FteQuakeC I receive an error:
monster_sserpent.qc:1030: error : Type Mismatch on redecleration of serp_melee. monsters/sserpent_melee.qc 875 const void(float damage, float smack) sserp_melee is defined here


Also in game the repeating nailshot sometimes crashes the game with "trigger in clipping list"

While working with this altered qtest1 qc I think some dragons spell code will work odd with this new cde. One thing I need to do is minimalize the xogre.mdl frames, as I receive a 324 frame maximum while 256 is permitted.

examining the animations I could tell that a lot of love went into them

Same goes for the coding, I must assure that!

It looks pretty good for so far!

:biggrin:
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 30, 2018 11:02 pm

Madfox wrote:The new squad frame for the serpent looks good.
A bit hard to make the texture the same shape.


Looks pretty good.

Madfox wrote:When I try to compile the mad_serp src with FteQuakeC I receive an error:
monster_sserpent.qc:1030: error : Type Mismatch on redecleration of serp_melee. monsters/sserpent_melee.qc 875 const void(float damage, float smack) sserp_melee is defined here



O_o'

* Dr. Shadowborg looks at the source...and goes d'oh!
* Dr. Shadowborg goes on a triptohell.info and grabs the latest fteqcc64.
* Dr. Shadowborg uses latest version on src and gets same error.
* Dr. Shadowborg fixes error for next version of source.

Um, just get rid of the first s in sserp_melee (the first one that takes variables) and change the respective calls in sserp_tail anims and sserp_stin anims.

I'm actually surprised that it compiled without any warnings or errors like that with this older version of fteqcc64, let alone actually worked as it should. :shock:

Madfox wrote:Also in game the repeating nailshot sometimes crashes the game with "trigger in clipping list"


o_O'

qtest1 qc or mad_serp qc? Super Nailgun or Nailgun?

Anyway, the 1.1 iteration of serpent isn't far off now. :)
User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1106
Joined: Sat Oct 16, 2004 3:34 pm

Re: statue code from doe

Postby Madfox » Wed Aug 01, 2018 4:14 am

Yes, the correction of the "s" made the code compatible.
I can play the demo in QuakeSpasm-AD-Spike, Fitzquake won't like the large mdl frames.
I've been minimazing it to 256 frames, so the scene happens somehow faster.

The "trigger in clipping list" is a kind of nail shoot that happens faster than the framerate.
It feels as if the weapons is a bit oversized.

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

Re: statue code from doe

Postby Spike » Wed Aug 01, 2018 10:50 am

'trigger in clipping list' generally means .solid was changed to solid_trigger WITHOUT the requisite setorigin/etc afterwards.
Spike
 
Posts: 2883
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: statue code from doe

Postby Madfox » Wed Aug 01, 2018 9:53 pm

The nail functions are doubled and make to many calls.
While compiling I get the statement:
commen player.qc : 311 : warning : too many parameters on call to W_FireSuperSpikes
If I trace that I hang on

Code: Select all
void() player_nail1   =[$nailatt1, player_nail2  ]
{
   self.effects = self.effects | EF_MUZZLEFLASH;

   if (!self.button0)
      {
         if(self.weapon == IT_SUPER_NAILGUN)
          {
             self.think = player_gspin1;
             self.nextthink = time;
             return;
          }
         
         self.think = player_run;
         self.nextthink = time;
         return;
      }
      
   self.weaponframe = self.weaponframe + 1;
   if (self.weaponframe == 9)
      self.weaponframe = 1;
   SuperDamageSound();

   if(self.weapon == IT_SUPER_NAILGUN)
    {
      if(self.weaponframe == 1)
   * =>    W_FireSuperSpikes (2, 2);   <= *
      else if(self.weaponframe == 2)
       W_FireSuperSpikes (-2, 0);
      else if(self.weaponframe == 3)
       W_FireSuperSpikes (2, -2);
      else if(self.weaponframe == 4)       W_FireSuperSpikes (0, 2);
      else if(self.weaponframe == 5)
       W_FireSuperSpikes (-2, -2);
      else if(self.weaponframe == 6)
       W_FireSuperSpikes (2, 0);
      else if(self.weaponframe == 7)
       W_FireSuperSpikes (-2, 2);   
      else if(self.weaponframe == 8)
       W_FireSuperSpikes (0, -2);
/*
       if(self.g_fired > 12)
        self.nextthink = time + 0.025;
       else if(self.g_fired > 8)
        self.nextthink = time + 0.05;
       else if(self.g_fired > 4)
        self.nextthink = time + 0.1;
       else
        self.nextthink = time + 0.15;
*/
      self.nextthink = time + self.g_fired;
    }
   else
    {
     W_FireSpikes (4);
     self.nextthink = time + 0.15;
    }

   self.attack_finished = time + 0.2;
};
User avatar
Madfox
 
Posts: 105
Joined: Sat Jan 15, 2005 3:13 pm
Location: Holland

Re: statue code from doe

Postby Dr. Shadowborg » Thu Aug 02, 2018 12:16 am

Madfox wrote:The nail functions are doubled and make to many calls.
While compiling I get the statement:
commen player.qc : 311 : warning : too many parameters on call to W_FireSuperSpikes


Its not that it is making too many calls, its that you don't have an upgraded W_FireSuperSpikes. (weapons.qc) The variables it takes allow for the offsetting of the nails to fit with the supernailgun models firing frames. Note that the v_nail2.mdl supplied with the mod has some extra frames used for making the SNG more..."Chaingunny". :wink:

Remember I mentioned that I built this on a modified gpl codebase. (actually I was upgrading it to my own specifications with the endgoal in mind of using it with with q2bsp in FTEQW) You can find some of the changes I made noted in the changelog file.

You shouldn't need to implement the nailgun / supernailgun mods for the serpent, unless you really want to.

Note that in the mad_serp qc, nails do 15 damage and travel at 2x the speed of a rocket regardless of NG or SNG. SNG only eats 1 nail per shot, but can spin up to 1200 RPM (2x the normal fire rate of 600RPM for Nailgun...Which isn't set properly because I was testing something.)

As far as the "trigger in clipping list" error, I don't think the SNG is causing the problem, as there isn't anything in that part of the code that changes solid type to SOLID_TRIGGER. Rather I think it probably has to do with the "transform into quad damage item" death of the serpent. I haven't run into this problem myself in FTEQW, but I'll look into it soon with those other engines, assuming I can find a linux version...

Fun side note: NG / SNG are actually the second worst weapons in the quake roster IMO. While on paper doing more damage per second than the shotguns, the incredibly slow projectiles coupled with a max capacity of only 200 nails means that the nailguns peak at 1800 potential damage (thats if you don't miss, and miss you will), whereas the shotguns are capable of 2400, the rockets somewhere around 12000 give or take, and the cells 3000.


EDIT: I can confirm this error occurs with QuakeSpasm-Spiked 0.93.1, and it doesn't just happen with the SNG either. Definitely a problem with the "transform into quad damage item" death. I dunno whats going wrong here, as FTEQW has absolutely no problem with this, but I don't wanna say that its a problem with QSS either. I'll see if I can isolate this issue and fix it. :shock:
User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1106
Joined: Sat Oct 16, 2004 3:34 pm

Re: statue code from doe

Postby Dr. Shadowborg » Thu Aug 02, 2018 2:14 am

Spike wrote:'trigger in clipping list' generally means .solid was changed to solid_trigger WITHOUT the requisite setorigin/etc afterwards.


This helped greatly in determining the problem. Thanks Spike! :biggrin:

Okay, heres a quick fix:

Change this code in sserp_diequad3
Code: Select all
self.solid = SOLID_TRIGGER; // set to item solid
self.touch = sserpquad_touch; // set to pickup
self.takedamage = DAMAGE_NO; // set to nodamage
self.pain_finished = time + 30; // remove after 30 seconds.
self.nextthink = time + 0.05;


To this:
Code: Select all
self.solid = SOLID_TRIGGER; // set to item solid
self.touch = sserpquad_touch; // set to pickup
self.takedamage = DAMAGE_NO; // set to nodamage
self.pain_finished = time + 30; // remove after 30 seconds.
setorigin(self, self.origin); // because everything not FTEQW is dwoofy. =P
self.nextthink = time + 0.05;


Kinda dumb that all it takes is a setorigin, but whatever. :neutral:

Note that this may change a bit in the future, in 1.1 it will NOT have a 20% chance to drop a quad by default. You'll have to set its items key in the map editor to 4194304 (IT_QUAD).

Also, if removing frames from the model, remember to do the same for the .qc. Remove self.nextthink = time + 0.05; as required in the frames to slow it down.
User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1106
Joined: Sat Oct 16, 2004 3:34 pm

Re: statue code from doe

Postby Madfox » Fri Aug 03, 2018 12:02 am

Woot! Yes, that's exactly what I was looking for when I made the model.
I tried the shorter version for Qtest, but it needs some tweaking.
I hope the subroutines for the xogre can be made, I didn't get a player of it.

And here is the updated file for the serpent with the altered version of the quad.

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

Thanks a lot for the help!
:biggrin:
User avatar
Madfox
 
Posts: 105
Joined: Sat Jan 15, 2005 3:13 pm
Location: Holland

Re: statue code from doe

Postby Dr. Shadowborg » Wed Aug 08, 2018 12:11 am

Sorry for the lack of updates, been kinda buried at work.

I've been bugfixing and have finished implementing plan 3 (separate "physics" object, i.e. entity with movetype_toss that updates the position of the monster every frame) to allow it to be placed on doors / plats / trains and be pushed off of them. (plan 1[pointcontents] fail'd, plan 2 [flags / movetype / checkbottom / .groundentity hybrid] works...but isn't as stable as I'd like.)

I'm adding one more spawnflag starttype, "sitting", so it can be used as a gargoyle on posts / building corners. Once that's done I'll boot it out the door. After that, Ogre Laugh 'n Pee gets worked on next.
User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1106
Joined: Sat Oct 16, 2004 3:34 pm

Re: statue code from doe

Postby Madfox » Thu Aug 09, 2018 9:09 pm

Wow, that's already much more than I asked for.

I started with the statue code, but for things to get a bit converted I need to lower the frame count in the mdl file. The serpent code I made was far too high framed, and I saw you added a lot of (set next think 0.05) to overcome the long poses length.

When I worked with the RMQ team they wonderd why I had those large frame count models.
The Animator I uses 30 frames for a pose, and I develope them in stages. That way I got a good choice which frames I can or cannot use. Or better, how much time it takes to expose the animation. Most models have a maximum of 16, death scenes 24.

I've been working on the file to lower this frame count to halve, but (of course) I ended up in game with the wrong start poses. After some juglin' the squad pose appeared but then throws a wrong pose after dying. I'm not that good at coding, but it is a challenge.

My only concern now is, that I'm not sure if this code will work with qtest1. The commen qc is not that bad, but with this deluded src I now have, things don't go as I would expected.
Things like change_level crash, as they were not implemented. I still have enough work to do there.

I have no hurry to complete the mod, just want to be sure it goes as it was intended to be.

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

Re: statue code from doe

Postby Dr. Shadowborg » Mon Aug 13, 2018 10:11 pm

Version 1.1 now available:
https://drive.google.com/open?id=1OjRko ... HHQL6HPJXV

Tested with FTEQW and QSS. Contains several bugfixes, now features gravity while in item mimic mode, and can be placed on plats / doors / trains and also pushed off of them by other brushes. Added sitting statue mode. To get monsters to have 20% chance of quad damage spawn on death, give them an "items" key in your map editor set to 4194304.

Disregard "onlydecor" comment in the beginning, this was not implemented. If you want to enable it, just add a conditional like this in place of the total_monsters = total_monsters + 1:

Code: Select all
if(self.targetname != "onlydecor")
    total_monsters = total_monsters + 1;


Version 1.0 was removed as it is now obsolete.

Now then...off to do that xogre laugh 'n pee thing... :wink:
User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1106
Joined: Sat Oct 16, 2004 3:34 pm

Previous

Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest