ACF General Thread

If I remember, they’re in the code but just not fully implemented. Here’s to hoping it finally comes through?

So I’m doing some work on ACF missiles - unofficial afaik, though ACF’s welcome to integrate them when done.
Right now I’m half way through dumb rockets. Code-wise, they’re almost identical to cannon shells - so you can have all kinds of crazy missiles. They come in different classes (40mm pod rocket, 170mm ‘hellfire’ etc). They also use modified bullet code, so when you fire 100 minipods from your ‘totally-balanced-i’m-honest’ 500 ton hoverball chopper, it should be about as harmful as firing a few RACs.
I’m posting because I want to ask a few questions;

Should guided missiles be entities? You can shoot these down but they’re heavier on the network + entcount.
Should missiles support all warhead types? Most real missiles are HEAT, but an AP missile could be hilarious (think; self propelled concrete bomb). This is already supported because I’m using some of the bullet code for the missiles too.
What era should I focus on? I’m modelling all of my current data off a Hellfire missile, circa 1980s. ACF is supposed to be 50s but missile tech was crap back then.
What’s the largest missile you could reasonably fit onto an aircraft? I’ll make that the upper tier of missile, for breaking super-tanks and bunkers.

Once I finish missiles, bombs should be really easy - they’re just missiles with no propellant. You’ll probably be able to mount them to the same racks and everything.

cheers chaps!

Thanks Splambob for doing that. ACF really needs something new. About guided missiles - I would recommend to leave them until you finish “dummies”. Make them of course explosive - HE, HEAT, we don’t need AP or HP (is there even that kind of missile?). They should change path randomly during flight - which should depend on weight of missle. Light missile = Crazy missile.

Guided missiles - If you start making them, of course they should go towards a engine that is turned on. And make them go without calculating next position of a target - I think we don’t need SO smart missiles.

Largest missile, I think this should be the biggest:

I’ve got some code from the old version of ACF, so these missiles should fly similarly. The old code’s pretty good but some of it’s missing from the copy I have so I’ve been spending time calculating constants and dynamics using a hellfire as an “ideal average”.

Your crazy missiles were in the old code: missile.Drift = 100 / missile.Mass ^ 0.5
(the coder had some stiff wood for exponents, they’re everywhere)

AP missiles would be pretty useless (their weight would make them really slow, so low penetration) but I think HP bombs would be amazing. I want to drop a giant “fuck you specifically” canister on dudes :v:
When I implement rocket pods the first thing I’m going to do is load them all up with smoke - it’s gonna look intenseeee

I think everyone wants something along the lines of a nebelwerfer, a Katyusha, and an FFAR. PM me if you need info on the ballistics for em. Maybe do the missiles so they have solid HE power for ultra low weight, but an astronomically fuckall long reload time?

And all ammo types, sure why not

On the subject of missles, Maybe have afew types, Like maybe a Wire-lazer guided lock on sort of thing, so your Guaranteed (Hopefully) A hit, Or maybe a cluster type warhead? Like when it hits the target, the missle explodes and really it’s all the Shrapnel and fragments that do actual damage, Like firing a Huge ass buckshot round, and then maybe different sized sized launchers for different sized tubes, like for short range, maybe a 4 or 6 pod, for medium, a 5 or 9, for long, a 10 or 20(Given the principle of lock on and what not, Just putting it out there), and for holy shit extreme range, a huge ass 1 or 2 tube mount.

Also, maybe implement a thing to protect an Ammobin from exploding so Violently? Like a C.A.S.E from Battletech, It’s a Piece of Equipment that you put Ammo into so that in the event of a weapon hitting the Ammo, the C.A.S.E absorbs the blast and puts it somewhere else

Making missiles entities would be a waste of resources as well as going against some of the work that has been done with ACF. Making guided missiles would require a modification to the code base but from a development point of view. Having a unified code base does make the addon easier to maintain.

Shooting down missiles though is a bit trickier. Perhaps a missile radar SENT needs to be designed in order to detect the missiles. This would allow for a balanced method of missile interception and avoidance by not allowing E2 to detect missiles itself. To implement the ability to shoot down missiles etc, functionality to detect collisions between ACF projectiles would need to be added.

As for AP bombs. Anyone else thinking concrete donkey?

I love the idea of canister shot for cannons etc, a giant tank shotgun with low AP capabilities but huge spread to devastate soft targets. I think that can be easily implemented just by adding a new ammo-type.

To put it simply, Missiles being entities = missile shoot-down ability. I don’t have unlimited time to make the perfect missile framework, but I do want to see something which is why I’m putting my time in.
Treating missiles as bullets but retaining the ability to destroy them requires code which will be time-expensive to run, and also code to detect if interceptions are successful which takes effort. Ents take care of that because almost everything comes with them.
The bullet system has its advantages though; if the missile is initialized on the client correctly, we can simulate it clientside with almost no network updates. Many missiles with minimal cost. However, there’s always a chance of desync and there’s extra code required.

The old ACF had a radar, it’d be cool if someone fixed that up again. Maybe me if I can’t find something to make that interests me more. :slight_smile:

Asked this in the official thread, but how do you reload ammo boxes?

Tap it with a refill crate of the same kind. (120mmC, 40mmHMG, etc.)

man, with all this work you’re putting in you should totally get picked up into the team, given how coder-deprived they seem to be at the moment
your GUI is astoundingly awesome and this work on missiles and rockets, hnnnng

as for entities/trace, I wonder what the impact in terms of performance and networking strain that adding intercept code to the bullet code being used by rockets/missiles is like when compared to using full blown entity?

and also how well those two options might fit in with the existing codebase

Yeah my job would be easier if I could commit to the ACF codebase, right now I’m overwriting half of the ACF ballistics functions after they’ve loaded - a neat trick but not ideal. I like making XCF though because it lets me do what I like and keeps my changes optional in case I do something dumb.

Intercept code would use no extra network - but it could make ACF slow. The algorithm is at least O(n^2) which means that if lots of bullets and/or missiles are flying, the algorithm becomes quite slow and not really suitable to run every frame. This is unlikely to be an issue because lua is fast and RAC spam is rare but there’s some subtleties about the problem that makes me disinterested in writing that code.
For example, ACF bullets are infinitesimally small points. How do you make two of those collide? Be a perfect shot? It begs the definition of collision boundaries for each projectile. That could be a pain in the dick (if you want something vaguely accurate).
Also, ACF bullets move in big jumps every frame, not smoothly. How do two teleporting things collide? Only when they teleport into eachother - or if somebody ran linear interpolation on the two objects.
Depending on the complexity of the collision bounds, this can either be expensive (delta movements) or painful (i’m bad at maths).

That being said, either option fits terribly into the existing codebase. I don’t want to diss the old coder because what’s there works nicely and ACF is hot stuff but the code is not what I’d call professional? :v: (dontkillme)

So yeah you can have guided bullets but making them collide with other bullets takes effort. Gimme an hourly wage and I’ll reconsider though, pinky swear.

The refill crate just spams Lua errors for me.

I’ve been trying to figure out why none of the vanilla particles were being called whenever I installed ACF, and then it occured to me that the particle_manifest file wasn’t calling for any of the vanilla particles anymore…
Apparently someone forgot to add the old particles.

    "file"        "particles/rocket_motor.pcf"
    "file"        "particles/acf_muzzleflashes.pcf"
    "file"        "particles/gmod_effects.pcf"
    "file"        "particles/blood_impact.pcf"
    "file"        "particles/explosion1.pcf"

If you are having the same issues, just goto - garrysmod/particles, and open the particle_manifest.txt, remove whatever was in there before, and plop this in there.

I can’t wait for the next update. If I may make a suggestion: More variants of a type of engine. And for forced induction maybe you should have let’s say a 5.7l v8 and in the menu there are two or 1 checkbox that may say turbo or supercharged. And if you click one of those and you spawn it, the engine has a turbo or supercharger model on it depending on which you chose. Oh, and maybe a slider to change the thickness of the acf driveshafts? That would be wonderful.

Actually, the particles_manifest file is the old way of loading particles. I’ve updated it to properly load them using game.AddParticles so you should just remove the particles_manifest file and all the vanilla particles will load normally.

I can’t get engines to work, can someone maybe make a tutorial how to use them without E2?

Not to be mean, but if you can’t use E2, you probably shouldn’t be using ACF. It requires a little more than just welding an engine to a chassis and expecting it to work.

No way, I used wire multiply gates and constant values before I learned how to use E2. Now I use E2 because I can’t be assed enough to put 5 gates and link them. Lazy ? I think not.