Announcement

Collapse
No announcement yet.

[Mod] RealFort

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

  • #46
    Would it be possible to make something like this?

    When a unit is near a fort, all tiles that are adjacent to the fort would become impassable for him (like peaks), except the fort itself and of course the tiles that are at least one square away ?
    "The only way to avoid being miserable is not to have enough leisure to wonder whether you are happy or not. "
    --George Bernard Shaw
    A fast word about oral contraception. I asked a girl to go to bed with me and she said "no".
    --Woody Allen

    Comment


    • #47
      Please take a look at this for me

      Hi Bhruic,

      I was using your Fort files as a starting point for something I'm doing. I want to use a CustomEventManager like you did but it doesn't seem to be working. I put a popup message event at the beginning of the turn but it doesn't show up so I know my code isn't being called. I don't get any error messages and the game loads fine, but the popup never happens. It is very frustrating because I've looked at your example and I can't see what I'm doing differently.

      Any help would be apreciated.

      Roger Bacon
      Attached Files

      Comment


      • #48
        Problem:

        After installing a couple of other mods, the effects of the Real Fort mod stopped working. Units no longer get the 'promotion'.

        Mods i have installed, in the order they are called up by CvCustomEventManager (in case it matters):

        import RealFort
        import CulturalDecay
        import TechConquest
        import AbandonRazeDemolish
        import SettlerReligion
        import SdCultureConquest (also included SdToolkit.py)







        Comment


        • #49
          I've got all of those but the last, and it works normally here. And I don't think the CulturalConquest mod makes any changes to unit moves, does it? Or did it make any changes to the promotions xml (seems even more unlikely)?

          Bh

          Comment


          • #50
            OKi - after some testing i've found out what was wrong... well, not really.


            Its related to The Abandon City/ Demolish building mod from twiggins.

            Once I removed it, it worked again. Sucks though, since both mods, real fort, and raze city, are equally important for gameplay




            I've attached 2 CvCustomeventmanager files - one where it works, and one were it doesn't. And the abandonrazedemolish.py.

            I don't think the problem is in the AbandonRazeDemolish.py, but the additional code in the cvcustomeventmanager that abandonrazedemolish has.

            Can ya please help me figure out whats wrong?

            Thanks
            Attached Files

            Comment


            • #51
              Oh. Well, the way you tried to combine them is incorrect. You can't have two classes called the same thing and expect them both to function. There's a newer ARD anyway, as I helped him create a more streamlined CvCustomEventManager.py file. You should get that. Then, simply add the functions to the existing class, don't try and duplicate the class itself.

              Bh

              Comment


              • #52
                ah.. i see. Sort of . Don't know anything about python.

                But thanks for the advice. I'll get the new ard.

                Comment


                • #53
                  Well, ok, you don't have to know anything about python... But look at the 'combined' custom file that you have. You'll note that you have:
                  class CvCustomEventManager(CvEventManager.CvEventManager )

                  listed twice. That's not going to work. Each of the functions (the things that start with 'def') need to be part of the same class. You could simply remove the second class instance and it would work, because there are no duplicate functions. But it's still better to get the new ARD. Make sure that if you are adding new mods that have the same function, that you only have one of them, not two.

                  For example... Bad:
                  Code:
                  def onUnitMove(self, argsList):
                  		self.parent.onUnitMove(self, argsList)
                  		firstmod.onUnitMove(argsList)
                  
                  def onUnitMove(self, argsList):
                  		self.parent.onUnitMove(self, argsList)
                  		secondmod.onUnitMove(argsList)
                  Good:
                  Code:
                  def onUnitMove(self, argsList):
                  		self.parent.onUnitMove(self, argsList)
                  		firstmod.onUnitMove(argsList)
                  		secondmod.onUnitMove(argsList)
                  Hopefully that'll clear things up a little.

                  Bh

                  Comment


                  • #54
                    I got the new ARD, but it had the same setup.

                    But after removing the second "class" reference, it did work.

                    Thanks a lot!

                    Comment


                    • #55
                      Anyone knows if it is possible to make forts buildable in enemy territory and where this might be, in the XML files?
                      The Slim End Of The Long Tail -
                      Kaplak Stream

                      Comment


                      • #56
                        hey Bhruic -

                        just wondering, you ever planning on making a fort mod that restricts movement ala Civ2?

                        I'm really itchen to try something like that out

                        Comment


                        • #57
                          If by "ever" you mean after the SDK comes out - maybe. Currently, there are too many restrictions with the Python system for that to work properly.

                          Bh

                          Comment


                          • #58
                            I dont know if its only your forts, or forts in general...

                            but forts are TOO good vs the AI. they will not attack them, I had edited a map with a castle occ, aggresive ai, monarch. My castle had 2 ways in, land access was a hill (later with a fort) defended by 5+ units, and a water canal defended by 5+ boats. during the entire game ( a very aggressive one mind you) my fort was attacked... once. when i had just moved a stack passed it so it only had 2 defenders left in it. a "seaborn" invasion came and had nowhere to land (my stacks were in the way) so it attacked the square with 2 units, and lost.

                            Russia had LEAPT ahead points wise, while i was still holed up in my castle, they'd send a stack of Gunpowder units close enough to see it, then turn around and leave. I figured the ai decided not worth loosing 10 or so units to attack my fort when there were other wars to fight....

                            Then i got flight, now i could see OUT of my castle. OMG what i saw made me wimper. Outside of my mountain wall was the most horrible, terrific, frigtening, and utterly disgusting numbers of artillery and infantry (i had riflemen and cannons) just milling about with nothing to do... Even though i was at war with them with 1 city!

                            Each russian city (she had 20+ after destroying 4 other civs) had a garrison of 30+ units in the larger ones (easily close to 100 each arty and infantry). I have no idea how she supported all those units AND out teched everyone else (tech trading off) but they would not attack my fort with 2 MGs 4 riflemen and 3 cavalry.


                            can someone make the AI a little less timid about forts?
                            --------------------------------------------------------------------------------------------------------------------------------------------------
                            The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it deosn't mttaer in waht oredr the ltteers in a wrod are, the olny iprmoatnt tihng is taht the frist and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it wouthit a porbelm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Amzanig huh?...So with that said: if you can not read my post because of spelling, then who is really the stupid one?...

                            Comment


                            • #59
                              BUMP
                              --------------------------------------------------------------------------------------------------------------------------------------------------
                              The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it deosn't mttaer in waht oredr the ltteers in a wrod are, the olny iprmoatnt tihng is taht the frist and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it wouthit a porbelm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Amzanig huh?...So with that said: if you can not read my post because of spelling, then who is really the stupid one?...

                              Comment


                              • #60
                                ok folks - I don't want you to think I am stupid but where in the CustomAssets should I "install" the mod? You mean unpack it instead of install?
                                Would be nice if you could tell me which folder for which file.

                                Thanks!

                                Comment

                                Working...