Advertisement
Civilization Fanatics' Center  

Go Back   Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Civ4 - Mod Components

Reply
 
Thread Tools
Old Sep 07, 2010, 11:07 PM   #1
TheLopez
Deity
 
TheLopez's Avatar
 
Join Date: Jan 2006
Location: Oregon
Posts: 2,525
[MODCOMP] Decaying Resource Mod

Decaying Resources Mod v0.2BtS
By: TheLopez

Last Update: 09/08/10

Version: v0.2BtS
Patch Compatibility: Beyond the Sword v3.19
MP Compatible: ?
Download Mod v0.2BtS

Description:
This mod adds three new tags allowing the specification of how many units (in
turns) of a particular bonus are available, how fast bonuses are consumed and
how fast bonuses are replenished. I have added the new tags to all of the
standard bonuses included in the game. The new tags are not required for
bonuses but if you want to add the decay feature you will need to add them to
any new bonuses.

So for example in the pig bonus definition the tags are:
Code:
      <fDecayRate>1</fDecayRate>
      <fBonusLifeAmount>100</fBonusLifeAmount>
      <fReplenishAmount>0.5</fReplenishAmount>
Meaning that one pig resource is consumed per turn, there are 100 turns of pig
available and the pig resource is replenished at .5 each turn when the plot
isn't worked by the city or if the plot doesn't contain a pasture but is
worked by the city.Buildings also add to the consumption of resources.

As a balance point the random discovery of resources is bumped up a little bit
depending on the number of resources that have been exhausted.

Installation Instructions:

1) Unzip this into the "bts_install_folder\Mods\" folder.
2) Open the CivilizationIV.ini configuration file
3) Change the Mod line to read: Mod = Mods\Decaying Resources Mod
4) Load the game.
5) Then play as normal.

-----Notes to Modmakers-----

If you want to use this mod component in your mod I have tried to make things
as easy as possible for you. In the XML files I have added
<!-- Decaying Resources Mod Start --> and
<!-- Decaying Resources Mod End --> in all of the places where changes
were made. In the SDK files I have added
// < Decaying Resources Mod Start > and
// < Decaying Resources Mod End > in all of the places where changes
were made.

Please look at the current values set in the CIV4BonusInfos.xml file to make
sure they align with what you are wishing.

-----Version Information-----

-----v0.2BtS------

- Fixed a bug where a resource was used before it was even available. Thanks
for reporting the issue TheLadiesOgre

- Fixed a bug where resource consumption rate was being shown on screen even
though that resource was inexhustable.

Spoiler:

-----v0.1BtS------

- Setup the Decaying Resources Mod infrastructure

- Added the new <fDecayRate> tag that allows the specification of how fast a
bonus should decay

- Added the new <fBonusLifeAmount> tag that allows the specification of how
many turns a resource is available.

- Added the new <fReplenishAmount> tag that allows the specification of how
fast a bonus should be replenished.


-----===Credits & Thanks===-----

- Exavier - Composite Mod - readme.txt format

- Dom Pedro II - For the idea for this mod
__________________
Currently working on: Civ4 City Resource Stockpiling thread here
On Deck: Unit Crews

"With time and money anything is possible."

Mod Component Library Threads: Civ 4 | Civ 5

1st Modder in training: Then | Now || 2nd Modder in training: Now

Last edited by TheLopez; Sep 08, 2010 at 07:53 AM.
TheLopez is offline   Reply With Quote
Old Sep 07, 2010, 11:12 PM   #2
TheLadiesOgre
Aspiring Codesmith
 
TheLadiesOgre's Avatar
 
Join Date: Jan 2009
Posts: 505
Downloaded, going to try it out immediately...
__________________
PerfectWorld2.03_WithMarshes
TLOTags: New Promotions all editable from the XML

**Life is Good, updates forthcoming... please be patient though**
TheLadiesOgre is offline   Reply With Quote
Old Sep 07, 2010, 11:22 PM   #3
TheLopez
Deity
 
TheLopez's Avatar
 
Join Date: Jan 2006
Location: Oregon
Posts: 2,525
Quote:
Originally Posted by TheLadiesOgre View Post
Downloaded, going to try it out immediately...
Please check out the Civ4BonusInfos.XML file to see what the "Expiration" rates are

Most farm food based bonuses don't decay for obvious reasons.
__________________
Currently working on: Civ4 City Resource Stockpiling thread here
On Deck: Unit Crews

"With time and money anything is possible."

Mod Component Library Threads: Civ 4 | Civ 5

1st Modder in training: Then | Now || 2nd Modder in training: Now
TheLopez is offline   Reply With Quote
Old Sep 08, 2010, 12:07 AM   #4
TheLadiesOgre
Aspiring Codesmith
 
TheLadiesOgre's Avatar
 
Join Date: Jan 2009
Posts: 505
On ~turn 161, I got a notification saying "Aluminum will be exhausted in 30.00 turns", when I was still in the Classical Age, there was a mine on the tile where the Aluminum was alleged to be. Attached below you will find a Save Game file.

EDIT: while I didn't look at them all, I did notice that several of the Resources are fairly abundant and some are kinda in short supply, I really like this, I think it has tons of potential in combination with other Resource-centric ModComps
Attached Files
File Type: civbeyondswordsave TLO BC-1890.CivBeyondSwordSave (218.3 KB, 11 views)
__________________
PerfectWorld2.03_WithMarshes
TLOTags: New Promotions all editable from the XML

**Life is Good, updates forthcoming... please be patient though**

Last edited by TheLadiesOgre; Sep 08, 2010 at 12:11 AM.
TheLadiesOgre is offline   Reply With Quote
Old Sep 08, 2010, 01:59 AM   #5
keldath
LivE LonG AnD PrOsPeR
 
keldath's Avatar
 
Join Date: Dec 2005
Location: israel
Posts: 5,664
at last! its here!

one of the most anticipated mo comp!!!

thank you lopez! your awesome!
__________________
keldath is offline   Reply With Quote
Old Sep 08, 2010, 05:24 AM   #6
TheLopez
Deity
 
TheLopez's Avatar
 
Join Date: Jan 2006
Location: Oregon
Posts: 2,525
Quote:
Originally Posted by TheLadiesOgre View Post
On ~turn 161, I got a notification saying "Aluminum will be exhausted in 30.00 turns", when I was still in the Classical Age, there was a mine on the tile where the Aluminum was alleged to be. Attached below you will find a Save Game file.

EDIT: while I didn't look at them all, I did notice that several of the Resources are fairly abundant and some are kinda in short supply, I really like this, I think it has tons of potential in combination with other Resource-centric ModComps
Huh, odd. Let me go get a cup of coffee and I'll take a look at it. (I just got to work)

EDIT: Ah, I think I see the problem... I'll try to get another version out in a few hours.
__________________
Currently working on: Civ4 City Resource Stockpiling thread here
On Deck: Unit Crews

"With time and money anything is possible."

Mod Component Library Threads: Civ 4 | Civ 5

1st Modder in training: Then | Now || 2nd Modder in training: Now

Last edited by TheLopez; Sep 08, 2010 at 06:51 AM.
TheLopez is offline   Reply With Quote
Old Sep 08, 2010, 07:55 AM   #7
TheLopez
Deity
 
TheLopez's Avatar
 
Join Date: Jan 2006
Location: Oregon
Posts: 2,525
Alright, TLO, I have release v0.2 that fixes that problem you were seeing. But after play testing with your save file I realized that the warning messages happen every turn after less than 11% of the resource is left... I don't know if that is good yet or not. It might be annoying to have a message for a bunch of resources that are about to be exhausted.
__________________
Currently working on: Civ4 City Resource Stockpiling thread here
On Deck: Unit Crews

"With time and money anything is possible."

Mod Component Library Threads: Civ 4 | Civ 5

1st Modder in training: Then | Now || 2nd Modder in training: Now
TheLopez is offline   Reply With Quote
Old Sep 08, 2010, 08:22 AM   #8
keldath
LivE LonG AnD PrOsPeR
 
keldath's Avatar
 
Join Date: Dec 2005
Location: israel
Posts: 5,664
thanks for the new release,

i think a message on resource disappearing is enough.. nobody likes annoying messages...

thanks!
__________________
keldath is offline   Reply With Quote
Old Sep 08, 2010, 08:45 AM   #9
TheLopez
Deity
 
TheLopez's Avatar
 
Join Date: Jan 2006
Location: Oregon
Posts: 2,525
Quote:
Originally Posted by keldath View Post
thanks for the new release,

i think a message on resource disappearing is enough.. nobody likes annoying messages...

thanks!
True... I might add some configuration options plus reference python code to set the different SDK options in the next version if there is enough interest in this mod.
__________________
Currently working on: Civ4 City Resource Stockpiling thread here
On Deck: Unit Crews

"With time and money anything is possible."

Mod Component Library Threads: Civ 4 | Civ 5

1st Modder in training: Then | Now || 2nd Modder in training: Now
TheLopez is offline   Reply With Quote
Old Sep 08, 2010, 08:58 AM   #10
keldath
LivE LonG AnD PrOsPeR
 
keldath's Avatar
 
Join Date: Dec 2005
Location: israel
Posts: 5,664
ok thanks.

but if theres some way to remove that message at all it could be nice, maybe theres some section i can remove in sdk?
__________________
keldath is offline   Reply With Quote
Old Sep 08, 2010, 09:08 AM   #11
TheLopez
Deity
 
TheLopez's Avatar
 
Join Date: Jan 2006
Location: Oregon
Posts: 2,525
Quote:
Originally Posted by keldath View Post
ok thanks.

but if theres some way to remove that message at all it could be nice, maybe theres some section i can remove in sdk?
Sure, go into the CvPlot.cpp file and in the doTurn method remove lines 427-431... this includes the check for the near exhaustion of resources and the reporting of the near exhaustion.
__________________
Currently working on: Civ4 City Resource Stockpiling thread here
On Deck: Unit Crews

"With time and money anything is possible."

Mod Component Library Threads: Civ 4 | Civ 5

1st Modder in training: Then | Now || 2nd Modder in training: Now
TheLopez is offline   Reply With Quote
Old Sep 08, 2010, 09:48 AM   #12
keldath
LivE LonG AnD PrOsPeR
 
keldath's Avatar
 
Join Date: Dec 2005
Location: israel
Posts: 5,664
sweet!

thanks buddy.
__________________
keldath is offline   Reply With Quote
Old Sep 08, 2010, 11:30 AM   #13
TheLadiesOgre
Aspiring Codesmith
 
TheLadiesOgre's Avatar
 
Join Date: Jan 2009
Posts: 505
I like it, update works great though I have to agree that the message about resource exhaustion is a little annoying. I think that there should be a single notification and that it should be more cryptic and less concrete (more of a "you know, past couple of years the mine's been producing less copper, you don't think-- Hey, where'd the copper go?"). I think that would be better than the countdown.
__________________
PerfectWorld2.03_WithMarshes
TLOTags: New Promotions all editable from the XML

**Life is Good, updates forthcoming... please be patient though**
TheLadiesOgre is offline   Reply With Quote
Old Sep 08, 2010, 12:04 PM   #14
TheLopez
Deity
 
TheLopez's Avatar
 
Join Date: Jan 2006
Location: Oregon
Posts: 2,525
Quote:
Originally Posted by TheLadiesOgre View Post
I like it, update works great though I have to agree that the message about resource exhaustion is a little annoying. I think that there should be a single notification and that it should be more cryptic and less concrete (more of a "you know, past couple of years the mine's been producing less copper, you don't think-- Hey, where'd the copper go?"). I think that would be better than the countdown.
True... I'll mull over a solution while looking into another mod comp... in the mean time you are more than welcome to peer into the source and make the changes yourself... it is pretty straight forward.
__________________
Currently working on: Civ4 City Resource Stockpiling thread here
On Deck: Unit Crews

"With time and money anything is possible."

Mod Component Library Threads: Civ 4 | Civ 5

1st Modder in training: Then | Now || 2nd Modder in training: Now
TheLopez is offline   Reply With Quote
Old Sep 08, 2010, 05:08 PM   #15
os79
Deity
 
os79's Avatar
 
Join Date: Mar 2009
Location: Hanover Park, IL
Posts: 2,957
Afforess have this modcomp in his A New Dawn modpack before you made this.

#1 How different?

#2 If similar, should you be crediting Afforess?
__________________
"The best [mod/modcomp] releases are things you did for yourself, as then you are less upset if it appears that nobody else is using it at all. " Xienwolf (responding to a potential modder in SDK/Python forum)
You want to play superb Civ4 game? Try Rise of Mankind's expansion A New Dawn by Wizard Afforess.
os79 is offline   Reply With Quote
Old Sep 08, 2010, 05:37 PM   #16
TheLopez
Deity
 
TheLopez's Avatar
 
Join Date: Jan 2006
Location: Oregon
Posts: 2,525
Quote:
Originally Posted by os79 View Post
Afforess have this modcomp in his A New Dawn modpack before you made this.

#1 How different?

#2 If similar, should you be crediting Afforess?
Before I disappeared many months ago I started working on this mod for warlords but never released it. Afforess suggested I look at his mod and rip out and release the system if I wanted to but I didn't so I suspect they are quite different.

Should I credit him for this mod? No. Should I credit him for advancing Civ4 modding yes absolutely yes

EDIT: Oh and if you go to my component library thread and go down to post three you'll see that the edit date is in 2006 and the to do lists the dynamic resources mod.
__________________
Currently working on: Civ4 City Resource Stockpiling thread here
On Deck: Unit Crews

"With time and money anything is possible."

Mod Component Library Threads: Civ 4 | Civ 5

1st Modder in training: Then | Now || 2nd Modder in training: Now

Last edited by TheLopez; Sep 08, 2010 at 08:15 PM.
TheLopez is offline   Reply With Quote
Old Sep 11, 2010, 01:47 PM   #17
Afforess
The White Wizard
 
Afforess's Avatar
 
Join Date: Jul 2007
Location: North Carolina, USA
Posts: 11,301
Gender: Male
Quote:
Originally Posted by os79 View Post
#2 If similar, should you be crediting Afforess?
I wasn't the first person to make a decaying resource mod - there was a python based one too before mine. I believe it was made by Jackel...
__________________
"A Witty Saying Proves Nothing"
-Voltaire
Afforess is offline   Reply With Quote
Old Sep 11, 2010, 01:51 PM   #18
TheLopez
Deity
 
TheLopez's Avatar
 
Join Date: Jan 2006
Location: Oregon
Posts: 2,525
Quote:
Originally Posted by Afforess View Post
I wasn't the first person to make a decaying resource mod - there was a python based one too before mine. I believe it was made by Jackel...
Huh, Jeckel made one? Wouldn't surprise me.
__________________
Currently working on: Civ4 City Resource Stockpiling thread here
On Deck: Unit Crews

"With time and money anything is possible."

Mod Component Library Threads: Civ 4 | Civ 5

1st Modder in training: Then | Now || 2nd Modder in training: Now
TheLopez is offline   Reply With Quote
Old Sep 12, 2010, 01:18 AM   #19
TheLadiesOgre
Aspiring Codesmith
 
TheLadiesOgre's Avatar
 
Join Date: Jan 2009
Posts: 505
I'm looking at the sources for this and I got to thinking, do you think it would be possible to add a city stockpile of harvested resources?
__________________
PerfectWorld2.03_WithMarshes
TLOTags: New Promotions all editable from the XML

**Life is Good, updates forthcoming... please be patient though**
TheLadiesOgre is offline   Reply With Quote
Old Sep 12, 2010, 03:22 AM   #20
keldath
LivE LonG AnD PrOsPeR
 
keldath's Avatar
 
Join Date: Dec 2005
Location: israel
Posts: 5,664
Quote:
I'm looking at the sources for this and I got to thinking, do you think it would be possible to add a city stockpile of harvested resources?
thats something ive been looking forward for 3 years,
i have brought it up to lopez, he said maybe he will get into, but this dude is very busy, as we can see..
__________________
keldath is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Civ4 - Mod Components > [MODCOMP] Decaying Resource Mod

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[MODCOMP] Building Resource Converter Mod v0.2 TheLopez Civ4 - Mod Components 65 Jul 02, 2011 02:33 PM
Need help testing the Decaying Resources Mod TheLopez Civ4 - Creation & Customization 6 Aug 31, 2010 05:30 PM
Decaying resources mod comp TheLopez Civ4 - Creation & Customization 9 Aug 30, 2010 04:40 PM
[MODCOMP] Resource Tech Research Modifier Mod TheLopez Civ4 - Mod Components 16 Aug 25, 2010 01:43 PM
[BtS MODCOMP] Resource Tech Research Modifier Mod Grave Civ4 - Mod Components 3 Apr 16, 2008 04:01 PM


Advertisement

All times are GMT -6. The time now is 11:53 PM.


Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
This site is copyright Civilization Fanatics' Center.
Support CFC: Amazon.com | Amazon UK | Amazon DE | Amazon CA | Amazon FR