• We are currently performing site maintenance, parts of civfanatics are currently offline, but will come back online in the coming days. For more updates please see here.

Resource Steel

Hulfgar

Emperor
Joined
Mar 31, 2008
Messages
1,798
Location
France
This mod will add the strategic resource Steel to the game.

2 units of steel are produced from 1 iron and 1 coal with a Steel Foundry.

Third building is a Heavy Weapons Factory that I used for testing.
It requires 1 steel.

Civilopedia in french and english

Icons for steel and buildings in Civilopedia provided
(In the top panel steel is marked with the iron icon)

To run this mod you need "Building resources ver6" from Whys Alives.
And you have to adapt it to your own need (2 steel output is probably not enough).
If you don't know how just ask I will do it for you.

Thanks to Kyoss for the tutorial on how to add resource, to Arbogli for the Steel Foundry and to Whys Alives!
 

Attachments

Hulfgar,

I don't know what to say except thank you so much :goodjob:

Your a Gentleman Sir of the highest caliber.

Many Regards

Riker13 :crazyeye:

Ps: Did they ever figure out how to put the resource on the top panel?

Update, Just tested it and is just what I was after, again many thanks.
 
Hey

railroad Tycoon ftw!
 
You're welcome Riker13 :)

Ps: Did they ever figure out how to put the resource on the top panel?

I suppose Whys Alives found how to do this because I didn't change anything in his mod and when I tried the steel foundry the resource steel appeared in top panel just after completion of the foundry.

By the way if you want to change the prereqs and output you need to edit the file

"NewBuildings.xml"

If you want to change the amount of coal or iron required look for these lines and change the value (here in red).

<Row>
<BuildingType>BUILDING_STEEL_FOUNDRY</BuildingType>
<ResourceType>RESOURCE_COAL</ResourceType>
<Cost>1</Cost>
</Row>
<Row>
<BuildingType>BUILDING_STEEL_FOUNDRY</BuildingType>
<ResourceType>RESOURCE_IRON</ResourceType>
<Cost>1</Cost>
</Row>

If you want to change the amount steel produced, look for these lines and change the value (here in red).

<Building_ResourceChange>
<Row>
<BuildingType>BUILDING_STEEL_FOUNDRY</BuildingType>
<ResourceType>RESOURCE_STEEL</ResourceType>
<ResourceChange>2 </ResourceChange>
</Row>
</Building_ResourceChange>

I plan to release a version 2 with 2 iron and 1 coal required for 3 or 5 in steel ouput.
3 would be more accurate but I am not sure if so little steel per foundry will not make it useless.

In the same file you can edit the cost of foundry and the prereq Tech (default is STEAM_POWER).

To conclude you can give more power to the foundry in adding a bonus to production (For myself I find that there is enough of such bonuses with other buildings).

Just tell me what you need and I will adapt it if you want.
 
Thanks Hulfgar your very kind.

I will change the output I think because what I am using it for is units that require Steel.

I didnt like the idea of some unit using Iron when in fact it is steel but as Steel is manufactured and not a natural resource hence the foundry.

I did have an error come up when it tried to show the Steel Icon it comes up as a round orange blob just the one in text form to say you have aquired a new resource.

Update. Its missing CivSymbolsColorLegends80.

Update. I added a CivSymbolsColorLegends80.dds to the art folder and also added an entry to the .modinfo file as well. All works fine now.

Thanks Again.

Riker13
 
Hulfgar,

How do I get rid of Whys Alchemist? I want your Steel Foundry and Bio but because you need his template it adds the Alchemist?

Regards

Riker13 :crazyeye:
 
just go in Whys's Mod folder.

you can delete both files CIV5Building and CIV5BuildingClasses if you didn't put anything in them.

If you use them for your own buildings write the Alchemist lines beetwen <!-- and --> or delete them.

It will look like this :

<!-- <Row>
<Type>BUILDINGCLASS_ALCHEMIST</Type>
<DefaultBuilding>BUILDING_ALCHEMIST</DefaultBuilding>
<Description>TXT_KEY_BUILDING_ALCHEMIST</Description>
</Row> -->

and

<!--<Row>
<Type>BUILDING_ALCHEMIST</Type>
<BuildingClass>BUILDINGCLASS_ALCHEMIST</BuildingClass>
<Cost>1</Cost>
<GoldMaintenance>1</GoldMaintenance>
<Help>TXT_KEY_BUILDING_ALCHEMIST_HELP</Help>
<Description>TXT_KEY_BUILDING_ALCHEMIST</Description>
<Civilopedia>TXT_KEY_BUILDING_ALCHEMIST_PEDIA</Civilopedia>
<Strategy>TXT_KEY_BUILDING_ALCHEMIST_STRATEGY</Strategy>
<ArtDefineTag>ART_DEF_BUILDING_FORGE</ArtDefineTag>
<MinAreaSize>-1</MinAreaSize>
<ConquestProb>0</ConquestProb>
<HurryCostModifier>-1</HurryCostModifier>
<IconAtlas>CIV_COLOR_ATLAS_LEGENDS</IconAtlas>
<PortraitIndex>3</PortraitIndex>
</Row>-->

<Building_ResourceChange>
<!--<Row>
<BuildingType>BUILDING_ALCHEMIST</BuildingType>
<ResourceType>RESOURCE_GOLD</ResourceType>
<ResourceChange>1</ResourceChange>
</Row>
<Row>
<BuildingType>BUILDING_ALCHEMIST</BuildingType>
<ResourceType>RESOURCE_IRON</ResourceType>
<ResourceChange>1</ResourceChange>
</Row>-->
</Building_ResourceChange>
 
Hi My Friend,

I did try that before I posted it worked but it also for some reason deleted your Steel Foundry and Heavy Weapons Factory as well?

Regards

Riker13 :crazyeye:
 
Hello Riker,

ok I assume that you use the 3 mods : Building Ressources--Template, Bio Refinery and Ressource Steel whithout modifications.

This is what i did to deactivate the Alchemist :

open CIV5BuildingClasses.xml from Building Ressources--Template and change it with this code :
<?xml version="1.0" encoding="utf-8"?>
<GameData>
<BuildingClasses>
<!-- Table data
<Row>
<Type>BUILDINGCLASS_ALCHEMIST</Type>
<DefaultBuilding>BUILDING_ALCHEMIST</DefaultBuilding>
<Description>TXT_KEY_BUILDING_ALCHEMIST</Description>
</Row>-->
</BuildingClasses>
</GameData>

open CIV5Buildings.xml from Building Ressources--Template and change it with this code :
<!-- Table data
<Buildings>
<Row>
<Type>BUILDING_ALCHEMIST</Type>
<BuildingClass>BUILDINGCLASS_ALCHEMIST</BuildingClass>
<Cost>1</Cost>
<GoldMaintenance>1</GoldMaintenance>
<Help>TXT_KEY_BUILDING_ALCHEMIST_HELP</Help>
<Description>TXT_KEY_BUILDING_ALCHEMIST</Description>
<Civilopedia>TXT_KEY_BUILDING_ALCHEMIST_PEDIA</Civilopedia>
<Strategy>TXT_KEY_BUILDING_ALCHEMIST_STRATEGY</Strategy>
<ArtDefineTag>ART_DEF_BUILDING_FORGE</ArtDefineTag>
<MinAreaSize>-1</MinAreaSize>
<ConquestProb>0</ConquestProb>
<HurryCostModifier>-1</HurryCostModifier>
<IconAtlas>CIV_COLOR_ATLAS_LEGENDS</IconAtlas>
<PortraitIndex>3</PortraitIndex>
</Row>
</Buildings>
<Building_ResourceChange>
<Row>
<BuildingType>BUILDING_ALCHEMIST</BuildingType>
<ResourceType>RESOURCE_GOLD</ResourceType>
<ResourceChange>1</ResourceChange>
</Row>
<Row>
<BuildingType>BUILDING_ALCHEMIST</BuildingType>
<ResourceType>RESOURCE_IRON</ResourceType>
<ResourceChange>1</ResourceChange>
</Row>
</Building_ResourceChange>-->

You can either copy and paste the lines from here or download the files and overwrite the originals.

This will deactivate the alchemist whithout deleting the files.

Once it is done you can test the result :
start a game, select America or a European Civ and a continental map (more chance to start near wheat), select futur as starting area (with this you should have all the prereq techs, or simply delete the prereq tech line for the biorefinery to test).

It worked for me, if it doesn't worked for you tell me if you changed something in the mods.

regards,

Hulfgar
 

Attachments

Resources are altered with the following line of code upon each iteration of Events.ActivePlayerTurnStart.
Code:
pPlayer:ChangeNumResourceTotal( resourceID, resourceChange ); --cumulative.
Resources defined as strategic are handled automatically by TopPanel when the logic is performed on ActivePlayerTurnStart. This is not entirely the case for luxuries, which impact empire happiness. TopPanel will display an inaccurate happiness calculation until either a unit is moved or a turn is taken. This is entirely cosmetic and simply requires a redraw of TopPanel, but... always easier said than done. I have been unable to find the proper fix. It most likely involves moving the building resources logic to another event that occurs before the automatic redraw of TopPanel. No one seems to know what that event is or if it is currently available to modders.

Anyway, not used to seeing myself talked about in conversations I'm not a part of. So I figured I'd add my two cents. Glad I could be of help to all of you. Keep up the great work! :)

.02
 
TopPanel will display an inaccurate happiness calculation until either a unit is moved or a turn is taken.

This is really a minor annoyance Whys, one that a man can live with.

Your mod is still one of the most usefull. It is so convenient to be able to make resources with buildings. Now we can get antimatter, perhaps somebody will make us a planetbuster like in Civ4 :)
 
Back
Top Bottom