[SDK MODCOMP] Unit Fuel Mod (includes Global Fuel)

f
If you remove the need to return to cities to refuel, can u keep that version up for those of us who would like it. Also, is the fuel based on a resource like oil?

Of course, and yeah, you set the resource in the Global Define file. Atm it's BONUS_OIL, and the resource that gives the unlimited fuel promotion is BONUS_URANIUM. (For the sea units)
 
f

Of course, and yeah, you set the resource in the Global Define file. Atm it's BONUS_OIL, and the resource that gives the unlimited fuel promotion is BONUS_URANIUM. (For the sea units)

So theoretically I could change it to like BONUS_COW or IRON?
 
I have not tried this (nor will I until next weekend) but I was thinking about using it to try something out with the colonization era ships.
If I wanted to create a new resource for the fuel (i.e supplies) and make it only available through building a building (is this possible), could I increase/decrease the amount of this resource made by the building per turn by how much cow/pig/fish the city has access to?
 
Sounds reasonable.

So is that a yes that it is possible through xml?
Probably shouldve specified through xml in the question.
 
It would require some python at least for the X amount of supplies per cow (give the city X amount of buildings)
 
Instead of using python to edit, could I just have multiple resources give fuel per turn? and would I do that by:
<DefineTextVal>
BONUS_PIG
BONUS_COW
</DefineTextVal>


How does one know how much fuel they would get from one oil source?

(edit) nevermind I figured it out the amount
 
I don't think my code supports multiple bonuses to give fuel. I might add that support in the future.
 
I don't think my code supports multiple bonuses to give fuel. I might add that support in the future.

If you could do that, that would be great.:goodjob:
 
What if you kept the refueling at cities but also created a feature/unit/promotion (such as an apc) that could refuel a vehicle while it is in the field, is that possible? Maybe a vehicle could give part of its supplies to a vehicle of your choice in a stack.
 
What if you kept the refueling at cities but also created a feature/unit/promotion (such as an apc) that could refuel a vehicle while it is in the field, is that possible? Maybe a vehicle could give part of its supplies to a vehicle of your choice in a stack.

That's what I do in my Advance Wars mod, but I use the Fall from Heaven spell system to achieve that.
 
That's what I do in my Advance Wars mod, but I use the Fall from Heaven spell system to achieve that.

So then is that function going to be translated to this mod eventually?
And now I see where all these ideas came from being an advance wars fan myself. :lol::D

(if you are wondering about all the ?'s, I am thinking about making a mod w/ this included, that is if I can stay motivated long enough...;))
 
I am not sure. If you are interested the FfH source is available in the Modding Fall from Heaven thread in the Fall from Heaven 2 forum. Although that requires c++ knowledge, and to make spells, some Python knowledge (but I swear python is quite simple once you get started).
 
Hi. I tried compiling your mod, and it does not work.

CyEnumsInterface.cpp(642) : error C2065: 'FUEL_CHAR' : indeclared identifier
CyEnumsInterface.cpp(642) : error C2228: left of '.value' must have class/struct/union type

There is also some follow up from CvGameTextMGR.cpp : FUEL_CHAR and FOREVER_CHAR are MIA.
My guess is, you missed a changed file in the upload. Perhaps CvEnums.h ? Below a list of the files present in your Source folder...

Spoiler :
29/03/2008 03:27 343,562 CvCity.cpp
29/03/2008 02:14 58,407 CvCity.h
29/03/2008 07:41 459,827 CvGameTextMgr.cpp
29/03/2008 02:02 16,944 CvGameTextMgr.h
29/03/2008 02:59 649,883 CvInfos.cpp
29/03/2008 19:23 225,566 CvInfos.h
30/03/2008 03:14 517,162 CvPlayer.cpp
29/03/2008 01:31 69,662 CvPlayer.h
30/03/2008 03:16 312,815 CvUnit.cpp
29/03/2008 03:36 43,697 CvUnit.h
29/03/2008 08:24 102,154 CvXMLLoadUtilitySet.cpp
29/03/2008 02:18 54,863 CyCity.cpp
29/03/2008 02:19 20,149 CyCity.h
29/03/2008 02:19 43,050 CyCityInterface1.cpp
29/03/2008 00:47 88,230 CyEnumsInterface.cpp
29/03/2008 01:55 9,184 CyGameTextMgr.cpp
29/03/2008 01:56 3,391 CyGameTextMgr.h
29/03/2008 01:56 4,677 CyGameTextMgrInterface.cpp
29/03/2008 01:09 59,324 CyPlayer.cpp
29/03/2008 01:52 20,648 CyPlayer.h
29/03/2008 01:10 36,277 CyPlayerInterface1.cpp
29/03/2008 19:38 38,279 CyUnit.cpp
29/03/2008 03:15 13,235 CyUnit.h
29/03/2008 03:15 25,075 CyUnitInterface1.cpp
 
Oops, yeah that seems about right. Sorry about that.

Here's a temporary solution till I upload a new version.
 

Attachments

  • CvEnums.zip
    15.3 KB · Views: 219
Thanks. :D
 
Version 1.1 has now been uploaded.
Check first post for download.

Spoiler Changelog :

----------------
Version 1.1
----------------

Fixes:
- Fixed a bug where units who started with 0 fuel couldn't move.
- Added CvEnums.h in the Changed SDK Folder. Sorry for forgetting that last version.

Additions
- Added iFuelPerTurn to Civ4BonusInfos.xml
- Added the FUEL_RESTORED_IN_CITIES Define, which defines whether or not fuel should be restored to units in cities.

Removed
- The Defines that determined what Bonus gave Fuel and how much it gave.
This is now done through Civ4BonusInfos instead.
 
Top Bottom