1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Obsolete Resources

Discussion in 'Civ4 - Unofficial Patches' started by Dresden, Oct 15, 2008.

  1. Dresden

    Dresden Emperor

    Joined:
    Jul 10, 2008
    Messages:
    1,081
    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)....
     
  2. bergee

    bergee Chieftain

    Joined:
    Apr 27, 2008
    Messages:
    5
    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.
     
  3. Dresden

    Dresden Emperor

    Joined:
    Jul 10, 2008
    Messages:
    1,081
    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.

    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.
     

Share This Page