Author Topic: Weapons not dealing proper damage  (Read 2453 times)

Basically, I'm trying to modify a bunch of weapon packs so that they're more suited balance-wise to an Endless Zombies server, and I've run into a few problems.

1. The Tactical Bullpup refuses to deal the proper amount of damage, even though it's been completely severed from the original Tier+Tactical addons, along with the rest of the weapons.

2. The following weapons have been set to deal more than 100 damage, but will only do that much (tested, 100 hp bot is instakilled, but 101 hp bot takes two hits with all of these):
TF2 Ubersaw: Set to 200
Arcane Magics Drain+: Set to 400
Land Dragon Claw: Set to 175 for both slashes, and 230 for the combo bite, all only deal 100
Dragon Fireball: set to 700 dmg
Dragon Firebarrage: Uses same damage as Fireball
SDragon Firedart: set to 248 dmg
SDragon Bite: set to 138 dmg
SDragon Wing Slash: set to 207 dmg

2.5: These weapons were also set to do more than 100 damage, but they deal an amount just slightly above 100 for some reason instead.

T+T Sniper Rifle: Set to 170 dmg, 340 for headshot, only deals 101 dmg and 301 for headshot
T+T Silenced Sniper: Set to 215 dmg, 430 for headshot, only deals 102 and 302 dmg
T+T Classic Sniper: Set to 262 dmg, 524 for headshot, only deals 102 and 302 dmg
T+T Retro Sniper: Set to 400 dmg, 800 for headshot, only deals 103 and 303 dmg

For comparison, the Frog's Weaponry Hawkeye deals the proper 350/1050 dmg I set it to, and the crossbow does the proper 225/1350.

I've prefixed all the addon filenames with "Z", so "Weapon" becomes "ZWeapon". I've also made sure to change all references to any file paths to their proper locations, and corrected all the namecheck.txt files. But I'm very inexperienced with this, so if I missed something, or screwed something up somewhere, be sure to tell me!

By the way, the Effects.cs is there because the Dragon Fireball weapon's radius damage is defined within it.


Download a .zip file containing all the broken instances of add-on code, as well as my ADD_ON_LIST.cs, here: DOWNLOAD
« Last Edit: March 24, 2015, 12:11:18 AM by Brixmon »

You could also make a big package modding the ProjectileName::Damage and ProjectileName::radiusDamage for all weapons, if it is that damage, you can set it other than modding every file to do so.

You could also make a big package modding the ProjectileName::Damage and ProjectileName::radiusDamage for all weapons, if it is that damage, you can set it other than modding every file to do so.
Whoa, really?
Well, it's a bit late now. Any idea why they would be doing the amount of damage that they are?


Show the code?
Oh, the code is in that MediaFire download. I'd attach it to the OP, but that doesn't allow .zip files and there are too many .cs files to attach them all individually.

Edit: Also, thanks for the help. I appreciate it.
« Last Edit: March 17, 2015, 09:11:47 PM by Brixmon »

Erm... I don't mean to be a bother, but have you taken a look at my code yet? Or should I just post all of the custom mods I'm using?
Edit: Wait, I probably should have just edited the previous post...

Regardless, though, here's the code for the Tactical Bullpup:

Wait a tick. It looks to me like the firing function for the Tactical Bullpup uses the standard Bullpup's projectile, rather than the custom one defined earlier on in the file. That'd be why it's only dealing 17 damage!
Edit: Changing that fixed it, it now does the proper 36 damage.

Here's the code for the Sniper Rifle:
Code: [Select]
datablock AudioProfile(BoltRifleReloadSound)
{
   filename    = "./bolt_boltrifle.wav";
   description = AudioClosest3d;
   preload = true;
};

//audio
datablock AudioProfile(MilitarySniperFireSound)
{
   filename    = "./sniper_rifle_fire.wav";
   description = AudioClose3d;
   preload = true;
};
datablock AudioProfile(MilitarySniperRicSound)
{
   filename    = "./Military_Sniper_Ricochet.wav";
   description = AudioClose3d;
   preload = true;
};

datablock ExplosionData(militarySniperExplosion)
{
   //explosionShape = "";
soundProfile = MilitarySniperRicSound;

   lifeTimeMS = 150;

   particleEmitter = shotgunExplosionEmitter;
   particleDensity = 5;
   particleRadius = 0.2;

   emitter[0] = gunExplosionRingEmitter;

   faceViewer     = true;
   explosionScale = "1 1 1";

   shakeCamera = true;
   camShakeFreq = "10.0 11.0 10.0";
   camShakeAmp = "1.0 1.0 1.0";
   camShakeDuration = 0.5;
   camShakeRadius = 10.0;

   // Dynamic light
   lightStartRadius = 0;
   lightEndRadius = 2;
   lightStartColor = "0.3 0.6 0.7";
   lightEndColor = "0 0 0";

   impulseRadius = 2;
   impulseForce = 1000;
};

AddDamageType("MilitaryRifle",   '<bitmap:add-ons/ZWeapon_Package_Tier2/CI_MilitaryRifle> %1',    '%2 <bitmap:add-ons/ZWeapon_Package_Tier2/CI_MilitaryRifle> %1',0.75,1);
AddDamageType("MilitaryRifleHeadshot",   '<bitmap:add-ons/ZWeapon_Package_Tier2/CI_MilitaryRifle> <bitmap:add-ons/ZWeapon_Package_Tier2/CI_tactheadshot> %1',    '%2 <bitmap:add-ons/ZWeapon_Package_Tier2/CI_MilitaryRifle> <bitmap:add-ons/ZWeapon_Package_Tier2/CI_tactheadshot> %1',0.75,1);

datablock ProjectileData(MilitarySniperProjectile : shotgunBlastProjectile)
{
   directDamage        = 0;
   directDamageType    = $DamageType::MilitaryRifle;
   radiusDamageType    = $DamageType::MilitaryRifle;

   brickExplosionRadius = 0.4;
   brickExplosionImpact = true;          //destroy a brick if we hit it directly?
   brickExplosionForce  = 30;
   brickExplosionMaxVolume = 25;          //max volume of bricks that we can destroy
   brickExplosionMaxVolumeFloating = 35;  //max volume of bricks that we can destroy if they aren't connected to the ground

   impactImpulse      = 300;
   verticalImpulse     = 100;
   explosion           = militarySniperExplosion;

   muzzleVelocity      = 100;
   velInheritFactor    = 1;

   armingDelay         = 0;
   lifetime            = 70;
   fadeDelay           = 0;
   isBallistic         = true;
   gravityMod = 0.0;
};

datablock ProjectileData(milTracerProjectile : pistolTracerProjectile)
{
   directDamage        = 1;
   directDamageType    = $DamageType::MilitaryRifle;
   muzzleVelocity      = 200;
   radiusDamageType    = $DamageType::MilitaryRifle;
};

//////////
// item //
//////////
datablock ItemData(MilitarySniperItem)
{
category = "Weapon";  // Mission editor category
className = "Weapon"; // For inventory system

// Basic Item Properties
shapeFile = "./sniper_rifle.dts";
rotate = false;
mass = 1;
density = 0.2;
elasticity = 0.2;
friction = 0.6;
emap = true;

//gui stuff
uiName = "Sniper Rifle";
iconName = "./sniperrifle";
doColorShift = true;
colorShiftColor = "0.3 0.3 0.3 1.000";

// Dynamic properties defined by the scripts
image = MilitarySniperImage;
canDrop = true;
   
   //Ammo Guns Parameters
   maxAmmo = 4;
   canReload = 1;
};

////////////////
//weapon image//
////////////////
datablock ShapeBaseImageData(MilitarySniperImage)
{
   raycastWeaponRange = 900;
   raycastWeaponTargets =
                   $TypeMasks::PlayerObjectType |    //AI/Players
                   $TypeMasks::StaticObjectType |    //Static Shapes
                   $TypeMasks::TerrainObjectType |    //Terrain
                   $TypeMasks::VehicleObjectType |    //Terrain
                   $TypeMasks::FXBrickObjectType;    //Bricks
   raycastExplosionProjectile = shotgunBlastProjectile;
   raycastTracerProjectile = milTracerProjectile;
   raycastCritTracerProjectile = milTracerProjectile;
   raycastExplosionBrickSound = bulletHitSound;
   raycastExplosionPlayerSound = bulletHitSound;
   raycastCritDirectDamageType = $DamageType::MilitaryRifleHeadshot;
   raycastDirectDamage = 340; //Varies
   raycastDirectDamageType = $DamageType::MilitaryRifle;
   raycastSpreadAmt = 0; //Varies

   // Basic Item properties
shapeFile = "./sniper_rifle.dts";
   emap = true;

   // Specify mount point & offset for 3rd person, and eye offset
   // for first person rendering.
   mountPoint = 0;
   offset = "0 0 0";
   eyeOffset = 0; //"0.7 1.2 -0.5";
   rotation = eulerToMatrix( "0 0 0" );

   // When firing from a point offset from the eye, muzzle correction
   // will adjust the muzzle vector to point to the eye LOS point.
   // Since this weapon doesn't actually fire from the muzzle point,
   // we need to turn this off. 
   correctMuzzleVector = true;

   // Add the WeaponImage namespace as a parent, WeaponImage namespace
   // provides some hooks into the inventory system.
   className = "WeaponImage";

   // Projectile && Ammo.
   item = MilitarySniperItem;
   ammo = " ";
   projectile = gunProjectile;
   projectileType = Projectile;

   //melee particles shoot from eye node for consistancy
   melee = false;
   //raise your arm up or not
   armReady = true;

   minShotTime = 1450;   //minimum time allowed between shots (needed to prevent equip/dequip exploit)

   doColorShift = true;
   colorShiftColor = MilitarySniperItem.colorShiftColor;

   // Images have a state system which controls how the animations
   // are run, which sounds are played, script callbacks, etc. This
   // state system is downloaded to the client so that clients can
   // predict state changes and animate accordingly.  The following
   // system supports basic ready->fire->reload transitions as
   // well as a no-ammo->dryfire idle state.

   // Initial start up state
stateName[0]                    = "Activate";
stateTimeoutValue[0]            = 0.2;
stateSequence[0]   = "Activate";
stateTransitionOnTimeout[0]     = "Smoke";
stateSound[0]   = weaponSwitchSound;

stateName[1]                    = "Ready";
stateTransitionOnNoAmmo[1] = "Reload";
stateTransitionOnTriggerDown[1] = "Fire";
stateAllowImageChange[1]        = true;
stateSequence[1]   = "ready";

stateName[2]                    = "Fire";
stateTransitionOnTimeout[2]     = "Wait2";
stateTimeoutValue[2]            = 0.1;
stateFire[2]                    = true;
stateAllowImageChange[2]        = false;
stateScript[2]                  = "onFire";
stateWaitForTimeout[2]   = true;
stateEmitter[2]   = gunFlashEmitter;
stateEmitterTime[2]   = 0.05;
stateEmitterNode[2]   = "muzzleNode";
stateSound[2]   = militarysniperfireSound;

stateName[3]   = "Smoke";
stateSequence[3]   = "eject";
stateSound[3]   = boltriflereloadSound;
stateTimeoutValue[3]            = 0.7;
stateScript[3]                  = "onSmoke";
stateTransitionOnTimeout[3]     = "Wait3";

stateName[4] = "LoadCheckA";
stateScript[4] = "onLoadCheck";
stateTimeoutValue[4] = 0.01;
stateTransitionOnTimeout[4] = "LoadCheckB";

stateName[5] = "LoadCheckB";
stateTransitionOnAmmo[5] = "Ready";
stateTransitionOnNoAmmo[5] = "Reload";

stateName[6] = "Reload";
stateTimeoutValue[6] = 0.2;
stateScript[6] = "onReloadStart";
stateTransitionOnTimeout[6] = "Reload1";
stateWaitForTimeout[6] = true;

stateName[7] = "Wait";
stateTimeoutValue[7] = 0.3;
stateScript[7] = "onReloadWait";
stateTransitionOnTimeout[7] = "Reloaded";

stateName[8] = "FireLoadCheckA";
stateScript[8] = "onLoadCheck";
stateTimeoutValue[8] = 0.01;
stateTransitionOnTimeout[8] = "FireLoadCheckB";

stateName[9] = "FireLoadCheckB";
stateTransitionOnAmmo[9] = "Ready";
stateTransitionOnNoAmmo[9] = "ReloadSmoke";

stateName[10] = "ReloadSmoke";
stateTimeoutValue[10] = 0.3;
stateTransitionOnTimeout[10] = "Reload";

stateName[11] = "Reloaded";
stateTimeoutValue[11] = 0.4;
stateScript[11] = "onReloaded";
stateTransitionOnTimeout[11] = "Smoke";

stateName[12]   = "Wait2";
stateTimeoutValue[12]            = 0.7;
stateTransitionOnTimeout[12]     = "Smoke";

stateName[13]   = "Wait3";
stateTimeoutValue[13]            = 0.7;
stateTransitionOnTimeout[13]     = "LoadCheckA";

stateName[14] = "Reload1";
stateTimeoutValue[14] = 1.5;
stateScript[14] = "onReloaded1";
stateTransitionOnTimeout[14] = "Wait";

};

///////// notes on the reload sequence:
///////// it goes (reloadsmoke)-reload-reload1-wait-reloaded
///////// complex, huh?
///////////////////////////////////

function MilitarySniperImage::onReloadStart(%this,%obj,%slot)
{           
commandToClient(%obj.client,'bottomPrint',"<just:right><font:impact:24><color:fff000>.270 Huge Rifle<font:impact:34>\c6 " @ %obj.toolAmmo[%obj.currTool] @ " / " @ %obj.client.quantity["308rounds"] @ "", 4, 2, 3, 4);
    if(%obj.client.quantity["308rounds"] >= 1)
{
%obj.playThread(2, plant);
serverPlay3D(block_PlantBrick_Sound,%obj.getPosition());
}
}

function MilitarySniperImage::onReloaded1(%this,%obj,%slot)
{
commandToClient(%obj.client,'bottomPrint',"<just:right><font:impact:24><color:fff000>.270 Huge Rifle<font:impact:34>\c6 " @ %obj.toolAmmo[%obj.currTool] @ " / " @ %obj.client.quantity["308rounds"] @ "", 4, 2, 3, 4);
    if(%obj.client.quantity["308rounds"] >= 1)
{
%obj.playThread(2, shiftleft);
            serverPlay3D(block_MoveBrick_Sound,%obj.getPosition());
}
}

function MilitarySniperImage::onReloadWait(%this,%obj,%slot)
{
commandToClient(%obj.client,'bottomPrint',"<just:right><font:impact:24><color:fff000>.270 Huge Rifle<font:impact:34>\c6 " @ %obj.toolAmmo[%obj.currTool] @ " / " @ %obj.client.quantity["308rounds"] @ "", 4, 2, 3, 4);
    if(%obj.client.quantity["308rounds"] >= 1)
{
serverPlay3D(block_ChangeBrick_Sound,%obj.getPosition());
%obj.playThread(2, shiftRight);
}
}

function MilitarySniperImage::onSmoke(%this,%obj,%slot)
{
commandToClient(%obj.client,'bottomPrint',"<just:right><font:impact:24><color:fff000>.270 Huge Rifle<font:impact:34>\c6 " @ %obj.toolAmmo[%obj.currTool] @ " / " @ %obj.client.quantity["308rounds"] @ "", 4, 2, 3, 4);
    if(%obj.client.quantity["308rounds"] >= 1)
{
%obj.playThread(2, plant);
}
}


function MilitarySniperImage::onReloaded(%this,%obj,%slot)
{
//
//
// RELOAD SEQUENCE LOL
// now 30% more modular or so
///////////////////////////////////////////////////////////////////////////////////

    if(%obj.client.quantity["308rounds"] >= 1)
{
%obj.client.quantity["308rounds"] += %obj.toolAmmo[%obj.currTool];
%obj.toolAmmo[%obj.currTool] = 0;
%obj.playThread(2, plant);
        serverPlay3D(reloadClick8Sound,%obj.getPosition());


        if(%obj.client.quantity["308rounds"] > %this.item.maxAmmo)
{
%obj.client.quantity["308rounds"] -= %this.item.maxAmmo;
%obj.toolAmmo[%obj.currTool] = %this.item.maxAmmo;
%obj.AmmoSpent[%obj.currTool] = 0;
%obj.setImageAmmo(%slot,1);


commandToClient(%obj.client,'bottomPrint',"<just:right><font:impact:24><color:fff000>.270 Huge Rifle<font:impact:34>\c6 " @ %obj.toolAmmo[%obj.currTool] @ " / " @ %obj.client.quantity["308rounds"] @ "", 4, 2, 3, 4);
return;
}

        if(%obj.client.quantity["308rounds"] <= %this.item.maxAmmo)
{
%obj.toolAmmo[%obj.currTool] = %obj.client.quantity["308rounds"];
%obj.AmmoSpent[%obj.currTool] = 0;
%obj.setImageAmmo(%slot,1);
%obj.client.quantity["308rounds"] = 0;


commandToClient(%obj.client,'bottomPrint',"<just:right><font:impact:24><color:fff000>.270 Huge Rifle<font:impact:34>\c6 " @ %obj.toolAmmo[%obj.currTool] @ " / " @ %obj.client.quantity["308rounds"] @ "", 4, 2, 3, 4);
return;
}
}
}

function MilitarySniperImage::onMount(%this,%obj,%slot)
{
   Parent::onMount(%this,%obj,%slot);
if($Pref::Server::TTAmmo == 0 || $Pref::Server::TTAmmo == 1)
{
commandToClient(%obj.client,'bottomPrint',"<just:right><font:impact:24><color:fff000>.270 Huge Rifle<font:impact:34>\c6 " @ %obj.toolAmmo[%obj.currTool] @ " / " @ %obj.client.quantity["308rounds"] @ "", 4, 2, 3, 4);
}
   %obj.lastFireTime = getSimTime() - 500;
}

function MilitarySniperImage::onFire(%this,%obj,%slot)
{
%obj.spawnExplosion(TTBigRecoilProjectile,"1 1 1");

  %fvec = %obj.getForwardVector();
  %fX = getWord(%fvec,0);
  %fY = getWord(%fvec,1);
 
  %evec = %obj.getEyeVector();
  %eX = getWord(%evec,0);
  %eY = getWord(%evec,1);
  %eZ = getWord(%evec,2);
 
  %eXY = mSqrt(%eX*%eX+%eY*%eY);
 
  %aimVec = %fX*%eXY SPC %fY*%eXY SPC %eZ;
%obj.setVelocity(VectorAdd(%obj.getVelocity(),VectorScale(%aimVec,"-4")));
if((%obj.lastFireTime+%this.minShotTime) > getSimTime())
{
%thread = "plant";
%this.raycastExplosionProjectile = militarySniperProjectile;
%this.raycastSpreadAmt = ((%obj.lastFireTime+%this.minShotTime) - getSimTime())/%this.minShotTime*0.005;
%this.raycastDirectDamage = 170;
}
else
{
%thread = "plant";
%this.raycastExplosionProjectile = shotgunBlastProjectile;
%this.raycastSpreadAmt = 0;
%this.raycastDirectDamage = 175;
}

Parent::onFire(%this,%obj,%slot);

if(!%obj.fireTrace)
{
%obj.lastFireTime = getSimTime();

%obj.playThread(2, %thread);
if($Pref::Server::TTAmmo == 0 || $Pref::Server::TTAmmo == 1)
{
%obj.toolAmmo[%obj.currTool] -= 1;
%obj.AmmoSpent[%obj.currTool]++;
            commandToClient(%obj.client,'bottomPrint',"<just:right><font:impact:24><color:fff000>.270 Huge Rifle<font:impact:34>\c6 " @ %obj.toolAmmo[%obj.currTool] @ " / " @ %obj.client.quantity["308rounds"] @ "", 4, 2, 3, 4);
}
}
}

function MilitarySniperImage::isRaycastCritical(%this, %obj, %slot, %col, %pos, %normal, %hit)
{
   if(%this.raycastSpreadAmt > 0)
      return 0;
   if(!isObject(%col))
      return 0;
   if(isObject(%col.spawnBrick) && %col.spawnBrick.getGroup().client == %obj.client)
      %dmg = 1;
   if(miniGameCanDamage(%obj,%col) != 1 && !%dmg)
      return 0;
   if(%col.getType() & $TypeMasks::PlayerObjectType)
   {
      %colscale = getWord(%col.getScale(),2);
      return(getword(%pos, 2) > getword(%col.getWorldBoxCenter(), 2) - 3.3*%colscale);
      //return (getWord(%col.getDamageLocation(%pos),0) $= "head");
   }
   return 0;
}
Upon taking a look at it, it seems like the damage calc for the Sniper Rifle is a bit more complicated than I thought. It seems that I set its damage to 340 instead of 170, and I can't find the headshot damage multiplier anywhere. Plus, what's the Shotgun Blast projectile doing in there?

Edit 2: Now I've noticed that setting the damage for the Combat Knife and Frying Pan to over 100 has caused them to break as well- now they're only dealing 100 damage per hit. (this includes when I charge up the Combat Knife.)

Frying Pan: Set to 350, only deals 100
Combat Knife: Set to 150, 750 for charged swing, only deals 100 in both conditions
Updated the .cs archive in OP to include them.
« Last Edit: March 24, 2015, 12:20:25 AM by Brixmon »

you might want to just speed up the melee swing rate other than the damage it deals
for the sniper problem i suggest you just convert them to projectile-based / or let me give u my converted rifles to you

function MilitarySniperImage::isRaycastCritical(%this, %obj, %slot, %col, %pos, %normal, %hit)
{
   if(%this.raycastSpreadAmt > 0)
      return 0;
   if(!isObject(%col))
      return 0;
   if(isObject(%col.spawnBrick) && %col.spawnBrick.getGroup().client == %obj.client)
      %dmg = 1;
   if(miniGameCanDamage(%obj,%col) != 1 && !%dmg)
      return 0;
   if(%col.getType() & $TypeMasks::PlayerObjectType) <=== if its a playertype
   {
      %colscale = getWord(%col.getScale(),2); <=== nummountpoint 2 is the mountpoint for the head
      return(getword(%pos, 2) > getword(%col.getWorldBoxCenter(), 2) - 3.3*%colscale); <=== headshot multiplier is 3.3
      //return (getWord(%col.getDamageLocation(%pos),0) $= "head"); <=== commented out idk y
   }
   return 0; <=== goes back to the original function of the sniper rifle's damage
}

if u realy want to get them broken addons workin, you have to do certain experiments with them to gain knowledge of what the script actually does to the weapon to get the desired effect or scripting them

you might want to just speed up the melee swing rate other than the damage it deals
for the sniper problem i suggest you just convert them to projectile-based / or let me give u my converted rifles to you

function MilitarySniperImage::isRaycastCritical(%this, %obj, %slot, %col, %pos, %normal, %hit)
{
   if(%this.raycastSpreadAmt > 0)
      return 0;
   if(!isObject(%col))
      return 0;
   if(isObject(%col.spawnBrick) && %col.spawnBrick.getGroup().client == %obj.client)
      %dmg = 1;
   if(miniGameCanDamage(%obj,%col) != 1 && !%dmg)
      return 0;
   if(%col.getType() & $TypeMasks::PlayerObjectType) <=== if its a playertype
   {
      %colscale = getWord(%col.getScale(),2); <=== nummountpoint 2 is the mountpoint for the head
      return(getword(%pos, 2) > getword(%col.getWorldBoxCenter(), 2) - 3.3*%colscale); <=== headshot multiplier is 3.3
      //return (getWord(%col.getDamageLocation(%pos),0) $= "head"); <=== commented out idk y
   }
   return 0; <=== goes back to the original function of the sniper rifle's damage
}

if u realy want to get them broken addons workin, you have to do certain experiments with them to gain knowledge of what the script actually does to the weapon to get the desired effect or scripting them
Well, ideally, I wouldn't like to turn the melee into high-swing rate spam weapons. But if that's the only option...

And with the sniper rifles, you really mean that I'd have to make them use regular projectiles instead of raycast in order for them to do the amount of damage that I want? Or do your "converted weapons" have a fix for that?

2. The following weapons have been set to deal more than 100 damage, but will only do that much (tested, 100 hp bot is instakilled, but 101 hp bot takes two hits with all of these):
For some reason Badspot restricted the weapon damage function to only allow values from -100 to 100. You can see this in the function posted here: http://forum.blockland.us/index.php?topic=14090.0

Note the line %directDamage = mClampF(%this.directDamage, -100, 100) * %scale;, specifically the mClampF part. I used to just replace this function in weapons that do over 100 damage, but lately I've taken to overwriting the function entirely with one that has that restriction cut out because it seems completely pointless.

For some reason Badspot restricted the weapon damage function to only allow values from -100 to 100. You can see this in the function posted here: http://forum.blockland.us/index.php?topic=14090.0

Note the line %directDamage = mClampF(%this.directDamage, -100, 100) * %scale;, specifically the mClampF part. I used to just replace this function in weapons that do over 100 damage, but lately I've taken to overwriting the function entirely with one that has that restriction cut out because it seems completely pointless.
Sounds great, uh... Where can I find this function? And how would I remove the restriction without breaking syntax? Would it just be this? %directDamage = mClampF(%this.directDamage) * %scale;
EDIT: And would it work with the raycasting weapons, or am I gonna have to find some sorta limitation there and replace that as well? Since the sniper rifles and melee weapons were also being limited to 100 damage...
« Last Edit: March 24, 2015, 03:57:31 PM by Brixmon »

Sounds great, uh... Where can I find this function? And how would I remove the restriction without breaking syntax? Would it just be this? %directDamage = mClampF(%this.directDamage) * %scale;
EDIT: And would it work with the raycasting weapons, or am I gonna have to find some sorta limitation there and replace that as well? Since the sniper rifles and melee weapons were also being limited to 100 damage...
You find the original in the post I linked you to. In your mod, you basically just copypaste the whole function in and change the offending part and it'll overwrite the default one in Blockland. Most of the time this is a bad idea because if Badspot changes the default function or if some other mod overwrites the same function, something might break, but I doubt that'll be an issue here, and Badspot seems to encourage overwriting it in his post, so go ahead. No idea if it'll help with raycasts, because I don't know how they apply damage and I don't normally touch raycast weapons with a 10 foot pole. If they just call the projectile damage function on whoever they hit, then it will work, otherwise you may have a bit more work to do.

You find the original in the post I linked you to. In your mod, you basically just copypaste the whole function in and change the offending part and it'll overwrite the default one in Blockland. Most of the time this is a bad idea because if Badspot changes the default function or if some other mod overwrites the same function, something might break, but I doubt that'll be an issue here, and Badspot seems to encourage overwriting it in his post, so go ahead. No idea if it'll help with raycasts, because I don't know how they apply damage and I don't normally touch raycast weapons with a 10 foot pole. If they just call the projectile damage function on whoever they hit, then it will work, otherwise you may have a bit more work to do.
So I just put that function straight into a server.cs file in a new addon, and then that'll overwrite it whenever I have it enabled? Or do I need to add some extra stuff onto that to get it to 'see' the overwritten function?
Keep in mind, I have the scripting knowledge of someone who's only learned it from just looking at the code of some addons.

-snip-
Edit 4: The damage is still a little lower than it should be- having set the Dart to about 301 damage and the Fireball to 850, they're still only dealing about 250 and 800 damage, but you know what, I'll take it. That's still quite a bit compared to most other weapons, so I THINK that Dragons should not be underpowered.

Edit 5: The dragon melee weapons work flawlessly. Exactly the right amount of damage. However, the Frying Pan/Combat Knife are still only dealing 100 damage. Perhaps the raycast damage support has its own damage limiter? I'll look into that.

Edit 7: Aha! I checked the Support_RaycastingWeapons .cs file in T+T Tier 1, and it indeed had a damage limiter as well. -100 to 100, now -9999 to 9999. Gonna look to see if it worked.

Edit 8: In all of the addons I had problems with, some form of projectile/raycast damage limit was defined- so I changed them all to -9999 and 9999. This will probably fix everything. It has! Locking thread.
Thanks for all your help, guys!
« Last Edit: March 24, 2015, 07:09:24 PM by Brixmon »

So I just put that function straight into a server.cs file in a new addon, and then that'll overwrite it whenever I have it enabled? Or do I need to add some extra stuff onto that to get it to 'see' the overwritten function?
Keep in mind, I have the scripting knowledge of someone who's only learned it from just looking at the code of some addons.
To register a function you just have to write the function. Unless you put it in a package and don't activate it or put it in a file that doesn't get loaded, there isn't any extra step. If you're making a new add-on for it like Script_DamageFix or whatever you're calling it, you'll have to package it properly and remember to enable it, but yeah you can do that.