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

hm, this is the thread of Raubwürgers events - I assumed his events are all similar saying more or less "bring 500 x to Europe". However, in this case it were trade goods therefore I just wrote "goods". Why could the end trigger trigger at 100 when I need 500?
 
Why could the end trigger trigger at 100 when I need 500?
Because the End Trigger actually checking for the Reward, technically does not care what the Start Trigger told you.
(Start Trigger could say "500", End Trigger might still simply check "100".)

A Quest consist of 2 EventTriggers:
  • Start Trigger (telling you what to do in Text)
  • End Trigger (ending the Quest by really checking the conditions which Text said)
Technically their trigger conditions are 100% independent.
This has never been different in the Python Quests ...

Only the modder implementing them can make sure that they match.
But since the modder is human he can also mess up ...

----

Or to explain it again as example:
  • "Church Quest Start Trigger" triggers when 1 Church is build and the text says "Build 5 Churches".
  • "Church Quest End Trigger" triggers when 5 Churches are build (as the text of "Start Trigger" said) and the text simply says "you succeeded".
There is no technical link between those 2 Triggers.
The link only exists in the brain of the modders and players (made by reading text)

The Python Event System has absolutely no mechanism to ensure that they match.
The Python Event System itself does not even know that they belong together.
For the Python Event System each of them is an Event Trigger on its own.

Only the modder uses a pair of Event Triggers to create a Quest for the player with texts.

Summary:
Very easy to mess up.
 
Last edited:
Ok, after several hours of testing, fixing and optimizing, I have found and solved all issues of the Trade Quests. :)

Most importantly:

1. Food Trade Quest now works as well. (A bug in my Python Trade Quest System and not in the XML setup.)
2. Cotton Trade Quest now works as well. (Was bugged and automatically triggered at game start and causing Python Exceptions. see 3)
3. No more Python Exceptions (Caused by missing Python methods called in XML. see 2 )

Generally
  • All Trade Quests could nicely be started and fnished in my Tests. (No Open Trade Quests in Log if normally triggered in game without flooding Quest System.)
  • @Nightinggale: Maybe check for Asserts in DLL caused by Events and let me know. If you can tell me the specific Event I most likely can easily solve.

@Raubwuerger :

The Python Event Trade Quest System now also supports Quests for "Luxury Goods".
(I had originally simply thought they were not needed thus until today it was not supported.)

So if you ever feel like creating one, it is possible like with all the other ones.
51 : "YIELD_LUXURY_GOODS"

@Nightinggale

I think you asked why the "IDs" are used in XML.
It is simply that my generic parameters used for this only support ints.

I implemented this addition without adding further XML modifiers.
(Mostly I added just several generic and reusable Python methods for the base logic and helper functions.)
 
Last edited:
Hello raystuttgart,

great that you found and fixed the bugs in the trade events.
Luxury Goods: I will do so ... :)

I just pulled the branch "Mod-river_merge" and played a bit.
I noticed that the AI players seem to ignore the goodies and the villages.
Visited a bunch of goodie huts right next to the AI player boarder.
And even the native villages are not visited by the AI ...
 
I just pulled the branch "Mod-river_merge" and played a bit.

Great. :thumbsup:

As reminder to all team members and partners:

All of this is in the merged branch "river_merge", our new common development branch.
Everybody working or testing on WTP stuff for next release only use "river_merge". :thumbsup:

----

great that you found and fixed the bugs in the trade events.
No problem. :)
I like to play with these new Events myself once I find time to play again ...

Luxury Goods: I will do so ... :)
Cool. :thumbsup:
 
Last edited:
I created an event for luxury goods and attached it as a zip.

Unfortunately I still have no write access to the branch "Mod-river_merge".
I can only create a new fork in the browser and upload my changed files ...
I can easily edit files in my own GitRepository.
 

Attachments

I just pulled the branch "Mod-river_merge" and played a bit.
I noticed that the AI players seem to ignore the goodies and the villages.
Visited a bunch of goodie huts right next to the AI player boarder.
And even the native villages are not visited by the AI ...
strange .. I also ran several test games and in them the AI actively prevents me from collecting "ruins" and "burials". he also visits native villages ...
what difficulty level did you play?
@raystuttgart can this be due to the low level of difficulty?
 
@Raubwuerger

We finally need to give you write access. :thumbsup:
Please check the internal team chat this evening so we take care of this.

I can of course also review your files, test and integrate it. :thumbsup:
It always makes sense that we modders review each others work anyways.
 
@raystuttgart can this be due to the low level of difficulty?

I simply do not know. :dunno:

But we should really create a new thread for "river_merge", and discuss these things there ...
(Will do so now.)
 
Last edited:
@Mr. ZorG: My difficult level is governor, so not that low.
My be it's because I recreated the map in the world builder several times. But I've never seen this issue in the other branches ...
 
hmm .. so the level of difficulty does not exactly affect.
but the mention of WorldBuilder worries me.

during tests of previous releases, there were no errors when replaying the situation with WorldBuilder. but in my usual game, errors would occur.
maybe there is a reverse situation here? .. although this is very strange ...
 
Guys,

It is important that you guys share your experience from your test of "river_merge". :thumbsup:
(The programmers currently simply have too little time to test, so your support in testing is needed.)

But let us please continue discussions about potential issues of "river_merge" here. :)
It will make the life of all of us easier if we do not have to search all feature threads for that.
 
@Raubwuerger
Please get the newest files from "river_merge" before continuing to work on any events. :thumbsup:
(I checked, corrected and integrated your event. See below.)

I made several small corrections, including the Python File, which now also considers the reversed logic of Luxury Goods, since in my last version it only did for Trade Goods.

1. Luxury Goods is bought in Europe and sold in the Colonies (In your last version it was still the other way around like "normal" goods produced in Colonies and sold in Europe both in texts and Python.)
2. Trade Goods is of course also bought in Europe and sold in Colonies (it was correctly coded already in Python but several texts in English did not yet match.)
3. Several small English errors considering capitalization that I had in the English texts. (That was already wrong in the original version of the System.)
 
I like the idea of these events but after some tests they feel like a cheat. :dunno:

There is no real challenge, the player is annoyed lot's of turns in early game by a further "challenge" to bring 500 or these or 500 of another good to Europe. I have currently no idea how these events could be made more interesting, diverse and more embeded into the game, but I feel something needs to be revided. :think:

Is there a downside or fine if the player does not complete it?
 
There is no real challenge, ...
Yes, because currently AI is not able to compete and thus there is no challenge.
It was supposed to become a contest with AI.

Also the numbers are way too low.
e.g. 500 is basically a number for easily testing the feature.
(so you can test in Worldbuilder with 1 Shipload)

------

The Quests included in the System were just examples with easy values for testing.
There was and is absolutely no necessity to have those numbers in final balancing.

------

What I was originally planning to do:

1. Give AI additional easier rules for this feature (directly coded in the a central Python of this feature - 5 min to adjust it)
2. Have the needed amounts become much higher (5000 or 10000 at least)

Then this feature would actually have become a competition, which it currently is not.
  • I just created the system and I did not want to mess with the balancing that @Raubwuerger had chosen without actually testing ingame
  • I know that team and community do not like my ideas of "easier AI rules", thus I do not suggest it anymore
Is there a downside or fine if the player does not complete it?

No, currently something as "negative consequences" of having failed a Quest is not yet supported by the Python Event System.
But it could be created by any programmer taking the time to do so. (The key-word is "time".)

------

Summary:

This is simply a matter of balancing and how you let AI have a chance to compete.

------

But again, no need to worry. :)
This feature is "brand new" and nobody has really taking care of finetuning yet, so do not worry. :)

First we implement a feature, then we test it, then we fix major issues first, then we finetune balancing, then we publish it in the release ... :thumbsup:

"river_merge" is not a "play version" yet, it is a "work and bugfix version". :)
The goal is to find such issues and fix them, thus thanks for reporting. :thumbsup:

------

Once I have the time, I will look into it. :thumbsup:

And do not worry, I will not implement "easier rules for AI" in the Core Mod / "river_merge"
(I know it is controversial and not liked by all.)

I will thus just adjust balancing wiht much higher numbers unless somebody else does it before.
(The only 2 people that currently know how this system works are myself and @Raubwuerger though.)
 
Hi guys,

I rebalance the events to be less of a cheat. :)

Following logic:
The rarer and very strategic Yields need less goods traded to trigger "Quest won".

e.g.
  • Tobacco --> You need to trade 5000 Units (to win the Quest)
  • Tools (needed for strategic purposes) --> You need to trade 3000 Units (to win the Quest)
  • Gold / Gems (very rare) --> You need to trade 2000 units (to win the Quest)
Values are balanced in XML and can be changed easily once you understand the Trade Quests.

-------

Otherwise I have a suggestion for you guys.
Think about it and maybe implement it one day.

As described in this thread here, it would be a good idea, to have Events and Quests consider Handicaps in "Python Can Do" Checks.
(It should normally only make sense to apply those Handicap checks for amounts of Gold or Goods that are conditions for an EventTrigger.)
 
Back
Top Bottom