Announcement

Collapse
No announcement yet.

[Mod] Auto Missionaries

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Mod] Auto Missionaries

    I'm working on a mod right now that should make it a little less tedious/micromanagement when you are trying to spread a religion.


    What is this mod supposed to do?

    The goal of this mod is to bring some sort of automation to your missionaries so you do not have to manually find cities to spread your religion every time you build a missionary.

    It works like this:

    - You select a missionary, press 'a'

    - That missionary will now automatically find the nearest city which does not have the religion he spreads, and he will go to it and try to spread his religion there. NOTE: When you automate a missionary and he chooses a city, that city is in effect "his", so if you automate another missionary of the same religion in the same turn he will know not to try to go to that same city. Only if the first missionary fails to spread the religion will that city be open again for the next automated missionary of the same religion.

    - If there are no cities left to convert whether it be because you don't see any more cities or he simply can't reach the remaining cities (due to water or blocked or by a civ with closed borders) then you will hear the Civ error sound.


    Features/Bug Fixes for next release:

    - Missionary will no longer get stuck due to trying to spread religion to a civ with Theocracy civic!

    - You will be able to press SHIFT + A to limit the missionary to spread ONLY to your nation's cities, or CTRL + A to spread ONLY to foreign cities. Just pressing A like normal will just find any city


    Download:

    NOTE: This mod is still currently in development and downloading now would mean you get a "beta" version which mostly works but some bugs are sure to be in it- please notify me if you do find anything wrong or suspicious!

    Auto Missionary Mod [BETA]
    Last edited by TheDarkside; November 17, 2005, 10:36.

  • #2
    I like it. Perhaps have two options for a missionary? Proselytize nationally and Proselytize abroad. Maybe a third for, those that don't care. If I don't have the holy building for a religion I generally don't spread it abroad, since that civ can build more +culture buildings to prevent me from taking over.
    Mylon Mod - Adressing game pace and making big cities bigger.
    Inquisition Mod - Exterminating heretic religions since 1200 AD

    Comment


    • #3
      Yeah I was thinking about that too, something like SHIFT + A = spread only nationally, CTRL + A = spread only abroad, then just A is whatever is closest.

      Thanks

      Comment


      • #4
        Sounds good (but only if it doesn't interfer with other mods that one might want to use)!

        Comment


        • #5
          Originally posted by JDexter
          Sounds good (but only if it doesn't interfer with other mods that one might want to use)!
          It'll be a script change in CvEventManager and parhaps a new python class in a new file. Like with my building demolition mod I'll label the sections of code which make the mod work so it can be easily copy + pasted into an already modified EventManager so it can work with anything else

          Comment


          • #6
            Ok I've made some progress here, and I'm just about at a point where I'll be happy enough to start distributing a "beta" version hoping someone can help me test it and offer suggestions.

            This is how it works currently:

            -You select a missionary, then press the 'A' key

            -That missionary now gets registered as an automated missionary. He finds the nearest city that does not have the religion he spreads, and he automatically goes there

            -If that city was already targetted by another automated missionary of the same faith, he will look for the next nearest city

            -If he already was in that city or can reach that city in 1 turn without losing all his movement pts, he immediately attempts to spread his religion

            -If it would take more than 1 turn to spread to that city, he will spread near the end of the turn he arrives in the target city (there is a certain phase of your game turn when automated actions occur, after you give orders to any new units/units who are idle.)

            To get this to work I had to make a new class which keeps track of your automated missionaries and checks up on them during the beginning of a turn, because there seems to be a bug where if you give a unit a queued order after a goto command, and the unit arrives at the target destination with no movement pts left to perform the queued order, the unit will not perform the order but still remove his order from his queue so next turn he's gonna be waiting for new orders instead of doing what he was supposed to!

            Also there seems to be a bug in the distance calculation. I'm using the calculateDistance function in CyMap and based on my experience it is not accurate.

            But in my opinion this is not too big of a deal, the goal is to have fire-and-forget missionaries. You send them off to spread their religion and forget about them. They will figure out for themselves where is the next best place to spread. No more micromanagement. And it satisfies this goal pretty well.

            I'll post some files tonight for anyone who can help me test out what I have so far.
            Last edited by TheDarkside; November 9, 2005, 11:39.

            Comment


            • #7
              Sounds fantastic. I definately feel automating missionaries was an oversight that should have been included in the game. Can't wait to try it out!

              Comment


              • #8
                Ok I have some files here ready for anyone who is willing and able to help me test this on their system to see how it runs.

                This is not a release! This is just a beta for testing purposes!

                Follow the directions in the readme file in the rar included...

                Please check back here and post any problems/suggestions you have with this mod...

                Thanks for you help !!!

                (file removed as new one is available below)
                Last edited by TheDarkside; November 15, 2005, 00:07.

                Comment


                • #9
                  Sounds really good I'll try and test it over the next few days.
                  Currently working on:
                  A Song of Ice and Fire Mod for Civ 4!
                  Click me to find out more!

                  Comment


                  • #10
                    Originally posted by Feet
                    Sounds really good I'll try and test it over the next few days.
                    Great! Looking forward to any comments/suggestions/complaints you might have!

                    Comment


                    • #11
                      I've followed the directions on where to put the files, but the missionary doesn't seem to want to automate... thoughts sir?

                      Comment


                      • #12
                        Originally posted by Seranthor
                        I've followed the directions on where to put the files, but the missionary doesn't seem to want to automate... thoughts sir?
                        Just to confirm, both files are now under a directory similar to this:

                        C:\Documents and Settings\<Your login name>\My Documents\My Games\Sid Meier's Civilization 4\CustomAssets\python

                        If that checks ok can you activate debug logging by going into your CivilizationIV.ini file which should be under this directory:

                        C:\Documents and Settings\<Your login name>\My Documents\My Games\Sid Meier's Civilization 4

                        Open the file with Notepad and scroll down to where you see "[DEBUG]". Under that section make sure you set the following settings to look like this:

                        LoggingEnabled = 1

                        OverwriteLogs = 1

                        MessageLog = 1

                        Then run Civ4 and try pressing the 'a' key while a missionary is selected and if nothing happens go into the folder:

                        C:\Documents and Settings\<Your login name>\My Documents\My Games\Sid Meier's Civilization 4\Logs

                        and either post the files PythonDbg.log and PythonErr.log or PM me for an e-mail address you can send to



                        Yeah, it's a bit of a hassle going through all that but if you could do that for me I'd greatly appreciate it, and then I can figure out what went wrong!
                        Last edited by TheDarkside; November 11, 2005, 15:06.

                        Comment


                        • #13
                          Originally posted by TheDarkside


                          Just to confirm, both files are now under a directory similar to this:

                          C:\Documents and Settings\<Your login name>\My Documents\My Games\Sid Meier's Civilization 4\CustomAssets\python
                          Check

                          If that checks ok can you activate debug logging by going into your CivilizationIV.ini file which should be under this directory:

                          C:\Documents and Settings\<Your login name>\My Documents\My Games\Sid Meier's Civilization 4

                          Open the file with Notepad and scroll down to where you see "[DEBUG]". Under that section make sure you set the following settings to look like this:

                          LoggingEnabled = 1

                          OverwriteLogs = 1

                          MessageLog = 1
                          Check



                          Then run Civ4 and try pressing the 'a' key while a missionary is selected and if nothing happens go into the folder:

                          C:\Documents and Settings\<Your login name>\My Documents\My Games\Sid Meier's Civilization 4\Logs
                          Check



                          and either post the files PythonDbg.log and PythonErr.log or PM me for an e-mail address you can send to



                          Yeah, it's a bit of a hassle going through all that but if you could do that for me I'd greatly appreciate it, and then I can figure out what went wrong!

                          hmmm... I dont know what was wrong... it seems to be working now in the 2 most recent games I created, I'll continue to test.

                          and again... Thank you for this wonderful mod.


                          edit: I found out what was wrong... auto-missionary mod and forestry mod dont seem to work together. the AM works if I dont load the forestry one.
                          Last edited by Seranthor; November 11, 2005, 15:45.

                          Comment


                          • #14
                            Thank you Seranthor for looking into that! I'm glad you got it working now

                            Yeah I'm not familiar with that mod but I'm sure it relies on it's own CvEventManager so we can't have both at the same time. You'd need to merge them both into one EventManager and there's someone on this forum who is looking into a tool that would do that for you.

                            One thing I certainly need to add is some kind of feedback to the user if they press 'a' and there are no cities left for the missionary. Right now nothing would happen... I should have some text displayed or a popup or something ...

                            Comment


                            • #15
                              about what happens to the missionary if there are no more cities.....

                              I had no open border treaties with anyone, and all my cities had that particular religion and it appeared to me that the missionary just went on auto pilot running amok in neutral lands (bouncing, if you will, off the boundaries of any other civilizations).

                              Comment

                              Working...
                              X