Advertisement
Civilization Fanatics' Center  

Welcome to Civilization Fanatics' Center.

You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support.

Go Back   Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Civ4 - Project & Mod Development > Civ4 - Unofficial Patches

Notices

Reply
 
Thread Tools
Old Oct 15, 2008, 09:06 PM   #1
Dresden
Emperor
 
Dresden's Avatar
 
Join Date: Jul 2008
Posts: 1,081
Obsolete Resources

Currently, obsolete resources don't completely obsolete. You can no longer harvest them in your own territory, but you can still trade for them from more primitive civs and they still work when you do. I have no major problem with that as a design decision.

Unfortunately, there is a check in CvPlayerAI::AI_baseBonusVal that skips the entire value calculation if a resource is obsolete for you. So if you ask an AI what they want for one, they'll think it's worthless to you and offer it free of charge. That, to me, is broken. If I was paying X gold per turn for a resource and then find that I cannot possibly harvest it myself, why should I be able to get it for free? In fact, a good case can be made that it should increase in value to simulate the markup in price you'd see trying to purchase something "on the black market."

So, what to do about obsolete resource trade value?
1) Leave it be, allowing us to exploit AI stupidity and sometimes get free resources.
2) Use the same value as it had prior to obsoleting.
3) Increase it's value after obsoleting. (How much? 50% more?)

I wonder if we could even make it a global define (which defaults to the current 0 value if missing)....
Dresden is offline   Reply With Quote
Old Oct 16, 2008, 03:10 PM   #2
bergee
Chieftain
 
Join Date: Apr 2008
Posts: 5
Quote:
Originally Posted by Dresden View Post
Currently, obsolete resources don't completely obsolete. You can no longer harvest them in your own territory, but you can still trade for them from more primitive civs and they still work when you do. I have no major problem with that as a design decision.

Unfortunately, there is a check in CvPlayerAI::AI_baseBonusVal that skips the entire value calculation if a resource is obsolete for you. So if you ask an AI what they want for one, they'll think it's worthless to you and offer it free of charge. That, to me, is broken. If I was paying X gold per turn for a resource and then find that I cannot possibly harvest it myself, why should I be able to get it for free? In fact, a good case can be made that it should increase in value to simulate the markup in price you'd see trying to purchase something "on the black market."

So, what to do about obsolete resource trade value?
1) Leave it be, allowing us to exploit AI stupidity and sometimes get free resources.
2) Use the same value as it had prior to obsoleting.
3) Increase it's value after obsoleting. (How much? 50% more?)

I wonder if we could even make it a global define (which defaults to the current 0 value if missing)....
I agree with you that the way it is now seems broken. I'm not sure that I really like the original game mechanic though. That is, if it's obsolete it should actually be obsolete and not have any value. That said, changing that might be a bit beyond the scope of what you're looking to do, so if nothing else, I'd vote for option two, because at least that reflects the fact that the resource still has value to me despite it being obsolete.

And just out of curiosity will the AI trade the same resource to another AI for free if that resource is obsolete to the second AI? Because how that is handled (if it's done differently) might offer some guidance here. I've just never looked at the code, so I don't know if this is going to be any different for a human vs an AI.
bergee is offline   Reply With Quote
Old Oct 16, 2008, 05:36 PM   #3
Dresden
Emperor
 
Dresden's Avatar
 
Join Date: Jul 2008
Posts: 1,081
Quote:
Originally Posted by bergee View Post
I agree with you that the way it is now seems broken. I'm not sure that I really like the original game mechanic though. That is, if it's obsolete it should actually be obsolete and not have any value. That said, changing that might be a bit beyond the scope of what you're looking to do, so if nothing else, I'd vote for option two, because at least that reflects the fact that the resource still has value to me despite it being obsolete.
Indeed changing the obsolescence mechanics so that obsolete resources become truly unusable is beyond the scope of the Unofficial Patch. It crosses too far into the "mod" domain AFAIC.

As for changing the value, the beauty of basing it off of an optional Global Define is that the user can choose which of the 3 options s/he wants. The real question then is whether to supply a new GlobalDefines.xml to make the default behavior be different than the current zero value.

Quote:
Originally Posted by continued...
And just out of curiosity will the AI trade the same resource to another AI for free if that resource is obsolete to the second AI? Because how that is handled (if it's done differently) might offer some guidance here. I've just never looked at the code, so I don't know if this is going to be any different for a human vs an AI.
The value function behaves the same in all cases but I'm not sure an AI would ever ask for (or offer) a resource that it believes has no value. The only time I've ever traded for one while playing, I initiated the trade and used the "what do you want for this?" option to force the offer. Once an obsolete resource is given a value, the AI should be willing to trade for it in AI-AI deals; but it's certainly something to look for in testing.
Dresden is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Civ4 - Project & Mod Development > Civ4 - Unofficial Patches > Obsolete Resources

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
Free obsolete resources Cookie Crumbs Civ4 - Bug Reports 4 Aug 25, 2008 07:18 PM
obsolete resources? HoMM3 fanatic Civ3 - Creation & Customization 10 Jun 18, 2006 02:40 PM
Trading Obsolete Resources, Bug/Exploit? vagrar Civ4 - General Discussions 5 Nov 18, 2005 12:55 AM
Obsolete Resources. Kubz Civ3 - General Discussions 4 Jan 14, 2004 04:22 PM
obsolete strategic resources jimmi Civ3 - General Discussions 6 Jan 21, 2002 02:28 PM


Advertisement

All times are GMT -6. The time now is 07:46 PM.


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