View unanswered posts | View active topics It is currently Tue Jan 07, 2025 12:51 am



Reply to topic  [ 32 posts ]  Go to page 1, 2, 3  Next
 For srs modders: Making a force field 
Author Message
User avatar

Joined: Mon Jul 16, 2007 9:50 am
Posts: 1512
Location: Tallahassee, FL
Reply with quote
Post For srs modders: Making a force field
So, I've spent all of two days trying to figure out how one might make an effective force field. I figured I'd put my experiences here for the sake of conversation. Here's a few semi-workable things one might do that I tinkered with:

The obvious one is to use a permanent object as a shield, like a MOSRotating or an actor Attachment. This is probably the most reliable method, except that, just like a solid object, they take so many hits and go away permanently, which isn't very energy-like. It just amounts to more armor with a spiffy sprite.

Something else I tried was making an emitter that shoots out other emitters in all directions, and those secondary emitters emit pinned, short-lived MOSRotatings at a certain time after they've been shot out from the central emitter. The result is a ring of MOSRotatings around the main emitter, or anything you attach it to. This is sort've interesting, as if you make it so these MOSRotatings gib after one or two hits and balanced the emission speeds correctly, you have a regenerating shield that can resist a light amount of firepower, but can be broken through temporarily with a heavy barrage. This is more like what a real energy shield would be like, I think, but this method has the drawback of having a crapload of MOSRotatings out at one time, which can get quite laggy, especially if you want to throw in some more effects.

The next logical step is surprisingly workable: the central emitter simply emits a series of large, pinned, short-lived, ring-shaped MOSRotatings. That single MOSRotating makes up the entire shield by itself. Again, if you balance the GibWoundLimit, the emission speed, and the MOSRotating lifetime, you can get a similar constant but overwhelmable energy shield as above. Even better, there are far, far less MOSRotatings being emitted, so you can avoid lag, and still have room for other special effects. Unlike the "small particle" shield though, if it gets overwhelmed from one angle, it gets overwhelmed from all angles, since destroying one part of the shield destroys the entire shield, at that moment. This might actually be considered more realistic for an energy shield, though, depending on how you feel about it.

Now, in the second and third method, I've had an awful time trying to get those MOSRotatings to actually stop projectiles. I don't know what the deal is, but between the thickness of the MOSRotating and various Material attributes, you can end up with a shield that stops some projectiles like you'd expect a GetsHitByMOs = 1 MOSRotating to do, and in other cases has projectiles just pass right through as if the shield isn't even there. Like, I had a shield that the regular Coaliton assault rifle shots couldn't get through, but that the Coalition gatling gun shots would pass through like its nothing. And its not even damaging the shield and causing wounds or anyting. It just goes on through. This issue pretty much made me give up on the third method, which makes me sad since there seemed to be so much potential there. Alas, I think there's some interplay between the shield material and the bullet materials that I don't understand. (Depth? Resolution? I still don't understand all that)

An advantage of the first method over the last two methods, which some of you may have already thought of if you've bothered to read this far, is if you make a static attachable that looks like a shield and attach it to an actor, that actor can shoot out of it, but others can't shoot into it. This, of course, is because the shield is considered a solid part of the actor. The second and third methods result in barriers that projectiles can't get through in either direction. So if you attach the central emitter to an actor, it makes it tough for that actor to actually shoot at anything since his own force field gets in the way. A possible solution to this is perhaps having an opening in the force field positioned for the actor to shoot out of. Ideally, the central emitter would be attached to the arm or weapon itself. Then the emitted shield objects would be emitted at the proper angles to have the hole be in front of the weapon at all times. Unfortunately, the interplay between emitters and things that flip around, like guns and actors, still isn't perfect. Put an emitter that emits to the right on an actor, and it'll still shoot to the right even if he's facing left. Oddly, if you place it on a gun or limb, the emitter will change its angle with the gun or limb... but will still get horizontally reversed when the actor turns around. Upsetting.

So, I think there are those of you who would agree that it would be cool to figure out how to make working force fields and energy barriers that actually act energy-like, and I think I've painted some general ideas on how to do it. Now, we just need some discourse. I'm sure some of you have thought on the issue, and maybe even tried to do it. Now is the time to relate your experiences.


Sat Nov 22, 2008 6:10 am
Profile YIM
User avatar

Joined: Sun May 18, 2008 8:30 am
Posts: 732
Reply with quote
Post Re: For srs modders: Making a force field
Can you make attachables and custom wounds on guns? If you can, couldn't you just add an attachable to the gun the unit is carrying and give it wounds with short lifetimes?


Sat Nov 22, 2008 6:16 am
Profile

Joined: Mon Dec 04, 2006 3:34 am
Posts: 2378
Reply with quote
Post Re: For srs modders: Making a force field
One of my concerns is not ♥♥♥♥ with the terrain/weapons/everything along the line of the shield. This includes having any emitted MOSRs becoming terrain because they spawned in/on something.

My short answer is "wait for lua"

I remember an old problem with the Force Shield item was that the circle, being a single object, would result in a bullet going through one side of the shield, then out the other, having phased through the space between. While this is interesting and perhaps cool for some things, it was awkward at the time (B9) so we didn't really like it.

Perhaps using a shield item that spawns shields at some rate or other would work well: it would rotate with the weapon and actor relatively correctly, while remaining destructible, renewable, and hopefully not too stupidly buggy or odd in implementation.

Maybe a timed shield with an actual firearm would work reasonably well, the gun would only have so many uses if it were wounding itself, but the shields created could be very strong to make up for it, and you could then go and ram dropships and stuff with it. It would still break from excessive force/wounds of course.


Sat Nov 22, 2008 6:27 am
Profile
User avatar

Joined: Tue Oct 14, 2008 11:07 pm
Posts: 112
Reply with quote
Post Re: For srs modders: Making a force field
I recall a mod around Build 14 that had an edited shield skeleton. It had a jetpack that, instead of propelling it upwards, activated the energy shield around it. I deleted it before I started modding, so I don't know exactly how it was done. Looking back, it was probably just a modification of your first method.

Unfortunately, this means that you have to sacrifice flight capacity for the shield. I can see it as a cool addition to a turret, but it's impractical for a mobile actor.

Hold on: Maybe an offhand tool that shoots MOSRotatings like those in the third method? The "bullets" would align with the way the gun is facing if you used AlignToVel, right?


Sat Nov 22, 2008 6:29 am
Profile
User avatar

Joined: Mon Jul 16, 2007 9:50 am
Posts: 1512
Location: Tallahassee, FL
Reply with quote
Post Re: For srs modders: Making a force field
Comment wrote:
I recall a mod around Build 14 that had an edited shield skeleton. It had a jetpack that, instead of propelling it upwards, activated the energy shield around it. I deleted it before I started modding, so I don't know exactly how it was done. Looking back, it was probably just a modification of your first method.

Unfortunately, this means that you have to sacrifice flight capacity for the shield. I can see it as a cool addition to a turret, but it's impractical for a mobile actor.

Hold on: Maybe an offhand tool that shoots MOSRotatings like those in the third method? The "bullets" would align with the way the gun is facing if you used AlignToVel, right?

Not if its firing pinned MOSRotatings, which pretty much start off with no velocity to align to. And firing pinned MOSRotatings is kinda necessary unless you want the shield to look like its parts are constantly falling down.

I've fiddled with employing AirResistance and GlobalAccScalar rather than PinStrength, to allow the emissions to have an initial velocity and then quickly come to a stop. But even then the emissions still seem to face in the default direction even though OrientToVel is set to 1. Maybe I was just doing it wrong.

And I still have the odd problem of some shots phasing through the shield, and others being stopped by it. I looked at the code for both coaliton assault rifle and the gatling gun. Both use bullets made of Bullet Metal, and no further material specifications. The difference between the shots is that the gatling gun bullets are heavier, but not as sharp as the assault rifle shots. I'm not sure why heavier+duller = ignores some objects, but it seems to be the case.

Alenth Eneil wrote:
My short answer is "wait for lua"

Well that's no fun.

Alenth Eneil wrote:
I remember an old problem with the Force Shield item was that the circle, being a single object, would result in a bullet going through one side of the shield, then out the other, having phased through the space between. While this is interesting and perhaps cool for some things, it was awkward at the time (B9) so we didn't really like it.

I haven't run into that particular problem, but I thought about the possibility. Still, I have yet to see it in action.

Alenth Eneil wrote:
Perhaps using a shield item that spawns shields at some rate or other would work well: it would rotate with the weapon and actor relatively correctly, while remaining destructible, renewable, and hopefully not too stupidly buggy or odd in implementation.

Thats a thought. But I still have issues with trying to get things to angle correctly.

Alenth Eneil wrote:
Maybe a timed shield with an actual firearm would work reasonably well, the gun would only have so many uses if it were wounding itself, but the shields created could be very strong to make up for it, and you could then go and ram dropships and stuff with it. It would still break from excessive force/wounds of course.

I'm not sure I follow.


Last edited by Darlos9D on Sat Nov 22, 2008 6:42 am, edited 1 time in total.



Sat Nov 22, 2008 6:37 am
Profile YIM
User avatar

Joined: Sun May 18, 2008 8:30 am
Posts: 732
Reply with quote
Post Re: For srs modders: Making a force field
Alenth Eneil wrote:
One of my concerns is not fudge with the terrain/weapons/everything along the line of the shield. This includes having any emitted MOSRs becoming terrain because they spawned in/on something.

My short answer is "wait for lua"

I remember an old problem with the Force Shield item was that the circle, being a single object, would result in a bullet going through one side of the shield, then out the other, having phased through the space between. While this is interesting and perhaps cool for some things, it was awkward at the time (B9) so we didn't really like it.

Then why not make the shield two objects?


Sat Nov 22, 2008 6:38 am
Profile
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post Re: For srs modders: Making a force field
As I believe I've mentioned before; I added some extra features to the dead space pulse rifle alt-fire inspired Shadow Echelon "WhirlyBird" tool.
Image
Hint 1: Recoil negation
Hint 2: No, not done like that.
Hint 3: Nor like that.


Last edited by Azukki on Sat Nov 22, 2008 7:01 am, edited 1 time in total.



Sat Nov 22, 2008 6:55 am
Profile
User avatar

Joined: Sun May 18, 2008 8:30 am
Posts: 732
Reply with quote
Post Re: For srs modders: Making a force field
That doesn't look like it will stop bullets.


Sat Nov 22, 2008 7:00 am
Profile
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post Re: For srs modders: Making a force field
It stops general bullets pretty well too, and I'm not even using an absurd material.
Maybe I should be?
Image
It can also shoot around corners, suicide ram with insane power, be used to fly, make you walk faster, be used to dig, throw craft gibs, and as either a short range or melee weapon.
It can also stop thrown timed grenades, but then you have to retreat some and block again before it goes off, to be effective at all against the explosion.

Right now it's big weaknesses are: you not responding to a threat quickly enough to block it, threats from multiple angles, explosives that detonate nearby, specialty emitter weapons, and STILL having my rocket launcher's sprite as a placeholder.
(That rocket launcher's pretty cool too, but I won't get into that)

And I've still got something left where I could add some more function.
Maybe an explosive blast attack?

Also this topic gives me an idea on how to do a radial version, by combining this with something else I've already made. (By the way, that something else is going to blow your mind when you see it)


Last edited by Azukki on Sat Nov 22, 2008 8:34 am, edited 4 times in total.



Sat Nov 22, 2008 7:52 am
Profile
User avatar

Joined: Wed Dec 27, 2006 10:05 pm
Posts: 100
Reply with quote
Post Re: For srs modders: Making a force field
there is a way to fix bullets passing through the MOSRotaings, but it can make the shield look a bit awkward. I've found that increasing the sprite's thickness to around 12 pixels wide stops most bullets, but im not sure how well it will work on weapons that are really strong. as for bullets not being able to get out i think the best solution would be to have the shield not cover the actuall weapon (simply make the shield more skin tight)

P.S these are tips for that third method


Sat Nov 22, 2008 7:56 am
Profile
User avatar

Joined: Mon Jul 16, 2007 9:50 am
Posts: 1512
Location: Tallahassee, FL
Reply with quote
Post Re: For srs modders: Making a force field
You know what? I have a great idea...

You'll probably find out what it is tomorrow.


Sat Nov 22, 2008 9:43 am
Profile YIM
Data Realms Elite
Data Realms Elite
User avatar

Joined: Wed Sep 05, 2007 4:14 am
Posts: 3966
Location: Canadida
Reply with quote
Post Re: For srs modders: Making a force field
I want that, and tweak it so it doesn't rape my base.


Sat Nov 22, 2008 9:52 am
Profile
User avatar

Joined: Tue Dec 12, 2006 3:10 pm
Posts: 495
Location: Uncertain quantum state
Reply with quote
Post Re: For srs modders: Making a force field
For MOSRotatings being pinned, why not use magicks of B22;
The GlobalAccScalar, and possibly AirResistance.
AlingToVel works pretty good with those.

Some form of a energy shield would be great.

Also, you could try to fiddle around with sprite animating.
Going slightly thicker and back, should make them look less bloated.


Sat Nov 22, 2008 10:03 am
Profile

Joined: Sat Jan 13, 2007 11:04 pm
Posts: 2932
Reply with quote
Post Re: For srs modders: Making a force field
Try my shield gun. The C3's method might interest you.
Shells allign to the direction the gun is pointing.

viewtopic.php?f=61&t=11468

I bet the main reason that the bullet pass through your shield is that its too thin. Thickness of the shield can make a difference. The thicker it is, the better chance it has to catch the incoming projectiles.


As for active shields on an actor it is tricky. I can suggest one small thing though: If you make it a central emitter that spawns a ring shield around the guy, make shield be GetHitByMOs = 1, but HitsMOs = 0 too and make sure the actor who is using is set to HitsMOs = 0. This will allow the actor to move reasonably freely without colliding himself into it at the cost of the shields delay to catch up with the actor, we can use that as a character flaw or something.

Next, if you want you actor be able to fire his guns through the shield without being blocked by it, make the shield compact and small, yet thick. As for the weapons, make sure they are long enough that when using, the gun's muzzle is pointing partially or atleast barely outside the shield.


Sat Nov 22, 2008 10:23 am
Profile
User avatar

Joined: Mon Jul 16, 2007 9:50 am
Posts: 1512
Location: Tallahassee, FL
Reply with quote
Post Re: For srs modders: Making a force field
Okay, I just don't get it. Bullets with a sensible mass around 0.008 and sharpness from around the 250-350 range get stopped by a pinned MOSRotating made of Military Stuff. But bullets with a mass of around 0.3 and a sharpness less than 30 just go on through. The weird thing is if I increase the mass OR the sharpness, the bullets suddenly start being stopped by the MOSRotating. Its as if the bullets actually have to be massive and sharp enough to wound (and subsequently be stopped by) a MOSRotating made of Military Stuff, because if they're below that level of penetrative ability... they just ignore the MOSRotating altogether!

I'm starting to wonder if I've found a bug.

And no its not thickness. I've made a huge, pinned mass and the bullets still go through. You have to understand its not "going through" as in "goes in an entry wound and comes out an exit wound." It just flies through as if the MOSRotating isn't even there. Here:
Code:
AddEffect = MOSRotating
   PresetName = Test Mass
   AddToGroup = Test STuff
   Buyable = 1
   Mass = 0.01
   PinStrength = 9999
   HitsMOs = 0
   GetsHitByMOs = 1
   RestThreshold = -500
   SpriteFile = ContentFile
      FilePath = Dummy.rte/Crafts/Dummy Dropship/DropshipHullA.bmp
   FrameCount = 1
   OrientToVel = 1
   SpriteOffset = Vector
      X = -45.5
      Y = -45.5
   EntryWound = AEmitter
      CopyOf = Dent Metal
   ExitWound = AEmitter
      CopyOf = Dent Metal
   AngularVel = 0
   AtomGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Military Stuff
      Resolution = 4
      Depth = 0
   DeepGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Military Stuff
      Resolution = 4
      Depth = 10
   DeepCheck = 1
   GibWoundLimit = 5000
   GibImpulseLimit = 5000

Try loading this up and spawn one. Now try firing the Coalition assault rifle at it. Stops it fine, right? Now, try the gatling gun. Or any of the Ronin weapons really. They're all high mass, low sharpness bullets. You'll notice they just fly right on through. Actually, even the coaliton assault rifle bullets have a tendency to fly a certain way into the MOSRotating until it actually "hits" and makes a wound on the inside.

What gives? I'll never be able to make a force field at this rate. And no, setting HitsMOs = 1 doesn't change anything (besides make it more processor-intensive)

Edit: Well guys, it's the mass. That's right. Having it set to 0.01 for something big isn't good if you actually want things to hit it. I guess the game assumes its made from something very etherial, so heavy stuff just pushes through it. Thats reasonable, I guess.

Well, back to making a shield.


Sat Nov 22, 2008 10:26 am
Profile YIM
Display posts from previous:  Sort by  
Reply to topic   [ 32 posts ]  Go to page 1, 2, 3  Next

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.051s | 13 Queries | GZIP : Off ]