Ambreville
Deity
Is there any way to have a unit's move = 0 when no OIL is available?? Boy, that'd be neat!
I had also thought of perhaps requiring fuel for vehicles to move. But I was thinking more of an item that provided fuel for a while. That would represent supply better. You could do the same thing with ammo.
For example, a refinery produces 4 cans of fuel per turn. Each can provides movement for a vehicle for 5 turns and it can carry 4 cans as cargo.
I realize that Civ IV is supposed to be abstract though, so that seemed excessively complicated.
Plus in the real world you would have some gas left in the vehicle or convoy. Its not like if the oil was cut off tonight all of our cars wouldn't work tomorrow.
You would have to create additional supply units to make this work. Truck carrying ammo, and tankers carrying fuel.
As for trained crews, thats what the promotions are for. I consider Combat 1-5 as experience. IE Combat 1 = Blooded, Combat 2 = Experienced, Combat 3 Veteran, etc.
Good luck, it is an intriguing idea.
This has been looked at before and Duke176 did come up with something that worked for Warlords.
It was done using SDK by assigning a oil counter to oil well improvements and then having a oil usage counter against units. Once the oil ran out, units with the counter could not move.
Duke176 (from what I know) has been busy with real life but he does drop past the forums....send him a PM and see if he still is working on a BTS version of this mod.
http://forums.civfanatics.com/showthread.php?t=194293
Additional thread that shows how he does it in SDK: http://forums.civfanatics.com/showthread.php?t=201247
As you said, it would only be useful for specific scenarios rather then open ended games. I specifically wanted to use it in my WW2 Eastern Front scenario, but alas, I am doing it in BTS and the DLL that comes with the mod no longer works.
It is relatively easy to do this in Python, the problem is that it will slow the game down. I'm 90% certain I can rig it so that if you have no oil supply (or, if using Quantified Resources, when your stockpile runs out) you can't move any mechanized unit, but I would need to find a function that doesn't get called so often that it will significantly slow down the game. Originally, I'd planned to use CanMoveInto or CannotMoveInto, but was told that's not the best idea.
Another issue: this won't affect planes. You'd have to take into account all the bombing missions and disable them if your oil runs out. I do not know if there is a Python function which handles that, but it would be needed before this could be done. (Unless you resort to SDK, but that's out of my area of expertise right now.)
def unitCannotMoveInto(self,argsList):
ePlayer = argsList[0]
iUnitId = argsList[1]
iPlotX = argsList[2]
iPlotY = argsList[3]
pPlayer = gc.getPlayer(ePlayer)
pUnit = pPlayer.getUnit(iUnitId)
if (gc.getUnitInfo(pUnit.getUnitType()).isMechUnit()):
if (pPlayer.getNumAvailableBonuses(gc.getInfoTypeForString("BONUS_OIL")) < 1):
return True
return False