The overall idea of this mod is that I find it weird that most modern day armies have a large core of infantry that is augmented with tanks, air force, helicopters, navy, artillery, ect. and it just seems like regular infantry units are not the majority of the military built.
If that's all you want then you could also get the same effect simply by reducing the number of resources. Play on Sparse resources instead of Standard or Abundant, and you'll have fewer resources placed on the map in the first place, which means you'll run out more quickly. This'll force you to use resourceless units (i.e., infantry) as a larger part of your army. Just don't take it too far, or you'll look like a City-State, with tons of artillery and SAMs.
The problem with doing what you're talking about is mainly the building-vs-unit balance. There are a few resources that are used both by buildings and units, so if you use this method and make a building that creates, say, Aluminum, then it's not easy to make sure the AI builds roughly the same number of Hydro Plants and Spaceship Factories as before. It's especially problematic if you make more units require Uranium.
I just hope it isn't too hard to make the ai use this new building.
Very easy, although the fine-tuning might take some time. The AI, when choosing which buildings to make at any moment, simply looks at the Flavor values, which you have full control over. AIs don't actually know what each building DOES, though, so it can't work through the logic chain of "hmm, I'm running low on Oil, maybe I'd better build a Refinery". It's more like "Production is good, and hey, that building over there has a high Production Flavor, so I'll build that." followed by "Okay, it's complete, and I just gained a unit of Oil by coincidence."
Since this building will only be in cities that have local Oil supplies (not many), you can set its Flavor values very high (total 100+), so that the AI will always consider the building to be a high priority.
I probably won't try to mess with lua I'm too much of a noob to even try that and the problems you told me about really make me not want to try it.
Lua is a programming language. If you've done any major programming, then it's really not hard to get the hang of. The only headache is that the devs turned off the debugging tools (FireTuner and the log files) by default, so you have to turn them back on. Frankly I'd suggest turning them all on even if you have no intention of doing Lua, because they're just so useful...
AssignStartingPlots.lua is just notable because of how badly it's laid out. It's HUGE, it covers tons of different things all at once (instead of being split into multiple files), and since Maps take precedence over Mods (stupid) any changes you make to it will not be compatible with the three map scripts I listed, OR any Scenario maps. It's also so large that ModBuddy won't work well for it, but any text editor will work just fine.
There's also a question of old-vs-new. Modifying an existing game Lua function file (like AssignStartingPlots) requires replacing the file in its entirety, which is automatically incompatible with any other mod that modifies the same file. NEW Lua functions work just fine, though, without any sort of compatibility issues.
Plus a shortage of oil is kinda what I'm looking for to give a real reason for a war and a good reason to get autocracy for the +100% strategic resources.
While I can understand the sentiment, be VERY careful using something like this. Both this and your proposed building have the same basic limitation: you have to HAVE the Oil to GET the Oil. Oil is by far the most terrain-limited resource, basically limited to the worst terrains (Desert, Tundra, offshore), so depending on the map it's easily possible that you'll have none at all.
At the same time, you're increasing the number of units that require the Oil, so you're widening the window where a shortage would cripple you. If Modern Armor requires both Oil and Aluminum, then a player with no Oil who's reached Tanks can't just play defensively for a few techs until his Tanks get replaced.
Generally I think this is still a good thing, which is why I made a similar change in my mod, but it's something to watch out for. This is why I mentioned AssignStartingPlots... you can increase the number of Oil deposits slightly, to make it less likely that any one civ goes without, while lowering the number of units per deposit to keep the total balanced.
And be very careful with the "shortage" concept. Shortages are far more damaging to the AI than to a human player; the Human will unlock Oil, look around and see that he has none, and immediately look to see where there's some available Oil. Maybe an unclaimed island, maybe a city-state that needs bribing. So even if the geographic distribution didn't favor him, a human player won't be entirely without Oil. An AI, on the other hand, has no similar logic, so if he's got no local Oil and he hasn't made friends with a city-state that does, he's out of luck.
It's made worse by the fact that all resources are purely probabilistic in the vanilla game. For instance, here's the logic the game uses, as it applies to Oil:
1> Go through every land hex in the game and see if it should get a Large deposit.
If it's a Marsh, there's a 1 in 9 chance it has a strategic resource.
If it's Tundra, there's a 1 in 16.
Snow: 1 in 17
Hills: 1 in 22
Jungle: 1 in 33
Forest: 1 in 39
Grassland or Plains (no Features): 1 in 33.
2> If the random draw above succeeded, do a new randomization depending on the terrain type.
If it's a Marsh, there's a 35% chance of a Uranium and a 65% chance of an Oil. (These are Large deposits: 7 units for Oil, 4 for Uranium, and so on.)
Oil also has a 40% chance on Tundra, 60% chance on Snow, and 65% chance on Desert.
3> Add extra strategics to the locations of City States.
4> Add 23 Small deposits of resources; for Oil, Small means 3 units per deposit. It'll pick a random unused hex on the map, and depending on terrain type will look up a slightly different table. The odds on this are a bit simpler; a Marsh is a 2 in 4 chance (50%), non-hills Jungles are 1 in 4, and so on. With 23 total deposits across 6 resources and depending on terrain types, it's easily possible that no Oils will be added this way. (Aluminum is especially rare to see in Small deposits; you almost always only see the big 8-unit deposits.)
5> Place Oil in the Sea. The number of total units (not deposits) placed in the ocean will be half what's placed on land, barring rounding errors. These will be 4-unit deposits unless you're playing on Abundant.
6> If there's NO Oil on the map at all after the above logic, add one Large deposit.
The bottom line is that there's no guarantee there'll be nearly enough Oil anywhere in the world, and the AI's inability to perceive a need for a resource could cripple them if you start increasing the number of units that require it.
Iron's fairly safe, because it's so common, so feel free to add it to the Battleship, Tank, etc., but watch out for doing the same for Oil or Uranium.