Duke4.net Forums: Changing the Devastator's Damage - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Changing the Devastator's Damage  "It doesn't seem like the CON files control the Deva's damage."

User is offline   HELLMOUSE 

#1

Does anyone know how to change the damage done by the devastator (usually misspelled as devistator).

define BOUNCEMINE_WEAPON_STRENGTH 150
and
define BULLET_WEAPON_STRENGTH 30
in the USER.CON do not seem to do it. 150 to 1500 and 30 to 300 had no effect.

actor DEVISTATORBLAST FREEZETHROWER_WEAPON_STRENGTH enda
in GAME.COM has nothing to do with the Devastator. I replaced FREEZETHROWER_WEAPON_STRENGTH with DEVASTATOR_STRENGTH in the GAME.CON and then defined DEVASTATOR_STRENGTH with 250. Even that had no effect. The directly above line seems to do nothing. So, I just commented it out and the game still ran with the Devastator being the same. Even in the Wiki it says that line is not necessary, and the Devastator's damage is defined by the RPG / 4.

I want to know how to change the Devastator's damage without effecting the RPG.

This post has been edited by HELLMOUSE: 10 July 2020 - 09:38 PM

0

User is online   Danukem 

  • Duke Plus Developer

#2

The devastator rockets are RPG projectiles and they don't have a separate setting in the CON file from the regular sized RPG. They are hardcoded to be smaller and do less damage when fired from the devastator weapon slot. You would have to learn how to make it fire your own custom projectiles, or how to change the small rockets after they spawn.
1

User is offline   Ninety-Six 

#3

View PostTrooper Dan, on 10 July 2020 - 10:05 PM, said:

The devastator rockets are RPG projectiles and they don't have a separate setting in the CON file from the regular sized RPG. They are hardcoded to be smaller and do less damage when fired from the devastator weapon slot.


Is the damage they do hardcoded, or is it a hardcoded fraction of the RPG damage (or in other words is still affected by the con file?)

This post has been edited by Ninety-Six: 10 July 2020 - 10:15 PM

1

#4

However, devastator's rockets are so damn buffed against octobrains (1 hit kill) https://forums.duke4.net/public/style_emoticons/default/tongue.gif.
1

User is online   Danukem 

  • Duke Plus Developer

#5

View PostNinety-Six, on 10 July 2020 - 10:14 PM, said:

Is the damage they do hardcoded, or is it a hardcoded fraction of the RPG damage (or in other words is still affected by the con file?)


I'm not sure, but you wouldn't want to increase RPG damage on the other weapon just to achieve the result with the devastator.


View PostThe Battlelord, on 10 July 2020 - 10:47 PM, said:

However, devastator's rockets are so damn buffed against octobrains (1 hit kill) https://forums.duke4.net/public/style_emoticons/default/tongue.gif.


That's a different issue. OCTABRAIN treats all RPG hits as instant death without even checking the damage. This may have originally been a bug, because the code in question works just like the code for when a dead body is checking for getting blown up.
2

User is online   NightFright 

  • The Truth is in here

#6

I have always been wondering why the Devastator is so efficient against Octabrains. Maybe it's something the coders might look into at some point. Would be interesting to see how it works after the "fix" (presuming it's really bug). Should still kill them fairly quickly, though.
1

User is online   Danukem 

  • Duke Plus Developer

#7

View PostNightFright, on 10 July 2020 - 11:30 PM, said:

I have always been wondering why the Devastator is so efficient against Octabrains. Maybe it's something the coders might look into at some point. Would be interesting to see how it works after the "fix" (presuming it's really bug). Should still kill them fairly quickly, though.


It's pretty straightforward, just look at the code in "state checkoctahitstate" -- there's the ifdead block, and then in the else block (where the damage did not kill it) it has explicit clauses for explosives to kill it instantly anyway. It could be intentional, or it could be the code from the lying dead damage check was just pasted in. I always remove it or modify in my mods because I have tougher pal versions of octabrain that I don't want to be killed so easily.
2

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#8

View PostTrooper Dan, on 11 July 2020 - 01:34 AM, said:

It's pretty straightforward, just look at the code in "state checkoctahitstate" -- there's the ifdead block, and then in the else block (where the damage did not kill it) it has explicit clauses for explosives to kill it instantly anyway. It could be intentional, or it could be the code from the lying dead damage check was just pasted in. I always remove it or modify in my mods because I have tougher pal versions of octabrain that I don't want to be killed so easily.

      ifwasweapon RPG
      {
        sound OCTA_DYING
        addkills 1
        state standard_jibs
        killit
      }
      else
        ifwasweapon GROWSPARK
          sound EXPANDERHIT

The "sound OCTA_DYING" and "addkills 1" implies it was intentional.

This has been "fixed" in the N64, but that was not intentional, since RPG returns RADIUSEXPLOSION in that version.
1

#9

View PostFox, on 11 July 2020 - 08:07 AM, said:

This has been "fixed" in the N64, but that was not intentional, since RPG returns RADIUSEXPLOSION in that version.


Is this somehow related to the fact that grenades can't really land on the Battlelord/mini-battlelords?

I mean, the grenades explode even before to touch their bodies (i think they avoid lot of damages this way) .

This post has been edited by The Battlelord: 11 July 2020 - 10:54 AM

1

User is offline   HELLMOUSE 

#10

View PostTrooper Dan, on 10 July 2020 - 10:05 PM, said:

The devastator rockets are RPG projectiles and they don't have a separate setting in the CON file from the regular sized RPG. They are hardcoded to be smaller and do less damage when fired from the devastator weapon slot. You would have to learn how to make it fire your own custom projectiles, or how to change the small rockets after they spawn.


Any ideas on where to start with how to change the small rockets?
0

User is offline   Striker 

  • Auramancer

#11

You'll want to just make entirely new projectiles. If you want the original spread behaviour, I have CON code replicating it that I can share here.

This post has been edited by Striker: 13 July 2020 - 07:50 PM

1

User is offline   HELLMOUSE 

#12

View PostStriker, on 13 July 2020 - 07:49 PM, said:

You'll want to just make entirely new projectiles. If you want the original spread behaviour, I have CON code replicating it that I can share here.


Can you please post it?
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#13

View PostThe Battlelord, on 11 July 2020 - 10:54 AM, said:

Is this somehow related to the fact that grenades can't really land on the Battlelord/mini-battlelords?

I mean, the grenades explode even before to touch their bodies (i think they avoid lot of damages this way) .

I don't know what you mean by grenades not landing on Battlelords
1

#14

View PostFox, on 15 July 2020 - 07:43 PM, said:

I don't know what you mean by grenades not landing on Battlelords


PM.
1

User is offline   Striker 

  • Auramancer

#15

Here's most of my code. You'll probably need to make adjustments, but this should generally give you projectiles that behave like the default, with exact damage and radius. Only difference is there's trails, and the projectile might be missing it's spawn sound.
gamevar SPAWN_ORIGANG 0 2
gamevar TEMP 0 0
gamevar TEMP2 0 0
gavevar TEMP3 0 0

define DEVASTATORMISSILE 4999 // This is the tilenum of the projectile. You'll want to point this to a 7-rotation projectile sprite.

define DEVASTATOR_WEAPON_STRENGTH 35
define DEVASTATORBLASTRADIUS 890

spritenoshade DEVASTATORMISSILE
gamevar WEAPON7_SHOOTS DEVASTATORMISSILE 1
defineprojectile DEVASTATORMISSILE PROJ_WORKSLIKE 32770
defineprojectile DEVASTATORMISSILE PROJ_CSTAT 128
defineprojectile DEVASTATORMISSILE PROJ_VEL 644
defineprojectile DEVASTATORMISSILE PROJ_XREPEAT 8
defineprojectile DEVASTATORMISSILE PROJ_YREPEAT 8
defineprojectile DEVASTATORMISSILE PROJ_EXTRA DEVASTATOR_WEAPON_STRENGTH
defineprojectile DEVASTATORMISSILE PROJ_HITRADIUS DEVASTATORBLASTRADIUS
defineprojectile DEVASTATORMISSILE PROJ_SHADE -127
defineprojectile DEVASTATORMISSILE PROJ_OFFSET 14354 // Centered, offset handled in EVENT_EGS
defineprojectile DEVASTATORMISSILE PROJ_ISOUND RPG_EXPLODE
defineprojectile DEVASTATORMISSILE PROJ_SPAWNS EXPLOSION2
defineprojectile DEVASTATORMISSILE PROJ_SXREPEAT 8
defineprojectile DEVASTATORMISSILE PROJ_SYREPEAT 8
defineprojectile DEVASTATORMISSILE PROJ_TRAIL SMALLSMOKE
defineprojectile DEVASTATORMISSILE PROJ_TXREPEAT 8
defineprojectile DEVASTATORMISSILE PROJ_TYREPEAT 8

action MISSILEANGLES 0 1 7 1 1 // This gives the projectile it's rotations
actor DEVASTATORMISSILE 0 MISSILEANGLES enda

onevent EVENT_EGS    
	ifactor DEVASTATORMISSILE
	{
		// Calculate horizontal spread
		getactor[THISACTOR].ang TEMP
		addvar TEMP 16
		randvar TEMP2 32
		subvarvar TEMP TEMP2
		setactor[THISACTOR].ang TEMP
			
		// Calculate vertical spread
		getactor[THISACTOR].zvel TEMP
		addvar TEMP 256
		randvar TEMP2 512
		subvarvar TEMP TEMP2
		setactor[THISACTOR].zvel TEMP
		
		ifspawnedby APLAYER
		{
			// Get angle and barrel
			getplayer[THISACTOR].hbomb_hold_delay TEMP3
			getplayer[THISACTOR].ang SPAWN_ORIGANG
			
			// Calculate X position
			setvarvar TEMP SPAWN_ORIGANG
			sin TEMP2 TEMP
			divvar TEMP2 512
			
			// Set X position
			getactor[THISACTOR].x TEMP
			ifvare TEMP3 1 // Check barrel
			{
				subvarvar TEMP TEMP2
			}
			else
			{
				addvarvar TEMP TEMP2
			}
			setactor[THISACTOR].x TEMP
			
			// Calculate Y position
			setvarvar TEMP SPAWN_ORIGANG
			addvar TEMP 1536
			sin TEMP2 TEMP
			divvar TEMP2 512
			
			// Set Y position
			getactor[THISACTOR].y TEMP
			ifvare TEMP3 1 // Check barrel
			{
				subvarvar TEMP TEMP2
			}
			else
			{
				addvarvar TEMP TEMP2
			}
			setactor[THISACTOR].y TEMP
		}

		break
	}
endevent


This post has been edited by Striker: 17 July 2020 - 02:30 PM

1

User is offline   HELLMOUSE 

#16

Thanks I'll try this. :D

What does "SPAWN_ORIGANG" mean as in "getplayer[THISACTOR].ang SPAWN_ORIGANG"?

What does "You'll want to point this to a 7-rotation projectile sprite" mean? Are talking about 7 tiles simulating a spin? 4999 is used. I can always go to another tile.
0

User is offline   HELLMOUSE 

#17

It works. :D

Line 4: gavevar TEMP3 0 0 was the only problem but that was an easy fix. I figured out what the 7 rotation means. I just made a black and red version of the RPG sprite at tile 1610.

Thanks for this.
1

User is offline   HELLMOUSE 

#18

For those who are interested in having two sounds:

defineprojectile NEW_DEVA_MISSILE PROJ_SOUND RPG_SHOOT // shoot sound from wiki under defineprojectile

For some reason this still makes the CAT_FIRE sound even when the PROJ_SOUND is omitted. As of now this new projectile makes two sounds. Personaly, I like that. I think even the original Devastator made two sounds (CAT_FIRE / freezray and RPG). I'm not sure what is making it play the CAT_FIRE sound. By the way, I changed the CAT_FIRE sound file to the Dark Forces plasma rifle sound.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options