Results 1 to 17 of 17

Thread: Help with modding problems!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Kenn_dm's Avatar Foederatus
    Join Date
    Nov 2013
    Location
    Belgium
    Posts
    48

    Default Help with modding problems!

    Hi everyone,


    I was wondering if someone could help me with my "problems" that occur after adding the following improvements to my medieval game (retrofit mod).
    It involves 3 different situations.


    1) The first is a scripting problem:
    I have added the fourth crusade script from the crusaders campaign into my retrofit game, but it doesn't work as planned.
    The crusader armies, when they spawn, aren't attacking the city of constantinople, not even when venice is at war with the byzantines.
    So I would like to add a part to the script that forces the armies to attack the city.
    Could one of the following options work?

    Code:
    Option 1:
        monitor_event FactionTurnEnd FactionType venice
            and I_CharacterExists Boniface
            and not I_SettlementOwner constantinople = venice
            and I_SettlementUnderSiege constantinople
    
    
            if I_CompareCounter siege_constantinople < 2
                siege_settlement Boniface, constantinople, maintain
            end_if
            if I_CompareCounter siege_constantinople = 2
                siege_settlement Boniface, constantinople, attack
                terminate_monitor
            end_if
    
    
            inc_counter siege_constantinople 1
        end_monitor
    
    
    
    
    Option 2:
    
    
    ;; START SIEGE
    monitor_event FactionTurnStart FactionType venice
    	and I_CompareCounter fourth_crusade_arrived = 1
    	and not I_SettlementOwner Constantinople = venice
    
    
    	if I_CharacterExists Enrico Dandola
    		siege_settlement Enrico Dandola, Constantinople, siege
    		terminate_monitor
    	end_if
    end_monitor
    
    
    monitor_event FactionTurnStart FactionType venice
    	and I_CompareCounter fourth_crusade_arrived = 1
    	and not I_SettlementOwner Constantinople = venice
    
    
    	if I_CharacterExists Fantino
    		siege_settlement Fantino, Constantinople, siege
    		terminate_monitor
    	end_if
    end_monitor
    
    
    ;; ATTACK SETTLEMENT
    monitor_event CharacterTurnStart FactionType venice
    	and I_CompareCounter fourth_crusade_arrived = 1
    	and not I_SettlementOwner Constantinople = venice
    	and I_CharacterExists Enrico Dandola
    	
    	if  I_RemainingMPPercentage Enrico Dandola = 100
    		siege_settlement Enrico Dandola, Constantinople, attack
    		terminate_monitor
    	end_if
    end_monitor
    2) My second error is related to a new faction I created, the teutonic order. The faction receives almost each turn adoption messages but because they don't have a family tree, the generals die after accepting.
    Is there a way to stop the game from offering these messages to one faction only? Other possible solutions are also welcome!


    3) My final question is about expanding the map (using geomod).
    I really like the expanded map, to the east, from the stainless steel mod.
    But just like in the vanilla game, this map (retrofit mod) includes the aztecs and the new world.
    Do I have to remove them and reduce the mapsize (removing the new world) before expanding it eastwards?

  2. #2

    Default Re: Help with modding problems!

    1) http://www.twcenter.net/forums/showt...ighlight=siege

    2) Use Geomod to set the family tree to "teutonic" I've never done this manually but I've converted factions to the "teutonic" family tree using Geomod a few times with no such issue.

    3) If you do not want to use the Americas I would definitely remove them first. Easiest to use Geomod here, under tools, resize, click the West arrow and reduce the width until the western border is where you want it. You'll want to exit (and save) then reload and expand the map (the arrows tell Geomod which direction you want to expand in.) I am not familiar with 'retrofit mod' so I am not sure if you have to remove the Americas first or not. Check map size limits: http://www.twcenter.net/forums/showt...Hardcoded-List
    You can do both at once manually by resizing all map files and editing the regions and provinces files: Look in the 'tools and tutorials' in the Mapping subfolder for details, I do not have these tutorials handy (I learned manual map editing back in Rome TW.)
    NOTE: Before removing any regions, make sure no faction has those regions in their 'victory conditions'

    If you are not already familiar with Geomod:
    http://www.twcenter.net/forums/showt...ol-for-Mapping

    Edit: Sorry, didn't see the (using Geomod) section for #3; You should check out Gigantus' manual (found in the same thread I linked to) for detailed instructions on just about anything you can do with Geomod.
    Last edited by CavalryCmdr; February 05, 2016 at 06:42 AM.

  3. #3
    Kenn_dm's Avatar Foederatus
    Join Date
    Nov 2013
    Location
    Belgium
    Posts
    48

    Default Re: Help with modding problems!

    Ok, thanks CavalryCmdr! I will try everything asap!

  4. #4
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Help with modding problems!

    The generals most likely die because you didn't assign a unit in the EDU as general_unit for your new faction. I call it the 'harakiri' bug. See my tutorial.










  5. #5
    Kenn_dm's Avatar Foederatus
    Join Date
    Nov 2013
    Location
    Belgium
    Posts
    48

    Default Re: Help with modding problems!

    Quote Originally Posted by Gigantus View Post
    The generals most likely die because you didn't assign a unit in the EDU as general_unit for your new faction. I call it the 'harakiri' bug. See my tutorial.
    This was indeed the problem. I forgot to assign a general_unit to the new faction.
    Thx Gigantus! Now, I can focus on my 2 other improvements.

  6. #6
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Help with modding problems!











  7. #7
    Kenn_dm's Avatar Foederatus
    Join Date
    Nov 2013
    Location
    Belgium
    Posts
    48

    Default Re: Help with modding problems!

    Hey guys,


    It has been a while since I last posted on the forum but now I could use a little help again.
    I'm still working on the third part mentioned in my first post on this thread, removing aztecs/americas and expanding the map.
    I started with removing the aztecs: cities, castles, units, ... and america (using geomod).
    I then made a testrun to be sure that the game wouldn't crash at start up, which it didn't. But I made the mistake by not running the campaign for a couple of turns.
    So, since I assumed everthing was working, I started with the next big step: expanding the map (also using geomod).
    The only thing left to do in this part, is to make a new radarmap.


    Before starting with the radarmap I tried out how the game would run. Again no problem at start up, only this time I tested the campaing and every time I get a crash at turn 3.
    I've looked countless hours after the error but i simply can't seem to find it.


    At first I thought the problem had to be the expansion but to be sure I tested my previous back up, luckily I always back-up my files frequently, but this back-up is the one where I didn't tested the campaign map (as mentioned above).
    Apparently the crash already occured with those files. I have a working version from before these modifications, no problem, but I rather find the error ofcourse because of the countless hours I've put into the expanding.


    Any help would be much appreciated? Suggestions or thoughts on what this error could be? Is it the radarmap, something I forgot when removing the aztecs?

  8. #8

    Default Re: Help with modding problems!

    Having a trace log would be helpful, otherwise it's just guess work.
    Check victory conditions, I'd set all factions to just a set number of regions (40 or so) except 'slave' you'd want much higher (I doubt that's the problem though since that usually just causes trouble with save/load.) Make sure the 'Aztec' faction dose not appear in any of your campaign files (shouldn't bother anything in the 'data' or 'text' folders, but I'm not completely sure.)

  9. #9
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Help with modding problems!

    I would suggest to disable the script - there are a number of aztec related monitors in there, although it's unlikely that they caused the crash (they fire at later stages of the game) removing the possibility of it it advisable. To disable the script simply put a semi-colon in front of the last two lines in the descr_strat file:
    Code:
    ; script
    ; campaign_script.txt
    There are plenty of spots where the aztec faction pops up, can you confirm that you merely want to remove it from your mod and not from the basic game set up? Because once you remove the faction from descr_sm_factions you are in a world of hurt

    CC is correct: invalid win conditions (eg non-existing factions and\or regions) will lead to crashes. Having a trace log will also help immensely. In your mod's CFG file make sure the [log] section has this line:
    Code:
    level = * trace
    The same section will also tell you were to find the log (to =), simply compress that log (7Zip is freeware) as it will have a substantial size and then upload it.










  10. #10
    Kenn_dm's Avatar Foederatus
    Join Date
    Nov 2013
    Location
    Belgium
    Posts
    48

    Default Re: Help with modding problems!

    Thanks for the quick reply CavalryCmdr and Gigantus.
    Here is my system.log.txt file.
    The aztecs aren't mentioned in the victory conditions or any other campaign files. The regions number for every faction is set on 60 (added a lot of new regions ).

    As for the campaign script I removed every monitor that was related to the aztecs, atleast I think I did , except "the world is round" event.
    I have an earlier back-up from the campaign script so I can try to put a semi-colon and see the result.
    I can confirm that I only want them removed from the mod but I dit remove the aztecs from the descr_sm_factions file as other files from the data folder (banners, modelstrat, ...) and text folder (names, ... ) even the units mentioned in de modeldb file.
    Actually all the files that need to be changed for adding a new faction.
    Attached Files Attached Files

  11. #11

    Default Re: Help with modding problems!

    You set the log to warning,
    Code:
    level = * trace
    gives much more info, granted the file will be quite large.
    I do not see anything in the log, there is this:
    Code:
    16:25:13.390 [script.err] [error] Script Error in mods/retrofit/data/descr_mount.txt, at line 117, column 1
    Could not find battle model for mount 'Mount_Adv_English_Armoured_Horse'.
    16:25:13.390 [script.err] [error] Script Error in mods/retrofit/data/descr_mount.txt, at line 256, column 1
    Could not find battle model for mount 'Mount_Adv_English_Barded_Horse'.
    16:25:13.390 [script.err] [error] Script Error in mods/retrofit/data/descr_mount.txt, at line 271, column 1
    Could not find battle model for mount 'Mount_Adv_French_Barded_Horse'.
    16:25:13.390 [script.err] [error] Script Error in mods/retrofit/data/descr_mount.txt, at line 344, column 1
    Could not find battle model for mount 'Mount_AdV_French_Heavy_Horse'.
    But that shouldn't be related to anything you did, so probably not critical.

    Honestly, if you're intending to add in new factions your best bet would be to leave Aztecs in then mod them into the new faction you want to add. That is much easier then adding a faction from scratch and easier then removing Aztec to begin with.

  12. #12
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Help with modding problems!

    Quote Originally Posted by CavalryCmdr View Post
    But that shouldn't be related to anything you did, so probably not critical.

    Honestly, if you're intending to add in new factions your best bet would be to leave Aztecs in then mod them into the new faction you want to add. That is much easier then adding a faction from scratch and easier then removing Aztec to begin with.
    The model errors will lead to a crash if these mounts (as listed in descr_mounts) are used in the EDU. I would suggest to search the EDU accordingly to make sure they are not and remove the entries from descr_mounts to eliminate the misleading log entries.

    Completely removing a faction from the game is tedious and 'hazardous'. The re-purpose it is by far safer - but may present you with some weird stuff from the trait and ancillary side. Fixing the latter is by far safer and easier (simple search for 'aztecs' and 'mesoamerican' will reveal the references) and thus preferable.
    Here is the link to a freeware search tool that comes very handy when doing jobs like the faction removal that requires searching whole directories for keywords.










  13. #13
    Kenn_dm's Avatar Foederatus
    Join Date
    Nov 2013
    Location
    Belgium
    Posts
    48

    Default Re: Help with modding problems!

    In my CFG file the [log] section has this line:
    Code:
    # to			= logs/system.log.txt
    # level		= * trace
    The log file mentions (besides a lot of missing dds files, ...) that medieval has encounter an unspecified error.
    I've tried disabling the script, still crash on turn 3, and removed the entries of the missing battle armors in the descr mount file.

    Because I've added a lot of new factions to my mod, the limit was reached.
    So the plan was to remove the aztecs, expand the map and put one final new faction into the game.
    I guess I'll take another look at the files in the 'world folder' and try to mod the aztecs into the new faction.

    Do I leave the aztecs mentioned in the descr_sm_factions? And change for example the names of the buildings or how does it work modding a faction that already exists?

    BTW thanks for the help so far!

  14. #14
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Help with modding problems!

    Quote Originally Posted by Kenn_dm View Post
    In my CFG file the [log] section has this line:
    Code:
    # to            = logs/system.log.txt
    # level        = * trace
    The log file mentions (besides a lot of missing dds files, ...) that medieval has encounter an unspecified error.
    I've tried disabling the script, still crash on turn 3, and removed the entries of the missing battle armors in the descr mount file.

    Because I've added a lot of new factions to my mod, the limit was reached.
    So the plan was to remove the aztecs, expand the map and put one final new faction into the game.
    I guess I'll take another look at the files in the 'world folder' and try to mod the aztecs into the new faction.

    Do I leave the aztecs mentioned in the descr_sm_factions? And change for example the names of the buildings or how does it work modding a faction that already exists?

    BTW thanks for the help so far!
    The hash tags in front of a line means that the line is not being read - the same as putting a semi-colon when commenting in a text file. Remove those tags, you will then find the trace log in the directory listed in the 'to' line.

    CC pretty much lines out how to proceed to 'clone' a faction. My 'adding a new faction' tutorial should give you a guideline which files in data\text require attention as well as a few other files you need to have a look at.
    One thing about the aztecs faction - they have all those weird battle buildings that are linked to their culture. I would suggest to use another culture.










  15. #15

    Default Re: Help with modding problems!

    Pretty much just like adding a new faction, just use 'aztecs' for the faction core name. So you would leave aztecs in sm_factions, just change their culture etc. Then change the text files leaving 'aztecs' inside the brackets {} with their new faction name outside. For example:
    Code:
    {AZTECS}Volga Bulgaria
    Then you would need to change the modeldb to give them new (or borrowed) models. Give them the appropriate buildings in EDB, units in EDU and change the traits and ancillaries as needed. Not sure what else off hand, should be easy enough to find a guide if you need, but if you can add a new faction from scratch it's basically the same except forgetting something won't cause any errors and half the work is already done

  16. #16
    Kenn_dm's Avatar Foederatus
    Join Date
    Nov 2013
    Location
    Belgium
    Posts
    48

    Default Re: Help with modding problems!

    Thanks for the help and info CavalryCmdr and Gigantus!
    I'll give it a try asap!

  17. #17
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Help with modding problems!











Posting Permissions

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