• 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.

Kaigon

Cake or Death?
48 Badges
Mar 15, 2002
4.216
0
kaigon.ripperdoc.net
  • Crusader Kings II: Horse Lords
  • Sengoku
  • Rome: Vae Victis
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Magicka: Wizard Wars Founder Wizard
  • Crusader Kings II: Way of Life
  • Magicka 2
  • Europa Universalis IV: Common Sense
  • Europa Universalis: Rome
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris Sign-up
  • Crusader Kings Complete
  • Shadowrun Returns
  • Shadowrun: Hong Kong
  • Imperator: Rome Sign Up
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Europa Universalis III: Chronicles
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Deus Vult
  • Europa Universalis III
  • Cities in Motion
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
Well, the title says it all.

This would be extra interesting for anyone creating fantasy mods or vampire mods of sorts.

I digged around the files but I couldn't find any death events (they had those in earlier games, such as Rome AFAIK which made it possible to very clearly define how characters could die).
I tried to add a trait that increased health by 1000 but could still not make a 400 year old character survive more than a few days.

Anyone had any luck on this issue?
 
Well, the title says it all.

This would be extra interesting for anyone creating fantasy mods or vampire mods of sorts.

I digged around the files but I couldn't find any death events (they had those in earlier games, such as Rome AFAIK which made it possible to very clearly define how characters could die).
I tried to add a trait that increased health by 1000 but could still not make a 400 year old character survive more than a few days.

Anyone had any luck on this issue?
I also tried this and didn't have any luck either. I tried values as huge as +10000 health, but nobody would last more than a few days when I set their birth year only 150 year in the past. Death by old age seems to be hardcoded, and not only that, you can't even change the average longevity of the characters (I had assumed some kind of variable in the common\ folder which would control the average lifespan, but I couldn't find any). I thought I could make everybody immortal by setting the base lifespan as 1000 years or so, and then kill all characters without the "immortal" trait by event when they reached old age, but since we can't affect the lifespan it wasn't possible either.

It would be pretty amazing if the devs decided to export their age values that determine young age, middle age, old age and (particularly) average lifespan to common\defines.lua in the next patch. It would be even more amazing if we could define it by culture, but that might be too much to ask...
 
After some further testing, I managed to create an event that immediately creates a new legitimate 16 year old son right after a character dies. I was afraid that you'd get the game over screen before that event would even fire, but this is not the case. You could then, theoretically, assign the father's attributes to this new character (initially assigning 0 to all attributes and then using a complicated system of conditional clauses: if father_martial=1 => martial+1, if father_martial=2 => martial +1... and so on until at least 20, then repeat for each attribute). You could then assign him his father's traits, by checking for any possible trait one by one.

Giving him his father's name would be harder, since I don't think you can do that by event. But you could do it by using cultures. If you give the father a new culture whose naming conventions say that the child will always get the father's name, it should assign the new character the right name automatically.

Finally, you probably should make this immortal character sterile, to prevent him from having any older sons who would inherit his stuff (and who you would start controlling instead of our clone) after the father "dies".
 
This would be extra interesting for anyone creating fantasy mods or vampire mods of sorts.

I've been daydreaming of a CK fantasy mod ever since the original CK1 years ago. It would probably be more of a sword-and-sorcery type of game, rather than high fantasy, since it's probably a lot easier to pull off.
 
After some further testing, I managed to create an event that immediately creates a new legitimate 16 year old son right after a character dies. I was afraid that you'd get the game over screen before that event would even fire, but this is not the case. You could then, theoretically, assign the father's attributes to this new character (initially assigning 0 to all attributes and then using a complicated system of conditional clauses: if father_martial=1 => martial+1, if father_martial=2 => martial +1... and so on until at least 20, then repeat for each attribute). You could then assign him his father's traits, by checking for any possible trait one by one.

Giving him his father's name would be harder, since I don't think you can do that by event. But you could do it by using cultures. If you give the father a new culture whose naming conventions say that the child will always get the father's name, it should assign the new character the right name automatically.

Finally, you probably should make this immortal character sterile, to prevent him from having any older sons who would inherit his stuff (and who you would start controlling instead of our clone) after the father "dies".

Cabezaestufa, do you have any intention of creating such an event and posting it?
 
Cabezaestufa, do you have any intention of creating such an event and posting it?
I'm pretty busy with other stuff at the moment, and such and event would be pretty complicated and annoying to do (loads of conditions and checks, just the thought of checking for every single trait... :wacko:). Maybe if I get bored I could try it for a change of pace, but don't hold your breath. If anybody wants to give it a shot, I can of course offer my assistance.
 
Giving him his father's name would be harder, since I don't think you can do that by event. But you could do it by using cultures. If you give the father a new culture whose naming conventions say that the child will always get the father's name, it should assign the new character the right name automatically.
If immortality were linked to culture, you could add "father_name_chance = 100". Or if it were linked to a title, you could have a single regnal name.
 
After some further testing, I managed to create an event that immediately creates a new legitimate 16 year old son right after a character dies. I was afraid that you'd get the game over screen before that event would even fire, but this is not the case. You could then, theoretically, assign the father's attributes to this new character (initially assigning 0 to all attributes and then using a complicated system of conditional clauses: if father_martial=1 => martial+1, if father_martial=2 => martial +1... and so on until at least 20, then repeat for each attribute). You could then assign him his father's traits, by checking for any possible trait one by one.

Giving him his father's name would be harder, since I don't think you can do that by event. But you could do it by using cultures. If you give the father a new culture whose naming conventions say that the child will always get the father's name, it should assign the new character the right name automatically.

Finally, you probably should make this immortal character sterile, to prevent him from having any older sons who would inherit his stuff (and who you would start controlling instead of our clone) after the father "dies".

i don't know if you have read "Sten" by chris bunch, but that reminds me of the eternal emperor, every time he dies a clone with the same memories appears and on it went for 2000 years
 
Bad news; I made some further tests and it doesn't seem to be possible to assign the clone the same name as the original. First I tried father_name_chance=100, but it didn't work. I think it's because the game generates the character before giving him a father, and so, no matter which chance you give his culture to use the father's name, since you haven't assigned the father yet it won't work. Since I used a culture without default names, the clone will always get the name "Adam" (an interesting choice :D). Why can't I assign the father on creation? Because I can't use anything but constants inside the create_character command; "FROM" or "father" won't work in there. I don't evem know if "father=" or "set_father=" is a valid argument for it, but even if it was it wouldn't be of any use.

After that I tried to find some kind of "set_name=" command I could use as an event effect to change the guy's name after his creation, but I was unsuccessful. I don't think such an effect exists, but if it does, I don't know its syntax.

So it appears there doesn't seem to be any practical way to dynamically assign the clone the same name as the original. It could still be done creating special events on a case by case basis (that is, you create an immortal character called "Connor" from the beginning, and then in the event you directly give the name "Connor" to his clone), but you'd need a different event for each character (or a way to tell them apart by culture or traits) and you could not create any new immortal characters ingame.

Also, something we overlooked: Unless I am mistaken, and I don't think I am, we can't assign the clone the same dna and properties as the original, which mean he will change his appearance in every "iteration".
 
Why can't I assign the father on creation? Because I can't use anything but constants inside the create_character command; "FROM" or "father" won't work in there. I don't evem know if "father=" or "set_father=" is a valid argument for it, but even if it was it wouldn't be of any use.

The new_character scope is used to apply most effects after a character has been created. Doesn't help with the other stuff though.
 
The new_character scope is used to apply most effects after a character has been created. Doesn't help with the other stuff though.
I know, that's how I assign things like the father and the dynasty. But you can't use it to give or change names, and by the time the code gets to that part and gets a father the name has already been assigned.
 
I know, that's how I assign things like the father and the dynasty. But you can't use it to give or change names, and by the time the code gets to that part and gets a father the name has already been assigned.
You sure? The Robin Hood event line has this:
Code:
create_character = {
			name = Robin
			random_traits = no
			dynasty = random
			female = no
			age = 30
			trait = brave
			trait = ambitious
			trait = proud
			trait = zealous
			health = 10
			attributes = {
				martial = 13
				intrigue = 13
			}
		}

Which seems like it gives a name...or at least, is supposed to.
 
You sure? The Robin Hood event line has this:
Code:
create_character = {
			name = Robin
			random_traits = no
			dynasty = random
			female = no
			age = 30
			trait = brave
			trait = ambitious
			trait = proud
			trait = zealous
			health = 10
			attributes = {
				martial = 13
				intrigue = 13
			}
		}

Which seems like it gives a name...or at least, is supposed to.
You can give people a name inside of the "create_character" command, but you can't do so inside of the "new_character" scope, which is what ATP mentioned. You can indeed assign names inside create_character, but they will always be the same every time this event fires since you can't do "name = FROM" (well, you can, but your character will be literally named "FROM" instead of getting his "parent's" name). That's why you can't use this to dinamically create clones of anybody with the "immortal" trait, but only of a single given character per event, defined from the beginning.
 
Ah, yes. Makes sense.

Well, the cheats thread mentions an Age command - I suppose you could always just open up the console every decade or so and reduce your age by 10, if that command works.
 
I also tried this and didn't have any luck either. I tried values as huge as +10000 health, but nobody would last more than a few days when I set their birth year only 150 year in the past. Death by old age seems to be hardcoded, and not only that, you can't even change the average longevity of the characters (I had assumed some kind of variable in the common\ folder which would control the average lifespan, but I couldn't find any). I thought I could make everybody immortal by setting the base lifespan as 1000 years or so, and then kill all characters without the "immortal" trait by event when they reached old age, but since we can't affect the lifespan it wasn't possible either.

It would be pretty amazing if the devs decided to export their age values that determine young age, middle age, old age and (particularly) average lifespan to common\defines.lua in the next patch. It would be even more amazing if we could define it by culture, but that might be too much to ask...
+1 For mod flexibility it would be very nice to be able to have better access to this. I would like to try playing a fantasy mod or two.
 
I hate to dredge this up, but can you fire console commands via event? If so, can you use a series of traits and/or character modifiers to basically count up their age. For example:

Bob is a Vampire and has the age_lt_50 trait. When he turns 50, an event fires to lower his age back to 30 and his trait becomes age_50. So now he is 50. When he turns fifty "again", the even fires again lowering his age to 30 and changing his trait to age_70. Now he is 70.

Now you can have immortal characters, or set predetermined limits through race traits as well.

Of course, the whole thing relies on one being able to fire console commands via event...