Announcement

Collapse
No announcement yet.

NoBarbarian

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

  • NoBarbarian

    I'm currently adding a flag which means that that unit can't be picked as a barbarian to the code. Can anybody tell me if I'm duplicating something here and if not, whether adding it makes sense?

    Can somebody revert the slic.y revision on SVN to r297? I made a mess there and I got lost trying to make it work again. Actually, only do this if the version there hasn't had ACTIVISION_ORIGINAL removed.
    Last edited by tombom; March 29, 2005, 17:02.
    Caution! Under no circumstances confuse the mesh with the interleave operator, except under confusing circumstances!
    -Intercal reference manual

    People often remark of me, "You say sorry far to much!". To which my common-sense reply is "I apologise".

  • #2
    nope, my cultureOnly only allowed for the possibility I think. But I recommend that you look into the BuildLists and instead look at the possibility of making a BarbarianBuildList and let the game pick offthere (instead off of the player build list)
    Formerly known as "E" on Apolyton

    See me at Civfanatics.com

    Comment


    • #3
      I seem to have done something really odd to slic.y. Now reverting to the previous revision which I know worked doesn't work and I really have no idea how to make it work again. It only shows up if you use SlicDebug.
      Caution! Under no circumstances confuse the mesh with the interleave operator, except under confusing circumstances!
      -Intercal reference manual

      People often remark of me, "You say sorry far to much!". To which my common-sense reply is "I apologise".

      Comment


      • #4
        Originally posted by tombom
        It only shows up if you use SlicDebug.
        Where is it that it only shows up when you use SlicDebug?..

        Comment


        • #5
          tut2_fun.slc, line 57 onwards has problems. The lines look perfectly normal, and they're all, as far as I can see, type declarations.
          Caution! Under no circumstances confuse the mesh with the interleave operator, except under confusing circumstances!
          -Intercal reference manual

          People often remark of me, "You say sorry far to much!". To which my common-sense reply is "I apologise".

          Comment


          • #6
            Looking at the diffs I'm somewhat confused as to what you have done. In you most recent change you deleted a line which you never added. I suspect that this may be the problem. Try:

            svn diff -r 295:304 slic.y

            to see what I mean. The typedef statement appears to have vanished - which would explain these errors.

            Since I want to make some other alterations to slic.y, I'll put it back if you don't beat me to it.
            Last edited by J Bytheway; March 31, 2005, 17:14.

            Comment


            • #7
              tombom could you explain what you did to exclude barbarian units (its a nice add bytheway)
              Formerly known as "E" on Apolyton

              See me at Civfanatics.com

              Comment


              • #8
                Originally posted by E
                tombom could you explain what you did to exclude barbarian units (its a nice add bytheway)
                To start with I added Bit NoBarbarian to Unit.cdb. Then in barbarians.cpp there is a function ChooseUnitType which decides which unit type to make as the new barbarian. The code then goes through each unit and first decides whether that unit cannot be a barbarian. I just added my code which checked the unitdb for whether it had the flag NoBarbarian.

                Here is the code, with the bit I added in bold.

                Code:
                	for(i = 0; i < g_theUnitDB->NumRecords(); i++) {
                		const UnitRecord *rec = g_theUnitDB->Get(i);
                		if(rec->GetCantBuild())
                			continue;
                
                		if(!rec->GetMovementTypeLand())
                			continue;
                		
                		if(rec->GetAttack() < 1)
                			continue;
                
                		if(g_exclusions && g_exclusions->IsUnitExcluded(i))
                			continue;
                [b]
                		if(rec->GetNoBarbarian())
                			continue;
                [/b]
                I only added 3 lines
                Caution! Under no circumstances confuse the mesh with the interleave operator, except under confusing circumstances!
                -Intercal reference manual

                People often remark of me, "You say sorry far to much!". To which my common-sense reply is "I apologise".

                Comment


                • #9
                  nice tombom,
                  I suspected as much. Where did you put the bit NoBarbarian in the unit.cdb only because I've added quite a few things to the unit.cb and I'm not sure if the server would copy over yours.
                  Formerly known as "E" on Apolyton

                  See me at Civfanatics.com

                  Comment


                  • #10
                    Originally posted by E
                    nice tombom,
                    I suspected as much. Where did you put the bit NoBarbarian in the unit.cdb only because I've added quite a few things to the unit.cb and I'm not sure if the server would copy over yours.
                    In case of doubt the you are asked to resolve, conflicting changes by hand. However in the case of the *.cdb files there shouldn't be any conflicts.

                    -Martin
                    Civ2 military advisor: "No complaints, Sir!"

                    Comment

                    Working...
                    X