Improved Python Event System (Quests for Europe Trade) [IMPLEMENTED]

raystuttgart

Civ4Col Modder
Joined
Jan 24, 2011
Messages
9,638
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:


 

Attachments

  • Civ4ScreenShot0019.JPG
    Civ4ScreenShot0019.JPG
    176.2 KB · Views: 682
  • Civ4ScreenShot0020.JPG
    Civ4ScreenShot0020.JPG
    178.7 KB · Views: 695
Last edited:
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
...
 
Sounds good. But the quest requirements should be in relation to the reward.
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.

But as far as I know your programming approach it is heavily configurable.
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:
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:
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:


Really, really like this. Thank you!
 
Really, really like this. Thank you!

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".
 
@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:
@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:

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:
@Raubwuerger
Thanks a lot for the new Trade Event you created. :thumbsup:
The issue you had reported was actually my fault - I could now fix it and your event is now working perfectly.
(I wrote you in our private chat about it.)
 
I needed something to relax my mind a bit, so I created a small new event. :)

It is just a small "flavour event".
(It is really simple and took max. 10 minutes incl. testing.)
Spoiler :

Actually I have always wondered if all of our players even build Forts or Monasteries.
They have really useful features and can trigger several nice Events.

I personally build one of each in every single game.
Mostly because I want to get all of these flavour event.


Soldier's Son Raised in Fort
Spoiler :


 

Attachments

  • Civ4ScreenShot0002.JPG
    Civ4ScreenShot0002.JPG
    229.9 KB · Views: 441
Last edited:
These are not Python events, but I have implemented two small events the player may like:

1. Rabble

Wagon trains will be "robbed" on the map after a while. Player needs to decide if he wants to pay "customs" or if he looses the wagon train.



2. Trade Fort

This one seems to be the first event of a series of following events. :D

If the player has a border to another player and places a master trader on the map he gets the opportunity to establish a fort. Of course, relationship with the other player will be affected negative...the event could trigger subsequent events with regard to good or bad relationships with the other player or something like that. I will think about it. However, the idea is to support the improvement fort.

 

Attachments

  • Civ4ScreenShot0003.JPG
    Civ4ScreenShot0003.JPG
    719.7 KB · Views: 385
  • Civ4ScreenShot0002.JPG
    Civ4ScreenShot0002.JPG
    700.8 KB · Views: 363
I have created another small event linked to the new goody shipwreck. Ships can now run aground and be lost (coastal ships and fishing boat cannot).

A shipwreck will be created.





Hope you like it. I try to implement some new events linked to new features.
 

Attachments

  • Civ4ScreenShot0008.JPG
    Civ4ScreenShot0008.JPG
    1 MB · Views: 355
  • Civ4ScreenShot0006.JPG
    Civ4ScreenShot0006.JPG
    1.2 MB · Views: 347
Another small event is the discovery of a bonus ressource "Fish" in a large river (can only spawn once in a game) so that there is at least one place where they can go fishing without the risk to be sunk by pirates.



 

Attachments

  • Civ4ScreenShot0009.JPG
    Civ4ScreenShot0009.JPG
    1.2 MB · Views: 339
  • Civ4ScreenShot0010.JPG
    Civ4ScreenShot0010.JPG
    1.3 MB · Views: 373
And Fishermen taking a stroll along the river could not?
That is not an existing functionality in the Python Event System and would be massive effort to implement.
It can trigger Events for a specific Plot (itself) - but it does have no default functionality to check the adjacent Plots and it would also not necessarily be very performant.

Summary:
  • Boat on the Large River triggering this event -> possible using existing functionality of the Python Event System (little effort)
  • Unit on a Plot next to the Large River triggering this event -> would require additional enhancement of the Python Event System (a lot more effort)
Please please let us not make everything more complicated than it needs to. ;)
(And let us please not program new functionaltity of an already complicated System for a single Event that already works nice enough.)

We are already drowning in modding effort that we try to manage additionally to job and real life... :(
 
Last edited:
And it is not required in this regard. A ship at the river mouth would never have the possibility to look into the complete river. :lol:

So where is the problem? Fishing boats can enter the river, that's it.
 
Top Bottom