[MOD PROJECT / DEV DIARY] - 1st of Genuary 2000 "The next Millenium"

Duke176

Warlord
Joined
Oct 19, 2006
Messages
241
Location
Turin - Italy
All right a short explanation.
The title show which is my target, the post will show my path.
I'm not an SDK, Python or XML programmer but I studying CIV4 and the way it works since 2 month and I starting getting some points throw the game.

So, I have a lot of ideas but not all, I'll try to relize them but I'm not sure I'll succed... well what else; I not looking for someone to work with me (I mean any help is welcome but, on the other hand, If I find someone is good in everything I need where is my enjoyment :confused: :D ) but I'm looking for ppls that leave here a message to help me techincally or with ideas (new and how to custom mines).

That's it.
But now let's go to the mod.

1st Genuary 2000 "The next Millenium"
In this mod I would like to realize in the best way possible the "nowaday" World as we know it. I want to get the things I think Firaxis left out from the game and try to implement them.

DEVELOPED
  1. Petrol/Oil: I've always asked myself why Firaxis forgot Oil from making it a real strategic energy resources that leads - even if we don't like it - the global economy and the diplomatic scenary every day.

    Techincally: I'm trying to make a counter (like gold one) that show how many barrels of oil you own and calculate and show you every turn.
    That's why I'm studying both GOLD functions and other similar functions to understand complitely the way. I'm finding some prb with "calculate the ammout of Wells or Platforms do you own" but I'm trying different solutions.

x - DONE - - DEVELOPED
Modern Units (machanized) movement cost - oil/petrol barrels cost.;)

- NEXT STEP -
Make it possible to commerce oil/petrol for gold.

- NEXT STEP -
Make an idex of Oil barrel costs and make it change each turn (ex. of function:
Get the total ammount of Oil from all players and increase the price of ex. 1gold if Total ammount of Oil divided between all players is lower than 500 barrels each Civ... obviously it need to be balanced.


- NEXT STEP - CONCEPT THINKING
Make a function that assign a Random number (not lower than x) and to assing it to each oil (giaciment?? dunno if it's correct in english) in order to rappresent the consuption of oil ammounts throw the world till the end of total disponibility - this could be related to the cost index. - After this it could be balanced to create a tech like (portable nuclear plant / miniaturization II / Hydrogen civil use/..... to overcome the need of Oil once it will be finished or if the planet will get too much HOT for pollution (this means to increase the pollution effectivness over global warming effect).

So tell me what you prefer and, I hope, enjoy your stay!


1st mod released for testing look further
 
well its a good idea in THEORY. it just seems like it would get anoying after a while with the game saying:
NOOOO you cant move that tank!!! your out of OIL YOU LOSER!!
but that can be fixed with reasonable oil-related movement costs and income
 
yes my idea was to set OilTurnProduction for Wells at 100 barrels each turn and to set movement cost for Tank ex. 1 each plot, for Bombers ex. 2 each run and 5 to rebase.

The idea is that if you own only 1 Well or Platform you couldnt' run and enormous army exactly how is it in the reality.
Another develpment would be... (look into the 1st post :D )
 
It would be cool to have more complex economy with supply/demand
- for all strategical resources and energy - the counter how much we have it (harvested, mined, imported) and how much we use it (use by industry, military, cities' people and exported to other countries) and expanded role of trading resources and Global Market with prices depending on supply and demand

the oil would be good test for the beginning
 
yeah it kind of looks like your drifting away. yes, uranium is a good idea too, and then is carbon, and all fuel resources until eventually all resources and by then the game stops making sence. keep it simply is my idea
 
well it could be right but if you cansider that most of the diplomacy, wars, decisions and so on are based on economy a little implamentation wouldn't be good?

One more thing, the idea of Oil came from the relations between middle east and us/eu.
Uranium came from my previous idea of creating Terrorist Units able to build atomic (so uranium needed) bombs.
 
i don't think that supply / demand economical system is much complicated that system from civ4. For sure it's more realistic and gives interesting option of global market to the game :) even if it'll be only used for oil
 
here we go my 1st mod here to be tested.
It's called "Mod to test ingame" becuase I need to know various things.

WAR FOR OIL mod - v. 0.1

  1. all "mechanized" units have been added with the new xml tag "oilMoveCost" that give an absolute value of how much OIL that unit needs to make 1 plot of movement
  2. all Air units have been preserved from this waiting to decide how to procede on application of this new characteristic with iAirRange and than Real movement done
  3. I have assigned a generic 200 value of Oil extracted each turn from Wells / Platforms
  4. I haven't modified AI yet so pls report me any strange behaviur of AI during normal play
  5. I still have to make the OIL Icon invisible till the correct tech is discovered
  6. I make a big semplification of DOOIL function inside CvPlayer.cpp file (I took it from DOGOLD and simplified it a lot) so report me any prb related to this
  7. There is also a unit called TerroristCell exctly the same of Spyes it's part of big big project so simply don't use them
  8. Still considering to create something getNumAvailableBonus for Improvements in order to be able to make a count of all Wells and Platforms and not a generic count of all OIL BONUSES owned

Other game modifications:
  • Oil Extracted each turn
    • Wells - 200 each turn
    • Platforms - 200 each turn
  • Unit Move cost as I set it
    • Mech Infantry - 1 each plot
    • Tanks - 2 each plot
    • Transport - 1 each plot
    • Destroyer - 3 each plot
    • Battleship - 5 each plot
    • Submarines - 3 each plot
    • Carriers - 10 each plot
    • Fighter / Jets / Bombers / Stealth Bombers - not yet implemented
To balance it modify ImprovementInfos.xml under xml/terrain and look for work "oil", than modify simply the value it will be faster than modifing unitinfos.xml.


More than this what can I say... test it if you like the idea and help me with debugging.

for future further moddifications pls look at 1st post I update.
Thx for you attention and here you have the MOD... (if you are interested in modded files just make a call and I'll attach them).

http://forums.civfanatics.com/uploads/102621/MOD_TO_TEST_INGAME.rar

...and pls test it for balance I'm opened to every suggestion

And BIG BIG THANKS to Kael and Impaler and all the others who answered my post for help or just to comment. You and we ARE A GREAT COMMUNITY :D


BUGS:
  1. calculateOilProdPerTurn() - the resoult doesn't rappresent the exact meaning becuase doesn't make difference between Wells and Platforms, I'll make a function to calculate the number of those 2
  2. there's not enough space from both Gold and Oil on thre same row, I'll try to make them one under the other
 

Attachments

  • Showoil.jpg
    Showoil.jpg
    40 KB · Views: 291
BUG2:
I'm finding some prb with making a numeric count of all available improvements - becuase it doens't exist a function like getnumAvailableBonuses for improvements there's only getNumImprovements in CvArea.cpp
 
DOH! :p
you are true in reality all the mod it's still under dev, so I'll probably change it a little more till the final relise.
 
okay I really like the idea . I do think that once you get it functionally working consider adding in the alternant resources <ie rember the diesal engine was orginally desigend by Mr diesal to run on olive oil which was and is in overabundance in italy> Modern Brazil has been driving on Corn squezin for the past 30 years <alchohol>
If it werent for the power of the oil lobby in the US we would have been running on alternative fuels 20 some years ago.
<thats a greed factor on the part of corporations>

Hmmn Alchohol refineries that accept grain and out put "oil" would be good
 
you tuched another idea I would develop.
I would assign a certain ammount of OIL not refined to all BONUS_OIL on the map in order to have real consumption of OIL while extracting and to add 3-4 different techs really really expensive and long to be researched in order to obatain indipendence from OIL.

For ex. Idrogen engine or Corn Fuel or similars.
So each civ you have to choose which one to develop when there will be shortage of OIL on the planet.
 
BUGS resolved now.

1) now Gold and OIL are one under the other so np with long strings and space for writing
2) now we have 3 counters: 1 for Wells, 1 for platforms and 1 for oil under cities.

To balance you can mod UnitInfos.xml moveOilCost x unit; ImprovementInfos.xml to mod extraction rate or mod globaldefines.xml where you see "OIL_EXTRACTED_FROM_CITIES" to mod rate of cities.

at the moment we have:
- wells 200 x turn
- platforms 200 x turn
- cities 100 x turn.

It's too much pls help with balancing.
 
Yup biocomponents in fuels (wich decrease the need for fuel in units or increase the amoount of oil - depends how you look at it) and biofuels and fuel cells (wich make it oil independent) could be one of the examples.

You can make wonder - Synthetic Fuel Plant - wich will add some fuel (like Hollywood gives movies this wonder could give some amount of oil) - Germans made fuel from coal during WW2. Now the similliar installations works in South Africa where's abundant of coal and it is very cheap to exploit. Similliar instalation is planned to be constructed in USA.

EDIT
And Brazil runs (in 40&#37;) on alcohol made from cane not corn. It had real bad impact on the quality of rivers (especially Orinoko) - sewage are real problem in producing biofuels on large scale - you can somehow make this impact if you want - unhealthiness after constructing instalatins
You can restrict for biocomponents / biofuels that they request Olives or Cane, Corn, Wheat, Rice? (is it profitable make fuel from rice - i didn't heared about it tough) (Potatoes, Soya and White Beet wich don't appear in game)
 
well its a good idea in THEORY. it just seems like it would get anoying after a while with the game saying:
NOOOO you cant move that tank!!! your out of OIL YOU LOSER!!
but that can be fixed with reasonable oil-related movement costs and income

Yes, it would indeed be annoying, but it happened to the Germans at the Battle of the Bulge.

This is quite a good idea and I am very interested to see how it will develop. The inclusion of Techs and Structures leading to alternative fuels as a means to ease the reliance on oil is another good idea and quite relevant to the real world.

I have a couple of suggestions myself:
1. Nuclear-Powered Naval units: Uranium combined with the Fission tech should enable the production of nuclear-powered naval vessels which do not carry an oilMoveCost. This would not mean your old oil-powered ships could now move for free. You would have to build the nuclear-powered ships and perhaps consider retiring your old oil-based ships.

2. Hydrogen Fuel Cell tech: Similarly, this new high-level tech could be added which would allow the production of oil-independent land units. This would be the final step before Future Tech.

3. Geologist and Exploration Ship units: These units would have a small random chance of finding a new source of oil, just as mines have a chance of discovering new resources. I don't know, however, if it is possible to give a unit this ability.

4. Depleting resources: In Civ 2 there was a small random chance of a worked resource being "used up" and disappearing from the map. Could this still be possible in Civ 4 via a scripted event? It would certainly be annoying (perhaps even game-unbalancing if it happened too often) but it would be realistic...the oil fields of Texas, for example, are becoming depleted. And if it worked well, it could add to the realism by forcing more vigorous competition for the remaining oil...the very essence of the "War For Oil".

[EDIT]
okay, two more...
5. Strategic Petroleum Reserve: This National Wonder would allow you to stockpile a large oil reserve, in case you lose your supply through resource depletion or a trade embargo. It would also be very helpful in the military build-up you would need to go out and "re-appropriate" someone else's oil.

6. Conservation: a new civic or a feature added to Environmentalism which would reduce your the Oil Movement Costs.
 
you know what? i think your oil plan could quite possibly be the route for a more detailed economy in the game. harvested resources mixed with modern supply and deman = one great game
 
Well, 1st of all sorry, but I'm passing an hard working period so I'm finding hard times, but I'll try to work on in my spear time.

About Dev.
Well I would have 2 ideas:
1st) assign to each OIL_Bonus a random number that rappresents the ammount of OIL barrels inside each bonus
2nd) make a count of all barrels on the world turn by turn ad starting from a base value for OIL Barrel modify it with a proportion like:

NumOfAllBarrels / (NumOfAllMilitaryUnits (that needs OIL to move) + NumOfBuildingsThatNeedsOilToWork ....

So we would have haw many Barrels are available for each Object that needs OIL
- if it's for ex. between 0 < x < 1; add + y to OIL BARREL price
- if it's for ex. between -1 < x < 0; add + y ......

and so on so we would have a dynamic changment of prices.
More than this who is gonna Develope alternative techs for indipendence from OIL (very much expensive) will have to think twice because the more Civs will dev NonOilDependentTechs and lower will be prices for OIL and ammount for other players (international exchanges will be lower for that bonus too).

This should add a lot of fashion to the game.
Tell me what do you think about this.
 
Dont know if you are still working on this mod...but I would like to say you are doing an amazing job.

I have just downloaded your test mod and will try and use it in my world war ii scenario.
 
Back
Top Bottom