Page 2 of 2 FirstFirst 1 2
Results 31 to 36 of 36

Thread: Anybody home?

  1. #31
    Ekmek
    Emperor Ekmek's Avatar
    Join Date
    26 May 1999
    Posts
    3,156
    Country
    This is Ekmek's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    11:32
    Originally posted by Solver
    Cmon E, you could mod it into Civ4 with your skills.
    You know I'm just a clever cut 'n paster, Martin Guhmann can confirm that...

    Gold for tile improvements would be easily modded. A PW system is also quite possible to implement, though it's not something I would do because of the AI.
    I found in the code where I could do that CvPlot::CanBuildImprovement but I know nothing of AI handling (ctp2 or civ4) I guess as a bool I assume the AI can handle it right???

    Other than that my consumed workers idea is probably the easiest way to implement and the AI logic of wanting more workers should handle that.

    By the way, its no secret that after the CtP2 code anniversary in October I'm moving to Civ4....
    Formerly known as "E" on Apolyton

    See me at Civfanatics.com

  2. #32
    Solver
    Deity Solver's Avatar
    Join Date
    24 Sep 2000
    Location
    Latvia, Riga
    Posts
    18,354
    Country
    This is Solver's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    22:32
    Somehow the job you've done on AE makes me strongly doubt that you're just a cut-and-paster

    The place to implement cost requirements wouldn't be in CvPlot::canBuildImprovement(), but I'd rather do it in CvPlayer::canBuild(), as that's where the gold check would fit better. It's a simple matter of modifying the CvImprovementInfo class to add a gold-cost variable and properly read and expose it.

    The AI is always more complicated than that. Sure, if it doesn't have enough gold, it'll see that the bool returns false and will, well, know that it can't build the improvement. It won't, however, realize that it needs more money for it, so you'd need additional AI changes to ensure that it knows how to keep some money for terrain improvements, etc.

    Besides, if you set the costs to high enough, you'd need to rebalance several other game areas. For example, if you slow down the game by requiring considerable costs, you'll need to alter the amount of turns, etc.
    Solver, WePlayCiv Co-Administrator
    Contact: solver-at-weplayciv-dot-com
    I can kill you whenever I please... but not today. - The Cigarette Smoking Man

  3. #33
    demon59
    Chieftain demon59's Avatar
    Join Date
    27 Oct 2002
    Location
    Decatur, AL
    Posts
    79
    Country
    This is demon59's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    13:32
    Well, I just snagged the demo for CivIV and played my 100 turns without my computer bursting into flames, so I guess that means my system at least meets the basic requirements. Time to start shopping...


  4. #34
    Ekmek
    Emperor Ekmek's Avatar
    Join Date
    26 May 1999
    Posts
    3,156
    Country
    This is Ekmek's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    11:32
    Originally posted by Solver
    The place to implement cost requirements wouldn't be in CvPlot::canBuildImprovement(), but I'd rather do it in CvPlayer::canBuild(), as that's where the gold check would fit better.
    rying to avoid getting too OFT but I saw this:

    Code:
    bool CvPlayer::canBuild(const CvPlot* pPlot, BuildTypes eBuild, bool bTestEra, bool bTestVisible) const
    {
    	PROFILE_FUNC();
    
    	if (!(pPlot->canBuild(eBuild, getID(), bTestVisible)))
    	{
    		return false;
    	}
    
    	if (GC.getBuildInfo(eBuild).getTechPrereq() != NO_TECH)
    	{
    		if (!(GET_TEAM(getTeam()).isHasTech((TechTypes)GC.getBuildInfo(eBuild).getTechPrereq())))
    		{
    			if ((!bTestEra && !bTestVisible) || ((getCurrentEra() + 1) < GC.getTechInfo((TechTypes) GC.getBuildInfo(eBuild).getTechPrereq()).getEra()))
    			{
    				return false;
    			}
    		}
    	}
    
    	if (!bTestVisible)
    	{
    		if (pPlot->getFeatureType() != NO_FEATURE)
    		{
    			if (!(GET_TEAM(getTeam()).isHasTech((TechTypes)GC.getBuildInfo(eBuild).getFeatureTech(pPlot->getFeatureType()))))
    			{
    				return false;
    			}
    		}
    
    		if (max(0, getGold()) < getBuildCost(pPlot, eBuild))
    		{
    			return false; 
    		}
    	}
    
    	return true;
    }
    That code was already there and I assume that means gold cost is in? how do I access that?


    Edit:
    NEVERMIND

    Looks like Firaxis beat me to the punch. In Build above kill (which kils workers) there is icost and it does trace to gold. Looks like I don't have to code after all


    now back to your original AOM program....
    Last edited by Ekmek; August 16, 2007 at 22:51.
    Formerly known as "E" on Apolyton

    See me at Civfanatics.com

  5. #35
    hexagonian
    Emperor hexagonian's Avatar
    Join Date
    25 Jun 1999
    Location
    Smemperor
    Posts
    3,456
    Country
    This is hexagonian's Country Flag
    Thanks
    0
    Thanked 1 Time in 1 Post
    Local Date
    May 23, 2013
    Local Time
    14:32
    Originally posted by demon59
    I'm running a 2.01 GHz AMD Athlon 64 CPU (3200+) with 1 Gig of Ram with no separate graphics card. Do you think CivIV would run on this?
    Try the demo for civ4...
    http://www.2kgames.com/civ4/downloads.htm

    The only thing I'm not sure about is whether the demo has the p1.51 optimization.

    The last three demos I tried (EU3, MTW2, Caeser4) made it very clear that my machine would have problems with those games.

    Edit...didn't see that you already downloaded the demo
    Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
    ...aisdhieort...dticcok...

  6. #36
    Protra3211
    Prince
    Join Date
    16 Jun 2003
    Posts
    525
    Country
    This is Protra3211's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    19:32
    I was able to run Civ4 demo Charlemagne from Beyond the Sword. P4 500ram with 128 intel video card.
    Was able to zoom in and out without any problems at all.Now of course I would still upgrade if I were to buy Civ4 as a full game would have more features.

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. BKs' New Home
    By Krill in forum Off Topic
    Replies: 11
    Last Post: November 30, 2008, 08:12
  2. Don't try this at home...
    By Lancer in forum Off Topic
    Replies: 5
    Last Post: April 18, 2008, 19:07
  3. Replies: 72
    Last Post: July 12, 2005, 15:00
  4. Anyone Home?
    By Zedd in forum Civ2-Democracy Game
    Replies: 6
    Last Post: April 26, 2004, 10:40
  5. Home, Sweet Home...
    By Aro in forum Civ3-Democracy Game-Archive
    Replies: 35
    Last Post: January 28, 2003, 16:57

Visitors found this page by searching for:

any body home play

anybody home game

Bookmarks

Posting Permissions