Total War Center Forums  
<a href="http://www.game-advertising-online.com/" target=_blank>Game Advertising Online</a><br> banner requires iframes

Go Back   Total War Center Forums > Medieval II: Total War > Mod Workshop > Text Editing and Scripting

Text Editing and Scripting Ask questions about all text editing and scripting aspects of modding.

Reply
 
Thread Tools Search this Thread
rebelyell2006
Old October 31, 2009, 01:10 AM / Modification to recruitment processes   #1
Light Infantryman
 
Posts: 24
?
I decided to try something different for recruiting units in a city. Here is a town watch:

Spoiler Alert, click show to read: 
recruit_pool "Spear Militia" 1 0.7 2 0 requires factions { england, scotland, france, hre, denmark, spain, portugal, } and not event_counter first_blast_furnace 1
recruit_pool "EE Spear Militia" 1 0.7 2 0 requires factions { poland, hungary, } and not event_counter first_blast_furnace 1
recruit_pool "Italian Spear Militia" 1 0.7 2 0 requires factions { milan, venice, papal_states, sicily, } and not event_counter first_blast_furnace 1
recruit_pool "Bill Militia" 1 0.7 2 0 requires factions { england, } and event_counter first_blast_furnace 1 and not event_counter malleus_maleficarum 1
recruit_pool "Swordstaff Militia" 1 0.7 2 0 requires factions { denmark, } and event_counter first_blast_furnace 1 and not event_counter malleus_maleficarum 1
recruit_pool "Partisan Militia" 1 0.7 2 0 requires factions { france, } and event_counter first_blast_furnace 1 and not event_counter malleus_maleficarum 1
recruit_pool "Scots Pike Militia" 1 0.7 2 0 requires factions { scotland, } and event_counter first_blast_furnace 1 and not event_counter malleus_maleficarum 1
recruit_pool "Heavy Bill Militia" 1 0.7 2 0 requires factions { england, } and event_counter malleus_maleficarum 1
recruit_pool "Pike Militia" 1 0.7 2 0 requires factions { france, hre, spain, portugal, milan, venice, papal_states, sicily, } and event_counter first_blast_furnace 1
recruit_pool "Halberd Militia" 1 0.7 2 0 requires factions { hre, papal_states, sicily, poland, hungary, } and event_counter first_blast_furnace 1
recruit_pool "Swordsmen Militia" 1 0.7 2 0 requires factions { spain, portugal, } and event_counter malleus_maleficarum 1
recruit_pool "Dismounted Conquistadores" 1 0.7 2 0 requires factions { spain, portugal, } and hidden_resource america
recruit_pool "Heavy Pike Militia" 1 0.7 2 0 requires factions { scotland, } and event_counter malleus_maleficarum 1
recruit_pool "Archer Militia" 1 0.7 2 0 requires factions { england, } and not event_counter malleus_maleficarum 1
recruit_pool "Crossbow Militia" 1 0.7 2 0 requires factions { france, hre, denmark, spain, portugal, } and not event_counter malleus_maleficarum 1
recruit_pool "EE Crossbow Militia" 1 0.7 2 0 requires factions { poland, } and not event_counter malleus_maleficarum 1
recruit_pool "Pavise Crossbow Militia" 1 0.7 2 0 requires factions { venice, papal_states, sicily, hungary, } and not event_counter malleus_maleficarum 1
recruit_pool "Genoese Crossbow Militia" 1 0.7 2 0 requires factions { milan, } and not event_counter malleus_maleficarum 1
recruit_pool "Hand Gunners" 1 0.7 2 0 requires factions { hre, denmark, poland, papal_states, sicily, } and event_counter gunpowder_discovered 1 and building_present_min_level academic alchemists_lab and not event_counter battle_of_pavia 1
recruit_pool "Arquebusiers" 1 0.7 2 0 requires factions { england, france, hre, denmark, spain, milan, venice, papal_states, sicily, poland, hungary, } and event_counter gunpowder_discovered 1 and building_present_min_level academic alchemists_lab
recruit_pool "Portuguese Arquebusiers" 1 0.7 2 0 requires factions { portugal, } and event_counter gunpowder_discovered 1 and building_present_min_level academic alchemists_lab
recruit_pool "Musketeers" 1 0.7 2 0 requires factions { spain, portugal, milan, venice, } and event_counter gunpowder_discovered 1 and building_present_min_level academic alchemists_lab
recruit_pool "Italian Cavalry Militia" 1 0.7 2 0 requires factions { milan, venice, } and event_counter first_blast_furnace 1
recruit_pool "EE Archer Militia" 1 0.5 4 0 requires factions { russia, }
recruit_pool "SE Town Militia" 1 0.5 4 0 requires factions { byzantium, }
recruit_pool "ME Town Militia" 1 0.5 4 0 requires factions { moors, turks, mongols, timurids, }
recruit_pool "ME Archer Militia" 1 0.5 4 0 requires factions { egypt, }
recruit_pool "Pikemen" 1 0.7 2 0 requires factions { france, } and event_counter first_printing_press 1
recruit_pool "Aventuros" 1 0.7 2 0 requires factions { portugal, } and event_counter first_printing_press 1


The Catholic faction units will have successively improved recruitment pools with each building upgrade. Russia, Byzantium and the Middle Eastern factions are as vanilla. I decided to do this because I do not like battles in 1600 between crossbow militia and arquebusiers - that just seems ridiculous. Basing all unit recruitment on event_counters should fix this.

The problem is, I start up a new campaign, and it does not give me any problems until I right-click select a building, and then I get a CTD with a generic "Medieval 2: Total War encountered an unspecified error and will now exit" message. Have I made an error here, or is there a limit to the size of the export_descr_building? I do not have any problems with recruiting units from the city barracks, and I can construct them. But I get an error on right clicking on them, from all factions.

Last edited by rebelyell2006; October 31, 2009 at 01:11 AM. Reason: getting my tags mixed up
rebelyell2006 is offline  
Reply With Quote
uanime5
Old October 31, 2009, 07:03 AM / Re: Modification to recruitment processes   #2
 
uanime5's Avatar
Artifex
 
Posts: 1,088
+++++++++++++++++++
This problem is most likely to do with the building's description. I'd check that all the prerequisite buildings have descriptions in the data/text/export_buildings.txt.

Another cause is that this is a building that the faction cannot have so when you try to access the description the mod crashes.
Crashes and how to fix them guide
http://www.twcenter.net/forums/showthread.php?t=142374

World map mod 1.4 (a mod with a map that covers the whole world)
http://www.twcenter.net/forums/downloads.php?do=file&id=2290 (Mod)

4 Seasons (6 Empires battle for supremacy); 3.1 version available
http://www.twcenter.net/forums/downloads.php?do=file&id=2165 (Mod)

Eras Total Conquest 1.5 (1080, 1200, 1230, 1300, 1346, 1400, 1454, 1500, or 1547)
uanime5 is offline  
Reply With Quote
rebelyell2006
Old October 31, 2009, 05:07 PM / Re: Modification to recruitment processes   #3
Light Infantryman
 
Posts: 24
?
I have not changed the building itself, I only changed the units that can be recruited. It is just the city Barracks. Which is why I am quite confused.
rebelyell2006 is offline  
Reply With Quote
Taiji
Old October 31, 2009, 07:19 PM / Re: Modification to recruitment processes   #4
 
Taiji's Avatar
Battlefield Ninja
 
Posts: 3,641
highpos ++++++++++++++++++++++++
*delete

Last edited by Taiji; October 31, 2009 at 07:24 PM.
Taiji is offline  
Reply With Quote
rebelyell2006
Old November 06, 2009, 12:02 AM / Re: Modification to recruitment processes   #5
Light Infantryman
 
Posts: 24
?
And now I have discovered that the Siege buildings cannot be built. And it is now crashing to desktop in the Rebel AI turn. I have no idea what is going on here. If someone has the time to look it over, I have uploaded my export_descr_building.txt file, as I am certain I have made some mistake that is probably very obvious that I have missed.
Attached Files
File Type: txt export_descr_buildings.txt (278.6 KB, 1 views)
rebelyell2006 is offline  
Reply With Quote
gigantus
Old November 06, 2009, 12:13 PM / Re: Modification to recruitment processes   #6
 
gigantus's Avatar
Maps, anyone?
 
Posts: 5,472
highpos highpos +++++
If it just happens with the barracks then it might have to do the number of levels and their conversions. Put that shouldn't cause the crash in my opinion.

Your best bet is still to upload a copy of the log. It sometimes gives an indication in these cases at what stage the program crashed.
gigantus is offline  
Send a message via Skype™ to gigantus
Reply With Quote
rebelyell2006
Old November 06, 2009, 12:36 PM / Re: Modification to recruitment processes   #7
Light Infantryman
 
Posts: 24
?
OK, here is the log.

EDIT:

There are a few benefits to the game not working properly. The AI does not spam their armies with catapults, and since the game takes forever to shut down, I can just select a city barracks and it CTDs automatically. However the armies do tend to spam their armies with crossbow units now.
Attached Files
File Type: txt system.log.txt (305.8 KB, 1 views)

Last edited by rebelyell2006; November 06, 2009 at 05:52 PM.
rebelyell2006 is offline  
Reply With Quote
gigantus
Old November 06, 2009, 08:54 PM / Re: Modification to recruitment processes   #8
 
gigantus's Avatar
Maps, anyone?
 
Posts: 5,472
highpos highpos +++++
Log doesn't give a clue.
I suggest to use a backup of the descr_strat and then add\modify the entries in small batches and tes. that way you will have a better idea what might trigger the crash.
gigantus is offline  
Send a message via Skype™ to gigantus
Reply With Quote
rebelyell2006
Old November 07, 2009, 12:07 AM / Re: Modification to recruitment processes   #9
Light Infantryman
 
Posts: 24
?
I have rolled back what I know I have done up to this current issue. I've returned the city barracks to the vanilla. I have not returned the entire file back to vanilla, because I have added tercio and landschneckt buildings a few months back that have not given me issue. I am no longer CTD when I select the barracks in game, however the Siege and Castle_Siege buildings still do not show up as options in game. I have included an event_counter restriction on the Siege and Castle_Siege buildings. Could this restriction be messing up the entire building? And can units have a "building_present_min_level" restriction?


EDIT:

I found one of the problems. "and building_present_min_level academic alchemists_lab " cannot be used for units. That has fixed the CTD problem, but I have yet to figure out why the Siege buildings are not recruitable.

Last edited by rebelyell2006; November 07, 2009 at 02:13 AM.
rebelyell2006 is offline  
Reply With Quote
gigantus
Old November 07, 2009, 05:51 AM / Re: Modification to recruitment processes   #10
 
gigantus's Avatar
Maps, anyone?
 
Posts: 5,472
highpos highpos +++++
Quote:
I have included an event_counter restriction on the Siege and Castle_Siege buildings. Could this restriction be messing up the entire building?
If the first building in line has a restriction that is not fulfilled, then all following buildings of that branch will not be able to be build.
Quote:
And can units have a "building_present_min_level" restriction?
That should be a viable restriction. Can't build merchants in the market if there is no port for instance.
gigantus is offline  
Send a message via Skype™ to gigantus
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

<a href="http://www.game-advertising-online.com/" target=_blank>Game Advertising Online</a><br> banner requires iframes

All times are GMT -5. The time now is 11:47 AM.


Forums powered by vBulletin® Version 3.8.3 - Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.