PC Mode
Org Mobile Site
Forum > Discussion > Arena (Gaming) >
Thread: Crusader Kings II - Mod General
Page 3 of 5 First 123 45 Last
rickinator9 17:39 07-08-2012
I'm not sure about the on_action events, but the age = 16 means that only people who are 16 or older can get the event(in this case the son must be 16 or older) .

Reply
Monk 02:36 07-09-2012
Originally Posted by D.PHa:
thank you very much, but i have few more questions

I found (but not sure if it is true) file "CK2defaultfolder"\common\on_actions\00_on_actions.txt and there are listed events and their firing chances i guess, can you tell me if i'm not mistaken and what those values before events like "10 = 3320" mean(percentage maybe if the conditions are met? but there are some events with 250 or more also)?

Could you tell me what does that age = 16 exactly signify? now i know that it's for any child but, does it mean that any child that is exactly 16 or does it mean any child that is 16 and above(and below 21 as there is "NOT = { age = 21 }")?

thanks once more
The on actions pulses will fire events as a consequence of another event happening. A child's birth is a very good example of this. Once a female character is married (or has a lover) they have a yearly pulse to check if they get pregnant. CyberSpider from the Paradox forums sums it up nicely in the massive mod FAQ thread:

Originally Posted by :
Event pulses are actually fairly straightforward.

1. The game engine decides when a 'pulse' happens for a character - there are annual 'pulses', biannual, pentannual, annual-between-2-and-16, combat pulses, and siege pulses.
2. Each pulse has a list of events (the right-hand number) and their associated weighting (the left-hand number).
3. The game goes through the list of events, and eliminates any for which the character receiving the 'pulse' doesn't qualify.
4. Each event's weight is then adjusted by the modifiers listed in the event's "mean time to happen". Note that these modifiers are essentially backwards from the normal use of modifiers; a high number makes the event more probable, not less.
5. Once the game has produced this list of modified weights for events for which the character is qualified, it "rolls a die" to pick one based on the weighting.
6. The character gets the event.
If you want to set up an event to fire on a pulse through the on_actions file, you'll need to give it a mean_time_to_happen as well as a is_triggered_only = yes. If you do not tie it correctly to the actions file, you will instead have it firing every day. Which can be very annoying

A useful link for learning about events is here:http://forum.paradoxplaza.com/forum/...?604588-Events

It includes a lot of the triggers you want to learn in the first two posts, after all the triggers, the OP explains what a lot of them mean. But still there's no substitute for good old fashioned experimenting.

Originally Posted by :
Could you tell me what does that age = 16 exactly signify? now i know that it's for any child but, does it mean that any child that is exactly 16 or does it mean any child that is 16 and above(and below 21 as there is "NOT = { age = 21 }")?

thanks once more
It means that you must be at least age 16 or above in order for that character to receive that event. The NOT 21 tag means that after a character is older than 21 they cannot receive that event any longer.

Reply
Rooster 10:21 07-10-2012
I just joined The Org, and thought I'd check out the modding scene.

I am the one working on the CAT mod, so I am happy to see it being used and hopefully enjoyed. Like all things, it evolves, and I am working on an Arthurian mod, but it's slow going.

The starting years will be 495 (Arthur's Coronation) to 518 (Battle of Badon Hill), but you will be able to play up to 1066. Currently, you can play any Irish or Briton Christian lord, but I would like to be able to expand this to the pagan Saxons and Picts as well. I am testing the alpha version of the Arthurian stuff right now, so I can post screenshots later this week if anyone is interested.

Reply
Monk 10:53 07-10-2012
Originally Posted by Rooster:
I just joined The Org, and thought I'd check out the modding scene.

I am the one working on the CAT mod, so I am happy to see it being used and hopefully enjoyed. Like all things, it evolves, and I am working on an Arthurian mod, but it's slow going.

The starting years will be 495 (Arthur's Coronation) to 518 (Battle of Badon Hill), but you will be able to play up to 1066. Currently, you can play any Irish or Briton Christian lord, but I would like to be able to expand this to the pagan Saxons and Picts as well. I am testing the alpha version of the Arthurian stuff right now, so I can post screenshots later this week if anyone is interested.
Ah, welcome to the Org Rooster You'll find our mod community here is much smaller than, say, the paradox forums, but we're no less as passionate about our work. Your project sounds quite interesting, would love to see screenshots.

Reply
Rooster 03:43 07-12-2012
Originally Posted by Monk:
Ah, welcome to the Org Rooster You'll find our mod community here is much smaller than, say, the paradox forums, but we're no less as passionate about our work. Your project sounds quite interesting, would love to see screenshots.
Thank you for the polite welcome. Here is a little collage of what I am working on. I am progressively adding rulers to the map, but I have South Wales, Brittany, Cornwall, and the area from Somerset to Oxford put in yet. The latter I have decided is where Arthur's own demesne should be. He was a descendant of the legendary King of Brittany and Cornwall, Conan Meriadoc (it is a large dynasty with 37 living characters in 495), so I have called the family Meriadoc. I might change this to something else later. Ideas? In 495, Arthur is the king of Britain (an empire-level title), and his heir is Eliwlod, the son of his dead half-brother Madoc. His half-siblings, including the infamous Morgan le Fay, are married into royal houses in Brittany and what is now lowland Scotland. I've thrown in Kay so far who is a baron in Dyfed, where the historical Sir Ector (an an Irishman named Connor Fair-Beard who was the son of the King of Connacht as it turns out). I'm trying to balance between history and legend, drawing on the Welsh sources to help fill out family trees.


Clockwise from top: House Meriadoc, of which both Arthur's parents were members; Arthur's immediate family, including his half-siblings Madoc ap Uther, Morgan, Anna, Elaine, and Gormand. The current realm of Britain, including the two subject Kingdoms of Gwent and Dumnonia. I used the vanilla e_britannia flag, which ended up being a really cool looking red dragon on a white field.

Reply
rickinator9 11:50 07-12-2012
Welcome. Already spoke to you on the modding IRC. Your mod looks really good.

Reply
Rooster 06:47 07-13-2012
Originally Posted by rickinator9:
Welcome. Already spoke to you on the modding IRC. Your mod looks really good.
Thanks. I'm holding off releasing it publicly until I have the history done. The core game will be over the high-kingship of each of the major realms. But there are a lot of possibilities.

Reply
Rooster 19:23 07-14-2012
Just a little update. I made an entry on the CK2 wiki that links to the official forum thread. I am calling it the Matter of Britain and it will cover the British Isles, the realms of the Franks, and Brittany between 410 and 1066.

Cheers,
Rooster

Reply
rickinator9 22:37 07-14-2012
Originally Posted by Rooster:
Just a little update. I made an entry on the CK2 wiki that links to the official forum thread. I am calling it the Matter of Britain and it will cover the British Isles, the realms of the Franks, and Brittany between 410 and 1066.

Cheers,
Rooster
Here's the link: http://forum.paradoxplaza.com/forum/...ter-of-Britain
Just so you know, the ORG does allow external links, as opposed to PPlaza which sadly doesn't.

Reply
Rooster 17:14 07-20-2012
Originally Posted by rickinator9:
Here's the link: http://forum.paradoxplaza.com/forum/...ter-of-Britain
Just so you know, the ORG does allow external links, as opposed to PPlaza which sadly doesn't.
I should just start my own thread, but here is the current image of Wales. 44 provinces, two big kingdoms (Gwynedd and Deheubarth), ten duchies. Glamorgan is going to be a lot of fun; Dyfed is pretty strong and has an allied minor kingdom, and Gwynedd, well, Gwynedd is HUGE! :) I still have to add in Powys, and spruce up the barony names, which are in early medieval Welsh for the most part. Some roll off the tongue, but some are a bit awkward to modern eyes IMO.



Only the beginning, probably about an eighth of the whole map, give or take.

Reply
rickinator9 18:42 07-20-2012
I love your dedication. I would find it pretty difficult to find out that sort of info from legends and after that trying to find out where it is on the map.

Reply
Monk 05:07 07-21-2012
Very impressive work.

Reply
Rooster 17:49 07-21-2012
Thanks, guys. Here is the download link for the current version. Here.

All of Wales is in there, but no special events yet. All I've changed so far is the map. You have seven independent kingdoms to play with, with no game killing bugs, except I forgot to create a way to go from Anglesey to the mainland, so you might want to avoid Gwynedd for now.

Dyfed is my personal favorite right now, but I like the idea of an Irish enclave in Wales. Powys is a bit crazy (but it was the biggest kingdom in southern Britain at the time).

Reply
PhilliptheGreat 15:49 08-23-2012
Have you thought about making a mod that covers India? The feudal system in India during this time period is similar to the one depicted in the game. I don't know anything about modding but I can help you with research. Factions can include the Kingdom of Rajputana and the Dehli Sultunate.

Reply
rickinator9 00:45 08-24-2012
Originally Posted by PhilliptheGreat:
Have you thought about making a mod that covers India? The feudal system in India during this time period is similar to the one depicted in the game. I don't know anything about modding but I can help you with research. Factions can include the Kingdom of Rajputana and the Dehli Sultunate.
Welcome to the .Org Philip. Although I aren't really interested in India, you could search on the Paradox Plaza forums.

Elder Kings has been announced (for a while). While I work for that mod, I'm also making a Diadochi mod in my spare time, whenever I'm not playing games or adding things to Elder kings.

Reply
rickinator9 15:22 09-19-2012
So I have been modding a little over the last few weeks. I am aiming to make a mod about the diadochi wars. Here's some early screens:
Spoiler Alert, click show to read: 





Reply
rickinator9 10:59 10-16-2012
From the 1.07 changelog:
FOR MODDERS:
- IMPORTANT: Added 'inherit_chance' to traits, replacing 'congenital'
- The 'replace_path' bug is now fixed for real
- Added 'effect' character history command. It's like an event option that's run for the character at game start.
- Fixed a bug with 'immortal' traits and sex appeal
- Added trigger 'leads_faction'
- Added trigger 'faction_power'
- Added trigger and effect 'any_faction_backer'
- Added trigger 'completely_controls = [title]' (I or my vassals hold everything in it)
- Added trigger 'revolt_distance'
- The 'ai_will_do' clause in Decisions is no longer binary (the value determines the MTTH)
- Fixed an issue with law triggers in the 'ai_will_do' field of decisions
- Added trigger 'in_faction'
- Added trigger 'war_title'
- Added trigger 'defending_against_claimant'
- Added event targets 'supported_claimant' and 'supported_claimant_title'
- Added 'set_parent_religion' effect
- Can now create Lowborn characters with the 'create_character' effect
- Fixed a bug with scripted attributes in the 'create_character' effect
- Fixed a bug in the 'conquest_culture' trigger
- Added 'is_conquered' trigger
- Added event targets 'heir_under_seniority_law' and 'heir_under_primogeniture_law'
- Added trigger 'any_claimant'
- Added 'from_potential' trigger to decisions (vassal and dynasty decisions only)
- Added event effect 'add_spouse_matrilineal'
- Added 'opinion_diff' trigger
- The event targets 'owner' and 'holder_scope' are now the same and work on both titles and provinces
- Added event effect 'copy_title_history'
- Added event effect 'copy_title_laws'
- Fixed a bug with trigger 'is_landed = no'
- Fixed a bug in the effect 'spawn_unit' with the 'match' argument
- Can now set a specific leader in the effect 'spawn_unit'
- Fixed a bug in trigger 'de_jure_liege_or_above'
- Fixed a bug in trigger 'de_jure_vassal_or_below'
- Fixed some bugs with the 'set_name' effect
- The 'set_name' effect can now change the name of titles
- Added 'capital' effect
- Added 'province_capital' effect
- Added effect 'participation_scaled_decadence'
- Added trigger 'num_of_faction_backers'
- Added trigger 'race'
- Added trigger 'graphical_culture'
- Fixed a bug with event name spaces not working in 'events' fields in On Actions
- Fixed a bug with event name spaces not working in 'events' fields in Job Actions
- Added 'divine_blood' marriage opinion modifiers
- Added more gradual Attrition Defines
- Added 'secondary_graphical_culture' to cultures and culture groups (a fallback option, when not having certain DLCs)
- Added trigger 'has_earmarked_regiments'
- Added 'earmark' argument to the 'spawn_unit' event effect
- The 'disband_event_forces' effect now takes an earmark argument
- Added trigger 'diplomatic_immunity'
- Added effect 'diplomatic_immunity'
- Exported PORTRAIT_MID_AGE_THRESHOLD, PORTRAIT_OLD_AGE_THRESHOLD, PORTRAIT_ADULT_MALE_AGE_THRESHOLD and PORTRAIT_ADULT_FEMALE_AGE_THRESHOLD to defines
- Exported AGE_OF_MARRIAGE to defines
- Ported the last old defines to lua
- Added SeaZone province text promotion
- Added PrevPrev text promotion
- Added trigger 'is_tribal_type_title'
- Added trigger 'has_horde_culture'

Reply
Namorax 17:02 10-25-2012
Hi, I wanted to ask a small question about traits and how to make them "congenial only":

The idea was to have a trait like "Arthurian Blood", which can only be selected with the Ruler Designer and is always passed on to all your children. There is no w for anyone else to get this trait except for marrying into the bloodline.
On the one hand you get a small stat-bonus but on the other hand this means your family-members are a bit more dangerous. Anyway, I wanted to try this but I cannot make the "restriction" work...
Either none of my children get the trait, or they do and somewhere in the world others with the same trait are popping up, even if their parents dont have the trait.

My current trait-code looks like this

Code:
bloodline00 = {
   inherit_chance = 100

   health = 1
   fertility = 0.5
   vassal_opinion = 10
}
I tried experimenting with various conditions listed on the CKIIwiki, but they either cause my game to crash or dont have the wanted effect. Any ideas on how to do this? Apparently the condition "is_child_of" is the solution I am looking for but I am not sure how to use it...

Reply
Monk 17:30 10-25-2012
Originally Posted by Namorax:
I tried experimenting with various conditions listed on the CKIIwiki, but they either cause my game to crash or dont have the wanted effect. Any ideas on how to do this? Apparently the condition "is_child_of" is the solution I am looking for but I am not sure how to use it...
I've never messed with traits but a couple of ideas come to mind after doing a few quick code experiments. You want to define that the trait is only giftable at birth which may be why people are popping up in other parts of the world with the trait.

The game randomly generates characters to inhabits courts whenever conquests happen and everyone previously was thrown out. Like in the case of holy wars. All of those characters get randomly assigned traits unless they get stopped by flags. Likewise, without a congenital flag, it's possible the game thinks you're trying to make a general birth gain trait, like Genius or Clubfooted.

Try making your code look like this:

Code:
bloodline00 = {
   congenital = yes
   birth = yes

   health = 1
   fertility = 0.5
   vassal_opinion = 10
}
You've already told the game that 1 it's congenital and 2 the only way to get it is from birth. Leaving 'inheritance chance' in is redundant for what you want to accomplish, i believe.

Reply
rickinator9 13:40 10-26-2012
Originally Posted by Monk:
You've already told the game that 1 it's congenital and 2 the only way to get it is from birth. Leaving 'inheritance chance' in is redundant for what you want to accomplish, i believe.
Inheritance_chance is the 1.07 replacement for the random congenital tag. The guys who get the trait randomly must be the guys who also get generated randomly. Maybe add a potential:

Code:
bloodline00 = {
   inherit_chance = 100

   potential = {
      OR = {
         father = {
            trait = bloodline00
         }
         mother = {
            trait = bloodline00
         }
      }
   }

   health = 1
   fertility = 0.5
   vassal_opinion = 10
}
Of course, you could always hand it out through an event. Events are one of the best ways of handing out traits.

Reply
Namorax 14:53 10-26-2012
Well, it seemed to be simpler to pass the trait on via children... I didnt want to have an event everytime a child gets born, and furthermore I dont know how to do that^^
Rickinator appears to be correct monk since your version had no effect, as in nobody gets that trait except when they I trigger the event.

Code:
bloodline00 = {
   potential = {
      OR = {
         father = { trait = bloodline00 }
         mother = { trait = bloodline00 }
      }
   }
   inherit_chance = 100

   health = 1
   fertility = 0.5
   vassal_opinion = 10
}
Changed the trait to this version, but now the gamecrashes when I try to start. Removing the "mother/father = "-part allows the game to start properly again. Any ideas why this happens?

PS: You're both right. Apparently the game tries to use the trait for randomly generated (new) characters.

Edit: The Sword of Islam DLC has a trait that gets inherited from father to son (agnatic=yes)... now I just need to find a way to do the same for mother to daughter

Reply
Namorax 21:14 10-26-2012
ok, I'm about to throw the towel here... the only way this worked halfway was to give the trait the agnatic-flag by setting that to "yes".
The only problem is that this completely ignores female children since they wont get the trait at all. The males get the trait and give it to their children. why didnt they include a cognatic flag! >_<

The father/mother-conditional (and a few others) appear to break the game by crashing it on load. After spending the last 8 hours on testing various potentials I have nothing left. All I know is that unless the potential or whatever I use instead is explictly true, nobody will ever get that trait. Tested this with various different rulers of both genders and lots of children.
Unless I write inherit_chance=100 none of my children will inherit the trait. But this causes the game to think that 100% of all children generated deserve that trait.

I still dont understand why potential doesnt accept father/mother as condition. I tried to change my approach and experimented with liege/any_dynasty_member and other words offered by the Scopes-List on the ckii-wiki...
Its Either everyone, males only or nobody... does anybody have another idea on how to achieve this?
I mean, if I try to fire an event whenever a child is born from somebody with that trait... wouldnt I need the same potential-clause as for the trait?

(Btw, I forgot to mention this, but thanks for your fast answers^^)

Reply
Monk 22:03 10-26-2012
Originally Posted by Namorax:
ok, I'm about to throw the towel here... the only way this worked halfway was to give the trait the agnatic-flag by setting that to "yes".
The only problem is that this completely ignores female children since they wont get the trait at all. The males get the trait and give it to their children. why didnt they include a cognatic flag! >_<
Ah the Sayyid work around! I was about to suggest that myself if my first suggestion didn't pan out, and it looks like it didn't. Sorry to hear that.

Originally Posted by :
I mean, if I try to fire an event whenever a child is born from somebody with that trait... wouldnt I need the same potential-clause as for the trait?
Not necessarily. You could set the event to check specifically to scan the scope of the parents' traits with something like:

Code:
#Child is born of Aurthorian Blood
character_event = {
 id = 3000000
 desc = EVTDESC3000000
 picture = GFX_evt_birth

 max_age = 1
 trigger = {
  OR = {
  father_even_if_dead = { trait = bloodline00 }
  mother = { trait = bloodline00 }
 }
  NOT = { trait = bloodline00 }
 }

 mean_time_to_happen = { days = 1 }

 option = {
  name = EVTOPTA3000000
  trait = bloodline00
 }
}
This codes an event to scan a child's parents' traits, even if the father in question is dead, and applies the trait you desire. Not exactly what you might be after, but it might be worth looking into. Rick may know more as he's been in and out of the traits files for a while now.

Honestly I'm surprised what i suggested before didn't work as the code example I gave you worked as late as 1.06b. One of my favorite silly mods used it to great success. They must have done some switches around in the code that broke a lot of stuff in the new patch. Shame

Sorry I can't be of more help.


edit: I lamented the lack of a "mother even if dead" tag but the event I gave you should cover most of what you need. I revised it a bit and added a mother = tag.

edit2: yeah way to go monk. Give someone an event that doesnt work. Added an OR tag like i should have in the first place to the triggers

Reply
rickinator9 02:45 10-27-2012
Originally Posted by Monk:
Code:
#Child is born of Aurthorian Blood
character_event = {
 id = 3000000
 desc = EVTDESC3000000
 picture = GFX_evt_birth

 max_age = 1
 trigger = {
  OR = {
  father_even_if_dead = { trait = bloodline00 }
  mother = { trait = bloodline00 }
 }
  NOT = { trait = bloodline00 }
 }

 mean_time_to_happen = { days = 1 }

 option = {
  name = EVTOPTA3000000
  trait = bloodline00
 }
}
Should be:
Code:
namespace = blood

#Child is born of Aurthorian Blood
character_event = {
 id = blood.1
 desc = "blood.1.desc"
 picture = GFX_evt_birth

 max_age = 1
 trigger = {
  OR = {
  father_even_if_dead = { trait = bloodline00 }
  mother = { trait = bloodline00 }
 }
  NOT = { trait = bloodline00 }
 }

 mean_time_to_happen = { days = 1 }

 option = {
  name = "blood.11.option"
  add_trait = bloodline00
 }
}
I would always advise you to use namespaces. They work great for compatibility with other mods and official PI patches.
'trait =' is a condition which checks if someone has the designated trait. 'add_trait' is a command which adds the designated trait to the character.

Reply
Monk 03:10 10-27-2012
Originally Posted by rickinator9:
I would always advise you to use namespaces. They work great for compatibility with other mods and official PI patches.
Well, that's your personal preference. 3,000,000 is high enough that paradox wont hit it with their numbering scheme, so the only concern is mod compatability

Originally Posted by :
'trait =' is a condition which checks if someone has the designated trait. 'add_trait' is a command which adds the designated trait to the character.
Correct, my mistake. not really sure what I was thinking there, coded dozens of trait events for tweaks mod without issue. Ah well. Probably just out of practice.

Reply
Namorax 10:15 10-27-2012
Okay, I added the event and it appear to be working. I'm currently playing a testgame and its the 10th year right now with no complications. Now I need to see how far it spreads^^
Thanks everyone!

Reply
Namorax 22:53 10-27-2012
Ok, it works perfectly. I had to try around with the event at first since it screwed up the whole text for the game^^
But now I hve it working and I will try to experiment with other conditions to deal with minor things that bug me... For example: After a few generations, there will be people in your realm that are distantly related to you. They still have the trait but your relation to them is so distant, they're not even registered as "kinsmen" anymore. I would like to have them stop spreading the bloodline-trait around, with the reasoning that their bloodline is distant enough for the effects to be diluted and vanishing.

Is there a way to check what the inheriting person's degree of relation to you is?

Reply
Beskar 02:46 10-29-2012
I am having a courtier issue at the moment. I have like 80, and every time I get rid of some, some more tend to end up flocking to my court from other places.

Trying to think of an event which will be able to "kill" all members of my immediate court which are not my dynasty, perhaps? Trying to think of how to get the scopes to do something similar to that.

I am guessing culture/religion scopes would be good as well so it isn't overpowered.

(Starting it off simple first. One of the issues is the fact the high courtier rate is killing my children off.)

Reply
rickinator9 11:57 10-30-2012
Although I can't help you right now, I usually sit in the CKII modding IRC at #ckii with rizon as the 'IRC provider'. There will be some other people who can help you there. Also, instead of an event, why not use an decision?

Reply
mrguymiah 03:29 11-20-2012
Could I get some help with this mod I'm working on? I am having a hell of a time getting my new map to work. I am creating a completely new map. I am just trying to create a single county surounded by a sea. I have not changed the pixelxpixel size of any of the images and have added entries into the history folder for the baronies and the county (do I have to create a duchy and kingdom to go along with it?) and created default characters to fill the two leadership positions. The game freezes at "Initialising Maplogic". The game works without the mod, so I believe that rules out it being a cache error.

EDIT:Just realized that I hadn't been doing anything with the default.map. I assume that must be the problem. I can't figure out how to open it, let alone edit it.

Please and thank you for any assistance.

Reply
Page 3 of 5 First 123 45 Last
Up
Single Sign On provided by vBSSO