Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Brixmon

Pages: [1] 2 3 4 5 6 ... 10
1
Modification Help / Re: Weapon doesn't do any radius damage
« on: November 02, 2017, 08:31:38 PM »
depends on the function its in, cause the parameters may be different.

sourceClient:
if %obj is a player object, then its %obj.client
if %obj is a projectile, then its %obj.sourceClient
if %obj is a client, then its %obj (duh)

sourceObject:
if %obj is a player object, then its %obj (duh)
if %obj is a projectile, then its %obj.sourceObject
if %obj is a client, then its %obj.player

we need the relevant oncollision code to comment on this better
Hm, okay. It occurs to me, though, that the Frag Grenade's shrapnel function involves a lot of stuff specific to that weapon- plus, it calls onExplode.
I don't really know how to write functions, nor how to make it just spawn a projectile at the impact point/explosion center. How would I call a function for bounce explosions? onBounce? onBounceExplode? onCollision?

The function itself would start with
Code: [Select]
function DemonFireballWandProjectile::onWhatever , by the way.

2
Modification Help / Re: Weapon doesn't do any radius damage
« on: November 02, 2017, 07:49:25 PM »
if you're spawning a projectile using code you need to make sure it has the sourceobject and sourceclient parameters defined as those are used in the minigameCanDamage damage check code
I'm not doing that yet. This has so far all been done using default code and functions. Bounce explosions, judging from these problems I've had, seem to be totally incapable of dealing radius damage in any way.

Edit: Oh, but how would I format sourceClient? Would it be:
Code: [Select]
sourceClient = %obj.client.player;Or:
Code: [Select]
sourceClient = %obj.client.getplayername;Or:
Code: [Select]
sourceClient = %obj.client.player.getID;

3
Modification Help / Re: Weapon doesn't do any radius damage
« on: November 02, 2017, 07:37:15 PM »
No. You can refer to another object as long as you overwrite the variable. Here's how inheritance works:
NewData : CopyData

The NewData will have the same exact data as CopyData - anything inside NewData will overwrite CopyData's variables that were copied onto NewData.

Change DamageRadius from 3 to 10 to see if it actually works.
Haaa... I, um, I already tried that after I posted my last reply. There's absolutely no radius damage.
I also tried setting the radius damage to 100 so it would oneshot hole bots. It doesn't, and the hit markers mod only showed one damage number, so the bounce explosions simply refuse to deal radius damage.
Is this a known thing? You'd think if this was a problem with Blockland itself that the inability of bounce explosions to deal radius damage would be known, right, considering it's been around for over a decade...

Edit: If this is a thing, surely it's possible to get the bounce explosion to instead spawn a projectile that instantly dies, thus spawning a damaging explosion. I have very little coding experience- this mod is pretty much the culmination of all my TorqueScript ability I have at this time.
If that's possible to do, could someone show me? It would also be incredibly useful for making projectiles that split, which would be awesome.
Edit 2: Ah, I thought there was already something like this. The old Frag Grenade spawns shrapnel on explosion instead of normal radius damage, and it has a function here that could very well be appropriated for other purposes. I imagine I could use this for my purpose, but that's only needed here if the bounce explosion functionality GENUINELY cannot deal radius damage.

4
Modification Help / Re: Weapon doesn't do any radius damage
« on: November 02, 2017, 06:31:09 PM »
I don't know how Gravity Cat's zombie thing does it's stuff, but i've never even heard of a 'bounce' explosion, maybe it's possible that the 'bounceExplosion' variable is just a thing specific to Gravity Cat's mod?

It is possible to script your weapon to spawn an explosion whenever the projectile collides with anything, but not with this 'bounceExplosion' thing
Uh... what? I don't know how you could've not heard of the bounce explosion thing. It's present in a lot more than that, and in fact, Gravity Cat's mod didn't include any bounce explosions in its wand projectiles.
You can find the bounceExplosion thing in the MAS Orb Launcher, the default Pong projectile, the energy ball projectile... it's used for practically every bouncing projectile.
And the Orb Launcher defines radius damage for its specific bounce explosion. Maybe I need different explosions for both in order for the damage to work?

Edit: Nope. Making a special bounce explosion doesn't fix it either.

5
Modification Help / Re: Weapon doesn't do any radius damage
« on: November 02, 2017, 06:14:05 PM »
Try putting "explodeOnDeath = true;" into your projectile data, your weapon uses an arming delay, and most weapons i've seen that use that also use explodeOnDeath, so i assume that's a necessary thing to have otherwise something like radius damage breaks
That still won't fix it.
Can bounce explosions even deal radius damage? The projectile is meant to last a while, bouncing around and doing radius damage whenever it bounces, but it's not working. It might deal radius damage on its death explosion, but that's hard to test, since it takes so long...
Just for reference, other explosive weapons have functioning radius damage. I do have Obstructed Radius Damage enabled, if that helps, but disabling it had no effect on the problem earlier.

Edit: Spawning a long line of hole bots makes testing that easy. The final explosion IS dealing raidus damage, but the bounces refuse to do anything.

6
Modification Help / Re: Weapon doesn't do any radius damage
« on: November 02, 2017, 05:40:40 PM »
-cut-
Didn't work. The wand still does no radius damage.
Edit: Even making it refer to the Rocket Launcher doesn't work. Somehow, something about it is ruining its radius damage.
Could it be the small value on the radius damage, or the short lifetime? Do explosions need to last a certain time for radius damage to be detected?

Edit 2: Here's the COMPLETE code for the weapon.
Code: [Select]
//########## Demonflame Wand

//### Sound
datablock AudioProfile(DemonWandHitSound)
{
   filename    = "./demonWandHit.wav";
   description = AudioClose3d;
   preload = true;
};

datablock AudioProfile(DemonWandFireSound)
{
   filename    = "./demonWandFire.wav";
   description = AudioClose3d;
   preload = true;
};

//### Effects

datablock ParticleData(DemonWandAmbParticle)
{
  textureName = "base/data/particles/cloud";
  dragCoefficient = 0;
gravityCoefficient = -0.5;
inheritedVelFactor = 0;
windCoefficient = 0;
constantAcceleration = 0;
lifetimeMS = 600;
lifetimeVarianceMS = 100;
spinSpeed = 0;
spinRandomMin = -90.0;
spinRandomMax = 90;
useInvAlpha = 0;
colors[0] = "0.66 0.19 1 1.0";
colors[1] = "0.5 0.07 1 0.5";
colors[2] = "0.29 0 1 0";
sizes[0] = 0.3;
sizes[1] = 0.2;
sizes[2] = 0.1;
times[0] = 0;
times[1] = 0.1;
times[2] = 1;
useInvAlpha = false;
};

datablock ParticleEmitterData(DemonWandAmbEmitter)
{
  ejectionPeriodMS = 4;
periodVarianceMS = 2;
ejectionVelocity = 0;
ejectionOffset = 0.1;
velocityVariance = 0;
thetaMin = 0;
thetaMax = 180;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvance = 0;
  particles = "DemonWandAmbParticle";
  uiName = "Demonflame Wand Ambient";
};

datablock ParticleData(DemonWandAtkParticle : DemonWandAmbParticle)
{
colors[0] = "0.66 0.19 1 1.0";
colors[1] = "0.66 0.19 1 0.5";
colors[2] = "0.5 0.07 1 0";
};

datablock ParticleEmitterData(DemonWandAtkEmitter : DemonWandAmbEmitter)
{
  particles = "DemonWandAtkParticle";
  uiName = "Demonflame Wand Attack";
};

datablock ParticleData(DemonFireballWandParticle)
{
  dragCoefficient = 0;
  inheritedVelFactor = 0;
  lifetimeMS = 500;
  textureName = "base/data/particles/cloud";
  spinSpeed = 0;
  colors[0] = "0.66 0.19 1 1";
  colors[1] = "0.5 0.07 1 0.5";
  colors[2] = "0.29 0 1 0";
  sizes[0] = 1.25;
  sizes[1] = 0.7;
  sizes[2] = 0.4;
  times[0] = 0;
  times[1] = 0.25;
  times[2] = 1;
  useInvAlpha = false;
};

datablock ParticleEmitterData(DemonFireballWandEmitter)
{
  ejectionPeriodMS = 5;
  ejectionVelocity = 1;
  velocityVariance = 1;
  thetaMin = 0;
  thetaMax = 180;
  phiReferenceVel = 0;
  phiVariance = 360;
  particles = "DemonFireballWandParticle";
  uiName = "Demonflame Fireball";
};

datablock ParticleData(DemonFireballWandExplosionParticle)
{
  dragCoefficient = 3;
  gravityCoefficient = -0.2;
  inheritedVelFactor   = 0;
constantAcceleration = 0.0;
lifetimeMS           = 500;
lifetimeVarianceMS   = 250;
  textureName = "base/data/particles/cloud";
  spinSpeed = 10.0;
spinRandomMin = -50.0;
spinRandomMax = 50.0;
  colors[0] = "0.66 0.19 1 1";
  colors[1] = "0.5 0.07 1 1";
  colors[2] = "0.29 0 1 0";
  sizes[0] = 4;
  sizes[1] = 0.75;
  sizes[2] = 0.4;
  times[0] = 0;
  times[1] = 0.04;
  times[2] = 1;
  useInvAlpha = false;
};

datablock ParticleEmitterData(DemonFireballWandExplosionEmitter)
{
  ejectionPeriodMS = 5;
   periodVarianceMS = 0;
   ejectionVelocity = 8;
   velocityVariance = 4;
   ejectionOffset   = 0.1;
   thetaMin         = 0;
   thetaMax         = 90;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
  particles = "DemonFireballWandExplosionParticle";
  uiName = "Demonflame Fireball Hit";
};

datablock ExplosionData(DemonFireballWandExplosion : rocketExplosion)
{
  uiName = "Demonflame Fireball Explosion";
  emitter[0] = DemonFireballWandExplosionEmitter;
  lifetimeMS = 350;
 
  particleEmitter = "";
 
  explosionShape = "base/data/shapes/empty.dts";
  soundProfile = DemonWandHitSound;
 
  shakeCamera = false;
 
  faceViewer     = true;
  explosionScale = "1 1 1";
 
  damageRadius = 3;
  radiusDamage = 25;
 
  impulseRadius = 2;
  impulseForce = 100;
 
  // Dynamic light
  lightStartRadius = 4;
  lightEndRadius = 0;
  lightStartColor = "0.66 0.19 1";
  lightEndColor = "0.29 0 1";
};

//### Projectile

datablock ProjectileData(DemonFireballWandProjectile)
{
  uiName = "Demonflame Fireball";
  projectileShapeName = "";
  directDamage = 25;
  directDamageType = $DamageType::MagicWand;
  radiusDamageType = $DamageType::MagicWand;
  impactImpulse = 100;
  verticalImpulse = 0;
  particleEmitter = DemonFireballWandEmitter;
  explosion = DemonFireballWandExplosion;
  bounceExplosion = DemonFireballWandExplosion;
  muzzleVelocity = 40;
  verInheritFactor = 0;
 
  armingDelay         = 4500;
   lifetime            = 5000;
   fadeDelay           = 5000;
   bounceElasticity    = 1;
   bounceFriction      = 0;
   isBallistic         = true;
   gravityMod = 20;
};

datablock ItemData(DemonFireballWandItem : WandItem)
{
uiName = "Demonflame Wand";
doColorShift = true;
colorShiftColor = "0.5 0.07 1 1";

image = DemonFireballWandImage;
};

datablock ShapeBaseImageData(DemonFireballWandImage : AdminWandImage)
{
  projectile = DemonFireballWandProjectile;
  projectileType = Projectile;
  doColorShift = true;
  colorShiftColor = "0.5 0.07 1 1";

  stateName[0] = "Initial";
stateTimeoutValue[0] = 0.2;
stateTransitionOnTimeout[0] = "Ready";
//stateSound[0] = weaponSwitchSound;

stateName[1] = "Ready";
stateTransitionOnTriggerDown[1] = "preFire";
stateAllowImageChange[1] = true;
stateEmitter[1] = DemonWandAmbEmitter;
stateScript[1]                  = "onFireReload";

stateName[3]                    = "Fire";
stateTransitionOnTimeout[3]     = "CheckFire";
stateTimeoutValue[3]            = 0.4;
stateFire[3]                    = true;
stateAllowImageChange[3]        = false;
stateSequence[3]                = "Fire";
stateScript[3]                  = "onFire";
stateWaitForTimeout[3] = true;
stateEjectShell[3]        = false;
stateEmitter[3] = DemonWandAtkEmitter;
stateEmitterTime[3] = 0.4;
stateEmitterNode[3] = "muzzlePoint";
stateSound[3] = DemonWandFireSound;

stateName[4] = "CheckFire";
stateTransitionOnTriggerUp[4] = "StopFire";
stateTransitionOnTriggerDown[4] = "Fire";
stateTransitionOnNoAmmo[4]       = "Recharge";

stateName[5]                    = "StopFire";
stateAllowImageChange[5]        = true;
stateTransitionOnTimeout[5]     = "Ready";
stateTimeoutValue[5]            = 0.01; //3.00
stateScript[5] = "onStopFire";
stateSequence[5] = "StopFire";
stateWaitForTimeout[5] = true;

stateName[6] = "PreFire";
stateScript[6] = "onPreFire";
stateAllowImageChange[6] = false;
stateTimeoutValue[6] = 0.1;
stateWaitForTimeout[6] = true;
stateTransitionOnTimeout[6] = "Fire";
};

function DemonFireballWandImage::onPreFire(%this,%obj,%slot) { %obj.playthread(2,armattack); }
function DemonFireballWandImage::onStopFire(%this,%obj,%slot) { %obj.playthread(2,root); }

7
Modification Help / Re: Weapon doesn't do any radius damage
« on: November 02, 2017, 07:40:55 AM »
Don't refer to anything, try just changing the line to "datablock ExplosionData(DemonFireballWandExplosion)"
Right. I'll try that when I have my computer next, thanks!

8
Modification Help / Re: Weapon doesn't do any radius damage
« on: November 02, 2017, 07:06:48 AM »
Why are you referencing the Admin Wand's explosion if you already have most of the explosion data variables anyway?

The Admin Wand does no damage, so maybe that's the problem?
There's not too much else to reference, but this explosiondata is partially from Gravity Cat's Endless Zombies Kompressorwand code. That didn't have radius damage, but I thought defining it would give it damage...
Should I make it refer to the Rocket Launcher instead?

9
Modification Help / Weapon doesn't do any radius damage
« on: November 02, 2017, 05:30:47 AM »
This is confusing... I referenced the code from the Rocket Launcher just to be sure, but I can't figure out why this weapon won't do any radius damage.
I have to directly hit an enemy to do anything, and if I reduce the projectile's directDamage to 0, it does no damage at all.

Code: [Select]
datablock ExplosionData(DemonFireballWandExplosion : AdminWandExplosion)
{
  uiName = "Demonflame Fireball Explosion";
  particleEmitter = "";
  emitter[0] = DemonFireballWandExplosionEmitter;
  lifetimeMS = 100;
 
  soundProfile = DemonWandHitSound;
 
  faceViewer     = true;
  explosionScale = "1 1 1";
 
  damageRadius = 4;
  radiusDamage = 25;
 
  // Dynamic light
  lightStartRadius = 4;
  lightEndRadius = 0;
  lightStartColor = "0.66 0.19 1";
  lightEndColor = "0.29 0 1";
};

//### Projectile

datablock ProjectileData(DemonFireballWandProjectile)
{
  uiName = "Demonflame Fireball";
  projectileShapeName = "";
  directDamage = 25;
  directDamageType = $DamageType::MagicWand;
  radiusDamageType = $DamageType::MagicWand;
  impactImpulse = 100;
  verticalImpulse = 0;
  particleEmitter = DemonFireballWandEmitter;
  explosion = DemonFireballWandExplosion;
  bounceExplosion = DemonFireballWandExplosion;
  muzzleVelocity = 40;
  verInheritFactor = 0;
 
  armingDelay         = 4500;
   lifetime            = 5000;
   fadeDelay           = 5000;
   bounceElasticity    = 1;
   bounceFriction      = 0;
   isBallistic         = true;
   gravityMod = 20;
};

10
Modification Help / Re: Base addon code?
« on: November 01, 2017, 11:33:22 PM »
you are correct, they are not readable, as they are encrypted as DSO files found in base/. below i've packaged the files i have on the following items: hammer, wrench, printer, brick item, admin wand, and wand

https://cdn.discordapp.com/attachments/372648606383210508/375502338355363841/default_item_datablocks_and_functions.zip
Ah, thanks! This is just what I needed.

11
Modification Help / Base addon code?
« on: November 01, 2017, 10:00:25 PM »
I'm not talking about 'default' add-ons- like Weapon_Gun, Weapon_Rocket_Launcher, or Vehicle_Jeep. I mean items that are always loaded as part of the base game-
the wrench, hammer, wand, etc. Mostly, I need emitter/particle/image data, as having the default Wand/Destructo Wand's code would be helpful for making spellcasting wand variants.

But I've looked around, and the game files don't seem to have them in a readable .cs format. I don't precisely know what to search for, so I'm asking here again.

Oh, also, if it seems like I'm doing a lot of unrelated things, I am. I'm juggling a bunch of different server concepts to see what works and what people will play.

12
Help / Re: VCE - Item collection system, escape/generator win system
« on: October 30, 2017, 09:11:20 PM »
probably wouldn't be too difficult to script variable replacers for minigame players/alive/haven't died

it may be possible to event it if you have access to the spawn point
ie if they spawn in a room and then get teleported to the map by using a portal/button would help

if you need help setting this up to work ingame, I can get on for a bit and put up some events
Nah. I think this is fine.
Slayer's already proving to be unreliable as it is- when I join the minigame from being outside it, the onMinigameReset events refuse to reset the Pages variable no matter what I do. I have to reset it a second time to get it to work.
The favorites menu also gets confused when I load the preset and thinks that I don't have Team Deathmatch installed for some reason... it seems the new Slayer is still buggier than the old Slayer.

13
Help / Re: VCE - Item collection system, escape/generator win system
« on: October 30, 2017, 03:54:11 PM »
There's no way to detect the amount of living players easily without the use of some outside script, and therefore no way to check how many have made it out of how many there are total, especially when players probably will die during the round.

It is possible to require a certain percentage of the initial amount to make it in order to win the round, though.
Hm. I think I've reached a compromise.
The current way it's set up requires players to wait for the power to come on, <i>then</i> escape through the now-powered door and into the tunnel. I'll have a glowing yellow win brick unhide there that wins the round for humans when touched.
While this still only requires one person, it does make it so that players will have to hold out near the tunnel to win, and the more there are, the more that are likely to be left to touch the brick. I think this achieves a similar effect, as they'll only have one minute (might make it thirty seconds) after the power's back to touch the win brick, incentivizing them to stay near the tunnel. That time might be very short, but at this point Rendy's spawn rate is max, so... going anywhere is dangerous.

Also, I've been thinking and I deduced that having one life in such a long gamemode as a Renderman gas can hunt might be too much wait time. Slender Fortress gets away with long round times by having waiting areas with PvP and silly team fortress shenanigans to get up to while you're 'dead'. I can't really do that here, though I could  have a system with the Infection gamemode that works similarly. So I think players having a sixty-second respawn time would work better than that, since it makes death a scary thing, keeping Rendy a spooky guy, but it also prevents huge wait times. My servers already have enough trouble garnering players as-is... I don't need a wait like that driving people out.
Maybe this is off-topic, but since I was thinking about it I thought I might as well ask. No use keeping my thoughts in an echo chamber.

14
Help / Re: VCE - Item collection system, escape/generator win system
« on: October 29, 2017, 09:29:13 PM »
Great, when get back will think of something to work with what you have.

If not, have done things like this in the past with default events so there's always something to fall back on.
Okay, took a look at my test build and it actually works properly. With some caveats.
I've attached a picture explaining my events. The thing is, there has to be a five-sec delay between page collection or VCE becomes confused.
I guess I forgot that these worked after all, but I still do have a problem. Ideally I want it to be based on an escape zone, not a generator with a timer. So all players would
need to enter an area and increment a "players escaped" count until all living players were in and the round was won, but I don't know how to detect how many living players there are.
I could take another approach and just have the team win as soon as anybody escapes, but that's not nearly as interesting. In that case, the generator would be more fun.

15
Help / Re: VCE - Item collection system, escape/generator win system
« on: October 29, 2017, 09:02:47 PM »
It's pretty late but from a quick read through have a few ideas on how to put this in place with your current plans. When I get back tomorrow will help out if no one else has before.

Till then, can you take pictures of everything you have done event wise?
Yeah, I'll do that real quick.

Pages: [1] 2 3 4 5 6 ... 10