Announcement

Collapse
No announcement yet.

Project: Unit Upgrading

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

  • #31
    Originally posted by E
    Code:
    
    void Unit::SetType(const sint32 type)
    
    {
    	AccessData()->SetType(type); 
    }
    
    void UnitData::SetType(sint32 type)
    { 
    	m_type = type; 
    	//ENQUEUE(); 
    }

    not seeing how type is accesed
    Actually that is how it should work, both methods are ok, I just would remove the const from the parameter list in Unit::SetType and I would rather put them into the header files than into the source files. But apart from that it is ok. Probably we have to do also some graphics updates and so on, maybe some more stuff. But that seems much more complicated than I thought. So that we can live now with your solution.

    However one thing you could try is to play one turn after upgrading, just to see whether it is just a graphics issue.

    But anyway thanks for trying.

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

    Comment


    • #32
      I noticed one thing that I thought would of worked differently. I had the warrior upgrade to have multiple units. two units happened to be available at the same time and on upgrading the game crashed.
      I assumed that the game would just pick the first available true but not the case.

      Not a big deal since Civ3 only has a linear upgrade and its easy to work around.
      Formerly known as "E" on Apolyton

      See me at Civfanatics.com

      Comment


      • #33
        Hatschy has designed an UnitUpgrade test scenario for Civilization: Call to Power. He has choosed an original way of computing the cost of the Upgrade that is actually very logical :

        "...the price is the same as when moving a unit to a city with an empty build queue and disbanding the old unit followed by rush buying the new unit."
        "Democracy is the worst form of government there is, except for all the others that have been tried." Sir Winston Churchill

        Comment


        • #34
          Tamerlin, the Unit Upgrading I hardcoded in Ctp2 takes the new units shields subtracts the old units shield cost and then that is multiplied by the unit rush modifier of whatever government you are in.

          So regarding Hatschy and I, I guess great minds think a like!
          Formerly known as "E" on Apolyton

          See me at Civfanatics.com

          Comment


          • #35
            Originally posted by E
            So regarding Hatschy and I, I guess great minds think a like!
            It seems so...

            You should have a look at his interface and the way the mod runs, it is a very good work... at least for someone like me who doesn't have any programming skill.
            "Democracy is the worst form of government there is, except for all the others that have been tried." Sir Winston Churchill

            Comment

            Working...
            X