Crusader Expeditions and other Side Quests

Kailric

Jack of All Trades
Joined
Mar 25, 2008
Messages
3,100
Location
Marooned, Y'isrumgone
We will keep tack of Event and Quest ideas here as well as the below Crusader Idea. Some suggestions so far...
  • Convert the heathen Magyars" (create 3 Missions in that civ)
  • Crusade against the Saracens" (defeat x Saracen units/cities)
  • Tithe 50 Casks of Wine for Carnival
  • Produce 100 Plate Armor for the Knights Templar
  • Pope requests Wine for sacraments
  • Escort Important Bishop through Wilderness and or hostel lands


What I would also like to do here is add something extra to the game that is not necessarily a vital part of a winning strategy but more like a side quest. Something that even a none military strategy can have fun with, and something cool and fun is the main idea.

And one idea I have is to allow your Units to form a Crusade Expedition. This Expedition will need provisions such as food, drink, weapons, horses, etc. Once this Expedition is ready to embark you can start the mission from any Europe plot and the Expedition can then been seen from a special Crusade Screen as it travels to the Holy Land, similar to the current Trade Screens in effect. If you are on good terms with the Pope you can also receive his blessing and get a small bonus, or the Pope may even request you go on such an Expedition. Once arrived your Units will simulate battles, winning, or losing, taking damage, using its provisions, etc.

Each turn spent on a Expedition has a chance of rewards such as:
  • Unique Holy Relics (Such as Holy Grail or St. Thomas’s Finger, and they add greater bonuses than general relics as well as attracting more pilgrams)
  • acquire(or Capture) a Master Unit and or Slaves
  • Discover a technology
  • acquire rare trade goods
  • unit promotions
  • captured provisions
  • treasure
  • Capture the Holy City

There can be negative effects as well such as:
  • Units Starving due to lost provisions
  • Units dyeing due to war
  • Knights Captured and must be ransomed

It will be up to the player to decided when his Expedition should return and he must make sure his troops have ample provisions on the return trip or they could end up raiding none hostile cities thus leading to unpleasant attitudes from neighboring rivals or all out war.

If the player manages to capture the Holy City he will gain a Kingdom wide bonus as well as access to a new trade route. The AI will also try to capture the Holy City as well as Muslims will attempt to recapture it. In order to maintain possession of the Holy City the player must continue sending provisions and fresh units.

This is my thoughts so far on this “side quest”, if anyone else has thoughts or ideas on another side quest please feel free to post.
 
As good as this idea may be I think we should focus of core features first. Once the basic gameplay is up and functioning, then we can consider additions like this. The economy is broken and we have some hardcoded stuff we should move to XML and other stuff like that, which we should consider looking into first.

Once the platform is up and running (again) we can consider interesting additions and this one is an interesting addition, which is worth remembering.
 
Once the platform is up and running (again) we can consider interesting additions and this one is an interesting addition, which is worth remembering.

You know me, more bark than bite;) Yeah, I agree with you, and like you say I write stuff like this down so I will remember and once I do write it I can stop thinking about it.
This is something way into future, after all the above is dealt with and perhaps the civics screen is done as I feel that that would add a lot more character and strategic depth.
 
That sounds cool, but it would be more interesting if quests are something where you can actually perform quests to earn rewards, rather than having units disappear somewhere and produce a random result.

If you're thinking of eventually adding some quests or missions, you should check out the existing system for Civ4EventTriggerInfos and Civ4EventInfos xml. It's underused in Civ4 but used well and extensively by RaR and TAC which also added a few new tags to it. You can design moddable events that have a chance to trigger in the circumstances you want, and these can include Quest events where the player fulfills quest criteria to get a reward you design. In M:C these could be something like "Convert the heathen Magyars" (create 3 Missions in that civ) , "Crusade against the Saracens" (defeat x Saracen units/cities), "Tithe 50 Casks of Wine for Carnival", "Produce 100 Plate Armor for the Knights Templar", etc etc. It'll likely save lots of time & headache to use this existing system & enhance it with a few added tags for new features you want.
 
That sounds cool, but it would be more interesting if quests are something where you can actually perform quests to earn rewards, rather than having units disappear somewhere and produce a random result.

Well, I was thinking this Crusader aspect would be separate and more detailed than your average event quest. And as far as units disappearing, that is basically what happened back in that time. The Pope an or King saw the Crusaders leave but had little contact with them until they returned. They had no idea when they would return, or what would be the results of their return, or if they would even return at all. I want the Crusade aspect of Medieval times added to the game and this is one way I can see it working out.

If you're thinking of eventually adding some quests or missions, you should check out the existing system for Civ4EventTriggerInfos and Civ4EventInfos xml. It's underused in Civ4 but used well and extensively by RaR and TAC which also added a few new tags to it. You can design moddable events that have a chance to trigger in the circumstances you want, and these can include Quest events where the player fulfills quest criteria to get a reward you design. In M:C these could be something like "Convert the heathen Magyars" (create 3 Missions in that civ) , "Crusade against the Saracens" (defeat x Saracen units/cities), "Tithe 50 Casks of Wine for Carnival", "Produce 100 Plate Armor for the Knights Templar", etc etc. It'll likely save lots of time & headache to use this existing system & enhance it with a few added tags for new features you want.

Yes, definitely would love to see the Event system utilized more. Some xml tags takes only a few minutes to add, even in the code, so lots of things can be done here. This may be something I would like to work on first before the Crusader idea. So, you have some good suggestions already which I will add to the first post, how many more you got :) I'll turn this into an Event thread as well and we can keep track of them all. I can tie the Events thread into a "Pope's or King's" request, so we can have some interaction there.

So far:
Convert the heathen Magyars" (create 3 Missions in that civ)
Crusade against the Saracens" (defeat x Saracen units/cities)
Tithe 50 Casks of Wine for Carnival
Produce 100 Plate Armor for the Knights Templar
Pope requests Wine for sacraments
Escort Important Bishop through Wilderness and or hostel lands
 
Some xml tags takes only a few minutes to add, even in the code, so lots of things can be done here.
It should be even easier when I'm completely done with the XML stuff. Currently I'm working on removing minOccurs="0" as they have a conflict with some XML editors. I'm in the process of writing a perl script to add new variables to XML like add "<bUserVarB>0</bUserVarB>" after "bUserVarA" and it will do so if bUserVarB isn't already present. This will provide the ability to update XML files to the newest layout nomatter how old they are, kind of like loading old savegames.
Using this script and copying schema files will then bring any branch up to date. This should make XML updates even easier than they are now.
Also often a variable is some string or -1. I added NONE as -1 in the DLL (hardcoded) to make a human readable XML file for this.

EDIT: I just came up with a new idea for this. The script should read Makefile.settings to read YOURMOD. If it is present and different from .., then it should work on this directory instead of the local Assets dir. On top of that it should copy all local schemas to the remote location. The result would be like this. We add a new tag in M:C and commit it. 2071 pulls the change to the source checkout and executes the script. The updated schema will then be added to 2071 and the XML files will be filled with the default values. This way keeping schemas in sync with the DLL couldn't be easier. It takes a little extra coding though and this setup might not end up in first commit, but I like this goal :)

EDIT2: committed the DLL change, script and updated UnitInfo. I split the updated XML files into a commit of their own as it makes reverting easier in the unlikely case I screwed up somehow :)

Convert the heathen Magyars" (create 3 Missions in that civ)
Crusade against the Saracens" (defeat x Saracen units/cities)
I would prefer it to be random civs instead of specific ones. We could add conditions where it could be a random native civ where variable X = Y or whatever. The point is that we shouldn't know from game start which civ can be targeted by such an event.
 
committed the DLL change, script and updated UnitInfo. I split the updated XML files into a commit of their own as it makes reverting easier in the unlikely case I screwed up somehow :)
You are a coding wizard, a code cranker extraordinaire, sure glad you are with us and not against us;)

I would prefer it to be random civs instead of specific ones. We could add conditions where it could be a random native civ where variable X = Y or whatever. The point is that we shouldn't know from game start which civ can be targeted by such an event.

Exactly, Sounds like fun to code in all the conditions and such then see it all working in the game.
 
You are a coding wizard, a code cranker extraordinaire, sure glad you are with us and not against us;)
With you? Just wait until I get network games to work. Then you might feel my wrath. Somehow I mysteriously have soldier with no yield requirement, which have 400 power and you will be clueless to how I did that :lol:
 
With you? Just wait until I get network games to work. Then you might feel my wrath. Somehow I mysteriously have soldier with no yield requirement, which have 400 power and you will be clueless to how I did that :lol:

Ha, everyone knows that trick... up, down, up, down, left, right, left, right, B, A, start:scan::lol:
 
Those sound like cool ideas. It's already somewhat possible to design a good variety of events/quests using the XML tags in TAC/RaR, I had actually added about 20 of them when I was working on RaR. However in the current TAC/RaR system they added only a few tags that take advantage of the DLL directly, if you want custom behaviors you need to write individual python functions for each event, which is cumbersome to write and debug for each one & is probably not best for performance.

as far as units disappearing, that is basically what happened back in that time
Actually it looks like most of the crusades were coordinated campaigns across diverse areas that were personally led and supervised by the participating rulers just like their other wars. http://en.wikipedia.org/wiki/Crusades E.g. Emperor Frederick I Barbarossa, King Philip II of France, and King Richard of England leading their armies in the Third Crusade; King Andrew of Hungary in the 5th Crusade, King Louis IX invading Egypt & Jerusalem in the 7th Crusade and Tunisia in the 8th & 9th Crusades, etc etc. They were campaigns with multiple battles that needed to be coordinated just like their other wars; I guess it would've been impious or shameful just to send someone else. Also many of the crusades were to capture and control various different areas within Europe itself, eg crusades against the Slavs and Livonians; and many against various heathen tribes in and near Europe or against orthodox Russia. There were even quite a few aimed against normal Christian rulers inside Europe who the pope was against, like crusades against Sicily and Aragon. (Maybe if the Pope is really pissed off he could either sends some units directly to attack you or get other rulers to crusade against you.)

So in most cases it would be likely more realistic/fun if you can lead your troops to capture actual cities on the map. But, if you do want some quests that involve a mechanism of units disappearing and have a variety of scripted or chance outcomes, it is possible to do with the RaR Events system. In fact I had made a very similar Event for RaR, in which the King commandeers one of your Frigates for a campaign against the Barbary Corsairs. If you agree the King is pleased and your Frigate leaves for ~20 turns; then has a chance to return damaged but having captured some treasure, or might not return at all. This could also be good for a Marco Polo voyage or something like that.
 
Those sound like cool ideas. It's already somewhat possible to design a good variety of events/quests using the XML tags in TAC/RaR, I had actually added about 20 of them when I was working on RaR. However in the current TAC/RaR system they added only a few tags that take advantage of the DLL directly, if you want custom behaviors you need to write individual python functions for each event, which is cumbersome to write and debug for each one & is probably not best for performance.
I'm not sure performance is critical here (but then again I find RaR to be a bit slow). However I would like to include as much as possible into the DLL as debugging python is a pain. Also writing generic rules in the DLL allows reuse of tested code in multiple quests across multiple mods.

In fact I would prefer if python is only used for GUI stuff where it is actually rather good. The game mechanics benefits a lot from being in the DLL. One huge benefit from keeping all game mechanics in the DLL is that XML modders with casual python writing will not be able to cause serious harm (other than breaking the screen interface).
 
In fact I would prefer if python is only used for GUI stuff where it is actually rather good. The game mechanics benefits a lot from being in the DLL.

Absolutely agree with that point. :thumbsup:

... but then again I find RaR to be a bit slow.

The 2 major aspects that impact performance in RaR are:

1) Massive amount of Yields and Professions (because there is lots and lots of logic involved with that)
2) Massive amount (and high level) of graphics (especially all the UnitArtStyles of the different nations)

If you would pack the same amount of Yields, Professions and graphics into Vanilla or most other mods you would have really serious problems.
(Not even speaking about all the features we added.)

But even with all those Yields, Professions and graphics, most people are still able to play RaR with good performance even on MapSize Gigantic ...
 
Actually it looks like most of the crusades were coordinated campaigns across diverse areas that were personally led and supervised by the participating rulers just like their other wars.

You are correct and I realized that after I posted it about the kings part. Sense you are the "king" it wouldn't be all that realistic. However, I want to add in the battles for the Holy Land and just haven't come up with a good way to implement that. We could have one of the barbarians having control of the Holy Land but there is implications as Natives can't have European cities and vice versa or crashes and other issues occur, but I am sure they can be worked out.

Maybe if the Pope is really pissed off he could either sends some units directly to attack you or get other rulers to crusade against you.

This happened quite often actually :) The Pope's had their own estates and went to war. I am actually wanting to add some of the predominate Pope's as a playable character with their own play style.

This could also be good for a Marco Polo voyage or something like that.

Yes, I like this. This could have a chance to open up new trade routes as well.
 
The 2 major aspects that impact performance in RaR are:

1) Massive amount of Yields and Professions (because there is lots and lots of logic involved with that)
2) Massive amount (and high level) of graphics (especially all the UnitArtStyles of the different nations)
Don't get me wrong. RaR isn't performing bad. As I already wrote (about RaRE I think) there aren't any poorly written code to hurt performance and starting with 1.6 there aren't any obvious places to optimize. Still it isn't performing as well as I would have hoped. I mentioned this as RaR was brought up and DLL/python was considered. However I don't think python is a big resource hog in RaR.

As I have been unable to pinpoint the cause of the reason why RaR appears to be slower than other mods I highly suspect that it is the huge amount of data, which is causing problems. 1+2 from the quote mean a lot of extra memory I/O and vanilla appears to never have considered a data structure, which would be friendly for the hardware caching for memory I/O. The bitmaps I recently added to M:C for keeping bools for plot revealed etc isn't much about the 128 bytes saved in each bool array (for 32 players). It is about reduced memory I/O for checking if plots are explored, visible etc. I wonder what would happen if the same is added to RaR.

Now we should try to stay at least somewhat on topic ;)
 
EDIT: I just came up with a new idea for this. The script should read Makefile.settings to read YOURMOD. If it is present and different from .., then it should work on this directory instead of the local Assets dir. On top of that it should copy all local schemas to the remote location. The result would be like this. We add a new tag in M:C and commit it. 2071 pulls the change to the source checkout and executes the script. The updated schema will then be added to 2071 and the XML files will be filled with the default values. This way keeping schemas in sync with the DLL couldn't be easier.
Done.

The script is quite easy to use. Just execute it and it will do its job.

When adding new tags to XML, add them like this:
scripts/xmlTagAdd.pl said:
openFile('Units/CIV4UnitInfos.xml');
updateFile ("DefaultProfession", "<bNativesInvalid>0</bNativesInvalid>");
writeFile();
openFile() opens the file in question (notice it's relative to the XML directory)
updateFile() adds #2 argument after #1 DefaultProfession, but only if the tag from #2 isn't already present.
writeFile() writes the updated file back to the disk.
(the example adds bNativesInvalid = false after DefaultProfession)

There can be multiple updateFile() between open and write and open can be used for a new file once writeFile() is called.

When the script executes, it goes into DLL_sources and checks Makefile.settings for YOURMOD. If it is present it will do:
1: work on the XML directory in that location instead.
2: openFile() will copy the Schema file for the selected file from M:C to YOURMOD, if it is present in M:C (it often is if we added a new tag ;)).
 
The script is quite easy to use. Just execute it and it will do its job.

How is it executed? I clicked on it and it just asks me what I want to open it with.

I posted a bug in the bug threads, for some reason diplomacy isn't working after I downloaded the newest git version.
 
How is it executed? I clicked on it and it just asks me what I want to open it with.
You need to install perl to execute it. It's debated which perl is best for windows, but at least it's narrowed down to two:
http://strawberryperl.com/
http://www.activestate.com/activeperl

I can't tell for certain which one is best, but both should cover our needs as far as I'm aware. Perl is preinstalled on most non-windows systems and the script should be cross platform, but odds are that you would like to get it working in windows. Still it's worth remembering that it works out of the box in linux or OSX, which mean you can execute it over LAN if you like (and have two computers).
 
Top Bottom