[Religion and Revolution]: System Enhancement for Events, Achievements and Goodies

raystuttgart

Civ4Col Modder
Joined
Jan 24, 2011
Messages
9,638
Location
Stuttgart, Germany
Hi guys,

as I already mentioned, we have noticed, that the existing systems used in our mod still lack several functionalities that would often be very useful:
(This is a modders discussion. If you don't know the systems and their limitations, it does not make a lot of sense to post in this thread. :thumbsup:)

  • Python Event System
  • Achievement System
  • Goody System

Sometimes it is possible to add functionalities with Python-Coding,
but this would not be necessary anymore if we enhance the core DLL logic for these systems and expose the configuration for these enhancements to XML.
(I would like to get rid of many PythonCanDo, PythonCanDoCity and PythonCanDoUnit calls.)

I am explicitly not mentioning things we could do for Inventions or other future features, since we simply do not have them these features at the moment.
Let us think about further enhancing, once we implement those features.

3 Major Goals:

  • More possibilities (also for non-programmers)
  • Minimize risk of bugs
  • Enhance performance

--------------------------

Enhancement for Achievement System:

new trigger conditions in XML for:

  • number of Native villages missioned
  • number of Native villages destroyed
  • number of European cities destroyed / conquered
  • total amount of a specific good traded with Europe
  • total amount of all goods traded on Domestic Market
  • number of Native Players eliminated
  • number of European Players eliminated
  • numer of a specific Improvement built

To be checked and eventually fixed:
(If they work only on map or also count units / professions in cities)

  • NumUnits
  • NumProfessions

Enhancement for Python Event System:

new conditions in EventTriggerInfos.xml:

A) General

  • player in Revolution
  • player not in Revolution
  • specific Achievement acquired
  • specific Founding Father acquired
  • min Attitude of other Player (if involved)
  • max Attitutde of other Player (if involved)
  • min current tax rate
  • max current tax rate

To be checked and eventually fixed:
  • UnitClasses of Units in Cities also counted (not only on map)
  • Profession of Units in Cities also counted (not only on map)

B) City based

  • min amout of certain Yield(s) stored
  • certain Bonus Ressource around city

To be checked and eventually fixed:
  • certain Improvement around city (not only total amounts)
  • Specific BuildingClass (or higher level of that Specialbuilding) in City (not only total amounts)

C) Plot / Unit based

  • UnitClass of Unit
  • Profession of Unit

new functions for EventInfos.xml:

  • add amount of certain Yield(s)
  • substract amount of certain Yield(s)
  • decrease max tax rate
  • increase max tax rate
  • increase tax rate
  • decrease tax rate

Enhancement of Goody System:

Ability to trigger Events:
(Different variables need to be transfered to Event)

  • Unit / Plot based
  • General / Player based
  • City based (random city chosen)

--------------------------

Let me know, if I forgot something important. :thumbsup:
 
I thought something similar, but instead of adding new XML tags to use them as trigger conditions (which is also great) I considered adding DLLCanDo, DLLCanDoCity and DLLCanDoUnit which would do the same than the python counterparts but implemented via DLL.

I would consider this as an addition to the system you suggested. Also if you think about it, it's really the same. But instead of checking all the triggers per object, you only check the desired triggers. Some type of documentation about what functions have been added to the DLL would be necessary, since this would work like python triggers but without having the possibility to modify them so easily....
 
Hi everyone,
Hi guys,

as I already mentioned, we have noticed, that the existing systems used in our mod still lack several functionalities that would often be very useful:
(This is a modders discussion. If you don't know the systems and their limitations, it does not make a lot of sense to post in this thread. :thumbsup:)

  • Python Event System
  • Achievement System
  • Goody System

Sometimes it is possible to add functionalities with Python-Coding,
but this would not be necessary anymore if we enhance the core DLL logic for these systems and expose the configuration for these enhancements to XML.
(I would like to get rid of many PythonCanDo, PythonCanDoCity and PythonCanDoUnit calls.)

I am explicitly not mentioning things we could do for Inventions or other future features, since we simply do not have them these features at the moment.
Let us think about further enhancing, once we implement those features.

3 Major Goals:

  • More possibilities (also for non-programmers)
  • Minimize risk of bugs
  • Enhance performance

--------------------------
That's a great idea, I really like it!
I thought something similar, but instead of adding new XML tags to use them as trigger conditions (which is also great) I considered adding DLLCanDo, DLLCanDoCity and DLLCanDoUnit which would do the same than the python counterparts but implemented via DLL.
That is an alternate solution. But I would rather avoid doing that... :(
Ray's solution does have a drawback. We would have to add many many xml tags to the existing achievements/events/goodies. Your solution would add less xml tags indeed, but only a c++ programmer could add these new functions... Many modders working on the events are used to python/xml functions. The whole point, in my opinion is to make it as easy as possible. :dunno:
With Ray's suggestion even a kid could create new events !

But I guess on special cases your solution could get handy... But In general, I don't like this idea...

I also have two or three tags I'd like to add...
 
I thought something similar, but instead of adding new XML tags to use them as trigger conditions (which is also great) I considered adding DLLCanDo, DLLCanDoCity and DLLCanDoUnit which would do the same than the python counterparts but implemented via DLL.

I would consider this as an addition to the system you suggested.

I cannot really see the gain in that ... :dunno:

I really believe that we can do almost everything we need with the XML tags I suggested.

Achievements should not need much more than I suggested.
Goody System should be able to do a lot by calling Events.

In some exceptions for Events, we could still use Python.
(I don't want to remove the Python-Call functions, I simply want to make them less necessary.)

More complicated events are coded in separate DLL-Diplo-Events anyways.
(If I need complicated coding, then I can do it all with coding Python, DLL and some texts in XML)

With Ray's suggestion even a kid could create new events !

That is the intention. :thumbsup:
I want to make things easier for the non-programmers out there.

There are so many functions we have coded again and again in Python.
(Replacing them with a simple XML tag really makes sense.)

Ray's solution does have a drawback. We would have to add many many xml tags to the existing achievements/events/goodies.

Most of the new XML tags could also be optional. :)
(But even adding them to the existing XML is not that much work, compared to the programming part.)

I also have two or three tags I'd like to add...

Sure, tell me what you need / want. :thumbsup:
 
For me the most important part is the Enhancement of the Goody System. The achievements are really well thought, and the event system has been quite improved by TAC team. So thanks to TAC Team :goodjob:
I would really like to add some special goodies (e.g. Fountain of Youth) but I would like to avoid hardcore programming. (In Age of Discovery II, it's programmed hard-cored, so if you want to change it's appearance probability you have to compile the entire dll !)
Enhancement of Goody System:

Ability to trigger Events:
(Different variables need to be transfered to Event)

  • Unit / Plot based
  • General / Player based
  • City based (random city chosen)
Wow ! :goodjob: Including events. :eek:
I guess it won't be that easy :dunno:
We would have to check also the event triggers, won't we ?

Anyway, I would like to add the following tags:
  • Applies to all Europeans
  • Applies only to Other Player
  • Hurry Immigrants
  • Domain
Just to explain those tags:
Spoiler :
In my idea Fountain of Youth would hurry a few immigrants (2 or 3) for every European nation (so it wouldn't unbalance the game...)

We could also add ocean goodies (we would of course restrict all the land goodies to land plots, we don't want a treasure to appear in the middle of the ocean!).
Some could trigger the appearance of a pirate ship, but of course we shouldn't own the Pirate ship -> that goody would apply to another Player.

We could also add some native units who would actually attack us instead of giving a message
 
Enhancement for Achievement System:

new trigger conditions in XML for:

  • number of Native villages missioned
  • number of Native villages destroyed
  • number of European cities destroyed / conquered
  • total amount of a specific good traded with Europe
  • total amount of all goods traded on Domestic Market
  • number of Native Players eliminated
  • number of European Players eliminated
  • numer of a specific Improvement built

To be checked and eventually fixed:
(If they work only on map or also count units / professions in cities)

  • NumUnits
  • NumProfessions
Seems OK
I would add:

  • Specific Goody triggered
  • Specific Event triggered (why not?)
 
  • Specific Goody triggered
  • Specific Event triggered (why not?)

You want to have achievements for random goodies and events ? :confused:

Achievements is usually something the player has done something for.
(Not something he gets by coincidence.)

If we really have a use-case for something, I am happy to do the coding.
But coding things that will probably never be used, would simply waste my time and make the XML complicated. :(
 
You want to have achievements for random goodies and events ? :confused:
That was indeed my idea!

Achievements is usually something the player has done something for.
(Not something he gets by coincidence.)
Actually, some events aren't random... So it isn't totally incompatible.
But I guess you're right. For me Achievements are Col94's cutscenes.
And yes, I would like to see a nice little image, with a text saying "You have discovered the Fountain of Youth" or "You have found one of the Golden Cities" or whatever...

But I guess that if we can now trigger events when a goody is found then there is no need to add the two tags I suggested... :goodjob:
 
But I guess that if we can now trigger events when a goody is found then there is no need to add the two tags I suggested... :goodjob:

Indeed. :)

Fountain of Youth, Eldorado, ... could all be Events triggered by the Goody.
(And those Events can have their graphics. :thumbsup:)
 
Enhancement for Python Event System:

new conditions in EventTriggerInfos.xml:

A) General

  • player in Revolution
  • player not in Revolution
Two different tags for this?
I think you can already do this by selecting ERA= Revolution. :dunno:
  • min Handicap
Min Difficulty already exists if I'm correct. You meant max difficulty? (Events for beginners) ?
 
Two different tags for this?
I think you can already do this by selecting ERA= Revolution. :dunno:

There are events that do not care about "In Revolution / Not in Revolution".
(And thus they should not be triggered in that ERA only.)

There are events however, that only make sense when not in Revolution.
Others do make sense only in Revolution.

The 2 Tags would simply say:
CheckForRevolution -> 0 / 1
CheckForNotInRevolution -> 0 / 1

It will probably be easier to understand.
(It really says "Explicitly check this condition".)

Edit:
We could also have tags saying "InEra" and "NotInEra". :dunno:

Min Difficulty already exists if I'm correct. You meant max difficulty? (Events for beginners) ?

No, I meant "Min Difficulty", I just forgot / did not see the XML tag already existing. :)
(I will correct my post. :thumbsup:)

Checking for "Max Difficulty" does not make that much sense ...
(At least, I cannot think of a use-case we would need.)
 
Edit:
We could also have tags saying "InEra" and "NotInEra". :dunno:
Sorry, there was a misunderstanding. I thought there was already an Era tag that enabled to restrict an event to a specific Era... But I think I was wrong ! Yes we could add them so events would only occur later on...

Checking for "Max Difficulty" does not make that much sense ...
(At least, I cannot think of a use-case we would need.)
If we judge an event to favorable we can deactivate in on high levels :dunno:
It's just a suggestion. But I agree, we might not use it often...

Could we also add bEurope, bNative tags? Natives can also trigger random events (mostly Forest Fires in my games :) ). But they shouldn't be able to trigger some! Some are automatically avoided since they can't meet the requirements, but some aren't. If I'm correct they will trigger FirstColony and SecondColony events... Well at least I've triggered them when I tried playing as natives ! :lol:

I really think there's something (logically) missing in those events...
 
Fountain of Youth, Eldorado, ... could all be Events triggered by the Goody.
How do you plan to implement that?

Currently you have no way to tell a goody to be unique, or trigger an event. Ok, you do that.

Then, which goody should have that event/special goody assigned? Would you assign some requirements for a goody to be ElDorado for ex?

Sure you would not want to find those easily. So we have to think if those special goodies will be really something different or just treat them as common goodies but with event associated. (not sure if someone player BTS and tried to do the event related with a magic peak which is placed somewhere in the map but there is no way to know where to search)

Then, graphics? New goody model for those, or just a popup with image or movie?
 
How do you plan to implement that?

Dale had done something similar like that already.
So I would have the code for "Unique Goodies".

Otherwise these "Unique Goodies" would look like and be placed like all the others.
(No special graphics used.)

Then when such a "Unique Goody" is discovered, the Event is triggered right away.

Don't see any problems with that. :dunno:
(But currently this complete topic does not have priority for me.)
 
Don't see any problems with that.
(But currently this complete topic does not have priority for me.)
Ahh, ok.

No problem, but there are different ways to do it. Daled did it the easy way, they are common goodies (only placed once) and that's all.

I was talking about adding something more, like using their own goody graphic on map or not being visible. So that Eldorado is really hard to find and not something a player will always trigger exploring all goodies.
 
Daled did it the easy way, they are common goodies (only placed once) and that's all.

Basically that is what I would have been doing, too.

I was talking about adding something more, like using their own goody graphic on map or not being visible. So that Eldorado is really hard to find and not something a player will always trigger exploring all goodies.

I was also thinking about new goody graphics for a while.
Also about respawning goodies.

1. Camp Fire -> To find units that had been lost / fled (Slave, Missionary, Conquistador, Native Mercenary, ...)

2. Some floating parts of a sunken ship (on water) -> Goods / Colonists / Gold / Map / ...

But as I said, all of these things are not my priorities currently. :(
(My time is simply too limited at the moment.)

Currently I am focussing on only 2 aspects:
(Except the discussions in the forum and with the team.)

1. Bugfixing / Improvements
2. New Founding Fathers
 
I'd like to push this topic up in priority.

Ok, if you want to work on this. :thumbsup:
(But then let us please postpone other things like "Inventions" and "Pirates".)
 
Very interesting ideas.. I think something like that could certainly save bugs and improve performance. Some other good ones to consider for EventTriggerInfos would be

<botherplayerKing> : makes the selected other player be the King of the active player.
<botherplayerattitudemin> and <botherplayerattitudemax> could be used to make diplomatic events that trigger when the otherplayer is sufficiently pleased or angry with you (together with the other tags this could be used to make diplomatic events with your king, other europeans or natives!)
<iMinPopulation> and <iMaxPopulation> are already in XML and it would be nice if these did count the player's population, but these have not seemed to work when I tested it. I don't know whether the existing <Landmass> triggers work or not in Civ4Col.
I'd also agree with Robert that it would be good to have <bNative> and <bEurope> in eventtriggers; I'm wondering if existing events can cause problems by triggering for Natives or not.

About your ideas to let a Goody trigger an Event, these also sound like very good ones. I had tried to work out an event trigger that would happen when a unit steps on a goody Improvement
using <bunitsonplot> and <ImprovementsRequired> in eventtriggerinfos, but that did not work because stepping on the goody removes it before eventtriggers get checked.
If one ImprovementInfos tag specifies an Event to trigger, it would be possible to make several kinds of rare or unique Goodys using the existing ImprovementInfos system that can trigger a special Event when discovered. The existing FatherInfos already has a <RevealImprovements> tag, so certain FFs could be made to reveal only certain types of Goody Improvements to the player. :king:

And yes, I would like to see a nice little image, with a text saying "You have discovered the Fountain of Youth" or "You have found one of the Golden Cities" or whatever...
It could be nice to show a larger graphic popup during some Events such as when finding a rare Goody, that could let us show off some of the nice historic images that we otherwise can't use. But, there's no need to have both an Achievement and an Event for the same thing. Maybe this could just be by allowing larger graphics during Events?

I'd think it might be best to do changes to the Event/Achievement/Goody system after Inventions, because we'd definitely want those to be able to use Inventions, for example:
* letting an Invention make an extra choice available to you when an event triggers
* finding a Goody can give you some progress toward a native knowledge
* achievement for having a certain # of inventions in one category
It would also be ok to add those later, however I'd think it could be extra work to have to change and reformat the Events/Achievements system twice. I think it may be possible to use the already existing <Civic> tag in eventtriggerinfos to make events that can only trigger once a certain knowledge is available.

Would changing the Event and Achievement schemas mean that all the existing events, achievements, and triggers would have to be re-developed manually in the new XML format? Perhaps if the schema can allow the new tags to be absent, then it wouldn't require re-doing all the previous XML content, and also decrease the size of the XML files.
 
Top Bottom