In a hypothetical scenario humans have discovered a new material that is decently expensive (not antimatter levels). Let's say it's slightly cheaper than gold. What properties would it need to have to make things like bullets, tanks, and gases obsolete during war? It would be preferrably if it replaced them in the form of melee weapons and armor.
It can't be done with a material, there is just nothing that does what you are looking for.
Imagine a human wearing armor hit by an RPG. It doesn't matter how much the armor holds its shape, the shockwave and acceleration will kill you.
What you need is some sort of reasonably cheap and efficient force-field generator that a person can wear. It would filter out poison gasses and stop incoming projectiles but would allow slower moving things to penetrate. To prevent remote controlled drones/seeker missiles/etc then maybe it would also be able to detect and neutralize those - basically nothing self-propelled or moving faster than X can penetrate the force shield.
Melee weapons can now be used since they are swung slow enough to penetrate the shield but then used to stab or slice the person inside.
In fact this was a concept used by the Dune novels and films. The special effects are very dated but here it is:
(...) a new material that is decently expensive (not antimatter levels). Let's say it's slightly cheaper than gold.
That's a poor comparison.
What you need is some magical material that can:
- Stop gunpowder and other explosives from working - so that firearms as we know cease being a thing. It has to affect things simpler than gunpoweder powered weapons otherwise spuds become the norm.
- Stop compressed air from working - otherwise paintball guns will be fitted with modified ammo.
- Stop electricity from working - otherwise the vacuum left by firearms will be filled in by lasers, tazers and sound guns.
- Quench fires from a distance - so as to stop flamethrowers also.
- Breaking cord and rubber at a distance - otherwise people will just resort to bullet crossbows, or just regular bows. I make PVC bows for a hobby. Some of my friends have wooden ones as well. We have tested them against some materials and I believe that the strongest bows would be able to pierce chain mail. If not the ones we own and make, then the composite ones that use carbon-fiber arrows would sure do it. The latter might even pierce harder stuff. You don't bring swords against archers in formation, so unless you prevent bows as well, most battles will not be melee.
There are just so many alternatives to guns for long range killing that, rather than inventing a new material, you would be better served by a global disaster that would drive humanity back to the stone age.
You just need a material where the more force that is used against it, the stronger it gets. This material doesn't exist in the real world, but you can make it exist in yours, and it's manufacture is a trade secret that no one knows.
You can make swords even more attractive by giving them some property that neutralizes the armor that can't work with a bullet.
Take Black Panthers vibranium armor. It's immune to all impacts, and even stores up the energy to be used later, but it is weak to specific sonic waves.
Your armor could be immune to all damage, but be weakened when vibrated at a certain frequency. The vibration has to be in contact with the suit (no transmitters), and it's too bulky to fit into a bullet (guns are useless).
But it would fit into the hilt of a sword. So the blade of the sword vibrates at the right frequency, and so when it hits the armor it can cut through instead of bouncing off.
A cheap shot would be graphene-based compounds and assuming large-scale production is decently expensive. Alternatives would be a skin with lots of high-grade spider silk woven into it (high-grade can be 40x tougher than Kevlar and make you virtually immune to getting the skin cut).
Everywhere you read that graphene is between 5 to 300 times as strong as steel (although they usually don't mention which property of steel). So assuming a weak form of graphene used as an exoskeleton (Grahene is light after all, although I haven't found any Kg/m^3 mentions yet). Even a 2cm thick exoskeleton would rate as 10cm of steel. Using pure graphene instead of graphene with specific deficits (deficits that make it stiffer for a skeleton) allows you to make skin out of it, skin well capable of withstanding cuts because pure graphene has the highest strength ratio's while still being flexible.
The result would be that everything becomes a blunt instrument (Except overkill like a .50cal anti-tank machine gun most people wont be bringing to infantry fights). If bullets cant cut through your body they need to damage you with the shockwaves they create. Consider the recoil you feel when your weapon goes off and that this is the same force the bullet will apply to your opponent, this means blunt melee weapons will become viable.
How about a custard filled ballistic vest?
What you may be looking for is a non newtonian fluid, something that stiffens when sudden kinetic force is applied to it (like custard).
So you might imagine a vest made of sealed sections (pockets or cells) & each of these sections filled with such a fluid.
You couldn't shoot the wearer (through the vest) but you could stab him (through the vest), if you stab slowly enough (this is almost exactly the effect of the shields in Dune).
For the actual material of the vest you probably can't beat Demigan's suggested spider silk, but I wouldn't know which of our currently available non newtonian fluids is best to fill it's pockets with.
It probably won't stop the effect of a bullet completely but it will take some of the kinetic force out (redistribute it sideways) & the forward force that's left (probably most of it?) will be spread over a much larger area of the body so it'll be (a little bit) more like being hit by a flat plank of wood than shot with a bullet (so sort of a full body airbag for bullets), a lot less lethal.
On the down side I'm not sure we have anything right now that would provide sufficient stopping power for what you want to it's own weight in ratios that would make such an armor even slightly reasonable for a person to wear & move in though.
Edit: rereading your question, my answer will only fit the bullets in your question.. if you really mean to include tanks & gas & weren't just getting a little excited & giving way to a touch of hyperbole as you typed then there's nothing, you want magic.
It seems this idea was already very much in the design stage if not in production as far back as 2006 (see Liquid Bullet-Proof Armour), and it seems much lighter & more flexible than I thought it could be with currently available materials (while still retaining adequate utility).
I'm going to assume you don't need bullets, tanks, and gases to be completely ineffective, but as you've said, just obsolete – by which I assume you mean not used in any significant amount, so that you can have a melee weapon setting.
You need a material which is extremely strong against impact, but weak against cutting. Kevlar fills these criteria, I believe – it's (somewhat) effective against bullets, but early kevlar jackets were susceptible to cutting – one demo I saw showed it was easier to stab through kevlar, as the fibres lubricated the blade.
Unlike in films, swords do not slice people in two by hitting people with them hard and fast – they kill by cutting (sure, or stabbing, if you've got a rapier, but we'll consider weapons which can cut, such as the sidesword). I practice sidesword, and one of the key things we're always reminded is that you have to pull through the cut to be effective. You don't cut a steak by hitting it with a knife fast; you cut by placing the knife on it and drawing it back and through. So impact resistance is meaningless against cutting. It'll probably stop stabbing, but there's whole schools of swordsmanship based around cutting.
So an impact-resistant but cutting-vulnerable material like kevlar is the starting point.
But you need that effect much more pronounced (kevlar can't protect against larger calibres, and the impact can still break ribs etc), and you need it to be in a form you can wrap a person with so there's no (or sufficiently few) weak spots, without harming mobility (or swords are also useless). So some super-kevlar or non-newtonian fluid type thing could work.
Now you've got a soldier invulnerable to small-arms, but not swords.
Now larger stuff... Tanks aren't used much against infantry. They're used against tanks. Sure you could use tank rounds to kill infantry with the shockwave, but it's gonna cost you - a single round for an Abrams tank apparently costs $8500. Most large weapons (bombs, etc.) for use against infantry rely on shrapnel, but shrapnel will get blocked. Shockwave and fire will still kill. Making your armour fire-proof is certainly plausible.
So, sure, you could use shockwaves from larger weapons to kill, but it's probably not the most practical, especially when you can just give infantry sharp sticks.
Gas – for this you either need your armour to be airtight, or you provide antidotes to bio/chemical weapons, or you rely on bans (it doesn't have to be impossible for gas to kill, just not used – Gas is very effective today, but it's basically obsolete because of the international backlash; similarly atomic weapons aren't used. No-one's asking "how do I invent a world where people use guns not nukes & nerve agents in wars?").
The problem with this is that it's relatively easy to add a cut-proof layer of armour, so swords would become useless. This really blows a hole in Dune – why didn't they wear some armour as well as their shields?
Rather than a new material, perhaps a change in the world? In the tv show Revolution ( https://en.m.wikipedia.org/wiki/Revolution_(TV_series) ) two things happened to bring swords back into the mainstream, no more electricty and loss of knowledge (no one knew how to make gun powder, so no more bullets). Change the world so that current weapon tech is no longer viable.
If you go with a shield technology (Dune is the best example I know of) give it an effective range so that, for Reasons, stops all attacks outside of melee range but cant stop attacks closer. (Because of tech limitations, the field must be 6 feet circular or if it was any closer to the user it causes cancer within eight seconds or Reasons).