设为首页收藏本站

塞爱维(CIV)文明联盟

 找回密码
 注册
查看: 2016|回复: 3

[疑问] 修改AI交易的金钱

[复制链接]
发表于 2010-3-6 21:52:15 | 显示全部楼层 |阅读模式
AI交易金钱只交易一小部分,怎么改成大部分?
 楼主| 发表于 2010-3-7 12:29:42 | 显示全部楼层
再次急呼小巫女...............
想修改的包括:
1,交易时AI现金全部可交易;
2,伟人点。第一个伟人要100点,第二个要200点……想改成第一个要100点,第二个要110点,第三个要121点…………
3,文化对防御的加成。标准游戏里好像最大只加成100%,想改成最大可加成1000%,并提高防御所需要的文化

目前就这3个不会改,急切呼叫小巫女
发表于 2010-3-7 20:59:07 | 显示全部楼层




  1. int CvPlayerAI::AI_maxGoldTrade(PlayerTypes ePlayer)
  2. {
  3.         int iMaxGold;

  4.         FAssert(ePlayer != getID());

  5.         if (isHuman() || (GET_PLAYER(ePlayer).getTeam() == getTeam()))
  6.         {
  7.                 iMaxGold = getGold();
  8.         }
  9.         else
  10.         {
  11.                 iMaxGold = getTotalPopulation();

  12.                 iMaxGold *= (GET_TEAM(getTeam()).AI_getHasMetCounter(GET_PLAYER(ePlayer).getTeam()) + 10);

  13.                 iMaxGold *= GC.getLeaderHeadInfo(getPersonalityType()).getMaxGoldTradePercent();
  14.                 iMaxGold /= 100;

  15.                 iMaxGold -= AI_getGoldTradedTo(ePlayer);

  16.                 iMaxGold = min(iMaxGold, getGold());

  17.                 iMaxGold -= (iMaxGold % GC.getDefineINT("DIPLOMACY_VALUE_REMAINDER"));
  18.         }

  19.         return max(0, iMaxGold);
  20. }
复制代码


  1. int CvPlayer::greatPeopleThreshold()
  2. {
  3.         int iThreshold;

  4.         iThreshold = ((GC.getDefineINT("GREAT_PEOPLE_THRESHOLD") * max(0, (getGreatPeopleThresholdModifier() + 100))) / 100);

  5.         iThreshold *= GC.getGameSpeedInfo(GC.getGameINLINE().getGameSpeedType()).getGreatPeoplePercent();
  6.         iThreshold /= 100;

  7.         iThreshold *= GC.getEraInfo(GC.getGameINLINE().getStartEra()).getGreatPeoplePercent();
  8.         iThreshold /= 100;

  9.         return max(1, iThreshold);
  10. }
复制代码


改完C++源码要重新编译DLL

城市最大防御改CIV4CultureLevelInfo.xml


你想改游戏的话可能先从XML开始,可以参数拉登写的
http://www.civclub.net/bbs/viewthread.php?tid=33858

DLL源码和python请自己努力。
 楼主| 发表于 2010-3-7 21:38:13 | 显示全部楼层
thank you
正在找VC。怪不得那个外交态度我改了没起作用,原来还要重新编译
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|塞爱维(CIV)文明联盟    

GMT+8, 2024-4-19 00:52

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表