• 设为首页
  • 收藏本站
  • 手机版
  • 官方微信
  • 登录 注册账号
  • 查看: 2016|回复: 5

    A Guide to Missions

    [复制链接]

    259

    主题

    807

    帖子

    8352

    积分

    大将军

    Rank: 8Rank: 8

    名望
    40 点
    汉币
    242 铢
    金币
    7223 枚
    注册时间
    2015-2-24

    战国全面战争会员勋章大秦帝国全面战争会员勋章

    发表于 2015-3-1 00:22:19 | 显示全部楼层 |阅读模式

    马上注册,结交更多好友,享用更多功能,让你轻松玩转汉魂游戏工坊!

    您需要 登录 才可以下载或查看,没有帐号?注册账号

    x
    原贴地址:
    http://www.twcenter.net/forums/showthread.php?t=81256&highlight=building
    本文主要是关于任务相关的教程
    本人鸟语渣,翻译的不流畅的地方大家意会一下就是了,应该都能看懂吧
    专贴请注明翻译作者及原贴地址,谢谢!
    A Guide to Missions
    By DarkKnight





    教程目录:

    -
    Table of Contents
    I.
    Overview   概述
    1.
    What is a mission?  什么是一个任务?
    2.
    How do I get a mission?  我如何得到一个任务?
    3.
    What happens when I get a mission?当我得到一个任务会发生什么?
    4.
    Do I have to complete every mission?我必须完成每个任务吗?
    5.
    Do I have any other options? 我有其他选择吗?
    6.
    How do I join a mission? 我如何加入一个任务?
    7.
    How do I join a crusade? 我如何加入圣战?
    II.
    Walkthroughs
    1.
    Join Crusade  加入十字军东征
    2.
    Return Home City  返还罗马
    3.
    Cease Hostilities  停止敌对行动
    4.
    Break Alliance  打破联盟
    5.
    Build Church  建造教堂
    6.
    Spread the Word of the Lord  传播耶和华的话
    7.
    Gift from Pope  教皇的礼物
    8.
    Give a "Donation"  给一个“捐赠”
    9.
    Give Relic  给遗物
    10.
    Recruit Priest   招募牧师
    11.
    Assassination  暗杀
    12.
    Blockade Port  封锁港口
    13.
    Take Settlement  占领城市
    14.
    Gift from Council  委员会的礼物
    15.
    Marry Princess  娶公主
    16.
    Annex Settlement  获得城市
    17.
    Send Emissary  派使者
    18.
    Reinforce Region  加强地区
    19.
    Recruit Agent  招募事务官
    20.
    Acquisition  收购
    21.
    Trade Agreement  贸易协定
    III.
    The Mechanics of Missions and Modding  任务的机制和修改
    1.
    Missions  任务
    2.
    Text  文本
    3.
    Paybacks  回报
    4.
    External Paybacks   外部回报
    IV.
    References  引用
    1.
    Mission Descriptions  任务描述
    2.
    Mission Titles  任务标题
    3.
    Mission Triggers  任务触发
    4.
    Null Payback Descriptions  零回报描述
    5.
    Missions  任务
    6.
    Mission Paybacks  任务回报
    7.
    Payback List  回报列表
    8.
    Null Paybacks  零回报
    9.
    Expire Triggers  到期触发
    10.
    Supported Missions   支持的任务
    11.
    Mission Parameters  任务参数
    12.
    Specific Parameters  特定参数
    13.
    Parameter Definitions  参数定义
    14.
    Payback Parameters  回报参数
    15.
    Rewards and Penalties  奖励和惩罚
    16.
    Formulae  公式
    17.
    Variables  变量


    Overview
    What is a mission? 什么是任务?
    A mission is a goal given to you by a source. Upon successfully meeting this goal you might win a reward, but upon failing the mission you might be penalized. A mission might be the Pope asking you to build a church or even another faction's heir asking you to assassinate his faction leader.
    任务是某个来源给你的一个目标。通过成功的完成目标你能获得一个奖励,但是任务如果失败,你也会收到惩罚
    一个任务可能是教皇叫你修一个教堂或者甚至另一个派系的继承人让你刺杀他的派系的领导人。
    How do I get a mission?如何获得任务呢?
    You get a mission assigned to you according to your actions in the game. Each mission has a score. Your actions might increase or decrease the score of the mission. The exact score threshold or probability of recieving a mission is unknown. All we know is that the higher a missions score is, the more likely it will be given.
    根据在游戏中的行为,你会得到一个任务分配给你。每个任务都有一个分数。你的行动可能会增加或减少的任务得分 。 一个任务确切的分数阈值或概率的是未知的。我们知道的是分数越高是一个任务,越有可能会给任务。
    What happens when I get a mission?
    当我得到一个任务的时候会发生什么呢?
    You will recieve an event pop up informing you of the mission. The pop up will tell you who is giving you the mission (normally the Pope or the Council of Nobles), what they wish for you to do, how long you have to do it, what happens if you fail, what happens if you succeed, and any specific info you need to complete it.
    你会得到一个弹出的事件通知你的任务。弹出的会告诉你谁是给你的任务(通常教皇或理事会的贵族),他们希望你做,你要多长时间完成它, 如果你失败了, 会发生什么事情, 如果你成功, 会发生什么,和任何特定的信息,你需要完成它。
    For example, if you recieve the take rebel settlement mission it will tell you the following:
    例如,你会收到要求攻占叛军城池的任务,任务会给以下内容:
    Quote:
    Take Rebel Settlement

    Our great nation appears weak to tolerate such insolence from these rebels. The Council recommends you capture this rebel settlement and assert your authority.


    Then it will tell you that you have 15 turns to capture it, that you will recieve some of the best units available, and the name of the settlement to capture.
    然后它会告诉你,你有1回合的时间去占领它,你会得到一些最好的部队,以及占领这个城池
    Do I have to complete every mission?我必须完成每个任务吗?
    The short answer: No
    简短的回答是:不
    However, you have to be willing to accept the penalties that will follow failure. When deciding whether to complete a mission, do the following:
    然而,如果接受失败,你必须愿意接受处罚。 在决定是否要完成一个任务的时候,做到以下几点:
    1. List the pros of completing the mission. This includes the rewards given from the mission and any other strategic value that may be gained from your actions in the mission.
    1。列表完成任务的优点 。这包括 任务给你是奖励给和其他通过任务行动中的获得的战略价值
    2. List the cons of completing the mission. This includes any strategic value that may be lost from your actions in the mission.
    2。列出完成任务的缺点。这包括 从你在完成任务的过程中可能失去的 任何战略价值。
    3. List the cons of failing the mission. This includes the penalties given from the mission and any other strategic value that may be lost from your actions in the mission.
    3.列出任务是白的缺点。这包括任务的处罚以及在执行任务的行动中失去的任何战略价值
    4. Weight the above and see if the pros of completing and the cons of failing outweigh the cons of completing.
    4.权衡一下上面看到的优点和缺点
    If you go through the process and are still unsure, it is always best to default to completing the mission. By completing the mission you will be pleasing at least one party, so unless you alienate another by doing so it is best to complete the mission.
    如果你通过这个过程,仍不确定,最好是默认为完成任务。通过完成任务你会取悦至少一方,所以除非你希望疏远另一个,通过这样做是最好的完成任务。
    However, you may not want to complete a mission in some circumstances. For example, you are allies and big trading partners with Turkey, and the Pope asks you to blockade their ports. It may be in your best interest to lose some of the Popes respect in order to maintain your trade.
    然而,你可能有不希望完成任务的情况。例如,你和土耳其是盟友也是贸易伙伴,单丝教皇叫你封锁他的港口。这样可能在你保留最佳利益的同事,失去交换对你的一些信任。
    Do I have any options besides completing and failing?
    我有任何选项除了完成和失败吗?
    Funny you asked that. As a matter of fact, you do. Most missions have expirations on them. That means if one of their expirations is triggered, you are no longer obligated to complete the mission. You recieve no reward, but more importantly no penalty.
    很高兴你问这个。作为一个事实,你做到的。大多数任务到期了。这意味着如果他们的一个到期了,你不再是义务来完成任务。你收到没有回报,但更重要的是没有处罚。
    Did the the Explorers Guild ask you to take a settlement owned by a faction which you don't want to go to war with. But then again, you are working on getting the guild's headquarters, and don't wish to upset them. Try to negotiate an alliance with the faction owning the settlement. If you manage to cement the alliance, the mission expires and you are no longer obligated to take it.
    探险家协会要求你去占领一个城市,而这个城池是你不希望与其开战的势力拥有的。但是但话又说回来,你正在为公会工作,并不想让他们心烦。尝试谈判结盟。如果你管理,以巩固双方的联盟,任务到期,你不再有义务接受它。
    How do I join a crusade?如何加入十字军圣战
    Find the general you want to send on the crusade and right click his unit card. If a crusade mission is active, then there will be a button at the bottom of the units scroll to join the crusade. If the button is not active make sure the general has at least 8 units in his army and is outside of a settlement.
    找到你想要加入十字军的将领,右击他的兵牌。如果十字军任务激活,那么那里会有一个按钮在单位的底部。如果这个按钮没激活,要保证将领在他的军队里至少有8支部队,而且要在野外。
    Are there any "missions" that aren't missions?
    是否有任何“任务”,不是任务呢?
    The missions system is just like any other trigger/event systems in the game only the trigger is fired according the the score system. This makes it useful for a number of things that do not necessarily fit the definition of a mission above.
    任务系统就像游戏里其他触发器和事件系统,触发器只有在得分系统中被激活。这使得它有用的一系列事情不一定符合上面任务的定义。
    For example, the game has a "mission" programed in it where the council will just give you money.
    例如,游戏里有个任务是委员会只是给你钱而已。
    Walkthroughs
    Join Crusade:加入十字军
    There are a couple of variations to this mission. In this mission the Pope will ask you to send an army on a crusade. You may even be asked to send your faction heir or leader on the crusade. The lower your papal standing is the more likely you will be asked to send an heir or leader.
    这是有两种变量的任务。在任务里,教皇要求你派部队加入十字军,你甚至可以拍你的势力继承人或君主加入十字军。
    教皇对你信任越低,你越有可能白要求派遣继承人或君主加入十字军。
    If you fail the mission, your papal standing will drop. The mission reward depends on your current papal standing. If the Pope doesn't like you very much you will likely recieve no reward for the mission and only be penalized for failing. If you already have a good standing with the Pope your relations with him will improve more. The mission lasts 10 turns. It will only expire if the crusade ends or you get excommunicated. If a specific character was ordered on the crusade, and that character dies, the mission will also expire.
    如果你的任务失败,教皇对你的评价将会下降。任务的奖励取决于当前教皇对你的评价。如果教皇不喜欢你,你可能会得到没有报酬的或者只有被处罚的任务。如果你和教皇关系已经较好,那么你和教皇的关系将会更加改善。任务持续十回合。如果十字军结束或者你被驱逐出教会,他会过期。如果某个特定的角色被要求加入十字军,而这个角色死亡,那么任务也过期。
    Joining a crusade will automatically put you in a state of war against the target of the crusade. The targets may be any non Christian or excommunicated faction. Carefully weigh the expenses of going on the crusade versus the benefits of completing the mission before making your decision.
    加入一个运动就会自动将你处于一种对目标战争状态。目标可以是任何非基督教或逐出教会的势力。在做决定前,仔细权衡十字军过程中的费用以及完成后的奖励。
    Make sure all of the following expenses are accounted for: short term and long term effects of war with the target, drop in relations with the targets allies, the absense of the crusading general in your homelands, how long it will take to complete, men deserting, and how it will affect your current game plan.
    确保实现以下的价值:
    短期和长期的对目标的战争的影响,降低与目标联盟的关系,你的国家十字军将领的缺乏,需要多久去完成他,人员的损失,他如何影响你当前的游戏计划。
    Then make sure all of the following benefits are accounted for: no upkeep of crusader units, double movement points for crusader units, experience for units on the crusade, chivalry for your general, higher papal standing-- lower papal standing if you fail, and any lands conquered.
    然后确保以下好处都得到:没有维护费用的十字军部队,十字军的双倍移动力,十字军的经验,你的进行的美德属性,更高的教皇的评价,如果失败,更低的教皇评价,以及其他领土的征服。
    If choose to join the crusade, you have completed the mission. Yep, its that easy. You don't have to actually capture the target settlement. Joining is good enough. But there are always nice benefits of capturing the target.
    如果选择加入十字军,您已经完成了这个任务。是的,它就是那么容易。不必实际占领目标。加入已经足够好了。但是,占领目标总是有更加好的好处


    First find a general with 8 units, outside of a settlement, and have him join the crusade.
    找一个有8支部队的将领,在野外,加入十字军


    As soon as you do, the mission is complete.
    只要你做了,任务就完成了。


    Lets capture the city for kicks and giggles.
    让我们为了利益占领目标城市去。



    We send our ship loaded up with our crusaders to the city.
    我们派遣我们的船只装载我们的十字军去那个目标城市。


    Almost there.
    就是那里


    We land and siege the city.
    登陆,围城。


    We conquer the city. HOORAY!
    征服这个城市,万岁

    [tr][/tr]
    Return Rome to the Papal States:返还罗马教廷
    If you manage to get Rome in your possession the Pope may ask you to return the city. For example, those blasphemous French invade Rome, then you take the city from the French. The Pope will ask you to return the settlement. I found that if you take Rome from the Papacy directly, then reconcile, you will not be asked to return the settlement. I also found that if you diplomatically recieved the settlement from the French (in my previous example) then you will not be asked to return the settlement.
    如果你占领了罗马,交换可能会要求你返还罗马。例如,那些亵渎神明的法国入侵罗马,然后你从法国手上得到罗马,教皇将会要求你返还罗马。我发现如果你直接从教皇手中得到楼吗,然后通过停战,就不会被要求返还城市。同样我也发现,如果你通过外交手段从法国手里得到罗马(就像我例子里的一样)你也不会被要求返还罗马。
    The rewards range from nothing to chest of florins, greatly higher papal standing, and your leader adored by the Pope. The penalties range from a chance of excommunication or inquisition to a slap on the wrist. The reward and penalty depend on your papal standing. If you have a very low papal standing you will just recieve a small papal standing increase for giving the city and risk excommunication or inquisition for keeping the city. With a very high papal standing you will recieve all of the good things listed above.
    回报包括金币、更高的教廷影响,首领更收教皇信任。惩罚包括一定几率被驱逐教会或宗教教会惩罚,奖励和惩罚取决于你在教廷的影响力。如果你在教廷的影响力很低,你只会获得少校的影响力,如果保持罗马不去归还有几率被驱逐教会。如果在教廷的影响力很高,会得到上面列举的所有较好的东西。
    When making your decision consider the benefits of having the city versus the wrath of the Pope. I would only advise keeping the city if your papal standing is higher than .7 or you plan on envoking the wrath of the Pope anyways in the near future.
    做决定时,要考虑占有城市的益处以及教皇的愤怒带来的影响。我只是建议当教廷影响高的时候占领这个城市。或者你计划在未来激发教皇的愤怒。
    To complete the mission just click the check mark. You lose the city and your garrison is automatically relocated.
    要完成任务,只需点击复选标记。你将失去这个城市和你的驻军将自动重新安置。






    [tr][/tr]
    Cease Hostilities:停止敌对行动:
    You will be given this mission when you are a Catholic and attack a fellow Catholic. If you or the Catholic you attack are excommunicated you will not recieve this mission. Even if both of you are non-excommunicated Catholics, there is still a chance that you won't recieve this mission-- at least not immediately. Eventually chances are that you will recieve the mission but it is possible to war for quite some time before recieving this mission.

    当你是一个天主教势力,攻击另外一个天主教势力的时候,你会得到这个任务。如果你或者被你攻击的是被天主教驱逐的势力,你就不会得到这个任务。如果你们双方都不是被天主教驱逐的势力,仍然有机会不收到这个任务----至hi,你少是不立刻收到。最终你会收到这个任务,但是在收到任务前,战争会持续一段时间。
    If you are given the mission the Pope will ask you not to commit any acts of aggression (attacking, blockading, seiging, etc) against the faction for a certain number of turns. That duration is not a set number, but depends on the situation. If you commit an act of aggression before the mission is over, then you fail and the penalty might be excommunication. If your papal standing is greater than .2 you will not be excommunicated, but your papal standing will take a dive. Completing the mission is as simple as not attacking the faction. Your only reward is not being penalized. The mission expires if you or the target becomes excommunicated or the target is eliminated.
    如果你收到这个任务,教皇会要求你在几个回合内不要对目标势力做出任何挑衅的行为(攻击,封锁,围城,等等)这个时间不是一个定数,取决于具体情况。如果你在任务结束前做出侵略行为,任务会失败你可能会被驱逐出天主教会。如果你在教廷的影响大于2,你不会被驱逐,但是影响力会降低。完成任务很简单,不要进攻目标势力就行了。你唯一的奖励就是不被处罚。你或者你的目标被驱逐,或者你的目标被消灭了,任务就取消。
    When deciding whether to obey the Pope decide if conquest of the target faction is worth excommunication. If you are excommunicated, you all of your cities will be significantly less orderly. You will most likely have to lower taxes and increase garrisons to maintain order. You also will have worse relations with Catholics. If you plan on war mongering, you might not mind excommunication that bad. You will no longer have the Pope bugging you every 5 seconds about ceasing hostilities and no more pleasing the Pope by completing his other missions. Your conquest will be valuable in the long term, so if you can suck up the loss in the short, when you reconcile you will be much stronger. But if you are a diplomatic man, or simply someone who doesn't feel like dealing with the disorder, obeying the Pope would be the wise thing to do.

    当决定是否服从教皇的时候,考虑下征服目标后被驱逐是否值得的。如果你被驱逐,那么你所有的城市的秩序会大大降低。你很可能不得不降低税收,增加驻军来维持秩序。你还可能和天主教的其他势力关系变差。如果你计划发动战争,那么你可能不介意被驱逐。如果教皇5次要求你停战,你将不会再被教皇关注,不会再被教皇要求完成其他任务。从长期来看,你的征服是更有价值的。所以如果你在短期内收到损失,你可以通过调停变得更强大。如果你喜欢与他国外交,或是是个简单的玩家,不喜欢处理问题,那么就尊总教皇的要求去做吧。


    If we try to attack those dirty Milanese.
    如果我们试图攻击那些肮脏的米兰。


    But if we wait it out
    但如果我们等待


    .






    Mission Mechanics and Modding
    任务的学习和修改
    This section is a discussion on how the missions system works and how to mod it. Remember that many of this is just my theories, as not much is explained iun the documents.

    这个章节是讨论任务系统如何工作以及如果修改任务的。记住这只是我的理论,文档中没有太多的解释。
    Missions are an event that is triggered according to its score. For certain missions, there are other triggers that are hardcoded. For example the Join Crusade mission requires a crusade to be active for the mission to be issued. In descr_mission.txt we can configure many of the missions settings.
    任务是根据得分被触发的事件。对于某些任务,还存在其他硬编码的触发器。例如加入十字军的任务,需要十字军被触发。
    在descr_mission.txt里面有很多任务相关的设置可以配置。
    All missions are hardcoded and cannot be modded themselves. There are supported missions that have hardcoded triggers and parameters that can be modded into something entirely different. For example, lets use the Gift from Council mission. This is simply a mission that is triggered when its score is higher than any other council missions. It immediately gives the payback without any other prerequistite (such as acquire the target in the acquisition mission). Because of this we have a lot of flexibility in terms of what we can do with it.
    所有任务都是硬编码而自身不能修改的。存在有硬编码触发器和参数可以修改一些东西变成完全不同的任务。让我么用委员会的礼物作为例子。这是个简单的任务,当这个任务的分数比其他理事会的任务分数高的时候被触发。它立即给予回报,没有任何其他前提(如在采集任务收购目标)。由于这一点,有很大的灵活性而言,我们能够用它做处理。
    Perhaps the most powerful thing in descr_missions.txt is the variations function. By leaving a space after defining the mission, you can define a variation by writing text. For example there is a variation for the Council Blockade Port mission called Blockade Distant. This is indentical to the original except that it requires a further distance and you don't have to hold the blockade as long.
    可能descr_missions.txt 里面有用的东西是变量功能。在定义任务后保留一段空间,你可以通过编写文本定义一个变量。例如存在一个变量叫做 Blockade Distant.用来定义理事会要求封锁港口的变量。它需要更远的距离你也不需要一直封锁港口。
    So in our example of the Gift from Council, we could create a variation of this. We could make it anything we want. For example, we want to make a variation where when the mission is triggered your global standing rises .2. We copy and paste the original mission, then add the variation. For example we could change

    Code:
    mission gift_from_council
    to
    Code:
    mission gift_from_council global_standing

    A mission is issued according to its score. The mannor in which it is, is not documented. Therefore we don't really know when or how a mission is issued. However, I have my theories. My leading theory is that each supported mission type has a formula to calculate its score based on the parameters. At the start of every factions turn the game calculates the score of each mission, if the faction currently has no current missions issued already (excluding crusades). Then the game selects and issues the mission that has the highest score. However, in play testing I found that when you eliminated all missions except the Gift mission and eliminated the exclude duration that the mission wasn't issued every turn. Sometimes it would be issued back to back, sometimes even three turns in a row. Then other times it would be issued every other turn. There even were some gaps lasting 10 turns without the mission being issued. When I turned on the exclude duration, the mission appeared much less frequently. It rarely appeared twice within 10 turns. This leads me to believe that not only does it take the highest score, but that score also has to exceed a certain threshold. In order for that to work, the score would have to be calculated and added to the previous turns score every turn. And in the end, I am still really confused on how exactly missions are issued based on the score. The only known right now is that higher score means higher chance of being issued.

    Every mission can use the score_modifier parameter. This parameter will multiply the score after it has been calculated. So for example, if we want or global standing variation to the gift from council to appear less often than the original we can set the score modifier to a value around .25.

    Another parameter is the exclude duration. This is a measure to prevent the same mission from being issued multiple times in a short timeframe. The exclude duration is NOT the time that must pass before the mission can be issued again. It lowers the score during that duration so it will be less likely to be issued. The exclude duration is inversly proportional to the score. As the larger the exclude duration the more it lowers the score. The score gets modified by the calculated score times the number of turns since the issuance of the mission. That number gets divided by the exclude duration. That value is the new score. If the exclude duration is not defined then it defaults to 0, which means there is none. So for example, if we don't want our global standing mission to be issued for awhile after its last issuance we can set the exclude duration to 30. That means that the first turn after it has been issued the score will be 1/30th of its calculated value. The second turn 1/15th the value. The third turn 3/30ths ofthe value, and so forth. After 30 turns have passed the exclude duration is ignored until the mission is issued again.

    Another way we can limit the availability of a mission is to use the max_score parameter. This sets a ceiling for the score. For example, if there is another mission with a score higher than 100, we want our global standing mission not to be issued. We would set the max_score to 100.

    Most of the missions also have parameters specific to them. These parameters are defined below the paybacks and affect when the mission can be issued, what happens when the mission is issued, and other miscellaneous things. For example the Gift from Pope mission has the pfp_thresh parameter. This parameter is the minimum papal standing that a faction must have to be issued this mission. I do not know whether one missions parameters can be used in another as I have not had time to test. It would be a good community project to find out which parameters are compatable with other missions. I am guessing that most of the parameters are not compatable, but there are probably some that can be used with certain other missions. There also might even be parameters that were coded into the source code, but then never used in descr_missions.txt.

    There also is the turn_start parameter for all missions. This is the first turn which this mission can be issued on. The default value is 2. For example, we dont want our global standing mission to be available until the 25th turn. We set this value to 25.

    Another universal parameter is the duration. This value is how long player has to complete the mission. In our global standing mission we will not define this because it is given instantly.

    The mission source is who is giving the mission. This is the first line in a missions code. For example a mission issued by the council says:

    Code:
    COUNCIL_MISSION
    One from the Pope says:
    Code:
    POPE_MISSION
    These text strings are looked up in expanded.txt.strings.bin. Use Alpaca's string.bin converter to convert the file into .txt, which can be opened in notepad. Then read a tutorial on this site about how to convert back to strings.bin.
    In expanded.strings.bin it looks for what ever you wrote _SOURCE}. So for example if COUNCIL_MISSION is placed as the source, it will look for {COUNCIL_MISSION_SOURCE} in expanded.txt.strings.bin. It then looks next to the "}" for the text to display in game as the source. This has no effect on the mission itself, just the text that appears in game. There is no actual difference between a mission being issued by the council or the pope, it is all cosmetic. It is the hardcoded functions of the mission and the paybacks of the mission which actually make it from the Pope in terms of gameplay.

    There are then four image_path parameters: image_path_issued, image_path_expired, image_path_success, and image_path_failed. These look up in data\ui\culture\eventpics the image to diplay when the mission is issued, expired, completed, or failed. For example, if the image_path_failed is Pope_Disapproval then when the mission is failed the picture will be Pope_Disapproval.tga.

    The rest of the text is located in expanded.txt.strings.bin or missions.txt.strings.bin. The game looks for source_ISSUED in expanded.txt.strings.bin for the text to display when you hover your mouse over the mission popup when it is issued. It works similarly for expired, success, and failed. The game looks for the name of the mission _PROPOSAL, _EXPIRY, _SUCCESS, and _FAILURE for the text to display when the mission is issued, expired, completed and failed. It also looks there for the penalty and reward text. It looks for the name of the payback _PENALTY_DESCR, _PENALTY_PRE_DESCR, _REWARD_DESCR, and _REWARD_PRE_DESCR. When a mission is issued it will display _PENALTY_PRE_DESCR as the text next to penalty and _REWARD_PRE_DESCR as the text next to reward. When the mission is completed it displays the _REWARD_DESCR. When the mission is failed it displayed the _PENALTY_DESCR. Remember that all of these text attributes are all cosmetic. You can have it say that you get 1000 florins, but you have to code in the 1000 florins elsewhere for the faction to actually recieve 1000 florins.

    The final parameter of missions is the paybacks. The payback is the penalty and reward from completing or failing to complete the mission. The payback can be anything, as long as you define it above in the paybacks. The game reads the payback_id and looks for it in the section above. For the example of our global standing mission lets have it refer to a payback called mod_global_standing.

    The payback parameter can also have parameters of its own. There are four valid parameters you may use: papal_standing, difficulty, cash, and random. papal_standing means that a faction with up to this amount of papal standing will recieve this payback versus the others. Difficulty is normally used with assassination type missions. If the chance of succeeding was less than this value the player recieves this payback. Cash places the condition on the treasury. If the player has less than the value next to cash, they recieve that payback. Random picks a random is the percentage chance of this payback being selected.

    For example the following payback means that there is a 20% chance of payback1 being selected for the faction, a 70% chance for payback2, and a 10% chance for payback3.
    Code:
    random 0.2 payback_id payback1random 0.7 payback_id payback2payback_id payback3
    This one means that if the player has less than 1000 florins in his treasury he recieves payback1. Between 1000 and 2000, payback2. 2000-3000, payback3. If the player has above 3000 florins he recieves payback4.
    Code:
    cash 1000 payback_id payback1cash 2000 payback_id payback2cash 3000 payback_id payback3payback_id payback4
    The following means the player recieves payback2 unless the missions chance of success is less than 60%, in which case the player recieves payback1.
    Code:
    difficulty 0.6 payback_id payback1payback_id payback2
    The following means that if the factions papal standing is less than -0.7 then the faction recieves payback1. Less than nuetral but greater than -0.7 then payback2. Between 0.0 and 0.7, payback3. Above 0.7, payback4.
    Code:
    papal_standing -0.7 payback_id payback1papal_standing 0.0 payback_id payback2papal_standing 0.7 payback_id payback3payback_id payback4
    The payback parameters can also be combined. The example below means that by default the faction recieves payback three. But if the factions treasury is less than 1000 florins there is a 50-50 chance of the factions recieving payback1 or payback2.
    Code:
    random 0.5 income 1000 payback_id payback1income 1000 payback_id payback2payback_id payback3
    When setting up complex payback conditions make sure none of them overlap, and if they do, you have the random condition on the overlapping ones. I am not sure what would happen if you made something like this and the faction had less than 1000 florins and less than 0.4 papal standing:
    Code:
    income 1000 payback_id payback1papal_standing 0.4 payback_id payback2
    If I had to guess I would say that it would always pick payback1, because it is the first one it reads. However, this could be fixed by this:
    Code:
    income 1000 random 0.5 payback_id payback1papal_standing 0.4 random 0.5 payback_id payback2
    That way if the faction has both less than 1000 florins and papal standing below 0.4, then there is a 50% chance of recieving payback1 and a 50% chance of recieving payback2.
    If you wanted to specifically define what would happen in that scenario you could do this:
    Code:
    income 1000 papal_standing 0.4 payback_id payback1income 1000 payback_id payback2papal_standing 0.4 payback_idpayback3
    In this case the faction recieves payback1 in our scenario and recieves separate paybacks if just the income is less than 1000 or just the papal standing is less than 0.4.

    Now that we went through all of this, I can tell you that we don't even have to use a variation to create our global standing missions. All we have to do is add another payback to the original mission with the random condition. We could make it so 20% of the gift to council missions raise global standing. We would do that by adding a payback with the condition random 0.2.

    Now to review this is what a mission structure looks like:
    Code:
    mission name of mission (variation name){parameterspaybacks{payback_id}additional parameters}
    Now you think you know everything about missions, don't you? Well you just scratched the surface. There is a whole nuther world of paybacks out there.

    At the top of descr_missions.txt there is the payback definitions. Any payback that you defined below in the missions has to be defined up here.

    A payback starts with the payback_list parameter. After this parameter goes the payback_id. So for our global standing payback this is where we would write mod_global_standing. If we had called it something else, we would write that here instead.

    Next comes the rewards and penalties. If reward isn't defined then there will be no reward for completing the mission. The same goes for penalty, if it is not defined, there is not penalty.

    A reward starts with stating "reward".
    Then you state a reward parameter and an attribute. You can state as many rewards as you like in one reward. For example if I want to give the faction 1000 florins for completing the mission it would state:
    Code:
    money 1000
    money is the parameter and 1000 is the attribute. I can state as many of these rewards as I would like. For example:
    Code:
    money 1000buildable_unit 800 2best_buildable_unit 1200 1
    The above means that the faction recieves 1000 florins, 2 units worth 800 florins a piece, and one of the best unit available worth up to 1200 florins. You can see a list of valid parameters and their attributes in the references.

    After you state your rewards, you state your penalties in the same way. Everything is identical except here you would put the bad things, and this is what happens if you fail.

    However, all this stuff is shallow. Inquisition chance? Money? Units? Didn't I promise that you had only scratched the surface earlier? I mean you can't really do much with these. That is where the modders best friend, null_paybacks, enters.

    A null_payback is essentially what its name implies. It does nothing. Zip, nada, zilch, zero, nothing. When a faction is awarded a null payback, the faction recieves nothing. The null payback does nothing by itself, but accompanied by external codes it isPOWERFUL!!!

    For example, lets say we want the faction to be awarded with a trait when they complete the mission. We go into export_descr_character_traits.txt and test the trigger when "LeaderMissionSuccess" under the condition PaybackID name of payback that the null payback is under. Lets say when the faction completes missionX their payback is trait which gives them null_payback TRAIT. Right now null_payback TRAIT gives them nothing. But lets add this to export_descr_character_traits.txt
    Code:
    Trigger trait1WhenToTest LeaderMissionSuccessCondition PaybackID traitAffects trait  1  Chance  100
    Now when the faction completes the mission they recieve null_payback TRAIT and their leader gets the trait you defined (in italics). You could also change the 100 after chance to make it a probability of recieving the trait. For example if you changed it to say "chance 50" it would mean there is a 50% chance that the leader gets the trait.

    We can also refer to paybacks in descr_faction_standing.txt. In the same mannor that we used in traits we can increase factions standing towards each other using null paybacks.
    Code:
    Trigger 0100_Success_Pope_Min_Reward_Only    WhenToTest LeaderMissionSuccess    Condition PaybackID pope_min_reward_only            FactionStanding factions { papal_states } 0.1
    The above means that when the faction completes the mission and recieves the payback pope_min_reward_only, the factions papal standing rises 0.1. In descr_mission.txt there will be a null_payback in the reward.

    So now what exactly do null_paybacks do? Now that you have made it so that the papal standing rises when you complete the mission, you need a message to inform the player. The game looks up the null_payback in expanded.txt.strings.bin for the text to display when the faction recieves the null payback, or has the opportunity to. If you remember from way above when I talked about where the text came from. These null paybacks are what the game looks up when displaying text from when you completed the mission. It has the PRE text, what it displays when the mission is issued. Then it also has the text it displays when the mission is completed or failed. So add in the benefit through another document, then add a null_payback as the reward/penalty. Then make sure the null payback is defined in the appropriate text documents.

    Back to our global standing mission, we would go the descr_faction_standing.txt and add this:
    Code:
    Trigger Global_Standing_Mission    WhenToTest LeaderMissionSuccess    Condition PaybackID mod_global_standing    FactionStanding global 0.2
    I haven't done extensive testing with descr_faction_standing.txt so I don't know if you need the number before the name of the trigger, but if you do, add the appropriate number.

    Now lets go to the paybacks and add this:
    Code:
    payback_list mod_global_standing{Reward{null_payback MOD_GLOBAL_STANDING}}
    Now we go to the text files and add in:
    Code:
    {MOD_GLOBAL_STANDING_REWARD_DESCR}Your reputation with the world has improved moderately.
    There we have it. 20% of the time the Gift from Council mission pops up, our global standing will increase by 0.2 instead of recieving the gift.

    With the null paybacks we can get really creative with this. There are so many potential possibilities for missions besides the intended purpose.
    管理点评回复 编辑支持



    0

    主题

    103

    帖子

    96

    积分

    伍长

    Rank: 2

    名望
    0 点
    汉币
    0 铢
    金币
    -7 枚
    注册时间
    2015-3-8
    发表于 2015-6-30 16:15:45 | 显示全部楼层
    说的非常好

    0

    主题

    112

    帖子

    108

    积分

    伍长

    Rank: 2

    名望
    0 点
    汉币
    0 铢
    金币
    -4 枚
    注册时间
    2015-3-9
    发表于 2015-6-30 16:11:39 | 显示全部楼层
    真心顶

    1

    主题

    84

    帖子

    76

    积分

    伍长

    Rank: 2

    名望
    0 点
    汉币
    0 铢
    金币
    -8 枚
    注册时间
    2015-3-7
    发表于 2015-6-30 16:15:42 | 显示全部楼层
    很好哦

    0

    主题

    103

    帖子

    96

    积分

    伍长

    Rank: 2

    名望
    0 点
    汉币
    0 铢
    金币
    -7 枚
    注册时间
    2015-3-8
    发表于 2015-6-30 17:03:37 | 显示全部楼层
    不错不错

    0

    主题

    67

    帖子

    61

    积分

    伍长

    Rank: 2

    名望
    0 点
    汉币
    0 铢
    金币
    -6 枚
    注册时间
    2015-3-9
    发表于 2015-6-30 17:04:11 | 显示全部楼层
    LZ真是人才
    您需要登录后才可以回帖 登录 | 注册账号

    本版积分规则

    QQ|手机版|网站地图|汉魂全面战争MOD网 ( 苏ICP备15054625号-2    Powered by Discuz! X3.4Comsenz Inc.

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