• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Riddermark

General
31 Badges
Dec 12, 2003
2.248
1
  • Europa Universalis III Complete
  • Crusader Kings III: Royal Edition
  • Crusader Kings III
  • Prison Architect
  • Shadowrun: Hong Kong
  • Crusader Kings II: Jade Dragon
  • Crusader Kings Complete
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Mount & Blade: Warband
  • 500k Club
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Crusader Kings II
  • Europa Universalis III Complete
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Europa Universalis III Complete
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
I've just finished watching these lections concerning the Crusade Era (2010):
http://www.thegreatcourses.com/tgc/courses/course_detail.aspx?cid=390

and that changed a lot of my views and understandings of the era. Unfortunately the more you learn the more you realize how flawed CK is. If it was up to me I'd have the entire Paradox staff working on CK2 to watch these :D

But to the point, I wanted to alter a few scripts in the crusader events but for the hell of me something went wrong :mad: Here are the things I want to achieve:

1.Jerusalem - main crusade. Dukes (irrelevant of independence) very likely to call it.

2.Now for gameplay reasons (main point) I want to add a check where Bishoprics, Orders and Republics CANNOT call a crusade. Or have any of the "take up the cross" events. I tried to add the NOT condition for form_of_government.. but as soon as the crusade starts and the first checks are done I get a Fatal Exception error :/
No script errors or anything but a direct Fatal Exception and bye bye. Am I doing the check wrong? Is it not meant for a charevent? And how do I go about making it proper then?

3.Removing all other crusades except Alexandria - I switched it to have Cairo as target and add a check to see if Jerusalem is ruled by a christian. If it is then the crusade can go on. What should the check look like?

4.A short event that forces peace on any republic, order, bishop that is at war with a muslim. I have no idea how to write that :eek:o

Thanks in advance to anyone who reads this! ;)
 
I've been playing this game for too long. There is no way to make it properly historical though. That's why I'm trying to have a mix of history+gameplay reasons with the latter prevailing. I'm using DVIP+addon and all that jazz.

I didn't really want anyone to fix my code since it's just addition of a few lines here and there as I mentioned, but rather dish out a script code that I can just add. As I said I don't get any script errors - just the fatal exception that terminates the game.
 
What's with your attitude?

There is no gameplay nor historical reasons for any of you alterations.
And who are you to tell me how my games are unwinding and what I know of history or not?

Also, it's very rare if you find someone to write you some code for no good reason. Especially for nonsensical reasons.
Again with the attitude? And it's not like I'm asking for tons of code. Just a few checks to see if I'm doing it right.

P.S. Also, maybe if you would delete that spam part of your original post, other people might take you seriously and respond to you.
Spam? I was just mentioning that, it's not as if I was shoving it someone's throat or anything.

Since you have no experience with DVIP, you are unwilling to assist other than telling me what's right or wrong about my game and my historical perception and understanding - I suggest you don't bother with replying to my thread anymore.
 
Don't try to weasel your way out of acting like an ass. I didn't see any good intentions in your wind ups that I quoted in the previous post. My posts haven't proven anything about my knowledge in history - your assumptions are laughable at best. Not to mention this has NOTHING to do with the subject.

Furthermore I did not suggest to you to watch these lectures now did I? You can't doubt their content if you have no idea what they are as well. So your arguments are just mind-boggling and ridiculous.

Am I trying to suggest anything for the game? No. Am I trying to tell YOU how to play or fix your game? No. So kindly don't mess with my ideas - I have played and beta-tested this game long before you even knew these forums existed. And yes you have no idea how DVIP works (thanks for telling me what it means btw, I'd never known if it wasn't your brilliant insight).

..

If you reckon that it makes muslims too weak, then you should read every single file of it and adjust them accordingly. But what you suggest is way out of proportions, to put it mildly.

Again I'm not suggesting ANYTHING to anyone. I was merely asking for help with my own tweaks. Are you not reading on purpose? I guess you enjoy just picking fights when there's nothing to fight about. The things I wanted to adjust were for my own game. I wasn't imposing my ideas on you or anyone, was I ?

..

Now that we have this put aside let me explain about the game. There are too many crusades for my taste. Every single time the Jerusalem crusade takes Alexandria and fights in the provinces of the Egyptian kingdom. Is that what you call historical? I've tried to battle this problem by switching the Egyptian directly controlled domain to be the duchy of Jerusalem. The problem with that is the AI takes 1-2 provinces and signs peace immediately.
- Republics didn't take the same level of participation as the proper crusaders now did they? Gameplay wise they have no demense limit, meaning Venice can take 20 provinces in the Holy lands and never make them into counties that break up free, or form Jerusalem and so on. Same goes for bishoprics and knight orders.

This is why I want to stop them from wage any kind of war against the muslims and make them unable to take the cross. They are unplayable for a human as well so I'm interested to see how this plays out.

- As for the crusades. The idea was to A) get Jerusalem B) help the Byzantines. Once you have Jerusalem there was a second crusade wave that was meant to stabilize the newfound kingdoms and so on. I don't think there was an idea to "free" Alexandria for the sake of it. They wanted to use Cairo as leverage to get back Jerusalem when it was taken. But that's further down the timeline.

The game just can't emulate this well. As I said too many crusades for my taste. Antioch, Jerusalem, Alexandria, Tunis, Sicilian ones, the ones in Spain. In my games the AI needs no help to handle spain, or even worse Tunis where you have a pretty thin stretch of muslim lands that get taken in seconds.

So what I want to do is - have the Jerusalem Crusade properly set (as it is now), moved the dates to be between 85-90. Then made it likely for a duke to call the crusade since the first one was pretty much the nobility taking the cross, not the kings leading everyone else. (The ones lead by kings afterwards are hardly successful historically speaking).

And then once you have Jerusalem you build upon that - hence the check if a christian owns it. If not - that should be the target until it's taken. That's my viewpoint and my take. My world my rules, I'm not telling you that it's the ultimate truth. That means I do not care about your comments and opinions whether it's accurate according to you or not. If you ask me Edessa would be the next logical step anyway.

So there are my reasons. I want to do these implementations and see how the game plays out. I'm not here to make a revolution just to tweak my game and ALL I asked for was someone to tell me what code and where to put it since my obviously has gone wrong.

But ok here goes the bit you wanted to see: (can't paste the whole crusader_events.txt now can I?)

Code:
	mean_time_to_happen = {
		years = 1800
		modifier = {
			condition = { type = not value = { type = year value = 1085 } }
			factor = 30
		}
		modifier = {
			condition = {
				type = and
				condition = { type = year value = 1085 }
				condition = { type = not value = { type = year value = 1095 } }
			}
			factor = 0.3

Here just slight change of dates.

Code:
		modifier = {
			condition = { type = papacy }
			factor = 0.01 #papal controller is most likely to call it
		}
		modifier = {
			condition = { type = not value = { type = papacy  } }
			condition = { type = duchy }
			factor = 0.2 #a duke unlikely to call one

Changed the Dukes to be more likely to call one.

Code:
#####################################
# Catholic rulers take up the cross #
#####################################

character_event = { #The Pope urges you to take up the cross and join God's Holy crusade!
	id = 1920
	picture = "event_crusades"

	trigger = {
		condition = { type = ai }
		condition = { type = is_independent }
                      [COLOR="#ff00ff"]condition = { type = not value = { type = form_of_goverment value = knight_order } }[/COLOR]
		condition = { type = crusade }
		condition = { type = not value = { type = atwar } }
		condition = { type = religion value = catholic }
		condition = { type = not value = { type = trait value = excommunicated } }
		condition = { type = not value = { type = trait value = heretic } }
		condition = { type = not value = { type = trait value = realm_duress } }

Now this is the one I suspect is crashing the game. It gives no error but when the crusade is called and this check is done it's CTD time. I know I'm doing it wrong I just don't know where to put that check or how to modify it to work.

and lastly..

There was a peace of god event which I can't find right now - I wanted to modify it to be forced upon republics, bishops when they are at war with muslims. (so they cant take land which they don't give to counts later). But I have no idea how to modify it at all!

So that's it. I'd appreciate you improving your attitude since It was really uncalled for.
 
Thanks! I'm glad we could work this out :D The reason I wasn't posting anything is because as you can see it's only very minor changes that anyone can do (since I'm doing it and I'm almost clueless).

I found the form_of_goverment thing in the crusader event file, as a modifier condition. Just not with a negative value. So I assumed I would be able to use it with "not". Here it is:

Code:
			modifier = {
				condition = { type = or
					condition = { type = title value = PAPA }
					condition = { type = title value = TEMP }
					condition = { type = title value = HOSP }
					condition = { type = title value = TEUT }
					condition = { type = title value = U000 }
					condition = { type = title value = U001 }
					condition = { type = form_of_goverment value = knight_order }
				}

It's in the Jerusalem event. Judging by the U000/1 tag I guess it's added by the modders of DVIP. However I'm not sure if it can work in the way I want to use it.

The tag thing you suggest isn't bad but new republics, bishoprics and orders spawn all the time (bishoprics especially). And I really want to limit their actions.

On the other hand can you suggest anything else that can help realize my idea? Anything additional that can be done.

Thanks! And it's not I don't appreciate a helpful attitude I just missed it the first time :D
 
Nice idea to go the other way around. Unfortunately if I'm reading the scenario flies right:

Code:
title = {
	tag = PAPA
	tier = kingdom
	liege = ----
	holder = { character = { type = 10 id = 2008 } startdate = { year = 1066 month = january day = 0 } }
}
title = {
	tag = VENI
	tier = kingdom
	liege = ----
	holder = { character = { type = 10 id = 7800 } startdate = { year = 1066 month = january day = 0 } }
}

The Papacy and Venice are tier kingdoms, so as you said this won't work as intended.

Can they be detected by some other way? Didn't republics/orders have a unique law or inheritance model that can be addressed?
 
Ok I found this in the real disruptor events which I believe are still DVIP ones.

Code:
###################
# Imperial series #
###################

# Becoming an emperor

character_event = { # The Pope has offered you an imperial crown.
	id = 6301

	picture = "event_claim"

	trigger = {
		condition = { type = kingdom }
		condition = { type = religion value = catholic }
		condition = { type = prestige value = 500 }
		condition = { type = gold value = 500 }
		condition = { type = piety value = 100 }
		condition = { type = age value = 16 }
		condition = { type = gender value = male }
		condition = { type = stability value = 0 }
		condition = { type = not value = { type = trait value = emperor } }
		condition = { type = not value = { type = trait value = excommunicated } }
		condition = { type = not value = { type = trait value = heretic } }
		condition = { type = not value = { type = trait value = realm_duress } }
		condition = { type = not value = { type = trait value = modest } }
		condition = { type = exists value = PAPA }
[COLOR="#ffff00"]		condition = { type = form_of_goverment value = feudal } # Kings become Emperors[/COLOR]
		condition = { type = or
			condition = { type = papacy }
			condition = { type = papacy_csc condition = { type = relation value = 100 } }
		}
		condition = { type = or
			condition = { type = num_king_titles value = 5 } # To allow ahistorical empires for really successful players
			condition = { type = and
				condition = { type = title value = GERM }
				condition = { type = title value = BURG }
				condition = { type = title value = ITAL }
			}

So obviously this check works. Maybe it's only the "not" value that crashes the game? How do I go about stopping them from taking up the cross then? Maybe add a mtth modifier ?
 
Wait wait. I don't want to get rid of them, just be able to target them so I can Stop them from becoming crusaders (taking the crusader trait) or calling a crusade.
 
Code:
###############################################
character_event = { #The Pope never fights!
	id = 7999
	picture = "event_crusades"

	trigger = {
		condition = { type = ai }
		condition = { type = title value = PAPA }
		condition = { type = atwar }
		condition = { type = not value = { type = enemy_same_religion } }
                  }
	mean_time_to_happen = {
		days = 15
                              }

	action_a = {#Enforce it!
		ai_chance = 100
        effect = { type = peace }
	}
}

Ok. I've managed to do this event and it works like a charm. Only problem is that the "daily chance" is around 0.05.. How do I improve that to be much more?

And how to modify the event to target muslims/pagans ? I'm not quite sure. I took these bits from existing events :rolleyes:
 
mean time to happen is 15. Doesn't that mean the event should fire up once every 15 days as long as the conditions are met. I.e: the chance of it firing off is 1/15. (daily chance of 0.666etc)

So you can bump that 15 day thing up and should be fine. But even at 15 days, that should mean that the conflicts never last longer than a month, maybe one and a half.

What do you mean about modifying it to target muslims pagans?

To fire off when the Pope is at war with non-catholics (Muslims, etc), or to fire off when Muslims (or other religions) are at war with eachother?

For the first, you probably only need to delete that 4th trigger condition "condition = { type = not value = { type = enemy_same_religion } }"

that way I think the even fires off whenever the Pope is at war and keeps him nice and safe
 
Thanks both! Yeah by targeting I meant that I wanted to modify it that the Pope gets this event only when he fights non-christians. Because have nothing against catholics/orthodox take him on. Although it might be a good idea. 15 days is fine? It wasn't firing for a few months though :/ I'm not sure that if the enemy is close it can fire in time to stop the conquest.

Btw the form_of_gov check works. I tried it on an unmodified events file and the game didn't crash. That means I can make the same event for republics/bishoprics I hope.

And one last question - are the events of the type "God urges you to take the cross" the only ones that force the AI to go at war with the crusade target? Because in my last testgame I saw Scotland and Bohemia declaring war although rulers had no crusader trait. Or their vassals that were also at war.

I also wanted to make an event that forces peace on ALL catholics when the Crusade is announced (to simulate the real-life unity that occurred when this happened). But I guess the event will keep firing while the crusade is on. Is there any way to achieve this?

Thanks again!
 
Hm I'm not sure it didn't fire immediately with the 15 days mtth, what would be the shortest one you would recommend or that works for you when you wrote events?
And about the form_gov thing, actually it's my bad because obviously I edited something else which crashed the game.

Isn't the problem with that even you wrote - that it can fire all the time during the crusades? I wanted to make it that once a crusade is declared everyone signs peace. But I guess it will keep firing.. unless.. I make it a choice of a)accept peace go to war (gives crusader trait and all that jazz) and b) no thanks
Btw.. didn't the peace event make peace only at the higher level of tiers? Like.. If i'm a king and get the event I will be at peace with the other king BUT our vassals would be still fighting?
 
Alright! I've modified your event a bit.

Code:
###############################################
character_event = { # Make crusade not war

	id = 7998
	picture = "event_crusades"

	trigger = {
		condition = { type = ai }
		condition = { type = crusade }
		condition = { type = atwar }
		condition = { type = religion value = catholic }
		condition = { type = enemy_same_religion }
        condition = { type = not value = { type = trait value = crusader } }
	}

	mean_time_to_happen = {
		days = 5
	}

	immidiate = { #Peace and Crusader at once
		effect = { type = peace }
        effect = { type = add_trait value = crusader }

	}

}

I found that mtth in days works as low as 1 and its still good. But the problem with the above event is (even though it works sweetly) well a lot of problems actually.

The trait check makes sure it won't fire once it fired for a crusader. But the problems are these
- it can fire for a King vs Count. Then the King would still be at war with the rest of the count's realm. :/ Can the peace be enforced upon ALL enemies no matter waht tier at once?
- if the ruler is having a realm-duress and is fighting his vassals I don't think enforcing peace on him would be a good idea :D But a simple realm duress trait check would do the trick I believe.

Is there a way to make this event tier-vs-tier ? So it will fire for only kings for example AND independant duke-vs- independant duke.

Thanks!
 
Code:
###############################################
character_event = { # Make crusade not war

	id = 7998
	picture = "event_crusades"

	trigger = {
	condition = { type = and
		condition = { type = ai }
		condition = { type = crusade }
		condition = { type = atwar }
		condition = { type = religion value = catholic }
		condition = { type = enemy_same_religion }
        condition = { type = not value = { type = trait value = crusader } }
		condition = { type = not value = { type = trait value = realm_duress } }
		        }
		condition = { type = kingdom }
          condition = { type = any_enemy        	
		  		condition = { type = kingdom }
		              }	
	}

	mean_time_to_happen = {
		days = 5
	}

	immidiate = { #Peace and Crusader at once
		effect = { type = peace }
        effect = { type = add_trait value = crusader }

	}

}

Ok I tried to do that check to work only for Kingdoms as you can see. But it fired for me (while being Duke of Anjou) :/ I mean it fired for the King of Norway to make peace with me.

What am I doing wrong?
 
I have done some modifications to unite most conditions with the "AND" tag. Now they fire much more often and here is a screen of my success! I have made the same event but for "duchy" tier. So dukes-dukes make peace as well as kings-kings.
http://i52.tinypic.com/jrxmhy.jpg

In this scenario Egypt still controlled Ciaro as demense. I have modified the ruler to be with better stats so Egypt had around 40k army when the crusade started in 1080. And for 30 years this happened! Sweden/France took the Jerusalem lands (NOT A SINGLE bishop or republic have lands from the muslims!). Germany took Alexandria and the likes. I'm so happy right now it worked!

On the other side - I couldn't stop the Pope from going to Sicily. Damned Pope. Also the muslims in spain took everything and are now taking Aquitane(?). Actually its them and France battling Aquitane.

1 question
Is there a way to check how much provinces are controlled directly? I want to try to make an event which checks if a bishop has more than 3 provinces to change his government type to something else. If that's possible?
 
Yeah he doesn't. I guess I can try this. In my current game it's only him and the orders that are getting huge chunks of land now since no bishops or republics are at war. However after the crusade ended and a new on Burgos was declared the game started crashing with this error almost every year :(

######## EXCEPTION: 0xC0000005 at address: 0x00449990: ACCESS VIOLATION read attempt to address 0x00000008
05/29/11 04:42:28
SymGetLineFromAddr(): GetLastError = 126
SymGetLineFromAddr(): GetLastError = 126

I don't think it's from the edits since it worked fine until now. 1140s and it's almost unplayable. Any idea?
 
If you could post the events you edited please as i have absolutely no idea by just looking at the error. :rolleyes:

That ain't so easy but here I'll show you: (keep in mind thats DVIP+DVIP addon)
http://www.filefactory.com/file/cb82438/n/events.rar

contains crusader_events.txt - Here I edited every crusade to check if Jeru is christian before starting
battle_events.txt - on the bottom of this file are my custom events which I already showed here in this thread but you can still check them out

So if you have time to check them I will be grateful for the feedback! (I'm not sure it's the events fault anyway, I haven't played such a long game on this laptop before)
 
Thanks for taking the time to check them.

That's a good idea bout the IDs - I also think I'm dwelling pretty close to taken ones but I have NO idea which ranges are free. I'll try switching them. I'm also trying it on a proper PC not a laptop so I'll see how it goes.
 
Hey! I didn't expect the interest :D Glad to hear you are still on the case.

Well I have to say mu current game is highly experimental and many things were changed on the go including my latest experiment - modding the character stats. You know how in CK vanilla stats were really low and you could really appreciate a strong ruler. That changed in DV quite drastically and everyone is in the 2 digit scene of stats. Now DVIP has a few events that fix that but I personally don't like them as they fire in the 12-16 age span.

Instead I made my own version which fires from 2 to 9 years of age that basically wipes all the stats. Do you know if it's possible to set them to 0 ? Right now I just remove randomly from 3 to 5 points when a stat hits 2.

Now, when they hit 10 the event stops firing AND I had to change the formal education event to fire from 10 to 16 instead of 5 to 16. This way, at 10 you will have a pretty good idea which stats to go for in education. With the DVIP event you might end up with a guy that's pushing for a high military stat but then it fires and you end up with a handicapped say.. brilliant strategist.

..

On the crusades front - the mods you helped me with somewhat did the trick. The forced peace and crusade on everyone makes for an intense battle in the east - however once it's over the muslims overrun the crusader lands again and take them back.

I stopped getting errors after I fixed the IDs as you suggested so I guess I was really getting into some taken range.

...

What I find annoying is that now it's 1250s, The mongols came and nothing happened. They get wiped out in seconds. I even fired the events manually (for the hardest difficulty) but even with an excess of 200k troops they still can't do anything.

The reason is that everyone by now have a medium castle built. That's something I really don't like. Every 2 province guy can put out 10k soldiers or more.

At the moment I'm trying to come up with a plan to battle that. Care to help? :D

I had the idea of a looted province to lose random improvements several times until it's fixed. (takes 12 months for the event that removes the looting to fire) So i figured my event should fire 2-3 times during the loot period. This way the Ai will be somewhat forced to rebuild and constant wars will be devastating for the country. Which kinda sounds logical.

I couldn't find a way to remove a random improvement though.. is it possible at all?

..

As for the new education model I'm in the midst of testing it after a few generations everythinig will become clear and I could report the results. The positive (in my view) is that if a child inherits with all those 0 stats it's a real disaster.
 
Just a quick edit:
After extensive testing ( like 3 separate games played till 1200s ) I'm proud to announce complete success in my own let's call it "stats balancer"

Here's a screenshot

As you can see, freak stats are something of the past unless we are talking about children prodigies. I must admit I might've been too harsh when balancing the stats but my own fixes have a few advantages over the implemented DVIP one.