Doom Marine
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Special Interest > Eternity > damagetype
 
Author
All times are GMT. The time now is 01:29. Post New Thread    Post A Reply
printz
CRAZY DUMB ZEALOT


Posts: 8856
Registered: 06-06


I'm seeking help with this one.

1. Can I define my own damagetypes?
2. I remember there were predefined damagetypes somewhere. But I can't find them in the EDF. Are they in the code? They were together with a note for us to limit ourselves to those damagetypes, not add new ones. If predefined damagetypes still exist, which are they?
3. The whole damagetype EDF block is suggested by this part of the 3.37.00 code (e_mod.c)? What I mean: these 4 are all the fields it uses?
code:
// // damagetype options // #define ITEM_DAMAGETYPE_NUM "num" #define ITEM_DAMAGETYPE_OBIT "obituary" #define ITEM_DAMAGETYPE_SELFOBIT "obituaryself" #define ITEM_DAMAGETYPE_SOURCELESS "sourceless" cfg_opt_t edf_dmgtype_opts[] = { CFG_INT(ITEM_DAMAGETYPE_NUM, -1, CFGF_NONE), CFG_STR(ITEM_DAMAGETYPE_OBIT, NULL, CFGF_NONE), CFG_STR(ITEM_DAMAGETYPE_SELFOBIT, NULL, CFGF_NONE), CFG_BOOL(ITEM_DAMAGETYPE_SOURCELESS, cfg_false, CFGF_NONE), CFG_END() };

4. Finally, is it actually recommended to use them at this stage?

Old Post 08-12-10 22:58 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Quasar
Moderator


Posts: 6052
Registered: 08-00


http://mancubus.net/svn/eternity/trunk/base/things.edf

Old Post 08-13-10 04:08 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
printz
CRAZY DUMB ZEALOT


Posts: 8856
Registered: 06-06


Interesting. Very interesting. Looks like damagetypes are differentiated by weapons, and I can make monsters behave differently when hit by something or another... and even be resistant.

Only "grenade" bothers me somewhat, because it's not in Doom and was only added as a MBF "selling" point (albeit not a bad one). What exactly marks a player-shot projectile as a grenade, not, say, a rocket?

Can I use damagefactor to make actors more vulnerable?

Old Post 08-13-10 14:39 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 11126
Registered: 07-07



printz said:
Only "grenade" bothers me somewhat, because it's not in Doom and was only added as a MBF "selling" point (albeit not a bad one). What exactly marks a player-shot projectile as a grenade, not, say, a rocket?

Take a rocket. In DeHackEd, remove the MISSILE flag, and instead add the BOUNCES flag. You now have a grenade.

Yeah that's how they're done in MBF. Bouncing rocket that's not a missile. The result is a lot of hackery around (to make things with the BOUNCES flag pass the same checks that those with the MISSILE flag do, and also to mess around with cyberdemon/spiderdemon immunity to splash damage) to make it work.

Old Post 08-13-10 14:47 #
Gez is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
printz
CRAZY DUMB ZEALOT


Posts: 8856
Registered: 06-06



Gez said:
and also to mess around with cyberdemon/spiderdemon immunity to splash damage)
I noticed that Eternity quietly removed that hack, so now, bouncing objects no longer breach through the BOSS barrier. Thankfully, I'll be adding an EDF patch that corrects it: FORCERADIUSDMG ;)

Does the grenade have to be a "rocket (in air)" (rocketshot) actor?

Old Post 08-13-10 14:51 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Quasar
Moderator


Posts: 6052
Registered: 08-00



printz said:
I noticed that Eternity quietly removed that hack, so now, bouncing objects no longer breach through the BOSS barrier. Thankfully, I'll be adding an EDF patch that corrects it: FORCERADIUSDMG ;)

Does the grenade have to be a "rocket (in air)" (rocketshot) actor?


Damage types are not attached to any particular actor so you can give them to whatever you want. The GRENADE damagetype is actually a throwback to Eternity TC, which had a grenade launcher "attachment" for the rocket launcher as weapon 2 on slot 5. Because it has always been documented, I couldn't really remove it. And now that they're dynamic via EDF, it really doesn't matter.

Old Post 08-13-10 14:56 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
printz
CRAZY DUMB ZEALOT


Posts: 8856
Registered: 06-06


Despite what is written in base\things.edf, can I make my own damagetypes, and the way to attach them to actors is through the mod thingtype keyword?

Old Post 08-13-10 15:01 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 11126
Registered: 07-07



printz said:
I noticed that Eternity quietly removed that hack, so now, bouncing objects no longer breach through the BOSS barrier. Thankfully, I'll be adding an EDF patch that corrects it: FORCERADIUSDMG ;)

Does the grenade have to be a "rocket (in air)" (rocketshot) actor?



I think so but I don't remember.

Here's the code I had written to handle BOUNCES in DeHackEd for ZDoom:
code:
if (value[0] & MF_BOUNCES) { // BOUNCES (which occupies in MBF the MF_NOLIFTDROP slot) // This flag is especially convoluted as what it does depend on what // other flags the actor also has, and whether it's "sentient" or not. value[0] &= ~MF_BOUNCES; // clean the slot // MBF considers that things that bounce can be damaged, even if not shootable. info->flags6 |= MF6_VULNERABLE; // MBF also considers that bouncers pass through blocking lines as projectiles. info->flags3 |= MF3_NOBLOCKMONST; // MBF also considers that bouncers that explode are grenades, and MBF grenades // are supposed to hurt everything, except cyberdemons if they're fired by cybies. // Let's translate that in a more generic way as grenades which hurt everything // except the class of their shooter. Yes, it does diverge a bit from MBF, as for // example a dehacked arachnotron that shoots grenade would kill itself quickly // in MBF and will not here. But class-specific checks are cumbersome and limiting. info->flags4 |= (MF4_FORCERADIUSDMG | MF4_DONTHARMCLASS); // MBF bouncing missiles rebound on floors and ceiling, but not on walls. // This is different from BOUNCE_Heretic behavior as in Heretic the missiles // die when they bounce, while in MBF they will continue to bounce until they // collide with a wall or a solid actor. if (value[0] & MF_MISSILE) info->BounceFlags = BOUNCE_Classic; // MBF bouncing actors that do not have the missile flag will also rebound on // walls, and this does correspond roughly to the ZDoom bounce style. else info->BounceFlags = BOUNCE_Grenade; // MBF grenades are dehacked rockets that gain the BOUNCES flag but // lose the MISSILE flag, so they can be identified here easily. if (!(value[0] & MF_MISSILE) && info->effects & FX_ROCKET) { info->effects &= ~FX_ROCKET; // replace rocket trail info->effects |= FX_GRENADE; // by grenade trail } // MBF bounce factors depend on flag combos: enum { MBF_BOUNCE_NOGRAVITY = FRACUNIT, // With NOGRAVITY: full momentum MBF_BOUNCE_FLOATDROPOFF = (FRACUNIT * 85) / 100,// With FLOAT and DROPOFF: 85% MBF_BOUNCE_FLOAT = (FRACUNIT * 70) / 100,// With FLOAT alone: 70% MBF_BOUNCE_DEFAULT = (FRACUNIT * 45) / 100,// Without the above flags: 45% MBF_BOUNCE_WALL = (FRACUNIT * 50) / 100,// Bouncing off walls: 50% }; info->bouncefactor = ((value[0] & MF_NOGRAVITY) ? MBF_BOUNCE_NOGRAVITY : (value[0] & MF_FLOAT) ? (value[0] & MF_DROPOFF) ? MBF_BOUNCE_FLOATDROPOFF : MBF_BOUNCE_FLOAT : MBF_BOUNCE_DEFAULT); info->wallbouncefactor = ((value[0] & MF_NOGRAVITY) ? MBF_BOUNCE_NOGRAVITY : MBF_BOUNCE_WALL); // MBF sentient actors with BOUNCE and FLOAT are able to "jump" by floating up. if (info->IsSentient()) { if (value[0] & MF_FLOAT) info->flags6 |= MF6_CANJUMP; } // Non sentient actors can be damaged but they shouldn't bleed. else { value[0] |= MF_NOBLOOD; } }


You can see how annoying it was to deal with that flag's highly context-dependent behavior.

Old Post 08-13-10 15:11 #
Gez is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Quasar
Moderator


Posts: 6052
Registered: 08-00


It really is about the worst thing Lee did. Like he couldn't just add a flags2 field >_>

Old Post 08-13-10 20:46 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 01:29. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Special Interest > Eternity > damagetype

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.