PDA

View Full Version : Can I mod the "Faction Re-emergence" code?



Adrian II
01-27-2007, 22:05
I hate them.

Re-emerging factions.

I do not hate them for re-emergenging -- which is a nice detail in the game -- but for the way in which the event is scripted.

It always happens in some piss-poor province where the AI, in its own sneaky vein, has lowered Loyalty to below 120%. So far so good.

If this province revolts even though it has been a part of said faction's realm for only three turns in one hundred years, so be it.

But then this province may yield a re-emerging army of up to five thousand state-of-the-art troops, all teched up, hyped up and rearing to jump at your throat. Alternatively, it may yield just three thousand underpaid Handgunners who flee at the drop of a horse apple; rebels without a clue, so to speak.

That, my friends, defies belief. In particular, it defeats Adrian's enjoyment of the game because he likes his game -- hold on -- to be as realistic as possible.

[Snips interminable, boring discussion of the term 'realistic']

Way back when M:TW had just gone gold, I remember seeing a discussion between mods about how to change the code for this re-emergence circus. Someone suggested it could be done.

Hence my question: is it possible for a dedicated amateur (I never touched a mod in my life) to change or delete the code that is resposible for re-emergences.

If it can be changed, I want to change the composition of re-emerging armies to, say, thousands and thousands of peasants led by some noblemen on foot, maybe some on horseback, and some very good but unsophisticated ranged units.

If that can't be done, I would rather scrap the code altogether than let it stand.

Does anyone here know the answer?

Aenarion
01-28-2007, 20:45
I think that such a code for generating re-emerging factions is one of those listed under the hard coded elements of the game. But I will try and find all I can regards this matter, and hopefully will come up with a more decent answer! :2thumbsup:

Thanks, :bow:
Aenarion

Adrian II
01-28-2007, 21:07
I think that such a code for generating re-emerging factions is one of those listed under the hard coded elements of the game. But I will try and find all I can regards this matter, and hopefully will come up with a more decent answer! :2thumbsup:

Thanks, :bow:
AenarionPlease do, Aenarion! I would be much obliged. It's nice to have such an experienced modder on my side.
And thank you for taking the trouble. :bow:

Aenarion
01-29-2007, 09:12
Please do, Aenarion! I would be much obliged. It's nice to have such an experienced modder on my side.
And thank you for taking the trouble. :bow:

Well it's good to try and help people who have problems in this game. But certainly I'm not an experienced modder hehe :sweatdrop: but thanks for your comment! :2thumbsup:

Anyway, I've been searching around the script (text) files in MTW:VI and I came across this piece of code, which can be found in the MTW folder/ Loc Folder/ Events text file.


// New character names and surnames
["reemerging daimyo title"]
{"%s Reappear"} // Don't translate %s. String will look like "The Scots Reappear"

["papacy_restored_title"]
{"Papacy Restored"}

["papacy reemerge text1"]
{"The Pope in exile is leading a rebellion to reunite the Papacy and restore it to it's former independence. "}

["reemerge text1"]
{"An heir of the last ruling lineage who escaped detection has organised a rebellion in an attempt to re-establish his faction. "}
["reemerge regions joining"]
{"A number of provinces previously held by rebels have joined his cause. "}
["reemerge incomers joining"]
{"A number of other rebellions in progress have declared allegiance to his faction. "}
["reemerge no provinces"]
{"Number of rebel provinces joining the revolt : "}
["reemerge no incomers"]
{"Number of provinces being attacked : "}

I know it's not very important, but I think it can lead us somewhere else. The odd thing is that it's refering to the 'Papacy' faction only; (probably because it is a hard-coded faction and so it is by default applied to all). Anyway, this code is used for displaying the actual text when the re-emerging window in the campaign map appears.

I will try and find more information regards this matter. I won't stop until I find something definite or useful! hehe :wall:

Thanks, :bow:
Aenarion

R'as al Ghul
01-29-2007, 09:47
If it can be changed, I want to change the composition of re-emerging armies to, say, thousands and thousands of peasants led by some noblemen on foot, maybe some on horseback, and some very good but unsophisticated ranged units.

If that can't be done, I would rather scrap the code altogether than let it stand.

Does anyone here know the answer?


Hello Adrian II,

yes that can be done. You need the Gnome Editor to edit the crusadr_unit_prod file. Column 11 is labeled "Rebelling Troop mixes this unit can belong to" and for peasants it reads:

"CATH_REBELS(15), CATH_LOYALISTS(5), CATH_PEASANTS(10), CATH_BANDITS(12), CATH_ZEALOTS(10), ORTH_REBELS(15), ORTH_LOYALISTS(5), ORTH_PEASANTS(10), ORTH_BANDITS(12), ORTH_ZEALOTS(10), ENG_BANDITS(2), CATH_HERETICS(15), ORTH_HERETICS(15), PAG_REBELS(10), PAG_LOYALISTS(10), PAG_PEASANTS(10), PAG_BANDITS(10), PAG_ZEALOTS(10)"

What you want to change concerning the Re-emergences is the value for LOYALISTS. 0 gives no unit. High numbers mean high probability and numbers.
You have to play around with it a bit. If you have a savegame you may be able to do some tests on that. I don't remember if changes on the unit_prod take effect when loading savegames, but they should.

The Gnome Editor can be found in the download section for MTW under tools.

R'as

naut
01-29-2007, 10:00
I don't remember if changes on the unit_prod take effect when loading savegames, but they should
They do, so long as the changes aren't too major.

Adrian II
01-29-2007, 14:39
Hello Adrian II,

yes that can be done. You need the Gnome Editor to edit the crusadr_unit_prod file.Thanks for the advice, R'as al Ghul. Yes, I have held a beaufitul saved game in reserve for this very purpose.

Between you, Rythmic and Aenarion I should have collected enough pointers to help me pull this off one of these days. Thanks for now, guys, you have been a great help and I will report back with the results!
:bow: