View Full Version : Creative Assembly New Faction Woes -- CA please respond!
Several of us have been successful in adding new factions to Viking, however, following the same format does not seem to work in the MTW campaign. The universal problem seems to be crashes during battle.
Off the main battle directory is a highres directory and a low res directory. If you edit the d.txt you can get the custom battles to work with your new factions (it won't work if you don't do it). However, battles with the new factions crash during the campaign game regardless of d.txt entries.
What is the d.txt file? What is the purpose of the highres, lowres directories? Any idea why a new faction works perfectly in Viking but using the same exact code (with basic region changes etc) crashes in MTW?
Also, can you safely use the Burgundian, Swiss, and Russian factions during the early campaign game?
Appreciate your help. Thanks
GilJaysmith
05-21-2003, 20:37
I can't see any reference to "d.txt" in the Vikings code. The datestamp suggests that it shipped as part of Medieval, and frankly the name suggests it was someone's debug file. I'll check the Medieval code tomorrow to see if it's used in there. But I can't see at the moment why its contents would have an impact on Vikings.
The code for shield-picking seems to look up the unit's body type code in the following table table and use the corresponding folder for the shield...
Code Sample
{"ChivalricMenAtArms\\", HLPLARSH},
{"ChivalricKnights\\", PLATECAV},
{"ChivalricSergeants\\", MSHELM},
{"FeudalSergeants\\", PEASANT},
{"FeudalMenAtArms\\", CHAINHLM},
{"FeudalFootKnights\\", CHAINHLM},
{"GothicSergeants\\", PLATES},
{"HighRoyalKnights\\", MKNIGHT},
{"MountedSergeants\\", LARMWCAV},
{"OrderFootSoldiers\\", MSHELM + 0x80000000}
[/QUOTE]
That slightly weird last type is for soldiers who pick up an Order shield rather than a faction shield; there are four order shields, and it uses the faction id to index the next table to determine which order to use. A null means that faction isn't supposed to have Order Foot and will get blank shields.
Code Sample
NULL,
"Templar", //almohad
"Templar", //byzantium
NULL, //danish
"Templar", //egypt
"Templar", //england
"Templar", //france
"Teutonic", //germany
"Hospitaller", //italy
NULL, //poland
NULL, //russia
NULL, //spain
NULL, //turkey
"Santiago", //aragon
NULL, //burgundy
NULL, //golden horde
NULL, //hungary
NULL, //novgorod
NULL, //papal states
NULL, //sicily
NULL //swiss"
[/QUOTE]
All of which is hardcoded :) And all of which, while potentially interesting, isn't really to do with why a faction might break MTW but not VI. And the answer is, I don't really know, but if you mail me at giljaysmith@hotmail.com with a zip of the files you're changing (assuming they're small enough) then I'll put them through a copy of MTW in debug, and see if I can see what the problem is.
It could easily be that faction modding just wasn't supported in MTW but the system was made more flexible in VI and so now you're in luck. *shrug* that's the breaks.
Quote[/b] (GilJaysmith @ May 21 2003,14:37)]I can't see any reference to "d.txt" in the Vikings code. The datestamp suggests that it shipped as part of Medieval, and frankly the name suggests it was someone's debug file. I'll check the Medieval code tomorrow to see if it's used in there. But I can't see at the moment why its contents would have an impact on Vikings.
The code for shield-picking seems to look up the unit's body type code in the following table table and use the corresponding folder for the shield...
Code Sample
{"ChivalricMenAtArms\\", HLPLARSH},
{"ChivalricKnights\\", PLATECAV},
{"ChivalricSergeants\\", MSHELM},
{"FeudalSergeants\\", PEASANT},
{"FeudalMenAtArms\\", CHAINHLM},
{"FeudalFootKnights\\", CHAINHLM},
{"GothicSergeants\\", PLATES},
{"HighRoyalKnights\\", MKNIGHT},
{"MountedSergeants\\", LARMWCAV},
{"OrderFootSoldiers\\", MSHELM + 0x80000000}
That slightly weird last type is for soldiers who pick up an Order shield rather than a faction shield; there are four order shields, and it uses the faction id to index the next table to determine which order to use. A null means that faction isn't supposed to have Order Foot and will get blank shields.
Code Sample
NULL,
"Templar", //almohad
"Templar", //byzantium
NULL, //danish
"Templar", //egypt
"Templar", //england
"Templar", //france
"Teutonic", //germany
"Hospitaller", //italy
NULL, //poland
NULL, //russia
NULL, //spain
NULL, //turkey
"Santiago", //aragon
NULL, //burgundy
NULL, //golden horde
NULL, //hungary
NULL, //novgorod
NULL, //papal states
NULL, //sicily
NULL //swiss"
[/QUOTE]
All of which is hardcoded http://www.totalwar.org/forum/non-cgi/emoticons/smile.gif And all of which, while potentially interesting, isn't really to do with why a faction might break MTW but not VI. And the answer is, I don't really know, but if you mail me at giljaysmith@hotmail.com with a zip of the files you're changing (assuming they're small enough) then I'll put them through a copy of MTW in debug, and see if I can see what the problem is.
It could easily be that faction modding just wasn't supported in MTW but the system was made more flexible in VI and so now you're in luck. *shrug* that's the breaks.[/QUOTE]
Thanks for the offer Gil.
Grell/Bohemia --
I think my efforts are behind yours but you guys are having similar problems. I will be glad to take a backseat here and let Gil look at your MOD for the interests of the group.
Quote[/b] (GilJaysmith @ May 21 2003,14:37)]I can't see any reference to "d.txt" in the Vikings code. The datestamp suggests that it shipped as part of Medieval, and frankly the name suggests it was someone's debug file. I'll check the Medieval code tomorrow to see if it's used in there. But I can't see at the moment why its contents would have an impact on Vikings.
The code for shield-picking seems to look up the unit's body type code in the following table table and use the corresponding folder for the shield...
Code Sample
{"ChivalricMenAtArms\\", HLPLARSH},
{"ChivalricKnights\\", PLATECAV},
{"ChivalricSergeants\\", MSHELM},
{"FeudalSergeants\\", PEASANT},
{"FeudalMenAtArms\\", CHAINHLM},
{"FeudalFootKnights\\", CHAINHLM},
{"GothicSergeants\\", PLATES},
{"HighRoyalKnights\\", MKNIGHT},
{"MountedSergeants\\", LARMWCAV},
{"OrderFootSoldiers\\", MSHELM + 0x80000000}
That slightly weird last type is for soldiers who pick up an Order shield rather than a faction shield; there are four order shields, and it uses the faction id to index the next table to determine which order to use. A null means that faction isn't supposed to have Order Foot and will get blank shields.
Code Sample
NULL,
"Templar", //almohad
"Templar", //byzantium
NULL, //danish
"Templar", //egypt
"Templar", //england
"Templar", //france
"Teutonic", //germany
"Hospitaller", //italy
NULL, //poland
NULL, //russia
NULL, //spain
NULL, //turkey
"Santiago", //aragon
NULL, //burgundy
NULL, //golden horde
NULL, //hungary
NULL, //novgorod
NULL, //papal states
NULL, //sicily
NULL //swiss"
[/QUOTE]
All of which is hardcoded http://www.totalwar.org/forum/non-cgi/emoticons/smile.gif And all of which, while potentially interesting, isn't really to do with why a faction might break MTW but not VI. And the answer is, I don't really know, but if you mail me at giljaysmith@hotmail.com with a zip of the files you're changing (assuming they're small enough) then I'll put them through a copy of MTW in debug, and see if I can see what the problem is.
It could easily be that faction modding just wasn't supported in MTW but the system was made more flexible in VI and so now you're in luck. *shrug* that's the breaks.[/QUOTE]
Gil,
The faction I am trying to add is in the Early campaign of VI Viking expansion. Sorry about the confusion.
Could you tell me if adding Russian, Swiss, or Burgundy factions in the early campaign causes a problem?
Thanks
Wellington
05-22-2003, 18:32
The faction I am trying to add is in the Early campaign of VI Viking expansion. Sorry about the confusion.
Could you tell me if adding Russian, Swiss, or Burgundy factions in the early campaign causes a problem?
Not sure about VI (yet) - but it may well cause a problem in MTW.
The reason being that the appearence of certain factions is year dependent. Some factions are only available after a certain year (and these years were hardcoded in MTW).
Do the same constraints apply for VI - at present, based on what I've been testing, it appears so.
Therefore, the questions for CA staff (pertaining to the VI expansion) should be -
a) what are the principal differences in the MTW/VI engine that determine how factions are viewed/managed/automated between the 2 'apparently seperate and different' era's of the game (VI era and MTW era)?
b) have any changes been made for the VI expansion that may allow any faction to appear at any time (MTW era wise)? For example, can we prevent the golden horde from appearing? Can we prevent the swiss from appearing at a certain date? If so, how?
c) what is the relationship between many of the hardcoded events - as per b) above - and the names of the factions? For example, can we remove the factions swiss/golden horde from appearing? Can we do this by changing the faction names within VI for the MTW era?
d) is the POPE still necessary in the MTW era game? How can we remove the PAPAL faction completely from VI in terms of the MTW era?
... and the 2 most important questions (that require multiple answers) should be -
e) what are the principle differences, for modders, that effect the MTW engine logic when playing a VI Viking era game as opposed to a VI MTW era game?
f) if we modders wish to create a new MTW/VI mod for a different period (eg: 500AD-700AD), whilst the VI structure appears to support this what exactly determines the appearance of the pope/swiss/golden_horde etc, and therfore what exactly determines whether the MTW/VI engine logic will execute the VI era paths as opposed to the MTW era paths (if, indeed, there is a logic distinction within MTW/VI for these two apparently different paths).
Until we know those answers, modding MTW/VI will still remain a hit and miss affair to some degree.
Quote[/b] (Wellington @ May 22 2003,12:32)]The faction I am trying to add is in the Early campaign of VI Viking expansion. Sorry about the confusion.
Could you tell me if adding Russian, Swiss, or Burgundy factions in the early campaign causes a problem?
Not sure about VI (yet) - but it may well cause a problem in MTW.
The reason being that the appearence of certain factions is year dependent. Some factions are only available after a certain year (and these years were hardcoded in MTW).
Do the same constraints apply for VI - at present, based on what I've been testing, it appears so.
Therefore, the questions for CA staff (pertaining to the VI expansion) should be -
a) what are the principal differences in the MTW/VI engine that determine how factions are viewed/managed/automated between the 2 'apparently seperate and different' era's of the game (VI era and MTW era)?
b) have any changes been made for the VI expansion that may allow any faction to appear at any time (MTW era wise)? For example, can we prevent the golden horde from appearing? Can we prevent the swiss from appearing at a certain date? If so, how?
c) what is the relationship between many of the hardcoded events - as per b) above - and the names of the factions? For example, can we remove the factions swiss/golden horde from appearing? Can we do this by changing the faction names within VI for the MTW era?
d) is the POPE still necessary in the MTW era game? How can we remove the PAPAL faction completely from VI in terms of the MTW era?
... and the 2 most important questions (that require multiple answers) should be -
e) what are the principle differences, for modders, that effect the MTW engine logic when playing a VI Viking era game as opposed to a VI MTW era game?
f) if we modders wish to create a new MTW/VI mod for a different period (eg: 500AD-700AD), whilst the VI structure appears to support this what exactly determines the appearance of the pope/swiss/golden_horde etc, and therfore what exactly determines whether the MTW/VI engine logic will execute the VI era paths as opposed to the MTW era paths (if, indeed, there is a logic distinction within MTW/VI for these two apparently different paths).
Until we know those answers, modding MTW/VI will still remain a hit and miss affair to some degree.
Great questions Wellington. I am looking forward to hearing what CA has to say.
eat cold steel
05-23-2003, 09:22
a) There are hard code rules linked the actural faction id, so FN_PAPIST is the always the papist faction and will have control over crusades and such, and FN_07 is the faction that get raid bonus. With 2.0 the regular campaign use mostly default value, and store its files on the "root" where as viking files are stored in the various viking directories. Adding Russian in early shouldn't be a problem, the emergance code looks to see the faction is not already active first before kicking in.
b) Making new faction emerge, no. Stopping regular factions emerging, just don't declare their faction ID.
C) The actural delared ID tag is used, if they are not in your startpos, their special rule will not have an effect.
d) If you want crusade then you need to have ID_PAPIST. Along with all the other nasty rules that come with the Pope. If you are willing to go without crusades then just don't declare ID_PAPIST.
e) Nothing really, but I do recomment starting complete fresh startpos, ie make use SetMapTexturesSubdir:: and copy everthing into your own directory espically if you want to add a faction. Do a search on "Welsh" say and you'll find what kind of files you need to copy.
f) Agin, just ID tags and year, say for example you've changed a region in VI to use ID_KHAZAR tag, declared a faction FN_GOLDEN_HORDE, and set the end date to 1500, then the golden horde will appear.
OK a breakthrough of sorts I have been runing my new mod for quite a while, NEVER ever had a campaign map crash. I have even added/unocked the pagan shrines, added in 3 new agents (Jews, Heretics and Christian Zealots) and heaps more units. I have been playing through as Aragon 3 times (got killed the first 2). Navarre the new faction (in FN_FREE24 slot) I added crashed when it attacked me and the battle map tried to load, later NAvarre conquered Castile and with my allies the Spanish I fought a battle against Navarre, I thought what the hell I will see if it loads and it did?? The battle worked fine but although Navarre had its proper colour as assigned in the Early.txt startpos fiel it had all Spanish flags (a bit confusing but at least the battle worked OK). Later Navarre and ALmhos kicked me out of the game. Turned off the computer and started a new game as Aragon, 10 turns later Navarre attacked me and it had the SPanish battle FLags and shields but still worked fine?? Sweet.
My guess is that somewhere is a temp/or whatever file with the battle graphics data and when you fight a battle with 3 factions (including yourself) somehow the new faction is assigned the missing battle flags/shields of onr of the other factions involved in the battle. So I suppose at this stage I have to start games have a 3 way battles with each of the new factions and everything will be fine (but some battle flags will be mixed up - but I can live with that if it means a crash free game with 10 new factions). Current new factions have:
Baltic Pagans
Cuman Tribes
Navaree
Bohemia
Danishmendid Turks
Kingdom of Jerusalem
Scotland
Wales
Sweden
Flanders
I want to fully test this with all factions some more and then will release my mod in the next week or so.
I will try and get a .zip file of all my new/moded files but there are so many at the moment it will take a while to sort out.
Wellington
05-24-2003, 14:31
Quote[/b] (eat cold steel @ May 23 2003,03:22)]a) There are hard code rules linked the actural faction id, so FN_PAPIST is the always the papist faction and will have control over crusades and such, and FN_07 is the faction that get raid bonus. With 2.0 the regular campaign use mostly default value, and store its files on the "root" where as viking files are stored in the various viking directories. Adding Russian in early shouldn't be a problem, the emergance code looks to see the faction is not already active first before kicking in.
b) Making new faction emerge, no. Stopping regular factions emerging, just don't declare their faction ID.
C) The actural delared ID tag is used, if they are not in your startpos, their special rule will not have an effect.
d) If you want crusade then you need to have ID_PAPIST. Along with all the other nasty rules that come with the Pope. If you are willing to go without crusades then just don't declare ID_PAPIST.
e) Nothing really, but I do recomment starting complete fresh startpos, ie make use SetMapTexturesSubdir:: and copy everthing into your own directory espically if you want to add a faction. Do a search on "Welsh" say and you'll find what kind of files you need to copy.
f) Agin, just ID tags and year, say for example you've changed a region in VI to use ID_KHAZAR tag, declared a faction FN_GOLDEN_HORDE, and set the end date to 1500, then the golden horde will appear.
ECS,
Many thanks for that. It makes a LOT of sense.
Seems the basic principles (please correct me if I'm wrong) for modding MTW/VI are -
a) - ignore all the original MTW constraints, as MTW/VI is far more flexable
b) - ignore the perception that within MTW/VI there are 2 seperate logic paths (one for the original MTW campaign and one for the VI campaign)
c) - ignore the perception that MTW/VI is an extension of MTW; rather the MTW/VI engine is the SAME for either the cureently provided MTW or VI campaigns. The differentiation is only as pertains to faction names (amendable) and dates (amendable) within ANY campaign (ie startpos file) that may trigger certain events/appearences in regard to faction emergence and/or faction necessity (ie PAPAL faction).
d) - consider the MTW/VI expansion to be a SINGLE ENGINE that is NOT restricted to the original MTW engine constraints. Also, it does not regard the VI or MTW eras to be different, but rather considers the coding of the startpos files and determines whether such original hardcoded triggers/occurences (swiss/golden_horde) should still be activated within any campaign game.
e) if you wish to remove the papal faction from the MTW/VI startpos files - then MTW/VI will totally ignore any papal triggers/considerations
ECS - I'm sure the above is generally accurate. Please correct where I've gone wrong (and many thanks again for your/CA's commitment to we modding-types)
Welly
Lord Of Storms
05-24-2003, 14:49
Quote[/b] ]e) if you wish to remove the papal faction from the MTW/VI startpos files - then MTW/VI will totally ignore any papal triggers/considerations
Well I must be missing something. I tried to Undecalre the papist faction an after a few error messages reffering to unknown faction , I had to eliminate all refrences to FN_PAPIST in build prod 13 and unit prod 11 for the error messages to end but after doing so the game itself would not boot what did I do wrong? ECS any thoughts
Back to adding new factions from the code that GilJaysmith posted above am I right in thinking that this hardocoded stuff saying which faction uses which facshield will prevent us assigning facshields to new factions (e.g. FN_FFREE21)? i.e. this code for shield picking is hardcoded and any new factions added will never be able to have shields assigned, which expalins why my new factions will work fine in the campaign map and sometimes work in battles, but so far NEVER work when there is a unit involved in the battle who needs a facshield (e.g. ChivSergeants). Is it possible to add values to the unit body part txt files so that new factions are included and what do the number in the .txt file body part files mean
I am refering to the HLPLARSH, etc files.
{"ChivalricMenAtArms\\", HLPLARSH},
{"ChivalricKnights\\", PLATECAV},
{"ChivalricSergeants\\", MSHELM},
vBulletin® v3.7.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.