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

Improved Python Event System (Quests for Europe Trade of specific Yields)

Discussion in 'Civ4Col - We The People' started by raystuttgart, Sep 20, 2020.

  1. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    5,723
    Gender:
    Male
    Location:
    Stuttgart, Germany
    Hi guys,

    I was a bit bored this morning. :)
    So I sat down and implemented one of my old technical concepts. :crazyeye:

    So what did I do:

    To simplify it, I added a new functionality - including blueprints and explanations - to the Python Event System.
    We are now able to easily create "Europe Trade Quests".
    (So this adds the possibility to check for Yields Traded in Europe.)

    These Quests are triggered once you sell the first Ship Load of a specific Yield in Europe.
    (In my example it is "Sugar" - but the System can easily be used to create further Quests for any other Yields.)

    Then a Quest for "Dominating the Market for that Yield" is started - meaning to be the first to sell a really large amount of that Yield. (Configurable in XML of the Event System.)
    So all European Nations will compete for that. If other Nations are faster to do that, you fail the Quest.

    Of course most of it (e.g. rewards) is configurable in XML but you will need to also add a few small Python functions (by simply copying and adjusting my examples).
    (See my Blueprints and Explanations in the CvRandomEventInterface.py)

    GamePlay effects:

    With these quests we could basically have a "real competition" / a "market race" for the goods in WTP.
    It is normally impossible to win all these Quests - you will certainly lose some against AI unless you configure it really unfair.

    So instead of most common strategies like "Scout Rush" and "Bell Rush" you will now also have to play "Market Rush" strategy if you want to win as many of them as possible.
    (The rewards can be quite nice - and of course only the winner gets them.)

    Summary:

    At the moment more or less just the system (incl. blueprints and explanations) exists.
    However I also included 1 "Europe Trade Quests" (for Sugar - fully implemented) as example.

    I basically did this for interested modders that might want to implement such Quests themselves but do not know much programming.
    With this I hope that lots of new Quests for Europe Trade can be implemented by community.

    It is really pretty easy to understand once you take a look at my example, blueprint and explanations.
    Otherwise just ask for advice in the WTP team chat and I will help. :thumbsup:

    I hope somebody will like to use this to create more "Europe Trade Quests". :dunno:
    Have fun modding. :thumbsup:

    -------------
    @WTP team:

    It is fully tested and working nicely.
    If you want to have it, I will commit to "Challenge".
    Let me know. :thumbsup:

    -------------
    This is the example for Sugar that is fully implemented:
    Spoiler :

    Quest Start:


    Quest Achieved:


     

    Attached Files:

    Last edited: Sep 20, 2020
    HobyMorgan and Mr. ZorG like this.
  2. Raubwuerger

    Raubwuerger Chieftain

    Joined:
    Nov 24, 2014
    Messages:
    44
    Location:
    Bavaria
    Sounds good. But the quest requirements should be in relation to the reward.

    500 Sugar for 1000 Gold, 1 Sugar Expert, +1 sales price, + 1 relation to the king is in my opinion a litle bit to much.
    But as far as I know your programming approach it is heavily configurable.
    So that the reward can be divided in two choices:
    • 1000 Gold, +1 relation to king
    • 1 Sugar Expert, +1 sales price
    ...
     
  3. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    5,723
    Gender:
    Male
    Location:
    Stuttgart, Germany
    Remember, these are global Quests.
    Only the Winner gets something. The losers get nothing.

    There needs to be some incentive that is worth racing for.

    It is. :)

    It is just an enhancement of the Python Event System. Thus it is as configurable as the Python Event System itself.
    Nothing considering rewards or number of Event choices is hardcoded. It is all still XML configuration (used by Python Functions).

    Also the amount thresholds are XML configurable - so you could have 1.000 Yields sold or even 10.000 Yields sold as requirements to fulfill the quest.
    And of course the Yields used by a specific Quest is XML configurable as well.

    As I said, I just wanted to give an example of a fully implemented Quest - so other modders can basically copy paste and simply adjust.
    All I wanted to do this time is to give non-programmers a system to play with - meaning to create further events themselves.

    Summary:

    It is completely up to remaining WTP team and community if they want to use this for implementing further "Trade Quests" or not. :dunno:
    And then they can of course configure it in any way they want as well. :thumbsup:
     
    Last edited: Sep 20, 2020
  4. Ramstormp

    Ramstormp Chieftain

    Joined:
    Jan 13, 2020
    Messages:
    43
    Gender:
    Male
    Really, really like this. Thank you!
     
  5. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    5,723
    Gender:
    Male
    Location:
    Stuttgart, Germany
    No problem. :)
    I hope that it will be used by WTP team or other modders from community like you.

    If you use it to create your own "Europe Trade Quests" please share them. :thumbsup:
    Would really be nice if we could get more "Europe Trade Quests" for other Yields (e.g. Tobacco, Cigars, ...).

    By the way:

    I did commit it to "Challenge".
     
  6. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    5,723
    Gender:
    Male
    Location:
    Stuttgart, Germany
    @Raubwuerger

    Could you be interested in checking this addition to the Python Event System I had implemented?
    (If you want to, I can explain it to you via Zoom.)

    Currently we only have 1 of these Events for Sugar. :(
    It would really be nice to have further ones for Tobacco, Cotton, Furs, ...

    Of course you would have completely free hand to implement the details of those events. :thumbsup:
    (And of course it is completely up to you how many you would like to implement.)

    And if you want to, you could also expand the System in itself.
    It could directly be commited to "Large Rivers" or if you want to, you could also create a new Branch. :dunno:
     
    Last edited: Oct 24, 2020 at 5:58 AM
  7. Raubwuerger

    Raubwuerger Chieftain

    Joined:
    Nov 24, 2014
    Messages:
    44
    Location:
    Bavaria
    @raystuttgart
    Of course I can do so. But today only until 10pm. I've to watch "Tatort" with my wife. And you know "Happy wife, happy life" ... :crazyeye:
     
    raystuttgart likes this.
  8. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    5,723
    Gender:
    Male
    Location:
    Stuttgart, Germany
    Thanks. :)
    And there is no need to hurry.

    I will contact you again the next days. :thumbsup:
    I can invite you then to a Zoom session to explain the addition to the system.

    I am a bit tired now and kind of unconcentrated - thus I will not do much modding anymore today.
    Got up today early to be able to do a at least a bit of modding before my family arrived for a family visit.
     
    Last edited: Oct 25, 2020 at 11:18 AM

Share This Page