PDA

View Full Version : A way to add titles to characters



Re Berengario I
12-06-2006, 04:51
One of my modding idea was to get rid of the territorial factions and instead stick with the dinastic factions as they are more realistic in a medieval contest. If any of you have ever played Crusader Kings you can catch the concept.

So I needed to give to the faction leaders and other named characters the noble titles linked to the regions they own or rule.

So I made a test with Traits and Triggers.

I wrote a new trait:

Trait DukeVenice
Characters family

Level DogeVenice
Description DogeVenice_desc
EffectsDescription DogeVenice_effects_desc
Threshold 1

Effect Trading 5

And 2 linked triggers (these are just the ones for venice faction, unfortunately in this case you need to make one set for every faction as we're messing with faction leaders. Plus we can have different traits based on the culture/religion... Sultan of Venice comes soon to mind)

;------------------------------------------
Trigger isdogevenice_venice
WhenToTest CharacterTurnStart

Condition CharFactionType venice
and IsFactionLeader
and I_SettlementOwner Venice = venice
and Trait DukeVenice <1

Affects DukeVenice 1 Chance 100

;------------------------------------------
Trigger isnodogevenice_venice
WhenToTest CharacterTurnStart

Condition CharFactionType venice
and IsFactionLeader
and not I_SettlementOwner Venice = venice
and Trait DukeVenice =1

Affects DukeVenice -1 Chance 100

This is the result (which I am very happy with :beam: )

https://img220.imageshack.us/img220/3584/mtw21vk4.jpg

I'm still wondering how many things can modders link to titles...

d1ng0d0g
12-06-2006, 08:39
Okay. Very cool. Just what I was looking at myself (allthough I suck at modding due to inexperience).

And it is possible to link it to traits. Very cool.

Here's an idea and I wonder if this is possible too, allthough it's a lot more complex then your original idea.

An ancillary, "Lettres Patentes" which gives +2 authority, and can always appears on the faction leader. This is a transferable ancillary, one that disappears after been given away.

If the Faction Leader gives these "Lettres Patentes" to a general, this general will gain a title depending on his location.

There's two types of titles. Titles that actually have a location linked to them, and "battlefield" promotion like titles.

When giving the "Lettres Patentes" you check for the location where it's given. If it's a city, the character it's given to gains the title of that city.

If it's on the battlefield, he gains a special commendation title.

---

As the AI does not give away ancillaries, for AI factions a general should get the title on conquest of a castle or city.

---

Now this bit is a resource hog perhaps, but it should make things quite interesting.

At the start of each turn, check wether the title has already been given away and to which faction. Linked to this are new traits.

A trait which drastically drops loyalty if someone within the same faction holds the same title.

A trait which gives a bonus fighting another holder of the same title within a different faction.

If it's possible, even add an "event" which affects cities drastically depending on the Title Holders trait. Defection, Rebellion, and civil unrest comes to mind.

---

Okay, I will stop seeing many possibillities for now and focus on learning stuff.

But I still think my idea is pretty cool.

Dingo

Dave1984
12-06-2006, 10:20
One of my modding idea was to get rid of the territorial factions and instead stick with the dinastic factions as they are more realistic in a medieval contest. If any of you have ever played Crusader Kings you can catch the concept.

So I needed to give to the faction leaders and other named characters the noble titles linked to the regions they own or rule.

So I made a test with Traits and Triggers.

I wrote a new trait:

Trait DukeVenice
Characters family

Level DogeVenice
Description DogeVenice_desc
EffectsDescription DogeVenice_effects_desc
Threshold 1

Effect Trading 5

And 2 linked triggers (these are just the ones for venice faction, unfortunately in this case you need to make one set for every faction as we're messing with faction leaders. Plus we can have different traits based on the culture/religion... Sultan of Venice comes soon to mind)

;------------------------------------------
Trigger isdogevenice_venice
WhenToTest CharacterTurnStart

Condition CharFactionType venice
and IsFactionLeader
and I_SettlementOwner Venice = venice
and Trait DukeVenice <1

Affects DukeVenice 1 Chance 100

;------------------------------------------
Trigger isnodogevenice_venice
WhenToTest CharacterTurnStart

Condition CharFactionType venice
and IsFactionLeader
and not I_SettlementOwner Venice = venice
and Trait DukeVenice =1

Affects DukeVenice -1 Chance 100



How many new traits have you been able to enter?

So far I've only been able to add one- any others I create after this cannot be found in the database. Anyone know if there is a harcoded limit for traits?


Edit: Don't know what it was- just re-wrote the entries in a fresh copy of the files and they all worked fine.

Maizel
12-06-2006, 15:00
Nice job

Re Berengario I
12-06-2006, 15:20
As the AI does not give away ancillaries, for AI factions a general should get the title on conquest of a castle or city.

---

Now this bit is a resource hog perhaps, but it should make things quite interesting.

At the start of each turn, check wether the title has already been given away and to which faction. Linked to this are new traits.

A trait which drastically drops loyalty if someone within the same faction holds the same title.

A trait which gives a bonus fighting another holder of the same title within a different faction.

If it's possible, even add an "event" which affects cities drastically depending on the Title Holders trait. Defection, Rebellion, and civil unrest comes to mind.


This is exactly what I will do but I started from the more difficult as giving traits to generals and removing them it's easier (for example you don't have to check the ownership of the province, just the number of turns that general is garrisoning it), the only complication I foresee is that we need to setup variables to check if a title is already assigned so maybe it could be done just by scripting and not triggers but here modders more experienced than me can say if we can use variables in triggers.

Maizel
12-06-2006, 16:52
I think it'd be more functional to let cities generate a tital as a retinue. and letting a general of the owning faction who's in the settlement for x turns pick it up. And regenerating it when that general dies.

Though i'm sure this would be more difficult to mod in

Re Berengario I
12-06-2006, 18:04
I think it'd be more functional to let cities generate a tital as a retinue. and letting a general of the owning faction who's in the settlement for x turns pick it up. And regenerating it when that general dies.

Though i'm sure this would be more difficult to mod in

No, it would be the same as the "Sword of Muhamed" or "Holy Lance" etc but you would lose the flexybility to swap generals around and anyway that retinue should be granted to the faction leader and then manually given to whom you want but how can I remove it when your faction and general lose the region to the enemy?

There's not any command to remove retinues for what I know.

Maizel
12-06-2006, 18:21
I can't help you with that either.

Maybe some guys from the Fourth Age:TW could, They;ve made something similar

d1ng0d0g
12-06-2006, 19:18
No, it would be the same as the "Sword of Muhamed" or "Holy Lance" etc but you would lose the flexybility to swap generals around and anyway that retinue should be granted to the faction leader and then manually given to whom you want but how can I remove it when your faction and general lose the region to the enemy?

There's not any command to remove retinues for what I know.

Actually you don't remove the retinue if you lose the town. You temporarilly give a trait to the one holding the title, focussed on taking back the city from the contenders. That's a good reason to begin wars. And that is moddable even to the AI, allthough I'm still puzzling on how to implement it all.

It's moddable through how the state of relations between nations are implemented.

And it can be used to completely change the AI, and turn it more realistically.

Dingo