# Thread: Implementing Marian Reforms in M2TW

1. ## Implementing Marian Reforms in M2TW

Implementing Marian Reforms in M2TW

Introduction

The 'marian reforms' mechanic is a leftover from RTW. It is a specific event which is triggered once certain hardcoded conditions are met. The status of the event (activated/not activated) can affect building effects through a specific conditional, as well as the factions' bodyguard units through a unit attribute.

Requirements

In order to be triggered, marian reforms require:

1. removing the 'marian_reforms_disabled' line from descr_strat
Code:
...
start_date    1080 summer
end_date    1530 winter
timescale    2.00

marian_reforms_disabled
rebelling_characters_active
night_battles_enabled
show_date_as_turns
brigand_spawn_value 20
pirate_spawn_value 28
...
2. adding the "italy" hidden resource to any region(s) in descr_regions (if the HR is not already defined at the top of your export_descr_buildings, it should also be added there)
Code:
London_Province
London
england
English_Rebels
232 41 46
atlantic, explorers_guild, woodsmens_guild, italy
5
4
religions { catholic 85 orthodox 0 islam 0 pagan 13 heretic 2 }
Code:
hidden_resources sparta rome italy america atlantic explorers_guild swordsmiths_guild woodsmens_guild teutonic_knights_chapter_house knights_of_santiago_chapter_house crusade jihad arguin horde_target no_pirates no_brigands
3. adding a new culture with the internal name "roman" (or renaming an existing one) and assigning at least one faction to it
This is a slightly more involved procedure than editing a couple of lines (though it's not hard), and detailing it is beyond the scope of the present tutorial, so please check this thread out for a walkthrough of how to add a new culture in M2. Renaming one is a similar process.

Activation

The marian reforms will be activated when a faction that belongs to the 'roman' culture controls a region with the 'italy' hidden resource and upgrades its settlement to 'huge city'. There will be no message or other visual indication that the activation took place.

Activation 'by default'

It is possible to set the marian reforms as already activated at campaign start by adding the "marian_reforms_activated" line at the top of desc_strat.
Code:
...
start_date    1080 summer
end_date    1530 winter
timescale    2.00

marian_reforms_activated
marian_reforms_disabled
rebelling_characters_active
night_battles_enabled
show_date_as_turns
brigand_spawn_value 20
pirate_spawn_value 28
...

Effects

When the reforms are activated, there are two ways they can affect the campaign.

In order to achieve this certain units must be given the "general_unit_upgrade" attribute in export_descr_unit. Those units must be listed below the regular BG unit of the factions they are available to, otherwise the engine will pick them as the default ones. It is not necessary to have upgraded BGs for every faction.

Code:
type             NE Late Bodyguard
dictionary       NE_Late_Bodyguard      ; General's Bodyguard
category         cavalry
class            heavy
voice_type       General
banner faction   main_cavalry
soldier          NE_Late_Bodyguard, 16, 0, 1
mount            armoured horse
mount_effect     elephant -4, camel -4
attributes       sea_faring, hide_forest, very_hardy, can_withdraw, general_unit, general_unit_upgrade
formation        2, 4.4, 3, 6, 2, square
stat_health      2, 0
stat_pri         13, 8, no, 0, 0, melee, melee_blade, piercing, spear, 25, 1
;stat_pri_ex      0, 0, 0
stat_pri_attr    no
stat_sec         14, 4, no, 0, 0, melee, melee_blade, piercing, sword, 25, 1
;stat_sec_ex      0, 0, 0
stat_sec_attr    no
stat_pri_armour  9, 5, 3, metal
;stat_armour_ex   9, 10, 0, 0, 5, 3, 3, metal
stat_sec_armour  0, 0, flesh
stat_heat        6
stat_ground      0, -2, -4, 0
stat_mental      11, normal, trained
stat_charge_dist 45
stat_fire_delay  0
stat_food        60, 300
stat_cost        1, 870, 250, 120, 95, 870, 1, 210
armour_ug_levels 5, 6
armour_ug_models NE_Late_Bodyguard, NE_Late_Bodyguard_ug1
ownership        england, scotland, france, hre, denmark, poland, hungary
era 2            england, scotland, france, hre, denmark, poland, hungary
;unit_info        13, 0, 34
When the reforms are triggered, the family members of every faction will switch to their upgraded bodyguard unit, if one is available.
2. Building effects
This can be achieved by using the "marian_reforms" conditional in export_descr_buildings.

Code:
recruit_pool "Longbowmen"  1   0.7   6  0  requires factions { england, } and marian_reforms
recruit_pool "Highland Archers"  1   0.7   6  0  requires factions { scotland, } and not marian_reforms
When the reforms are triggered, any building effects with the conditional will become active, while those with a negative conditional will become inactive.

2. ## Re: Implementing Marian Reforms in M2TW

Well, what can I say:

3. ## Re: Implementing Marian Reforms in M2TW

Ooh, that's cool and interesting!

Is it a new "discovery"?

Originally Posted by Aikanár
Was it very sunny and hot that day?

4. ## Re: Implementing Marian Reforms in M2TW

From what I've read on the M2 forums, everyone thought they did not work on the engine, so I guess it's a 'new discovery' in that sense.

Yes, that's the only way to get an upgraded/different bodyguard mid-campaign (without killing a character and spawning a new one with the same name etc) that I know of. This is actually why I looked into this, I was asked to find a way to change bodyguards in-game.

5. ## Re: Implementing Marian Reforms in M2TW

That's great.
What about other culture belonging factions.
How can we create army reforms to them?
We can not have common cuture (roman) to all factions.
Maybe through an event?

6. ## Re: Implementing Marian Reforms in M2TW

The reforms apply to all factions once triggered, you can't have this type of reforms happen at different times for different factions.

Events are the usual way of simulating reforms, since they can be triggered independently for each faction and based on whatever conditionals you want - and effects/recruitment can be tied to them in EDB. The drawback with events is that the generals don't get upgraded, but you can get around that by allowing armour upgrades for the BG based on events and simulating the 'new' units with a model upgrade of the old ones (assuming the unit type and description are applicable to both versions).

7. ## Re: Implementing Marian Reforms in M2TW

Originally Posted by EP!anastasi
Was it very sunny and hot that day?
It was freezing cold and Aradan had little pitty for my frozen fingers hammering the keyboard to get the code in the file as fast as he demanded ....

8. ## Re: Implementing Marian Reforms in M2TW

Great discovery! A lot of potential this feature can give.

9. ## Re: Implementing Marian Reforms in M2TW

To be honest the only thing the reform offer that scripted events can't provide and I'm not 100% sure about it, is the upgraded bodyguard ability. Everything else I believe can be achieved through scripted events.

EDIT: I missed that Aradan said exactly the same thing

10. ## Re: Implementing Marian Reforms in M2TW

Does it require entries in the data\text files and an event pic?

Because in event_title I have this:
Code:
{marian_reform}DO NOT TRANSLATE: THIS TEXT SHOULD BE REPLACED BY TEXT FROM ANOTHER FILE
And in event_strings it's this:
Code:
{marian_reform_body_eastern_european}DO NOT TRANSLATE: THIS HISTORIC EVENT SHOULD BE REPLACED ON SCREEN WITH TEXT FROM ANOTHER FILE!
{marian_reform_body_greek}DO NOT TRANSLATE: THIS HISTORIC EVENT SHOULD BE REPLACED ON SCREEN WITH TEXT FROM ANOTHER FILE!
{marian_reform_body_mesoamerican}DO NOT TRANSLATE: THIS HISTORIC EVENT SHOULD BE REPLACED ON SCREEN WITH TEXT FROM ANOTHER FILE!
{marian_reform_body_middle_eastern}DO NOT TRANSLATE: THIS HISTORIC EVENT SHOULD BE REPLACED ON SCREEN WITH TEXT FROM ANOTHER FILE!
{marian_reform_body_northern_european}DO NOT TRANSLATE: THIS HISTORIC EVENT SHOULD BE REPLACED ON SCREEN WITH TEXT FROM ANOTHER FILE!
{marian_reform_body_southern_european}DO NOT TRANSLATE: THIS HISTORIC EVENT SHOULD BE REPLACED ON SCREEN WITH TEXT FROM ANOTHER FILE!

11. ## Re: Implementing Marian Reforms in M2TW

There is no message when the reforms are activated, so I believe no strings are necessary.

Yes, I know where the link goes, a new culture is required with the "roman" name, not a new faction.

12. ## Re: Implementing Marian Reforms in M2TW

There is no message when the reforms are activated, so I believe no strings are necessary.
Would it be possible for someone to make a new one and implement it?

13. ## Re: Implementing Marian Reforms in M2TW

You mean a new message? If the game does not trigger one on its own, the only way to do it is with a script.

14. ## Re: Implementing Marian Reforms in M2TW

You mean a new message?
Yep
If the game does not trigger one on its own, the only way to do it is with a script.
Yes, i understand this, i just imagined that maybe there was already the mechanism but just the message missing? So you wouldn't have to write a script, just put a proper message somehow... Or would you have already noticed if this was the case?
Do i make sense?

15. ## Re: Implementing Marian Reforms in M2TW

can we set the activation of the Marian reforms as anything we want? like kill this faction or capture the X-named settlement?

and as i understood right the Marian reforms can unlock new recruitable units and buildings , if we set the Marian reforms as requirement of course.

16. ## Re: Implementing Marian Reforms in M2TW

Originally Posted by EP!anastasi
Yep
Yes, i understand this, i just imagined that maybe there was already the mechanism but just the message missing? So you wouldn't have to write a script, just put a proper message somehow... Or would you have already noticed if this was the case?
Do i make sense?
You do make sense.

The text for such a message is already there in the files (Gigantus posted the entries above), and one would expect it to be displayed, but the game does not seem to trigger it. So the only work-around would be a scripted message.

Originally Posted by Toho
can we set the activation of the Marian reforms as anything we want? like kill this faction or capture the X-named settlement?

and as i understood right the Marian reforms can unlock new recruitable units and buildings , if we set the Marian reforms as requirement of course.
No, the reforms' conditionals are hardcoded.

As said above, the marian reforms aren't particularly useful by M2's standards (being a remnant from RTW and very limiting), except for the upgraded bodyguards.

17. ## Re: Implementing Marian Reforms in M2TW

Fantastic discovery Aradan! Its good to know we can plan upgraded BG units once again.

18. ## Re: Implementing Marian Reforms in M2TW

This will work a treat for the Roman faction in War of the Gods mod, thanks for this find.

I noticed the entry in descr_strat but never understood how to get the marian reforms to work

19. ## Re: Implementing Marian Reforms in M2TW

Originally Posted by ToonTotalWar
I noticed the entry in descr_strat but never understood how to get the marian reforms to work
You probably thought this doesn't work cause you knew this guy died more than 1000 years ago (from the timeframe of m2tw)
This is a prime example of how CA lets us re-create history!

20. ## Re: Implementing Marian Reforms in M2TW

... the only way to get an upgraded/different bodyguard mid-campaign (without killing a character and spawning a new one with the same name etc) that I know of. This is actually why I looked into this, I was asked to find a way to change bodyguards in-game.
Rather than killing a character you can send him off map. When you bring him back via a spawn_army you can still use a different bodyguard but he will keep everything else: traits, ancs, battle_model, portrait, hero ability, etc.

But the script to send off map and bring him back needs to know his name which means that it can only be used on characters that the script 'knows about'. Which is next to useless for everyday randomly-named generals as opposed to heroes, historical figures, etc.

It would be no good for upgrading all BGs in one or more factions - like these reforms do - but it is another tool in the box. (This TATW submod uses it.)

Page 1 of 2 1 2 Last

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•