Log in

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



Adrian II
01-27-2007, 22:02
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?

EDIT
I double-posted this question in the Alchemist's Lab. Moderators please dispose of this thread as you see fit.

Vladimir
01-28-2007, 04:10
Well a short-term fix is to play M2. Just bring your fly swatter. There's been a lot of discussion here about how to stop re-emergences from occuring on isolated islands to give them a chance. A search on that might help somewhat.

Martok
01-28-2007, 07:55
I double-posted this question in the Alchemist's Lab. Modedators, please dispose of this thread as you think best. :bow:
I've always been a little curious about this myself, so I'm happy to let this one sit where it is. ~:)

I have to wonder if it really is possible, though, as one would think this issue would've already been addressed in the various mods. I can at least vouch that in the XL Mod, re-emerging armies are about as silly as they are in vanilla MTW/VI -- and I'd like to think that VikingHorde would've changed that if he could've. :shrug: Still, it's a good question.

naut
01-28-2007, 14:49
Well, you can't remove it as that would be illegal. However, you can change the AI rebellion and re-emergence stats/integers of units. Basically you'd have to trial every single unit to see the effects and the effectiveness of such a measure.

bamff
01-29-2007, 05:18
Pardon my complete ignorance, Rythmic, but where would one track down these stats?

I assume that they can be amended using Gnome Editor?

naut
01-29-2007, 05:57
Fire up Gnome Editor, open the Unit_Prod file it's column 11.

There are many labels, first the religion/culture specific (CATH, ORTH, MUS & PAG [You could probably add JEWISH to that aswell])

_REBELS()
_LOYALISTS()
_PEASANTS()
_BANDITS()
_ZEALOTS()
_HERETICS()

Then the less generic:

MONG_RAIDERS()
ENG_BANDITS()
CRUSADE()
JIHAD()

IIRC values between -15 and 15 should be inserted in brackets to increase/decrease occurance of appearance. If you don't want a unit to be available for a certain rebellion remove the identifier (for example you don't want Artillery in a rebellion remove CATH_REBEL(2)).

Adrian II
01-29-2007, 09:35
That sounds promising. Thanks, Rythmic! :thumbsup:

I will look into this sometime today (as soon as I have a couple of hours to spare) and report back to you.

Aenerion has also suggested a tentative solution in the parallel thread in the Alchemist Lab.

Martok, could you please lock this thread and let the thread in the Lab stand? This is after all a modification issue, though not a very sophisticated one. Thanks for your patience. :bow:

R'as al Ghul
01-29-2007, 10:34
Repost from the other thread:


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

Odin
01-29-2007, 20:43
I've always been a little curious about this myself, so I'm happy to let this one sit where it is. ~:)

I have to wonder if it really is possible, though, as one would think this issue would've already been addressed in the various mods. I can at least vouch that in the XL Mod, re-emerging armies are about as silly as they are in vanilla MTW/VI -- and I'd like to think that VikingHorde would've changed that if he could've. :shrug: Still, it's a good question.

While that is true, I recall (its been a while) that when VH was in development of this mod part of his goal was to take out peasants as they truly had minimal value, and VI had them coded to be the primary force in the reemergence config.

He upped the quality of troops at the price of quantity but it was something that couldnt be removed completely. So as Martok says here and other posters have replied, its a question of balancing the file to get what you personally want. VH did it in his mod already, and while not ideal its certainly better then nothing.

naut
01-30-2007, 10:06
Odin, thank you for fixing my mod.