magnetguns
Moderators: GSH, VSMIT, Red Devil, Commando
- MrTwosheds
- Recycler
- Posts: 3059
- Joined: Sat Feb 19, 2011 8:37 am
- Location: Outer Space
- Contact:
magnetguns
In the Modlog I find entrys for magnetgun called
[MagnetGunClass]
ForceMass = -1 // if > 0, this is the base mass that forces apply to
MaxForceMassScale
MinForceMassScale
This setting determines if the amount of force exerted on an object will be a function of its mass.
If ForceMass is less than 0, the default behavior is used. If ForceMass is greater than zero, the amount of force exerted on the object will be multiplied by ForceMass / pushObjectMass. The higher the number, the greater the force for a specified mass. The value will be clamped between MaxForceMassScale and MinForceMassScale.
After some experimentation I cannot quite figure out what these are doing.
What is pushObjectMass? is it the Mass setting or something else? or the objPushCenter = value.
Setting ForceMass = 1 stops the magnetgun from doing anything noticable
Setting ForceMass = 10000 produces an effect similar to the original.
What I am trying to do is reduce the effect of sonic wave on the Rocket tank in particular. Under normal settings altering the Mass of the rocket tank has no effect on what the sonic wave does to it.
It does not seem to make any difference with ForceMass set either.
So I'm just a bit confused about what it is actually supposed to do.
[MagnetGunClass]
ForceMass = -1 // if > 0, this is the base mass that forces apply to
MaxForceMassScale
MinForceMassScale
This setting determines if the amount of force exerted on an object will be a function of its mass.
If ForceMass is less than 0, the default behavior is used. If ForceMass is greater than zero, the amount of force exerted on the object will be multiplied by ForceMass / pushObjectMass. The higher the number, the greater the force for a specified mass. The value will be clamped between MaxForceMassScale and MinForceMassScale.
After some experimentation I cannot quite figure out what these are doing.
What is pushObjectMass? is it the Mass setting or something else? or the objPushCenter = value.
Setting ForceMass = 1 stops the magnetgun from doing anything noticable
Setting ForceMass = 10000 produces an effect similar to the original.
What I am trying to do is reduce the effect of sonic wave on the Rocket tank in particular. Under normal settings altering the Mass of the rocket tank has no effect on what the sonic wave does to it.
It does not seem to make any difference with ForceMass set either.
So I'm just a bit confused about what it is actually supposed to do.
- Red Devil
- Recycler
- Posts: 4398
- Joined: Fri Feb 18, 2011 5:10 pm
- Location: High in the Rocky Mountains
Re: magnetguns
it says it's a function of its Mass, so it probably uses the value of its Mass = setting (if present) or its derived mass (Mass = -1). the mass of an object can be seen by saving an object in ASCII using the editor. i think APC's told me about that once.
- MrTwosheds
- Recycler
- Posts: 3059
- Joined: Sat Feb 19, 2011 8:37 am
- Location: Outer Space
- Contact:
Re: magnetguns
I know that, but I don't know what pushObjectMass is or what ForceMass is actually supposed to do.
The original magnetgun seems to ignore the mass setting and Im not sure that it makes allot of difference with ForceMass.
The original magnetgun seems to ignore the mass setting and Im not sure that it makes allot of difference with ForceMass.
- MrTwosheds
- Recycler
- Posts: 3059
- Joined: Sat Feb 19, 2011 8:37 am
- Location: Outer Space
- Contact:
Re: magnetguns
Maybe its the mass of the waving unit affecting the unit waved at?
Re: magnetguns
What is the actual Mass of the Rtank, and how much is 10k under/above it?
I'd say it aplies 100% force with '-1' and aplies x% based on the relation between the value set and the actual mass of the object.
The testresults sort of indicate that, but should know the mass of the Rtank to make anything out of it.
How the relation actually works may also become more clear when all values are known.
(Have no idea of the above holds any truth, but my grey matter says I should post it anyway
)
I'd say it aplies 100% force with '-1' and aplies x% based on the relation between the value set and the actual mass of the object.
The testresults sort of indicate that, but should know the mass of the Rtank to make anything out of it.
How the relation actually works may also become more clear when all values are known.
(Have no idea of the above holds any truth, but my grey matter says I should post it anyway

- MrTwosheds
- Recycler
- Posts: 3059
- Joined: Sat Feb 19, 2011 8:37 am
- Location: Outer Space
- Contact:
Re: magnetguns
RocketTank Mass = 33488.6
Re: magnetguns
Can you make the Rtank fly with: ForceMass = 33489 ?? 
I'd try the actual mass of the Rtanks and see how that behaves in order to see how the specific entry behaves ingame, just a thought though.
(Am I correct when I assume you dont actually have a problem and got it to work, and you basicly just want to understand the behaviour of the command?)

I'd try the actual mass of the Rtanks and see how that behaves in order to see how the specific entry behaves ingame, just a thought though.
(Am I correct when I assume you dont actually have a problem and got it to work, and you basicly just want to understand the behaviour of the command?)
- Zero Angel
- Attila
- Posts: 1536
- Joined: Mon Feb 21, 2011 12:54 am
- Contact:
Re: magnetguns
It looks like forceMass was the key after all. I experimented with this setting
Where the old Sonic Wave could throw an RT as far as 170m (on level ground) with one burst, the one with this setting can only throw an RT half as far. They're still pushable but you can't launch them an insane distance, blink and then relaunch. It means you're a little more vulnerable to attacks when stealing an RT and taking it to your base. What I like about this forceMass thing is that it's not nerfed in an obvious way, the only thing the player would notice is that they can still steal but are more vulnerable to fire while doing so (rather than stealing a unit in 3 blink/wave combos).
Thank you twosheds for inquiring about this.
Code: Select all
[MagnetGunClass]
forceMass = 15000 // *new
Thank you twosheds for inquiring about this.
Last edited by Zero Angel on Sat Nov 19, 2011 6:20 pm, edited 1 time in total.
- MrTwosheds
- Recycler
- Posts: 3059
- Joined: Sat Feb 19, 2011 8:37 am
- Location: Outer Space
- Contact:
Re: magnetguns
Force mass will effect everything...we will have to test pushing stuff about a bit. I don't see the heavier units being pushed less as a problem but it might do unexpected things to light objects.
I still don't know what pushObjectMass is. Is it the unit firing the weapon? scout or warrior, or the object being pushed?
How do the original settings, objPushCenter etc work in relation to it?
I still don't know what pushObjectMass is. Is it the unit firing the weapon? scout or warrior, or the object being pushed?
How do the original settings, objPushCenter etc work in relation to it?
Last edited by MrTwosheds on Sat Nov 19, 2011 6:23 pm, edited 1 time in total.
- Zero Angel
- Attila
- Posts: 1536
- Joined: Mon Feb 21, 2011 12:54 am
- Contact:
Re: magnetguns
You may be right about that. I'm going to run some side-by-side tests of stock vs modified sonic wave to see if it causes problems, if it does, then we'll have to experiment with the scale settings and see if that improves things.
- MrTwosheds
- Recycler
- Posts: 3059
- Joined: Sat Feb 19, 2011 8:37 am
- Location: Outer Space
- Contact:
Re: magnetguns
I did some tests yesterday, I doubled the mass of one ivrckt and pushed both of them about (forcemass 10000) they both behaved the same...That's what got me thinking that it might actually be using the mass of the ship firing the wave. Sort of makes sense, little ship - little push.
- Zero Angel
- Attila
- Posts: 1536
- Joined: Mon Feb 21, 2011 12:54 am
- Contact:
Re: magnetguns
Tests Run with a warrior:
Scavenger Push: Stock sonic wave launches scavengers about 70m, modified sonic wave pushes them about 35m. When pushing while moving, the warrior can maintain full speed while pushing in with both versions (that's good)
Service Truck Push: Very little difference noticed. Stock sonic wave pushes them perhaps 10% harder than modified sonic wave
Builders: Little difference noticed. Stock sonic pushes builders a little bit harder.
GT Deflection: Both versions deflect Guntower shots equally well.
Minigun Deflection: Both versions deflect turret minigun shots equally well (IOW: they barely deflect it at all).
Scout Push: Stock sonic seems to push an AI scout a tiny bit harder. I don't think you will see much unit pushing with sonic anyways.
Scavenger Push: Stock sonic wave launches scavengers about 70m, modified sonic wave pushes them about 35m. When pushing while moving, the warrior can maintain full speed while pushing in with both versions (that's good)
Service Truck Push: Very little difference noticed. Stock sonic wave pushes them perhaps 10% harder than modified sonic wave
Builders: Little difference noticed. Stock sonic pushes builders a little bit harder.
GT Deflection: Both versions deflect Guntower shots equally well.
Minigun Deflection: Both versions deflect turret minigun shots equally well (IOW: they barely deflect it at all).
Scout Push: Stock sonic seems to push an AI scout a tiny bit harder. I don't think you will see much unit pushing with sonic anyways.
- General BlackDragon
- Flying Mauler
- Posts: 2408
- Joined: Sat Feb 19, 2011 6:37 am
- Contact:
Re: magnetguns
Okay, see, from my interpretation it works like this:
ForceMass = -1 means it uses the mass of the object being pushed.
Otherwise, it applies the force of mass = X to the object. I.E. When you set forcemass to 10000, it will apply the force of 10000 mass'ed object to whatever it pushes.
Basically, ForceMass forces a mass of X onto the object being pushed.
So, I'd try ForceMass = -1 and playing with different mass settings on the ships.
ForceMass = -1 means it uses the mass of the object being pushed.
Otherwise, it applies the force of mass = X to the object. I.E. When you set forcemass to 10000, it will apply the force of 10000 mass'ed object to whatever it pushes.
Basically, ForceMass forces a mass of X onto the object being pushed.
So, I'd try ForceMass = -1 and playing with different mass settings on the ships.
- Zero Angel
- Attila
- Posts: 1536
- Joined: Mon Feb 21, 2011 12:54 am
- Contact:
Re: magnetguns
Yup. It also seems that if forcemass is set into the weapon, than anything above that mass will not be pushed as hard, but things below that mass will generally be unaffected. In other words it's the perfect way to limit magnet type weapons' ability to push heavy things.
Re: magnetguns
GBD, that was what I was trying to refer to, but your explanation is a bit clearer 
