• 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.
Showing developer posts only. Show all posts in this thread.
can I have two entries in the same history file with the same date, or will that bug the file?

I mean, for example,

Code:
100.1.1 ={
  #do some stuff
}
100.1.1 ={
  #do more stuff
}
It should still work but why would you not just put them both under the same entry?
 
Does on_new_holder also trigger when a new title is created? I.e. does it overlap with on_create_title? I want to make sure any title held by someone of a specific religion always has a certain law.
on_new_holder, on_new_holder_usurpation, and on_new_holder_inheritance cover all instances where a title has a new holder set.
This includes creating a new one, so that would go under on_new_holder.

It overlaps with on_create_title, yes. 100% overlap as far as I can tell.
 
  • 2
Reactions:
Is it possible to age a character - forward or back - through an event? or is it console only? Tried a few combinations of things and got nothing.
It is not currently possible to change a character's date of birth except via the console, and thus not possible to change their age.
 
  • 2
Reactions:
As far as I know the map can be any height vs width. I made an almost square shaped map so..
It does have to be multiples of 256 though AFAIK. The map is currently 3072x2048, but 2048x3072 or 2048x4096 or whatever should work fine too.
 
  • 4
Reactions:
on_startup seems to ignore characters created by the ruler designer, is this correct? o_O
Certainly sounds like a bug.
You should write a bug report in the bug reporting sub-forum if you haven't already.
 
  • 1
Reactions:
Say I have a province in ROOT, and I want to check wether any neighbouring province belongs to a different top realm. How would I do that? It seems that same_realm don't work with provinces.
any_neighbouring_province = { owner { top_liege = { ROOT = { owner = { top_liege = { NOT = { character = PREVPREVPREV } } } } } } } would work I guess, there is probably a lot simpler way of doing it though lol
 
hello
I want to use 'random list' function along with some modifiers and I wonder if the chances go over 100% does it still work as intended? like a chance event of 200% is more likely to be triggered than that of 100% so on and so forth?

Or should I just try to make it under 100%?
Random_list chances are relative, not based around 100.
So if you've got two chances at 1 each, that's the same as two chances at 50 each.

So it doesn't need to add up to 100. It can add up to 2. It can add up to 10000.
 
  • 1
Reactions:
Yes i know haha, but i never noticed that specific command on the wiki.
It feels a bit patronizing to get a link of that page haha :p
Oh not intended to be patronising! I have that link saved to use any time I mod anything lol especially the scopes, conditions and commands cause I have a bad habit of forgetting them half the time I need them...
 
Does that mean that if you want a random_list to have every entry having an equal chance, you can just set them all to 1 and the game will work it out for itself by dividing the sum of the total value by the number of entries? And does it mean that if you have an entry of 100 and one of 1 that the 100 entry is 100 times more likely? If you have 100 and two entries of 1, so three will the entry of 100 become 98% likely? Or will it become something else?

PS can you post me the usage for while loops? I cannot seem to find a usage example anywhere.
That's correct.
If you've got one entry at 100, and two at 1, the 100 entry will have a 100/102 = 98.04% chance of happening.

I'm not familiar with the while loop syntax, sorry.
 
  • 1
Reactions:
Does the lacks_dlc trigger simply not work on portrait dlc? Perhaps it's only reserved for the bigger DLC, like Charlemagne?
That's correct. It currently only works for the DLC that get listed in the campaign start window, plus the Ruler Designer.
 
  • 3
Reactions:
@Meneth is there a maximum upper bounds on a stored variable? We are talking about having a variable that could potentially need to store values in the hundreds of thousands if not higher over the course of a total game duration. Is there an absolute value? Or will a variable rollover and become negative? Is there any failover code in place?
Variables are fixed points, and are stored internally as ints.
Since their resolution is down to 1/1000, this means that their max value is 2^31 / 1000.
Or about 2.1 million.

Chances are it'll go from +2.1m to -2.1m if you end up out of bounds. Sanity checks for core datatypes are expensive, so they're not done by default.
 
@Meneth sorry to keep asking for elaboration, what is the functional different between the *_unit and the *_army scopes? Further is there anyway to scope to all legitimate army owners without doing the any_character scope?
Don't know, sorry.
 
  • 1
Reactions:
does the job action events = {} function like the on_action events = {} ? Can I set an event called by the events block as triggered only? And is there a way to make sure if it has a mtth of 1 will the event fire immediately?
No. job_events is just so the UI will tell you which events it can fire, and how likely they are. It has no actual gameplay effect.
 
Is that changing at all with the new DLC? Or will it remain the same?
At the time of writing, that's remaining unchanged.
If it ends up being changed that'll be in the changelog in the User Modding section.
 
Is there a way to change at which age characters visibly get older or is that hard coded?
If you can't, is there a way to completely overwrite the oldest age stage with the middle age graphics?
There are a set of defines for it PORTRAIT_OLD_AGE_THRESHOLD. There are also ones for PORTRAIT_MID_AGE_THRESHOLD, PORTRAIT_ADULT_MALE_AGE_THRESHOLD and PORTRAIT_ADULT_FEMALE_AGE_THRESHOLD.
 
Province setup does not need to be completed for a map to work, as far as I remember it just makes loading the game quicker but is a massive pain to create and I don't think anyone made a program to do it automatically from existing mod files
 
What is the current merge behavior for 1) decisions, 2) events, and 3) Traits when you have a duplicate item?

Or to put it another way, has a way been added to override a single decision/event/trait without having to replace the entire file in question?
  1. Merge, but override of decision by re-using same name does not work (breaks the decision effect, that does nothing)
  2. Not known for sure, I imagine that the events will function the same as decisions
  3. Merge, but traits with same name will co-exist, and generated characters may get both versions of the trait at the same time. The last definition gets assigned to a character when using commands.
1 and 3 are taken from the wiki but 2 is guesswork, my suggestion would be test having two events with identical ids and then lets us know ;)