考察任务

This commit is contained in:
Tourswen
2025-11-24 01:51:11 +08:00
parent 6b68faae33
commit 8607bb5036
69 changed files with 2607 additions and 666 deletions

View File

@@ -1040,6 +1040,21 @@
</disallowedTraits>
</AlienRace.AlienBackstoryDef>
<AlienRace.AlienBackstoryDef>
<defName>WULA_Adult_Backstory_Legion</defName>
<slot>Adulthood</slot>
<title>「军团」分体</title>
<titleShort>「军团」分体</titleShort>
<description>[PAWN_nameDef]实际上没有自主心智它直接链接乌拉帝国行星封锁机关的超级AI「军团」作为其在外活动时的耳目。</description>
<workDisables>AllWork</workDisables>
<bodyTypeGlobal>Thin</bodyTypeGlobal>
<bodyTypeFemale>Thin</bodyTypeFemale>
<bodyTypeMale>Thin</bodyTypeMale>
<spawnCategories>
<li>Wula_Backstory_Categories_Legion</li>
</spawnCategories>
</AlienRace.AlienBackstoryDef>
<!-- 乌拉反常网络固定背景 -->
<AlienRace.AlienBackstoryDef>
<defName>WULA_Adult_Backstory999</defName>

View File

@@ -40,6 +40,12 @@
<basicMemberKind>Wula_PawnKind</basicMemberKind>
<pawnSingular>乌拉帝国合成人</pawnSingular>
<pawnsPlural>乌拉帝国合成人</pawnsPlural>
<generateNewLeaderFromMapMembersOnly>true</generateNewLeaderFromMapMembersOnly>
<leaderTitle>总控</leaderTitle>
<leaderForceGenerateNewPawn>true</leaderForceGenerateNewPawn>
<fixedLeaderKinds>
<li>WULA_Legion_PawnKind</li>
</fixedLeaderKinds>
<requiredCountAtGameStart>1</requiredCountAtGameStart>
<factionNameMaker>NamerFaction_Wula_PIA_Legion_Faction</factionNameMaker>
<factionIconPath>Wula/World/WorldObjects/Expanding/Wula_PIA_Legion_Faction</factionIconPath>

View File

@@ -34,4 +34,15 @@
<driverClass>WulaFallenEmpire.JobDriver_RecycleMechanoid</driverClass>
<reportString>正在准备进入猫猫地堡。</reportString>
</JobDef>
<!-- 考察工作定义 -->
<JobDef>
<defName>WULA_InspectBuilding</defName>
<driverClass>WulaFallenEmpire.JobDriver_InspectBuilding</driverClass>
<reportString>正在考察TargetA.</reportString>
<playerInterruptible>true</playerInterruptible>
<checkOverrideOnDamage>Always</checkOverrideOnDamage>
<alwaysShowWeapon>false</alwaysShowWeapon>
<casualInterruptible>false</casualInterruptible>
</JobDef>
</Defs>

View File

@@ -29,8 +29,6 @@
<apparelTags>
<li>Wula_Apparel_Init</li>
</apparelTags>
<abilities>
</abilities>
<weaponMoney>0</weaponMoney>
<apparelAllowHeadgearChance>1</apparelAllowHeadgearChance>
<apparelMoney>1000~2000</apparelMoney>
@@ -374,4 +372,99 @@
</li>
</backstoryFiltersOverride>
</PawnKindDef>
<!-- 上司 -->
<PawnKindDef>
<defName>WULA_Legion_PawnKind</defName>
<label>「军团」</label>
<race>WulaSpecies</race>
<lifeStages>
<li>
<bodyGraphicData>
<texPath>Wula/Item/WULA_Species_Icon</texPath>
<maskPath>SRA/Pawn/Mechanoid/AllegianceOverlays/None</maskPath>
<shaderType>CutoutWithOverlay</shaderType>
<graphicClass>Graphic_Multi</graphicClass>
<drawSize>1.1</drawSize>
<shadowData>
<volume>(0.2, 0.3, 0.2)</volume>
</shadowData>
</bodyGraphicData>
</li>
</lifeStages>
<combatPower>0</combatPower>
<factionLeader>true</factionLeader>
<minGenerationAge>18</minGenerationAge>
<maxGenerationAge>20</maxGenerationAge>
<forceNormalGearQuality>true</forceNormalGearQuality>
<initialWillRange>10~20</initialWillRange>
<initialResistanceRange>10~20</initialResistanceRange>
<defaultFactionDef>Wula_PIA_Legion_Faction</defaultFactionDef>
<isFighter>false</isFighter>
<apparelTags Inherit="False">
<li>Wula_Legion_Apparel</li>
</apparelTags>
<weaponTags>
<li>Wula_Melee_Weapon_T2</li>
</weaponTags>
<weaponMoney>3000~8000</weaponMoney>
<weaponMoney>0</weaponMoney>
<apparelAllowHeadgearChance>0</apparelAllowHeadgearChance>
<apparelMoney>99999~99999</apparelMoney>
</PawnKindDef>
<PawnKindDef>
<defName>Wula_PIA_Legion_Escort_Unit</defName>
<label>重装卫队</label>
<race>WulaSpecies</race>
<lifeStages>
<li>
<bodyGraphicData>
<texPath>Wula/Item/WULA_Species_Icon</texPath>
<maskPath>SRA/Pawn/Mechanoid/AllegianceOverlays/None</maskPath>
<shaderType>CutoutWithOverlay</shaderType>
<graphicClass>Graphic_Multi</graphicClass>
<drawSize>1.1</drawSize>
<shadowData>
<volume>(0.2, 0.3, 0.2)</volume>
</shadowData>
</bodyGraphicData>
</li>
</lifeStages>
<minGenerationAge>18</minGenerationAge>
<maxGenerationAge>20</maxGenerationAge>
<combatPower>500</combatPower>
<initialWillRange>10~20</initialWillRange>
<initialResistanceRange>10~20</initialResistanceRange>
<itemQuality>Poor</itemQuality>
<minApparelQuality>Poor</minApparelQuality>
<maxApparelQuality>Poor</maxApparelQuality>
<isFighter>true</isFighter>
<apparelTags>
<li>Wula_Armor_Super_Heavy</li>
</apparelTags>
<weaponTags>
<li>Wula_Melee_Weapon_T2</li>
</weaponTags>
<apparelRequired>
<li>WULA_Heavy_Infantry_PowerArmor</li>
<li>WULA_Heavy_Infantry_Helmet</li>
</apparelRequired>
<weaponMoney>3000~8000</weaponMoney>
<biocodeWeaponChance>1</biocodeWeaponChance>
<apparelAllowHeadgearChance>1</apparelAllowHeadgearChance>
<techHediffsChance>1</techHediffsChance>
<apparelMoney>999999~999999</apparelMoney>
<techHediffsMoney>999999~999999</techHediffsMoney>
<techHediffsRequired>
<li>DeathAcidifier</li>
</techHediffsRequired>
<backstoryFiltersOverride>
<li>
<categories>
<li>Wula_Backstory_Categories</li>
</categories>
</li>
</backstoryFiltersOverride>
</PawnKindDef>
</Defs>

View File

@@ -0,0 +1,227 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<!-- 纳税 -->
<IncidentDef>
<defName>WULA_GiveQuest_Base_Tex</defName>
<category>GiveQuest</category>
<label>纳税</label>
<targetTags>
<li>Map_PlayerHome</li>
</targetTags>
<questScriptDef>WULA_Base_Tex_Quest</questScriptDef>
<workerClass>IncidentWorker_GiveQuest</workerClass>
<baseChance>0</baseChance>
<requireColonistsPresent>True</requireColonistsPresent>
</IncidentDef>
<QuestScriptDef>
<defName>WULA_Base_Tex_Quest</defName>
<rootSelectionWeight>0</rootSelectionWeight>
<autoAccept>true</autoAccept>
<sendAvailableLetter>false</sendAvailableLetter>
<defaultChallengeRating>1</defaultChallengeRating> <!-- 挑战等级(星级) -->
<isRootSpecial>true</isRootSpecial> <!-- 特殊任务 -->
<defaultCharity>false</defaultCharity> <!-- 是否仁善 -->
<!-- 命名规则 -->
<questNameRules>
<rulesStrings>
<li>questName->WULA_Base_Tex_Quest_questName</li>
</rulesStrings>
</questNameRules>
<questDescriptionRules>
<include>
<li>QuestHospitalityCommon</li>
</include>
<rulesStrings>
<li>questDescription->WULA_Intro_Spy_questDescription</li>
</rulesStrings>
</questDescriptionRules>
<!-- 运行规则 -->
<root Class="QuestNode_Sequence">
<nodes>
<!-- 获取地图 -->
<li Class="QuestNode_GetMap" />
<!-- 生成物品奖励 -->
<li Class="QuestNode_GenerateThingSet">
<thingSetMaker>WULA_Base_Tex_Reward</thingSetMaker>
<storeAs>permissionReward</storeAs>
</li>
<!-- 产生超链接 -->
<li Class="WulaFallenEmpire.QuestNode_Hyperlinks">
<thingDefs>
<li>WULA_GlobalStorageSenderPod</li>
</thingDefs>
<factionDefs>
<li>Wula_PIA_Legion_Faction</li>
</factionDefs>
</li>
<li Class="QuestNode_Set">
<name>taxAmount</name>
<value>1</value>
</li>
<li Class="QuestNode_Set">
<name>taxInterval</name>
<value>250</value> <!-- 较短的测试间隔 -->
</li>
<li Class="QuestNode_Multiply">
<value1>$points</value1>
<value2>1</value2>
<storeAs>taxAmount</storeAs>
</li>
<li Class="WulaFallenEmpire.QuestNode_CheckGlobalResource">
<resourceDef>Silver</resourceDef>
<requiredCount>$taxAmount</requiredCount>
<retryDelayTicks>$taxInterval</retryDelayTicks>
<successSignal>TaxPaymentSuccess</successSignal>
<failSignal>TaxPaymentFailed</failSignal>
<deductOnSuccess>true</deductOnSuccess>
<useInputStorage>true</useInputStorage>
</li>
<!-- 通知 -->
<li Class="QuestNode_Letter">
<label>什一税</label>
<text>唯死亡和税收不可避免——按时上交什一税是乌拉帝国殖民地的光荣义务。\n\n查看任务列表以了解更多。</text>
<letterDef>NegativeEvent</letterDef>
</li>
<!-- 支付成功处理 -->
<li Class="QuestNode_Signal">
<inSignal>TaxPaymentSuccess</inSignal>
<node Class="QuestNode_Sequence">
<nodes>
<li Class="QuestNode_Letter">
<label>纳税完成</label>
<text>帝国已经接收了税款,为了表彰你在纳税上的良好表现,一封税金缴纳凭证已经送到你的殖民地中!</text>
<letterDef>PositiveEvent</letterDef>
</li>
<li Class="QuestNode_AddItemsReward">
<items>$permissionReward</items>
</li>
<li Class="QuestNode_ChangeFactionGoodwill">
<faction>Wula_PIA_Legion_Faction</faction>
<change>10</change>
<reason>WULA_Base_Tex_Quest_Handle_Intime</reason>
</li>
<li Class="QuestNode_End">
<outcome>Success</outcome>
<sendStandardLetter>false</sendStandardLetter>
</li>
</nodes>
</node>
</li>
<!-- 倒计时 -->
<li Class="QuestNode_LoopCount">
<loopCount>2</loopCount>
<storeLoopCounterAs>Handle_Outtime_Counter</storeLoopCounterAs>
<node Class="QuestNode_Sequence">
<nodes>
<li Class="QuestNode_Delay">
<delayTicks>60000</delayTicks>
<!-- <delayTicks>360</delayTicks> -->
<node Class="QuestNode_ChangeFactionGoodwill">
<faction>Wula_PIA_Legion_Faction</faction>
<change>-5</change>
<reason>WULA_Base_Tex_Quest_Handle_Outtime</reason>
</node>
</li>
</nodes>
</node>
</li>
<li Class="QuestNode_Delay">
<delayTicks>180000</delayTicks>
<!-- <delayTicks>360</delayTicks> -->
<node Class="QuestNode_Sequence">
<nodes>
<li Class="QuestNode_SendSignals">
<outSignals>Handle_Outtime</outSignals>
</li>
</nodes>
</node>
</li>
<!-- 超时结束 -->
<li Class="QuestNode_Signal">
<inSignal>Handle_Outtime</inSignal>
<node Class="QuestNode_Sequence">
<nodes>
<li Class="WulaFallenEmpire.QuestNode_EventLetter">
<inSignal>Handle_Outtime</inSignal>
<eventDefName>WULA_Base_Tex_Quest_UI_1</eventDefName>
</li>
<li Class="QuestNode_Letter">
<label>未按时纳税</label>
<text>作为乌拉帝国的殖民地,你被发现未按时纳税——或许一次两次她们可以原谅你,但是一直拖欠必然会激怒她们!</text>
<letterDef>NegativeEvent</letterDef>
</li>
<li Class="QuestNode_ChangeFactionGoodwill">
<faction>Wula_PIA_Legion_Faction</faction>
<change>-10</change>
<reason>WULA_Base_Tex_Quest_Handle_Outtime</reason>
</li>
<li Class="QuestNode_End">
<outcome>Fail</outcome>
</li>
</nodes>
</node>
</li>
</nodes>
</root>
</QuestScriptDef>
<HistoryEventDef>
<defName>WULA_Base_Tex_Quest_Handle_Intime</defName>
<label>按时上交帝国什一税</label>
</HistoryEventDef>
<HistoryEventDef>
<defName>WULA_Base_Tex_Quest_Handle_Outtime</defName>
<label>拖欠帝国什一税</label>
</HistoryEventDef>
<ThingSetMakerDef>
<defName>WULA_Base_Tex_Reward</defName>
<root Class="ThingSetMaker_RandomOption">
<options>
<li>
<weight>1</weight>
<thingSetMaker Class="ThingSetMaker_StackCount">
<fixedParams>
<filter>
<thingDefs>
<li>WULA_Tex_Voucher</li>
</thingDefs>
</filter>
<countRange>1</countRange>
</fixedParams>
</thingSetMaker>
</li>
</options>
</root>
</ThingSetMakerDef>
<WulaFallenEmpire.EventDef>
<defName>WULA_Base_Tex_Quest_UI_1</defName>
<label>和P.I.A的通讯</label>
<portraitPath>Wula/Events/Portraits/WULA_Legion_6</portraitPath>
<characterName>「军团」,P.I.A</characterName>
<descriptions>
<li>你们没有按时交税——你们应该知道吧?\n\n&lt;color=#820D13>&lt;i>我们都希望局势不会进一步恶化。&lt;/i>&lt;/color></li>
</descriptions>
<options>
<li>
<label>下次一定</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
</effects>
</li>
</optionEffects>
</li>
</options>
</WulaFallenEmpire.EventDef>
</Defs>

View File

@@ -0,0 +1,457 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<!-- 初始任务 -->
<IncidentDef>
<defName>WULA_GiveQuest_Colony_Promotion</defName>
<category>GiveQuest</category>
<label>殖民地视察</label>
<targetTags>
<li>Map_PlayerHome</li>
</targetTags>
<questScriptDef>WULA_Colony_Promotion</questScriptDef>
<workerClass>IncidentWorker_GiveQuest</workerClass>
<baseChance>0</baseChance>
</IncidentDef>
<QuestScriptDef>
<defName>WULA_Colony_Promotion</defName>
<defaultChallengeRating>3</defaultChallengeRating> <!-- 挑战等级(星级) -->
<isRootSpecial>true</isRootSpecial> <!-- 特殊任务 -->
<defaultCharity>false</defaultCharity> <!-- 是否仁善 -->
<autoAccept>true</autoAccept>
<!-- 命名规则 -->
<questNameRules>
<rulesStrings>
<li>questName->WULA_Colony_Promotion_questName</li>
</rulesStrings>
</questNameRules>
<questDescriptionRules>
<include>
<li>QuestHospitalityCommon</li>
</include>
<rulesStrings>
<li>questDescription->WULA_Colony_Promotion_questDescription</li>
</rulesStrings>
</questDescriptionRules>
<root Class="QuestNode_Sequence">
<nodes>
<li Class="QuestNode_GetMap" />
<!-- End if map removed -->
<li Class="QuestNode_End">
<inSignal>map.MapRemoved</inSignal>
<outcome>Fail</outcome>
<signalListenMode>NotYetAcceptedOnly</signalListenMode>
</li>
<li Class="QuestNode_End">
<inSignal>map.MapRemoved</inSignal>
<outcome>Fail</outcome>
<signalListenMode>OngoingOnly</signalListenMode>
<sendStandardLetter>true</sendStandardLetter>
</li>
<!-- 生成带有自定义名字和背景故事的 Pawn -->
<li Class="WulaFallenEmpire.QuestNode_GeneratePawnWithCustomization">
<kindDef>WULA_Legion_PawnKind</kindDef>
<faction>Wula_PIA_Legion_Faction</faction>
<useCustomBackstories>true</useCustomBackstories>
<childhoodBackstory>WULA_Child_Backstory01</childhoodBackstory>
<adulthoodBackstory>WULA_Adult_Backstory_Legion</adulthoodBackstory>
<storeAs>asker</storeAs>
</li>
<!-- End if faction became hostile -->
<li Class="QuestNode_GetFaction">
<storeAs>faction</storeAs>
<ofPawn>$asker</ofPawn>
<allowEnemy>false</allowEnemy>
<allowNeutral>true</allowNeutral>
<allowAlly>true</allowAlly>
</li>
<li Class="QuestNode_Letter">
<inSignal>faction.BecameHostileToPlayer</inSignal>
<label TKey="LetterLabelFactionBecameHostile">LetterLabelFactionBecameHostile</label>
<text TKey="LetterTextFactionBecameHostile">LetterTextFactionBecameHostile</text>
</li>
<li Class="QuestNode_End">
<inSignal>faction.BecameHostileToPlayer</inSignal>
<outcome>Fail</outcome>
</li>
<li Class="QuestNode_End">
<inSignal>faction.BecameHostileToPlayer</inSignal>
<outcome>InvalidPreAcceptance</outcome>
<signalListenMode>NotYetAcceptedOnly</signalListenMode>
</li>
<!-- Add the asker himself to the lodgers list -->
<!-- The Stellarch needs to be first, otherwise certain letters won't properly display his name. -->
<li Class="QuestNode_AddToList">
<name>lodgers</name>
<value>$asker</value>
</li>
<!-- Get or generate guards -->
<li Class="QuestNode_LoopCount">
<loopCount>2</loopCount>
<node Class="QuestNode_GeneratePawn">
<faction>Wula_PIA_Legion_Faction</faction>
<kindDef>Wula_PIA_Legion_Escort_Unit</kindDef>
<addToList>lodgers</addToList>
<biocodeWeaponChance>1</biocodeWeaponChance>
<biocodeApparelChance>1</biocodeApparelChance>
<mustBeCapableOfViolence>true</mustBeCapableOfViolence>
<allowPregnant>false</allowPregnant>
<giveDependentDrugs>false</giveDependentDrugs>
</node>
</li>
<!-- Biocode asker's weapons (we took his reference manually, so we need to biocode his weapons manually) -->
<li Class="QuestNode_BiocodeWeapons">
<pawns>$asker</pawns>
</li>
<!-- Add a home faction to lodgers -->
<li Class="QuestNode_ExtraFaction">
<pawns>$lodgers</pawns>
<faction>Wula_PIA_Legion_Faction</faction>
<factionType>HomeFaction</factionType>
<inSignalsRemovePawn>
<li>lodgers.RanWild</li>
<li>lodgers.BecameMutant</li>
</inSignalsRemovePawn>
</li>
<!-- Lock their apparel -->
<li Class="QuestNode_SetAllApparelLocked">
<pawns>$lodgers</pawns>
</li>
<!-- Allow asker to issue decrees -->
<li Class="QuestNode_AllowDecreesForLodger">
<lodger>$asker</lodger>
</li>
<!-- Make everyone leave on cleanup -->
<li Class="QuestNode_LeaveOnCleanup">
<pawns>$lodgers</pawns>
<sendStandardLetter>false</sendStandardLetter>
<inSignalRemovePawn>lodgers.RanWild</inSignalRemovePawn>
</li>
<!-- Lodgers arrive by shuttle -->
<li Class="QuestNode_Sequence">
<nodes>
<!-- Join player or become a prisoner. -->
<li Class="QuestNode_JoinPlayer">
<pawns>$lodgers</pawns>
<joinPlayer>true</joinPlayer>
<makePrisoners>false</makePrisoners>
</li>
<li Class="QuestNode_Sequence">
<nodes>
<!-- Pawns arrive by shuttle -->
<li Class="QuestNode_SubScript">
<def>Util_TransportShip_DropOff</def>
<parms>
<contents>$lodgers</contents>
<owningFaction>Wula_PIA_Legion_Faction</owningFaction>
</parms>
</li>
<!-- Goodwill penalty -->
<li Class="QuestNode_Set">
<name>goodwillChangeOnShuttleDestroyed</name>
<value>-50</value>
</li>
<!-- Set pawnsLabelDef as a slate ref for the destruction letter. -->
<li Class="QuestNode_Set">
<name>pawnsLabelDef</name>
<value>[asker_nameDef]</value>
</li>
<!-- Shuttle destroyed -->
<li Class="QuestNode_Signal">
<inSignal>dropoffShipThing.Destroyed</inSignal>
<node Class="QuestNode_Sequence">
<nodes>
<li Class="QuestNode_Letter">
<label TKey="LetterLabelShuttleDestroyed">Shuttle destroyed</label>
<letterDef>NegativeEvent</letterDef>
<text TKey="LetterTextShuttleDestroyed">The shuttle sent to drop off [pawnsLabelDef] has been destroyed. You have failed the quest '[resolvedQuestName]'.\n\nYour relations with [asker_faction_name] have changed by [goodwillChangeOnShuttleDestroyed].</text>
</li>
<li Class="QuestNode_End">
<outcome>Fail</outcome>
<goodwillChangeAmount>$goodwillChangeOnShuttleDestroyed</goodwillChangeAmount>
<goodwillChangeFactionOf>$asker</goodwillChangeFactionOf>
<goodwillChangeReason>ShuttleDestroyed</goodwillChangeReason>
</li>
</nodes>
</node>
</li>
</nodes>
</li>
</nodes>
</li>
<!-- Asker died -->
<li Class="QuestNode_Signal">
<inSignal>asker.Destroyed</inSignal>
<inSignalDisable>pickupShipThing.SentWithExtraColonists</inSignalDisable>
<node Class="QuestNode_Sequence">
<nodes>
<li Class="QuestNode_Letter">
<label TKey="LetterLabelGuestDied">Guest died: {SUBJECT_definite}</label>
<letterDef>NegativeEvent</letterDef>
<text TKey="LetterTextGuestDied">{SUBJECT_definite}, who you were charged to protect, has died. [failLetterEndingCommon]</text>
<signalListenMode>OngoingOrNotYetAccepted</signalListenMode>
</li>
<li Class="QuestNode_End">
<outcome>Fail</outcome>
<goodwillChangeAmount>-25</goodwillChangeAmount>
<goodwillChangeFactionOf>$asker</goodwillChangeFactionOf>
<goodwillChangeReason>QuestPawnLost</goodwillChangeReason>
<signalListenMode>OngoingOrNotYetAccepted</signalListenMode>
</li>
</nodes>
</node>
</li>
<!-- Shuttle -->
<li Class="QuestNode_Set">
<name>shuttleDelayTicks</name>
<value>720000</value>
</li>
<li Class="QuestNode_ShuttleDelay">
<delayTicks>$shuttleDelayTicks</delayTicks>
<lodgers>$lodgers</lodgers>
<node Class="QuestNode_Sequence">
<nodes>
<li Class="QuestNode_SubScript">
<def>Util_TransportShip_Pickup</def>
<parms>
<leaveDelayTicks>$(3*60000)</leaveDelayTicks>
<requiredPawns>$lodgers</requiredPawns>
<overrideMass>999999999</overrideMass>
<sendAwayIfAllDespawned>$lodgers</sendAwayIfAllDespawned>
</parms>
</li>
<li Class="QuestNode_InspectString">
<targets>$lodgers</targets>
<inspectString TKey="InspectStringDepartShuttle">Should depart on shuttle</inspectString>
</li>
<li Class="QuestNode_Letter">
<label TKey="LetterLabelShuttleArrived">Shuttle arrived</label>
<text TKey="LetterTextShuttleArrived">The shuttle has arrived to collect the [asker_faction_leaderTitle].\n\nAll of you can accompany the [asker_faction_leaderTitle] on the shuttle and travel to the Imperial flotilla to begin a new life.</text>
<lookTargets>$pickupShipThing</lookTargets>
</li>
<!-- Win condition -->
<!-- <li Class="QuestNode_EndGame">
<inSignal>pickupShipThing.SentWithExtraColonists</inSignal>
<signalListenMode>Always</signalListenMode>
<introText TKey="EndGameIntroText">You've escaped on the Imperial shuttle!</introText>
<endingText TKey="EndGameEndingText">The high stellarch will now welcome you into the Imperial flotilla as an honored noble party.\n\nYou might stay in the Imperial court and jockey for political power. Perhaps you'll avoid the drama and focus on enjoying ultratech luxuries. Or, you might even buy a ship and set a course for your long-lost home.\n\nThe choice is up to you.</endingText>
</li> -->
</nodes>
</node>
</li>
<!-- - - - - -->
<!-- Threats -->
<!-- - - - - -->
<li Class="QuestNode_Set">
<name>enemyFaction</name>
<value>Pirate</value>
</li>
<li Class="QuestNode_ViolentQuestsAllowed">
<node Class="QuestNode_GenerateThreats">
<parms>
<allowedThreats>Raids</allowedThreats>
<onDays>1.0</onDays>
<offDays>0.5</offDays>
<minSpacingDays>0.04</minSpacingDays>
<numIncidentsRange>1~2</numIncidentsRange>
<currentThreatPointsFactor>1.75</currentThreatPointsFactor>
<minThreatPoints>1000</minThreatPoints>
</parms>
</node>
</li>
<!-- - - - - - - - -->
<!-- End conditions -->
<!-- - - - - - - - -->
<!-- Any lodger unhappy -->
<li Class="QuestNode_Set">
<name>lodgersMoodThreshold</name>
<value>0.25</value>
</li>
<li Class="QuestNode_MoodBelow">
<pawns>$asker</pawns>
<threshold>$lodgersMoodThreshold</threshold>
<node Class="QuestNode_Sequence">
<nodes>
<li Class="QuestNode_Letter">
<label TKey="LetterLabelSubjectUnhappy">{SUBJECT_bestRoyalTitle} unhappy</label>
<letterDef>NegativeEvent</letterDef>
<text TKey="LetterTextSubjectUnhappy">{SUBJECT_definite}, who you were charged to protect and keep happy, has been below the minimum mood of [lodgersMoodThreshold] too long. [failLetterEndingCommon]</text>
</li>
<li Class="QuestNode_End">
<outcome>Fail</outcome>
</li>
</nodes>
</node>
</li>
<!-- Lodger arrested -->
<li Class="QuestNode_Signal">
<inSignal>lodgers.Arrested</inSignal>
<node Class="QuestNode_Sequence">
<nodes>
<li Class="QuestNode_Letter">
<label TKey="LetterLabelGuestCaptured">Guest captured: {SUBJECT_definite}</label>
<letterDef>NegativeEvent</letterDef>
<text TKey="LetterTextGuestCaptured">{SUBJECT_definite}, who you were charged to protect, has been arrested. [failLetterEndingCommon]</text>
</li>
<li Class="QuestNode_End">
<outcome>Fail</outcome>
<goodwillChangeAmount>-5</goodwillChangeAmount>
<goodwillChangeFactionOf>$asker</goodwillChangeFactionOf>
<goodwillChangeReason>QuestPawnArrested</goodwillChangeReason>
</li>
</nodes>
</node>
</li>
<!-- Surgery violation -->
<li Class="QuestNode_Signal">
<inSignal>lodgers.SurgeryViolation</inSignal>
<node Class="QuestNode_Sequence">
<nodes>
<li Class="QuestNode_Letter">
<label TKey="LetterLabelUnauthorizedSurgery">Unauthorized surgery: {SUBJECT_definite}</label>
<letterDef>NegativeEvent</letterDef>
<text TKey="LetterTextUnauthorizedSurgery">Unauthorized, violating surgery has been performed on {SUBJECT_definite}, who you were charged to protect. [failLetterEndingCommon]</text>
</li>
<li Class="QuestNode_End">
<outcome>Fail</outcome>
<goodwillChangeAmount>-5</goodwillChangeAmount>
<goodwillChangeFactionOf>$asker</goodwillChangeFactionOf>
<goodwillChangeReason>PerformedHarmfulSurgery</goodwillChangeReason>
</li>
</nodes>
</node>
</li>
<!-- Lodger's xenogerm absorbed -->
<li Class="QuestNode_Signal" MayRequire="Ludeon.RimWorld.Biotech">
<inSignal>lodgers.XenogermAbsorbed</inSignal>
<node Class="QuestNode_Sequence">
<nodes>
<li Class="QuestNode_Letter">
<label>Xenogerm absorbed: {SUBJECT_definite}</label>
<letterDef>NegativeEvent</letterDef>
<text>{SUBJECT_definite}, who you were charged to protect, has had {SUBJECT_possessive} xenogerm forcibly absorbed. [failLetterEndingCommon]</text>
</li>
<li Class="QuestNode_End">
<outcome>Fail</outcome>
<goodwillChangeAmount>-5</goodwillChangeAmount>
<goodwillChangeFactionOf>$asker</goodwillChangeFactionOf>
<goodwillChangeReason>XenogermAbsorbed</goodwillChangeReason>
</li>
</nodes>
</node>
</li>
<!-- Lodger left map -->
<li Class="QuestNode_Signal">
<inSignal>asker.LeftMap</inSignal>
<node Class="QuestNode_Sequence">
<nodes>
<li Class="QuestNode_Letter">
<label TKey="LetterLabelGuestLost">Guest lost: {SUBJECT_definite}</label>
<letterDef>NegativeEvent</letterDef>
<text TKey="LetterTextGuestLost">{SUBJECT_definite}, who you were charged to protect, has left the assigned settlement. [failLetterEndingCommon]</text>
</li>
<li Class="QuestNode_End">
<outcome>Fail</outcome>
<goodwillChangeAmount>-5</goodwillChangeAmount>
<goodwillChangeFactionOf>$asker</goodwillChangeFactionOf>
<goodwillChangeReason>QuestPawnLost</goodwillChangeReason>
</li>
</nodes>
</node>
</li>
<!-- Shuttle destroyed -->
<li Class="QuestNode_Signal">
<inSignal>pickupShipThing.Destroyed</inSignal>
<node Class="QuestNode_Sequence">
<nodes>
<li Class="QuestNode_Letter">
<label TKey="LetterLabelShuttleDestroyed">Shuttle destroyed</label>
<letterDef>NegativeEvent</letterDef>
<text TKey="LetterTextShuttleDestroyed">The shuttle sent to collect the [asker_faction_leaderTitle] has been destroyed. [failLetterEndingCommon]</text>
</li>
<li Class="QuestNode_End">
<outcome>Fail</outcome>
<goodwillChangeAmount>-5</goodwillChangeAmount>
<goodwillChangeFactionOf>$asker</goodwillChangeFactionOf>
<goodwillChangeReason>ShuttleDestroyed</goodwillChangeReason>
</li>
</nodes>
</node>
</li>
<!-- Asker ran wild -->
<li Class="QuestNode_Signal">
<inSignal>asker.RanWild</inSignal>
<node Class="QuestNode_Sequence">
<nodes>
<li Class="QuestNode_Letter">
<label TKey="LetterLabelLodgerRanWild">Guest lost: {SUBJECT_definite}</label>
<letterDef>NegativeEvent</letterDef>
<text TKey="LetterTextLodgerRanWild">{SUBJECT_definite}, who you were charged to protect, has run wild. [failLetterEndingCommon]</text>
</li>
<li Class="QuestNode_End">
<outcome>Fail</outcome>
<goodwillChangeAmount>-5</goodwillChangeAmount>
<goodwillChangeFactionOf>$asker</goodwillChangeFactionOf>
<goodwillChangeReason>QuestPawnLost</goodwillChangeReason>
</li>
</nodes>
</node>
</li>
<!-- Shuttle sent away -->
<li Class="QuestNode_Signal">
<inSignal>pickupShipThing.SentSatisfied</inSignal>
<node Class="QuestNode_End">
<outcome>Success</outcome>
<sendStandardLetter>true</sendStandardLetter>
</node>
</li>
<li Class="QuestNode_Signal">
<inSignal>pickupShipThing.SentUnsatisfied</inSignal>
<node Class="QuestNode_Sequence">
<nodes>
<li Class="QuestNode_Letter">
<label TKey="LetterLabelShuttleSentUnsatisfied">Quest failed: [resolvedQuestName]</label>
<letterDef>NegativeEvent</letterDef>
<text TKey="LetterTextShuttleSentUnsatisfied">The shuttle sent to collect the [asker_faction_leaderTitle] has departed without [asker_objective]. [asker_pronoun] will now leave on foot. [failLetterEndingCommon]</text>
</li>
<li Class="QuestNode_End">
<outcome>Fail</outcome>
<goodwillChangeAmount>-5</goodwillChangeAmount>
<goodwillChangeFactionOf>$asker</goodwillChangeFactionOf>
<goodwillChangeReason>MemberMissedShuttle</goodwillChangeReason>
</li>
</nodes>
</node>
</li>
</nodes>
</root>
</QuestScriptDef>
</Defs>

View File

@@ -0,0 +1,413 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<QuestScriptDef>
<defName>WULA_Intro_NewColony</defName>
<rootSelectionWeight>0</rootSelectionWeight>
<autoAccept>true</autoAccept>
<sendAvailableLetter>false</sendAvailableLetter>
<defaultChallengeRating>1</defaultChallengeRating> <!-- 挑战等级(星级) -->
<isRootSpecial>true</isRootSpecial> <!-- 特殊任务 -->
<defaultCharity>false</defaultCharity> <!-- 是否仁善 -->
<!-- 命名规则 -->
<questNameRules>
<rulesStrings>
<li>questName->WULA_Intro_NewColony_questName</li>
</rulesStrings>
</questNameRules>
<questDescriptionRules>
<include>
<li>QuestHospitalityCommon</li>
</include>
<rulesStrings>
<li>questDescription->WULA_Intro_NewColony_questDescription</li>
</rulesStrings>
</questDescriptionRules>
<!-- 运行规则 -->
<root Class="QuestNode_Sequence">
<nodes>
<li Class="QuestNode_Delay">
<delayTicks>60</delayTicks>
<!-- <delayTicks>360</delayTicks> -->
<node Class="QuestNode_Sequence">
<nodes>
<li Class="QuestNode_SendSignals">
<outSignals>UI_Start</outSignals>
</li>
<li Class="WulaFallenEmpire.QuestNode_EventLetter">
<inSignal>UI_Start</inSignal>
<eventDefName>Wula_Intro_NewColony_UI_1</eventDefName>
</li>
<li Class="QuestNode_End">
<outcome>Success</outcome>
<sendStandardLetter>false</sendStandardLetter>
</li>
</nodes>
</node>
</li>
</nodes>
</root>
</QuestScriptDef>
<WulaFallenEmpire.EventDef>
<defName>Wula_Intro_NewColony_UI_1</defName>
<label>未知通讯</label>
<portraitPath>Wula/Events/Portraits/WULA_Legion_2</portraitPath>
<characterName>「军团」,P.I.A</characterName>
<descriptions>
<li>这里是行星封锁机关P.I.A看起来你们已经成功抵达地表了。根据规划你们应该是第一批部署在这个星球地表的乌拉帝国合成人——遵照异族接触法则做事建立本地根据地如果有必要就呼叫舰队的支援。</li>
</descriptions>
<options>
<li>
<label>你是谁?</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_2</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
<li>
<label>我们需要做什么?(发展流程)</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_5</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
<li>
<label>收到,帝国荣光永存</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_11</defName>
</li>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
</effects>
</li>
</optionEffects>
</li>
</options>
</WulaFallenEmpire.EventDef>
<WulaFallenEmpire.EventDef>
<defName>Wula_Intro_NewColony_UI_2</defName>
<label>未知通讯</label>
<portraitPath>Wula/Events/Portraits/WULA_Legion_3</portraitPath>
<characterName>「军团」,P.I.A</characterName>
<descriptions>
<li>第一次参加开拓任务?\n\n好吧你们可以叫我「军团」我是负责管理乌拉帝国行星封锁机关舰队的AI根据你们的编制来说我是你们的顶头上司。在登陆地表前机械行会没有给你们设置正确的记忆扇区吗</li>
</descriptions>
<options>
<li>
<label>行星封锁机关?</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_3</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
<li>
<label>机械行会?</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_4</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
<li>
<label>我们没有相关问题了···</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_10</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
</options>
</WulaFallenEmpire.EventDef>
<WulaFallenEmpire.EventDef>
<defName>Wula_Intro_NewColony_UI_3</defName>
<label>未知通讯</label>
<portraitPath>Wula/Events/Portraits/WULA_Legion_3</portraitPath>
<characterName>「军团」,P.I.A</characterName>
<descriptions>
<li>行星封锁机关是隶属于乌拉帝国开发署的暴力机关,控制着开发署所有的舰队,负责在疆域开拓中的侵略性接触。\n\n通常来说类似边缘世界这样的星球我们会直接封锁轨道轰炸所有现存聚居地然后再投放殖民者不过看起来这个世界还有救所以你们作为第一批先遣队投放到星球上和其他异族接触试探一下明白了吗</li>
</descriptions>
<options>
<li>
<label>我们还有别的问题···</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_2</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
<li>
<label>我们没有相关问题了···</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_10</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
</options>
</WulaFallenEmpire.EventDef>
<WulaFallenEmpire.EventDef>
<defName>Wula_Intro_NewColony_UI_4</defName>
<label>未知通讯</label>
<portraitPath>Wula/Events/Portraits/WULA_Legion_3</portraitPath>
<characterName>「军团」,P.I.A</characterName>
<descriptions>
<li>乌拉帝国机械行会负责所有的合成人的生产、审查、投放和初始化,你们在部署到舰队上时,应该会有一个机械师帮你们设置好预载了记忆的扇区,但是很显然那家伙失职了,才让你们在这里拿着一堆你们早该知道的事情来烦我。</li>
</descriptions>
<options>
<li>
<label>我们还有别的问题···</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_2</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
<li>
<label>我们没有相关问题了···</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_10</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
</options>
</WulaFallenEmpire.EventDef>
<WulaFallenEmpire.EventDef>
<defName>Wula_Intro_NewColony_UI_5</defName>
<label>未知通讯</label>
<portraitPath>Wula/Events/Portraits/WULA_Legion_3</portraitPath>
<characterName>「军团」,P.I.A</characterName>
<descriptions>
<li>你们的意思是,你们连不知道要干什么就被丢下来了?\n\n哎你们要做的就是施展你们的百般武艺活下来建立一个根据地。根据帝国税收法你们每个一段时间需要上交税款——作为帝国殖民地舰队和机群将成为你们的后盾。\n\n如果你们觉得你们准备好了可以申请权限进阶审查我会部署一个带卫队的分体去你们的殖民地考察一段时间然后根据评级决定是否给你们晋升。晋升后的殖民地会获得更多的许可允许调用更加强大的武备和支援。</li>
</descriptions>
<options>
<li>
<label>我们还有别的问题···</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_2</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
<li>
<label>我们没有相关问题了···</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_10</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
</options>
</WulaFallenEmpire.EventDef>
<WulaFallenEmpire.EventDef>
<defName>Wula_Intro_NewColony_UI_10</defName>
<label>未知通讯</label>
<portraitPath>Wula/Events/Portraits/WULA_Legion_2</portraitPath>
<characterName>「军团」,P.I.A</characterName>
<descriptions>
<li>还有什么事吗?</li>
</descriptions>
<options>
<li>
<label>你是谁?</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_2</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
<li>
<label>我们需要做什么?(发展流程)</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_5</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
<li>
<label>收到,帝国荣光永存</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_11</defName>
</li>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
</effects>
</li>
</optionEffects>
</li>
</options>
</WulaFallenEmpire.EventDef>
<WulaFallenEmpire.EventDef>
<defName>Wula_Intro_NewColony_UI_11</defName>
<label>未知通讯</label>
<portraitPath>Wula/Events/Portraits/WULA_Legion_2</portraitPath>
<characterName>「军团」,P.I.A</characterName>
<descriptions>
<li>帝国荣光永存。\n\n快去吧有一整个世界在等着我们征服。</li>
</descriptions>
<options>
<li>
<label>(结束通讯)</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
</effects>
</li>
</optionEffects>
</li>
</options>
</WulaFallenEmpire.EventDef>
</Defs>

View File

@@ -1,428 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<QuestScriptDef>
<defName>WULA_Intro_NewColony</defName>
<rootSelectionWeight>0</rootSelectionWeight>
<autoAccept>true</autoAccept>
<sendAvailableLetter>false</sendAvailableLetter>
<defaultChallengeRating>1</defaultChallengeRating> <!-- 挑战等级(星级) -->
<isRootSpecial>true</isRootSpecial> <!-- 特殊任务 -->
<defaultCharity>false</defaultCharity> <!-- 是否仁善 -->
<!-- 命名规则 -->
<questNameRules>
<rulesStrings>
<li>questName->WULA_Intro_NewColony_questName</li>
</rulesStrings>
</questNameRules>
<questDescriptionRules>
<include>
<li>QuestHospitalityCommon</li>
</include>
<rulesStrings>
<li>questDescription->WULA_Intro_NewColony_questDescription</li>
</rulesStrings>
</questDescriptionRules>
<!-- 运行规则 -->
<root Class="QuestNode_Sequence">
<nodes>
<li Class="QuestNode_Delay">
<delayTicks>60</delayTicks>
<!-- <delayTicks>360</delayTicks> -->
<node Class="QuestNode_Sequence">
<nodes>
<li Class="QuestNode_SendSignals">
<outSignals>UI_Start</outSignals>
</li>
<li Class="WulaFallenEmpire.QuestNode_EventLetter">
<inSignal>UI_Start</inSignal>
<eventDefName>Wula_Intro_NewColony_UI_1</eventDefName>
</li>
<li Class="QuestNode_End">
<outcome>Success</outcome>
<sendStandardLetter>false</sendStandardLetter>
</li>
</nodes>
</node>
</li>
</nodes>
</root>
</QuestScriptDef>
<WulaFallenEmpire.EventDef>
<defName>Wula_Intro_NewColony_UI_1</defName>
<label>未知通讯</label>
<portraitPath>Wula/Events/Portraits/WULA_Legion_2</portraitPath>
<characterName>「军团」,P.I.A</characterName>
<descriptions>
<li>这里是行星封锁机关P.I.A看起来你们已经成功抵达地表了。根据规划你们应该是第一批部署在这个星球地表的乌拉帝国合成人——遵照异族接触法则做事建立本地根据地如果有必要就呼叫舰队的支援。</li>
</descriptions>
<options>
<li>
<label>你是谁?</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_2</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
<li>
<label>我们需要做什么?(发展流程)</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_5</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
<li>
<label>收到,帝国荣光永存</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_11</defName>
</li>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
</effects>
</li>
</optionEffects>
</li>
</options>
</WulaFallenEmpire.EventDef>
<WulaFallenEmpire.EventDef>
<defName>Wula_Intro_NewColony_UI_2</defName>
<label>未知通讯</label>
<portraitPath>Wula/Events/Portraits/WULA_Legion_3</portraitPath>
<characterName>「军团」,P.I.A</characterName>
<descriptions>
<li>第一次参加开拓任务?\n\n好吧你们可以叫我「军团」我是负责管理乌拉帝国行星封锁机关舰队的AI根据你们的编制来说我是你们的顶头上司。在登陆地表前机械行会没有给你们设置正确的记忆扇区吗</li>
</descriptions>
<options>
<li>
<label>行星封锁机关?</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_3</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
<li>
<label>机械行会?</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_4</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
<li>
<label>我们没有相关问题了···</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_10</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
</options>
</WulaFallenEmpire.EventDef>
<WulaFallenEmpire.EventDef>
<defName>Wula_Intro_NewColony_UI_3</defName>
<label>未知通讯</label>
<portraitPath>Wula/Events/Portraits/WULA_Legion_3</portraitPath>
<characterName>「军团」,P.I.A</characterName>
<descriptions>
<li>行星封锁机关是隶属于乌拉帝国开发署的暴力机关,控制着开发署所有的舰队,负责在疆域开拓中的侵略性接触。\n\n通常来说类似边缘世界这样的星球我们会直接封锁轨道轰炸所有现存聚居地然后再投放殖民者不过看起来这个世界还有救所以你们作为第一批先遣队投放到星球上和其他异族接触试探一下明白了吗</li>
</descriptions>
<options>
<li>
<label>我们还有别的问题···</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_2</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
<li>
<label>我们没有相关问题了···</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_10</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
</options>
</WulaFallenEmpire.EventDef>
<WulaFallenEmpire.EventDef>
<defName>Wula_Intro_NewColony_UI_4</defName>
<label>未知通讯</label>
<portraitPath>Wula/Events/Portraits/WULA_Legion_3</portraitPath>
<characterName>「军团」,P.I.A</characterName>
<descriptions>
<li>乌拉帝国机械行会负责所有的合成人的生产、审查、投放和初始化,你们在部署到舰队上时,应该会有一个机械师帮你们设置好预载了记忆的扇区,但是很显然那家伙失职了,才让你们在这里拿着一堆你们早该知道的事情来烦我。</li>
</descriptions>
<options>
<li>
<label>我们还有别的问题···</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_2</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
<li>
<label>我们没有相关问题了···</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_10</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
</options>
</WulaFallenEmpire.EventDef>
<WulaFallenEmpire.EventDef>
<defName>Wula_Intro_NewColony_UI_5</defName>
<label>未知通讯</label>
<portraitPath>Wula/Events/Portraits/WULA_Legion_3</portraitPath>
<characterName>「军团」,P.I.A</characterName>
<descriptions>
<li>你们的意思是,你们连不知道要干什么就被丢下来了?\n\n哎你们要做的就是施展你们的百般武艺活下来建立一个根据地。根据帝国税收法你们每个一段时间需要上交税款——作为帝国殖民地舰队和机群将成为你们的后盾。\n\n如果你们觉得你们准备好了可以申请权限进阶审查我会部署一个带卫队的分体去你们的殖民地考察一段时间然后根据评级决定是否给你们晋升。晋升后的殖民地会获得更多的许可允许调用更加强大的武备和支援。</li>
</descriptions>
<options>
<li>
<label>我们还有别的问题···</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_2</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
<li>
<label>我们没有相关问题了···</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_10</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
</options>
</WulaFallenEmpire.EventDef>
<WulaFallenEmpire.EventDef>
<defName>Wula_Intro_NewColony_UI_10</defName>
<label>未知通讯</label>
<portraitPath>Wula/Events/Portraits/WULA_Legion_2</portraitPath>
<characterName>「军团」,P.I.A</characterName>
<descriptions>
<li>还有什么事吗?</li>
</descriptions>
<options>
<li>
<label>你是谁?</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_2</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
<li>
<label>我们需要做什么?(发展流程)</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_5</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
<li>
<label>收到,帝国荣光永存</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_NewColony_UI_11</defName>
</li>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
</effects>
</li>
</optionEffects>
</li>
</options>
</WulaFallenEmpire.EventDef>
<WulaFallenEmpire.EventDef>
<defName>Wula_Intro_NewColony_UI_11</defName>
<label>未知通讯</label>
<portraitPath>Wula/Events/Portraits/WULA_Legion_2</portraitPath>
<characterName>「军团」,P.I.A</characterName>
<descriptions>
<li>帝国荣光永存。\n\n快去吧有一整个世界在等着我们征服。</li>
</descriptions>
<options>
<li>
<label>(结束通讯)</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
</effects>
</li>
</optionEffects>
</li>
</options>
</WulaFallenEmpire.EventDef>
<!-- 初始任务 -->
<IncidentDef>
<defName>WULA_GiveQuest_Intro_Spy</defName>
<category>GiveQuest</category>
<label>SPY</label>
<label>掩护间谍</label>
<targetTags>
<li>Map_PlayerHome</li>
</targetTags>
<questScriptDef>WULA_Intro_Spy</questScriptDef>
<workerClass>IncidentWorker_GiveQuest</workerClass>
<baseChance>0</baseChance>
<requireColonistsPresent>True</requireColonistsPresent>
</IncidentDef>
<QuestScriptDef>
<defName>WULA_Intro_Spy</defName>
@@ -520,7 +108,7 @@
<!-- 设置袭击点数 -->
<li Class="QuestNode_Set">
<name>points</name>
<value>50</value>
<value>350</value>
</li>
<!-- 延迟生成袭击 -->
<li Class="QuestNode_Delay">
@@ -1021,229 +609,4 @@
</li>
</options>
</WulaFallenEmpire.EventDef>
<!-- 纳税 -->
<IncidentDef>
<defName>WULA_GiveQuest_Base_Tex</defName>
<category>GiveQuest</category>
<label>纳税</label>
<targetTags>
<li>Map_PlayerHome</li>
</targetTags>
<questScriptDef>WULA_Base_Tex_Quest</questScriptDef>
<workerClass>IncidentWorker_GiveQuest</workerClass>
<baseChance>0</baseChance>
<requireColonistsPresent>True</requireColonistsPresent>
</IncidentDef>
<QuestScriptDef>
<defName>WULA_Base_Tex_Quest</defName>
<rootSelectionWeight>0</rootSelectionWeight>
<autoAccept>true</autoAccept>
<sendAvailableLetter>false</sendAvailableLetter>
<defaultChallengeRating>1</defaultChallengeRating> <!-- 挑战等级(星级) -->
<isRootSpecial>true</isRootSpecial> <!-- 特殊任务 -->
<defaultCharity>false</defaultCharity> <!-- 是否仁善 -->
<!-- 命名规则 -->
<questNameRules>
<rulesStrings>
<li>questName->WULA_Base_Tex_Quest_questName</li>
</rulesStrings>
</questNameRules>
<questDescriptionRules>
<include>
<li>QuestHospitalityCommon</li>
</include>
<rulesStrings>
<li>questDescription->WULA_Intro_Spy_questDescription</li>
</rulesStrings>
</questDescriptionRules>
<!-- 运行规则 -->
<root Class="QuestNode_Sequence">
<nodes>
<!-- 获取地图 -->
<li Class="QuestNode_GetMap" />
<!-- 生成物品奖励 -->
<li Class="QuestNode_GenerateThingSet">
<thingSetMaker>WULA_Base_Tex_Reward</thingSetMaker>
<storeAs>permissionReward</storeAs>
</li>
<!-- 产生超链接 -->
<li Class="WulaFallenEmpire.QuestNode_Hyperlinks">
<thingDefs>
<li>WULA_GlobalStorageSenderPod</li>
</thingDefs>
<factionDefs>
<li>Wula_PIA_Legion_Faction</li>
</factionDefs>
</li>
<li Class="QuestNode_Set">
<name>taxAmount</name>
<value>1</value>
</li>
<li Class="QuestNode_Set">
<name>taxInterval</name>
<value>250</value> <!-- 较短的测试间隔 -->
</li>
<li Class="QuestNode_Multiply">
<value1>$points</value1>
<value2>1</value2>
<storeAs>taxAmount</storeAs>
</li>
<li Class="WulaFallenEmpire.QuestNode_CheckGlobalResource">
<resourceDef>Silver</resourceDef>
<requiredCount>$taxAmount</requiredCount>
<retryDelayTicks>$taxInterval</retryDelayTicks>
<successSignal>TaxPaymentSuccess</successSignal>
<failSignal>TaxPaymentFailed</failSignal>
<deductOnSuccess>true</deductOnSuccess>
<useInputStorage>true</useInputStorage>
</li>
<!-- 通知 -->
<li Class="QuestNode_Letter">
<label>什一税</label>
<text>唯死亡和税收不可避免——按时上交什一税是乌拉帝国殖民地的光荣义务。\n\n查看任务列表以了解更多。</text>
<letterDef>NegativeEvent</letterDef>
</li>
<!-- 支付成功处理 -->
<li Class="QuestNode_Signal">
<inSignal>TaxPaymentSuccess</inSignal>
<node Class="QuestNode_Sequence">
<nodes>
<li Class="QuestNode_Letter">
<label>纳税完成</label>
<text>帝国已经接收了税款,为了表彰你在纳税上的良好表现,一封税金缴纳凭证已经送到你的殖民地中!</text>
<letterDef>PositiveEvent</letterDef>
</li>
<li Class="QuestNode_AddItemsReward">
<items>$permissionReward</items>
</li>
<li Class="QuestNode_ChangeFactionGoodwill">
<faction>Wula_PIA_Legion_Faction</faction>
<change>10</change>
<reason>WULA_Base_Tex_Quest_Handle_Intime</reason>
</li>
<li Class="QuestNode_End">
<outcome>Success</outcome>
<sendStandardLetter>false</sendStandardLetter>
</li>
</nodes>
</node>
</li>
<!-- 倒计时 -->
<li Class="QuestNode_LoopCount">
<loopCount>2</loopCount>
<storeLoopCounterAs>Handle_Outtime_Counter</storeLoopCounterAs>
<node Class="QuestNode_Sequence">
<nodes>
<li Class="QuestNode_Delay">
<delayTicks>60000</delayTicks>
<!-- <delayTicks>360</delayTicks> -->
<node Class="QuestNode_ChangeFactionGoodwill">
<faction>Wula_PIA_Legion_Faction</faction>
<change>-5</change>
<reason>WULA_Base_Tex_Quest_Handle_Outtime</reason>
</node>
</li>
</nodes>
</node>
</li>
<li Class="QuestNode_Delay">
<delayTicks>180000</delayTicks>
<!-- <delayTicks>360</delayTicks> -->
<node Class="QuestNode_Sequence">
<nodes>
<li Class="QuestNode_SendSignals">
<outSignals>Handle_Outtime</outSignals>
</li>
</nodes>
</node>
</li>
<!-- 超时结束 -->
<li Class="QuestNode_Signal">
<inSignal>Handle_Outtime</inSignal>
<node Class="QuestNode_Sequence">
<nodes>
<li Class="WulaFallenEmpire.QuestNode_EventLetter">
<inSignal>Handle_Outtime</inSignal>
<eventDefName>WULA_Base_Tex_Quest_UI_1</eventDefName>
</li>
<li Class="QuestNode_Letter">
<label>未按时纳税</label>
<text>作为乌拉帝国的殖民地,你被发现未按时纳税——或许一次两次她们可以原谅你,但是一直拖欠必然会激怒她们!</text>
<letterDef>NegativeEvent</letterDef>
</li>
<li Class="QuestNode_ChangeFactionGoodwill">
<faction>Wula_PIA_Legion_Faction</faction>
<change>-10</change>
<reason>WULA_Base_Tex_Quest_Handle_Outtime</reason>
</li>
<li Class="QuestNode_End">
<outcome>Fail</outcome>
</li>
</nodes>
</node>
</li>
</nodes>
</root>
</QuestScriptDef>
<HistoryEventDef>
<defName>WULA_Base_Tex_Quest_Handle_Intime</defName>
<label>按时上交帝国什一税</label>
</HistoryEventDef>
<HistoryEventDef>
<defName>WULA_Base_Tex_Quest_Handle_Outtime</defName>
<label>拖欠帝国什一税</label>
</HistoryEventDef>
<ThingSetMakerDef>
<defName>WULA_Base_Tex_Reward</defName>
<root Class="ThingSetMaker_RandomOption">
<options>
<li>
<weight>1</weight>
<thingSetMaker Class="ThingSetMaker_StackCount">
<fixedParams>
<filter>
<thingDefs>
<li>WULA_Tex_Voucher</li>
</thingDefs>
</filter>
<countRange>1</countRange>
</fixedParams>
</thingSetMaker>
</li>
</options>
</root>
</ThingSetMakerDef>
<WulaFallenEmpire.EventDef>
<defName>WULA_Base_Tex_Quest_UI_1</defName>
<label>和P.I.A的通讯</label>
<portraitPath>Wula/Events/Portraits/WULA_Legion_6</portraitPath>
<characterName>「军团」,P.I.A</characterName>
<descriptions>
<li>你们没有按时交税——你们应该知道吧?\n\n&lt;color=#820D13>&lt;i>我们都希望局势不会进一步恶化。&lt;/i>&lt;/color></li>
</descriptions>
<options>
<li>
<label>下次一定</label>
<useCustomColors>true</useCustomColors>
<normalColor>(255,255,255,255)</normalColor>
<hoverColor>(157,201,185,195)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
</effects>
</li>
</optionEffects>
</li>
</options>
</WulaFallenEmpire.EventDef>
</Defs>

View File

@@ -198,6 +198,23 @@
<li>Map_PlayerHome</li>
</allowedTargetTags>
</li>
<!-- 乌拉族税收任务 -->
<li Class="WulaFallenEmpire.StorytellerCompProperties_SimpleTechnologyTrigger">
<technology>WULA_Colony_License_LV1_Technology</technology>
<incident>WULA_GiveQuest_Base_Tex</incident>
<questDef>WULA_Base_Tex_Quest</questDef>
<!-- 时间配置 -->
<fireAfterDaysPassed>0</fireAfterDaysPassed> <!-- 游戏开始后立即开始检测 -->
<checkIntervalDays>15</checkIntervalDays> <!-- 每5天检查一次 -->
<!-- 可选配置 -->
<preventDuplicateQuests>false</preventDuplicateQuests>
<debugLogging>false</debugLogging>
<requiredFaction>Wula_PIA_Legion_Faction</requiredFaction>
</li>
</comps>
</StorytellerDef>
</Defs>

View File

@@ -670,7 +670,7 @@
<texturePath>Wula/Building/Flag/WULA_Flag_Building_A</texturePath>
<scale>(3,3)</scale>
<drawOrder>0</drawOrder>
<offset>(0,0,3)</offset>
<offset>(0,1,3)</offset>
<hoverSpeed>1.5</hoverSpeed> <!-- 比全局慢 -->
<hoverIntensity>0.2</hoverIntensity> <!-- 比全局弱 -->
<hoverPhase>0</hoverPhase>
@@ -679,7 +679,7 @@
<texturePath>Wula/Building/Flag/WULA_Flag_Building_Mount</texturePath>
<scale>(1,1)</scale>
<drawOrder>1</drawOrder>
<offset>(0,0,0)</offset>
<offset>(0,1,0)</offset>
<hoverSpeed>0</hoverSpeed> <!-- 比全局慢 -->
<hoverIntensity>0</hoverIntensity> <!-- 比全局弱 -->
<hoverPhase>0</hoverPhase>

View File

@@ -337,6 +337,9 @@
<texPath>Wula/Apparel/WULA_Bodystocking</texPath>
</graphicData>
<apparel>
<tags>
<li>Wula_Legion_Apparel</li>
</tags>
<wornGraphicPath>Wula/Apparel/WULA_Bodystocking</wornGraphicPath>
</apparel>
</ThingDef>
@@ -381,6 +384,39 @@
</apparel>
</ThingDef>
<ThingDef ParentName="WULA_ApparelCivilHatBase">
<defName>WULA_Eggplant_Hat</defName>
<label>茄子帽</label>
<description>这也是帽子吗——茄子柄有了,那茄子在哪呢?</description>
<graphicData>
<texPath>Wula/Apparel/WULA_Eggplant_Hat</texPath>
</graphicData>
<recipeMaker>
<researchPrerequisite>WULA_Synth_Clothes_1_Technology</researchPrerequisite>
</recipeMaker>
<apparel>
<bodyPartGroups>
<li>UpperHead</li>
</bodyPartGroups>
<layers>
<li>Middle</li>
</layers>
<wornGraphicPath>Wula/Apparel/WULA_Eggplant_Hat</wornGraphicPath>
<canBeDesiredForIdeo>false</canBeDesiredForIdeo>
<canBeGeneratedToSatisfyWarmth>false</canBeGeneratedToSatisfyWarmth>
<canBeGeneratedToSatisfyToxicEnvironmentResistance>false</canBeGeneratedToSatisfyToxicEnvironmentResistance>
</apparel>
<costList Inherit="False">
<Cloth>20</Cloth>
</costList>
<statBases>
<MaxHitPoints>200</MaxHitPoints>
<WorkToMake>500</WorkToMake>
<EquipDelay>2</EquipDelay>
<Mass>0.1</Mass>
<StuffEffectMultiplierArmor>0</StuffEffectMultiplierArmor>
</statBases>
</ThingDef>
<!-- 女仆装 -->
<ThingDef ParentName="WULA_ApparelCivilBase">
<defName>WULA_Maid_Uniform</defName>
@@ -463,6 +499,44 @@
<WorkSpeedGlobal>0.05</WorkSpeedGlobal>
</equippedStatOffsets>
</ThingDef>
<!-- 上司衣服 -->
<ThingDef ParentName="WULA_ApparelCivilBase">
<defName>WULA_Legion_Cloth</defName>
<label>乌拉帝国指挥官制服</label>
<description>由乌拉帝国指挥官所穿的鎏金四溢的华服。\n\n你还想听什么介绍你觉得这个东西你有足够的身份穿吗</description>
<graphicData>
<texPath>Wula/Apparel/WULA_Legion_Cloth</texPath>
</graphicData>
<apparel>
<tags Inherit="False">
<li>Wula_Legion_Apparel</li>
</tags>
<bodyPartGroups>
<li>Torso</li>
<li>Neck</li>
<li>Shoulders</li>
<li>Arms</li>
<li>Legs</li>
</bodyPartGroups>
<layers>
<li>Middle</li>
</layers>
<wornGraphicPath>Wula/Apparel/WULA_Legion_Cloth</wornGraphicPath>
<canBeDesiredForIdeo>false</canBeDesiredForIdeo>
<canBeGeneratedToSatisfyWarmth>false</canBeGeneratedToSatisfyWarmth>
<canBeGeneratedToSatisfyToxicEnvironmentResistance>false</canBeGeneratedToSatisfyToxicEnvironmentResistance>
</apparel>
<costList Inherit="False">
<Cloth>300</Cloth>
<Gold>100</Gold>
</costList>
<statBases>
<MaxHitPoints>500</MaxHitPoints>
<WorkToMake>12000</WorkToMake>
<EquipDelay>1</EquipDelay>
<StuffEffectMultiplierArmor>1</StuffEffectMultiplierArmor>
</statBases>
</ThingDef>
<ThingDef ParentName="WULA_ApparelArmorBase">
<defName>WULA_Assault_Troop_PowerArmor</defName>
@@ -677,7 +751,7 @@
<ArmorRating_Sharp>1.5</ArmorRating_Sharp>
<ArmorRating_Blunt>1.5</ArmorRating_Blunt>
<ArmorRating_Heat>2.0</ArmorRating_Heat>
<EquipDelay>15</EquipDelay>
<EquipDelay>5</EquipDelay>
</statBases>
<equippedStatOffsets>
<IncomingDamageFactor>-0.1</IncomingDamageFactor>

View File

@@ -257,9 +257,6 @@
<weaponTags>
<li>Wula_Melee_Weapon_T2</li>
</weaponTags>
<thingSetMakerTags>
<li>RewardStandardQualitySuper</li>
</thingSetMakerTags>
<comps>
<li Class="WulaFallenEmpire.CompProperties_WeaponRenderDynamic">
<TexturePath>Wula/Weapon/WULA_MW_ChainSword/WULA_MW_ChainSword_Anim</TexturePath>
@@ -969,9 +966,6 @@
<weaponTags>
<li>Wula_Ranged_Weapon_T2</li>
</weaponTags>
<thingSetMakerTags>
<li>RewardStandardQualitySuper</li>
</thingSetMakerTags>
<modExtensions>
<li Class="WulaFallenEmpire.ModExtension_ShootWithOffset">
<offsets>

View File

@@ -402,6 +402,22 @@
<li Class="ThinkNode_SubtreesByTag">
<insertTag>Humanlike_PostMain</insertTag>
</li>
<!-- 添加军团成员的考察工作,优先级较低 -->
<!-- Idle wild man -->
<li Class="ThinkNode_ConditionalPawnKind">
<pawnKind>WULA_Legion_PawnKind</pawnKind>
<subNodes>
<li Class="ThinkNode_Tagger">
<tagToGive>Misc</tagToGive>
<subNodes>
<li Class="WulaFallenEmpire.JobGiver_InspectBuilding">
<priority>4.0</priority>
</li>
</subNodes>
</li>
</subNodes>
</li>
<!-- Idle colonist -->
<li Class="ThinkNode_ConditionalColonist">

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<LanguageData>
<WULA_Base_Tex_Quest.questNameRules.rulesStrings>
<li>questName->什一税税收</li>
</WULA_Base_Tex_Quest.questNameRules.rulesStrings>
<WULA_Base_Tex_Quest.questDescriptionRules.rulesStrings>
<li>questDescription->唯死亡和税收不可避免——按时上交什一税是乌拉帝国殖民地的光荣义务。\n\n乌拉帝国每隔一个季度15天收一次什一税什一税会从殖民地储存在舰队中的资产里面扣除你可以建造&lt;color=#6BB7B7>&lt;i>乌拉帝国物资输送舱&lt;/i>&lt;/color>来将物资输送到位于轨道上的舰队。\n\n乌拉帝国对积极纳税的殖民地会给予更多关照——但是如果拖延则每延期一天都会惹其不快最后甚至有可能被定性为叛国</li>
</WULA_Base_Tex_Quest.questDescriptionRules.rulesStrings>
</LanguageData>

View File

@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<LanguageData>
<WULA_Colony_Promotion.questNameRules.rulesStrings>
<li>questName->殖民地考察</li>
</WULA_Colony_Promotion.questNameRules.rulesStrings>
<WULA_Colony_Promotion.questDescriptionRules.rulesStrings>
<li>questDescription->殖民地已经承接了视察任务。\n\n行星封锁机关的总控AI已经派遣了自己的一个分体和护卫队抵达殖民地。考察持续12天她会检查殖民地方方面面的运转情况你需要确保其心情始终高于25%。考察完成后,她和卫队会搭乘穿梭机离开,如果一切顺利你们将获得殖民地晋升的机会,以解锁更多的许可科技。\n\n小心附近的敌对派系已经知道了殖民地来了一个大人物这些劫掠者会尝试袭击殖民地并抓住这个分体你可能需要面对大量袭击</li>
</WULA_Colony_Promotion.questDescriptionRules.rulesStrings>
<WULA_Colony_Promotion.LetterLabelFactionBecameHostile.slateRef>任务失败:[resolvedQuestName]</WULA_Colony_Promotion.LetterLabelFactionBecameHostile.slateRef>
<!-- EN: [faction_name] became hostile to you. -->
<WULA_Colony_Promotion.LetterTextFactionBecameHostile.slateRef>[faction_name]开始敌视你。</WULA_Colony_Promotion.LetterTextFactionBecameHostile.slateRef>
<!-- EN: Shuttle destroyed -->
<WULA_Colony_Promotion.LetterLabelShuttleDestroyed.slateRef>穿梭机被破坏</WULA_Colony_Promotion.LetterLabelShuttleDestroyed.slateRef>
<!-- EN: The shuttle sent to drop off [pawnsLabelDef] has been destroyed. You have failed the quest '[resolvedQuestName]'.\n\nYour relations with [asker_faction_name] have changed by [goodwillChangeOnShuttleDestroyed]. -->
<WULA_Colony_Promotion.LetterTextShuttleDestroyed.slateRef>被派遣来运输[asker_nameDef]的穿梭机已被破坏。</WULA_Colony_Promotion.LetterTextShuttleDestroyed.slateRef>
<!-- EN: [asker_faction_leaderTitle] arrived -->
<WULA_Colony_Promotion.LetterLabelAskerArrived.slateRef>[asker_nameDef]已抵达</WULA_Colony_Promotion.LetterLabelAskerArrived.slateRef>
<!-- EN: The [asker_faction_leaderTitle] of [asker_faction_name], has arrived.\n\nProtect him and satisfy his royal needs until the shuttle arrives in [shuttleDelayTicks_duration].\n\nAll of you can accompany the [asker_faction_leaderTitle] on the shuttle and travel to the Imperial flotilla to begin a new life. -->
<WULA_Colony_Promotion.LetterTextAskerArrived.slateRef>[asker_nameDef]的分体和她的卫队已经抵达殖民地。\n\n你必须在穿梭机抵达前[shuttleDelayTicks_duration]内为[asker_objective]提供护卫并且满足[asker_possessive]各种需求。</WULA_Colony_Promotion.LetterTextAskerArrived.slateRef>
<!-- EN: Guest died: {SUBJECT_definite} -->
<WULA_Colony_Promotion.LetterLabelGuestDied.slateRef>宾客{SUBJECT_definite}死亡。</WULA_Colony_Promotion.LetterLabelGuestDied.slateRef>
<!-- EN: {SUBJECT_definite}, who you were charged to protect, has died. [failLetterEndingCommon] -->
<WULA_Colony_Promotion.LetterTextGuestDied.slateRef>需要你护卫的{SUBJECT_definite}已经死亡。[failLetterEndingCommon]</WULA_Colony_Promotion.LetterTextGuestDied.slateRef>
<!-- EN: Should depart on shuttle -->
<WULA_Colony_Promotion.InspectStringDepartShuttle.slateRef>应该乘坐穿梭机离开</WULA_Colony_Promotion.InspectStringDepartShuttle.slateRef>
<!-- EN: Shuttle arrived -->
<WULA_Colony_Promotion.LetterLabelShuttleArrived.slateRef>穿梭机已抵达</WULA_Colony_Promotion.LetterLabelShuttleArrived.slateRef>
<!-- EN: The shuttle has arrived to collect the [asker_faction_leaderTitle].\n\nAll of you can accompany the [asker_faction_leaderTitle] on the shuttle and travel to the Imperial flotilla to begin a new life. -->
<WULA_Colony_Promotion.LetterTextShuttleArrived.slateRef>穿梭机已经前来迎接[asker_nameDef]。</WULA_Colony_Promotion.LetterTextShuttleArrived.slateRef>
<!-- EN: {SUBJECT_bestRoyalTitle} unhappy -->
<WULA_Colony_Promotion.LetterLabelSubjectUnhappy.slateRef>{SUBJECT_bestRoyalTitle}情绪低落</WULA_Colony_Promotion.LetterLabelSubjectUnhappy.slateRef>
<!-- EN: {SUBJECT_definite}, who you were charged to protect and keep happy, has been below the minimum mood of [lodgersMoodThreshold] too long. [failLetterEndingCommon] -->
<WULA_Colony_Promotion.LetterTextSubjectUnhappy.slateRef>需要你护卫和满足需求的{SUBJECT_definite},其情绪值已经长时间低于最低限度[lodgersMoodThreshold]。[failLetterEndingCommon]</WULA_Colony_Promotion.LetterTextSubjectUnhappy.slateRef>
<!-- EN: Guest captured: {SUBJECT_definite} -->
<WULA_Colony_Promotion.LetterLabelGuestCaptured.slateRef>宾客{SUBJECT_definite}被俘。</WULA_Colony_Promotion.LetterLabelGuestCaptured.slateRef>
<!-- EN: {SUBJECT_definite}, who you were charged to protect, has been arrested. [failLetterEndingCommon] -->
<WULA_Colony_Promotion.LetterTextGuestCaptured.slateRef>需要你护卫的{SUBJECT_definite}已经被俘虏。[failLetterEndingCommon]</WULA_Colony_Promotion.LetterTextGuestCaptured.slateRef>
<!-- EN: Unauthorized surgery: {SUBJECT_definite} -->
<WULA_Colony_Promotion.LetterLabelUnauthorizedSurgery.slateRef>未授权手术:{SUBJECT_definite}</WULA_Colony_Promotion.LetterLabelUnauthorizedSurgery.slateRef>
<!-- EN: Unauthorized, violating surgery has been performed on {SUBJECT_definite}, who you were charged to protect. [failLetterEndingCommon] -->
<WULA_Colony_Promotion.LetterTextUnauthorizedSurgery.slateRef>需要你护卫的{SUBJECT_definite}接受了一场未授权的多余手术。[failLetterEndingCommon]</WULA_Colony_Promotion.LetterTextUnauthorizedSurgery.slateRef>
<!-- EN: Xenogerm absorbed: {SUBJECT_definite} -->
<WULA_Colony_Promotion.root.nodes.lodgersXenogermAbsorbed.node.nodes.Letter.label.slateRef>异种胚芽被吸收</WULA_Colony_Promotion.root.nodes.lodgersXenogermAbsorbed.node.nodes.Letter.label.slateRef>
<!-- EN: {SUBJECT_definite}, who you were charged to protect, has had {SUBJECT_possessive} xenogerm forcibly absorbed. [failLetterEndingCommon] -->
<WULA_Colony_Promotion.root.nodes.lodgersXenogermAbsorbed.node.nodes.Letter.text.slateRef>指定由你保护的{SUBJECT_definite}在你的殖民地被吸收了异种胚芽。[failLetterEndingCommon]</WULA_Colony_Promotion.root.nodes.lodgersXenogermAbsorbed.node.nodes.Letter.text.slateRef>
<!-- EN: Guest lost: {SUBJECT_definite} -->
<WULA_Colony_Promotion.LetterLabelGuestLost.slateRef>宾客失踪:{SUBJECT_definite}</WULA_Colony_Promotion.LetterLabelGuestLost.slateRef>
<!-- EN: {SUBJECT_definite}, who you were charged to protect, has left the assigned settlement. [failLetterEndingCommon] -->
<WULA_Colony_Promotion.LetterTextGuestLost.slateRef>需要你护卫的{SUBJECT_definite}失踪在你的殖民地。[failLetterEndingCommon]</WULA_Colony_Promotion.LetterTextGuestLost.slateRef>
<!-- EN: Shuttle destroyed -->
<WULA_Colony_Promotion.LetterLabelShuttleDestroyed.slateRef>穿梭机已被毁</WULA_Colony_Promotion.LetterLabelShuttleDestroyed.slateRef>
<!-- EN: The shuttle sent to collect the [asker_faction_leaderTitle] has been destroyed. [failLetterEndingCommon] -->
<WULA_Colony_Promotion.LetterTextShuttleDestroyed.slateRef>前来迎接[asker_faction_leaderTitle]的穿梭机被摧毁了。[failLetterEndingCommon]</WULA_Colony_Promotion.LetterTextShuttleDestroyed.slateRef>
<!-- EN: Guest lost: {SUBJECT_definite} -->
<WULA_Colony_Promotion.LetterLabelLodgerRanWild.slateRef>宾客失踪:{SUBJECT_definite}</WULA_Colony_Promotion.LetterLabelLodgerRanWild.slateRef>
<!-- EN: {SUBJECT_definite}, who you were charged to protect, has run wild. [failLetterEndingCommon] -->
<WULA_Colony_Promotion.LetterTextLodgerRanWild.slateRef>需要你护卫的{SUBJECT_definite}在你的殖民地回归自然。[failLetterEndingCommon]</WULA_Colony_Promotion.LetterTextLodgerRanWild.slateRef>
<!-- EN: Quest failed: [resolvedQuestName] -->
<WULA_Colony_Promotion.LetterLabelShuttleSentUnsatisfied.slateRef>任务失败:[resolvedQuestName]</WULA_Colony_Promotion.LetterLabelShuttleSentUnsatisfied.slateRef>
<!-- EN: The shuttle sent to collect the [asker_faction_leaderTitle] has departed without [asker_objective]. [asker_pronoun] will now leave on foot. [failLetterEndingCommon] -->
<WULA_Colony_Promotion.LetterTextShuttleSentUnsatisfied.slateRef>前来迎接[asker_faction_leaderTitle]的穿梭机没有接到[asker_objective]。[asker_pronoun]现在只能走回去。[failLetterEndingCommon]</WULA_Colony_Promotion.LetterTextShuttleSentUnsatisfied.slateRef>
</LanguageData>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<LanguageData>
<WULA_Intro_NewColony.questNameRules.rulesStrings>
<li>questName->新殖民地</li>
</WULA_Intro_NewColony.questNameRules.rulesStrings>
<WULA_Intro_NewColony.questDescriptionRules.rulesStrings>
<li>questDescription->乌拉帝国的先遣队已经抵达地表,舰队给她们发来了第一条通讯。</li>
</WULA_Intro_NewColony.questDescriptionRules.rulesStrings>
</LanguageData>

View File

@@ -1,12 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<LanguageData>
<WULA_Intro_NewColony.questNameRules.rulesStrings>
<li>questName->新殖民地</li>
</WULA_Intro_NewColony.questNameRules.rulesStrings>
<WULA_Intro_NewColony.questDescriptionRules.rulesStrings>
<li>questDescription->乌拉帝国的先遣队已经抵达地表,舰队给她们发来了第一条通讯。</li>
</WULA_Intro_NewColony.questDescriptionRules.rulesStrings>
<WULA_Intro_Spy.questNameRules.rulesStrings>
<li>questName->掩护帝国密探</li>
</WULA_Intro_Spy.questNameRules.rulesStrings>
@@ -62,11 +55,4 @@
<WULA_Intro_Spy.LetterLabelQuestFailed.slateRef>任务失败:[resolvedQuestName]</WULA_Intro_Spy.LetterLabelQuestFailed.slateRef>
<!-- EN: The shuttle sent to collect [asker_nameDef] has departed without [asker_objective]. [asker_pronoun] will now leave on foot. [failLetterEndingCommon] -->
<WULA_Intro_Spy.LetterTextQuestFailed.slateRef>前来迎接[asker_nameDef]的穿梭机在离开时因为一些原因落下了[asker_objective]。[asker_pronoun]现在只能走回去了。[failLetterEndingCommon]</WULA_Intro_Spy.LetterTextQuestFailed.slateRef>
<WULA_Base_Tex_Quest.questNameRules.rulesStrings>
<li>questName->什一税税收</li>
</WULA_Base_Tex_Quest.questNameRules.rulesStrings>
<WULA_Base_Tex_Quest.questDescriptionRules.rulesStrings>
<li>questDescription->唯死亡和税收不可避免——按时上交什一税是乌拉帝国殖民地的光荣义务。\n\n乌拉帝国的什一税会从殖民地储存在舰队中的资产里面扣除你可以建造&lt;color=#6BB7B7>&lt;i>乌拉帝国物资输送舱&lt;/i>&lt;/color>来将物资输送到位于轨道上的舰队。\n\n乌拉帝国对积极纳税的殖民地会给予更多关照——但是如果拖延则每延期一天都会惹其不快最后甚至有可能被定性为叛国</li>
</WULA_Base_Tex_Quest.questDescriptionRules.rulesStrings>
</LanguageData>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 877 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

View File

@@ -0,0 +1,112 @@
using System.Collections.Generic;
using RimWorld;
using Verse;
using Verse.AI;
namespace WulaFallenEmpire
{
public class JobDriver_InspectBuilding : JobDriver
{
private const TargetIndex BuildingIndex = TargetIndex.A;
private int ticksLeft;
// 定义考察效果 - 可以使用现有的效果或创建自定义效果
private static readonly EffecterDef InspectEffect = EffecterDefOf.Research; // 使用研究效果作为临时替代
private static readonly SoundDef InspectSound = SoundDefOf.Interact_CleanFilth; // 使用建造声音作为临时替代
public override bool TryMakePreToilReservations(bool errorOnFailed)
{
// 预订目标建筑
return pawn.Reserve(job.targetA, job, 1, 1, null, errorOnFailed);
}
protected override IEnumerable<Toil> MakeNewToils()
{
// 失败条件
this.FailOnDestroyedOrNull(BuildingIndex);
this.FailOnDespawnedOrNull(BuildingIndex);
this.FailOn(() => !pawn.health.capacities.CapableOf(PawnCapacityDefOf.Moving));
// 第一步:前往目标建筑
yield return Toils_Goto.GotoCell(BuildingIndex, PathEndMode.Touch)
.FailOnSomeonePhysicallyInteracting(BuildingIndex);
// 第二步:进行考察(带动画效果)
Toil inspectToil = CreateInspectionToil();
yield return inspectToil;
}
/// <summary>
/// 创建带动画效果的考察工作
/// </summary>
private Toil CreateInspectionToil()
{
Toil inspectToil = new Toil();
inspectToil.initAction = () =>
{
ticksLeft = job.expiryInterval;
// 记录日志
if (Prefs.DevMode)
{
Log.Message($"[JobDriver_InspectBuilding] {pawn.Name} started inspecting {TargetThingA.Label} for {ticksLeft} ticks");
}
};
inspectToil.tickAction = () =>
{
ticksLeft--;
// 每 tick 检查是否完成
if (ticksLeft <= 0)
{
ReadyForNextToil();
}
};
inspectToil.defaultCompleteMode = ToilCompleteMode.Delay;
inspectToil.defaultDuration = job.expiryInterval;
// 添加动画效果
inspectToil.WithEffect(InspectEffect, BuildingIndex);
// 添加音效
inspectToil.PlaySustainerOrSound(() => InspectSound);
// 添加进度条(可选)
inspectToil.WithProgressBar(BuildingIndex,
() => 1f - ((float)ticksLeft / job.expiryInterval),
interpolateBetweenActorAndTarget: true);
inspectToil.AddFinishAction(() =>
{
// 考察完成后的处理
OnInspectionComplete();
});
return inspectToil;
}
/// <summary>
/// 考察完成时的处理
/// </summary>
private void OnInspectionComplete()
{
// 可以在这里添加考察完成后的效果
// 例如:增加技能经验、触发事件等
if (Prefs.DevMode)
{
Log.Message($"[JobDriver_InspectBuilding] {pawn.Name} completed inspection of {TargetThingA.Label}");
}
}
public override void ExposeData()
{
base.ExposeData();
Scribe_Values.Look(ref ticksLeft, "ticksLeft", 0);
}
}
}

View File

@@ -0,0 +1,307 @@
using RimWorld;
using RimWorld.Planet;
using System.Collections.Generic;
using System.Linq;
using Verse;
using Verse.AI;
namespace WulaFallenEmpire
{
public class JobGiver_InspectBuilding : ThinkNode_JobGiver
{
// 检查间隔ticks
private const int CheckInterval = 120; // 2秒检查一次
// 最大考察距离
private const float MaxDistance = 20f;
// 默认最小间隔ticks- 5分钟
private const int DefaultMinIntervalTicks = 300 * 60; // 5分钟 * 60秒/分钟 * 60ticks/秒
// 存储每个 Pawn 的最后考察时间
private static Dictionary<Pawn, int> lastInspectionTicks = new Dictionary<Pawn, int>();
protected override Job TryGiveJob(Pawn pawn)
{
// 检查 Pawn 是否有效
if (pawn == null || pawn.Destroyed || !pawn.Spawned || pawn.Map == null)
return null;
// 检查 Pawn 是否能够工作
if (pawn.Downed || pawn.InMentalState || !pawn.health.capacities.CanBeAwake)
return null;
// 检查 Pawn 是否能够移动
if (!pawn.health.capacities.CapableOf(PawnCapacityDefOf.Moving))
return null;
// 检查背景故事是否为军团背景
if (!HasLegionBackstory(pawn))
return null;
// 检查是否已经有工作
if (pawn.CurJob != null && pawn.CurJob.def == JobDefOf_WULA.WULA_InspectBuilding)
return null;
// 检查冷却时间
if (!CanInspectNow(pawn))
return null;
// 寻找合适的考察目标
Thing inspectionTarget = FindRandomInspectionTarget(pawn);
if (inspectionTarget == null)
return null;
// 创建考察工作
Job job = JobMaker.MakeJob(JobDefOf_WULA.WULA_InspectBuilding, inspectionTarget);
job.expiryInterval = Rand.Range(300, 600); // 5-10秒的随机时间
job.checkOverrideOnExpire = true;
// 记录开始考察时间
RecordInspectionStart(pawn);
// 记录调试信息
if (Prefs.DevMode)
{
Log.Message($"[JobGiver_InspectBuilding] Assigned inspection job to {pawn.Name} at {inspectionTarget.Label}");
}
return job;
}
/// <summary>
/// 检查 Pawn 是否具有军团背景故事
/// </summary>
private bool HasLegionBackstory(Pawn pawn)
{
if (pawn.story == null)
return false;
// 检查成年背景故事是否为军团背景
if (pawn.story.Adulthood != null && pawn.story.Adulthood.identifier == "WULA_Adult_Backstory_Legion")
return true;
return false;
}
/// <summary>
/// 检查 Pawn 是否可以开始新的考察(冷却时间检查)
/// </summary>
private bool CanInspectNow(Pawn pawn)
{
// 获取设置的最小间隔时间
int minIntervalTicks = GetMinInspectionIntervalTicks();
// 如果 Pawn 没有记录,说明可以立即开始
if (!lastInspectionTicks.ContainsKey(pawn))
return true;
int lastTick = lastInspectionTicks[pawn];
int currentTick = Find.TickManager.TicksGame;
int elapsedTicks = currentTick - lastTick;
// 检查是否已经过了最小间隔时间
bool canInspect = elapsedTicks >= minIntervalTicks;
if (Prefs.DevMode && !canInspect)
{
int remainingTicks = minIntervalTicks - elapsedTicks;
float remainingSeconds = remainingTicks / 60f;
Log.Message($"[JobGiver_InspectBuilding] {pawn.Name} must wait {remainingSeconds:F1} seconds before next inspection");
}
return canInspect;
}
/// <summary>
/// 记录 Pawn 开始考察的时间
/// </summary>
private void RecordInspectionStart(Pawn pawn)
{
lastInspectionTicks[pawn] = Find.TickManager.TicksGame;
if (Prefs.DevMode)
{
Log.Message($"[JobGiver_InspectBuilding] Recorded inspection start for {pawn.Name} at tick {lastInspectionTicks[pawn]}");
}
}
/// <summary>
/// 获取最小考察间隔时间ticks
/// </summary>
private int GetMinInspectionIntervalTicks()
{
// 这里可以从 Mod 设置中获取值
// 暂时返回默认值,您可以根据需要修改
return DefaultMinIntervalTicks;
}
/// <summary>
/// 随机寻找合适的考察目标
/// </summary>
private Thing FindRandomInspectionTarget(Pawn pawn)
{
// 获取地图上所有符合条件的建筑
List<Thing> validBuildings = new List<Thing>();
// 遍历地图上的所有建筑
foreach (Thing thing in pawn.Map.listerThings.ThingsInGroup(ThingRequestGroup.BuildingArtificial))
{
if (IsValidInspectionTarget(thing, pawn))
{
validBuildings.Add(thing);
}
}
// 如果没有找到合适的建筑返回null
if (validBuildings.Count == 0)
{
if (Prefs.DevMode)
{
Log.Message($"[JobGiver_InspectBuilding] No valid inspection targets found for {pawn.Name}");
}
return null;
}
// 随机选择一个建筑
Thing selectedBuilding = validBuildings.RandomElement();
if (Prefs.DevMode)
{
Log.Message($"[JobGiver_InspectBuilding] Randomly selected {selectedBuilding.Label} from {validBuildings.Count} valid targets");
}
return selectedBuilding;
}
/// <summary>
/// 检查是否有效的考察目标
/// </summary>
private bool IsValidInspectionTarget(Thing thing, Pawn pawn)
{
// 基本检查
if (thing == null || thing.Destroyed)
return false;
// 检查是否玩家拥有
if (thing.Faction != Faction.OfPlayer)
return false;
// 检查是否可到达
if (!pawn.CanReach(thing, PathEndMode.Touch, Danger.None))
return false;
// 排除一些不适合的建筑类型
if (thing.def.IsFrame || thing.def.IsBlueprint)
return false;
// 确保建筑是完整的
if (thing is Building building && (building.IsBurning() || building.IsBrokenDown()))
return false;
// 确保不是禁止进入的区域
if (thing.IsForbidden(pawn))
return false;
// 确保没有其他 Pawn 正在考察这个建筑
if (IsBeingInspectedByOther(thing, pawn))
return false;
// 排除墙壁建筑
if (IsWall(thing))
return false;
// 距离检查(可选,但为了性能考虑可以保留)
if (pawn.Position.DistanceTo(thing.Position) > MaxDistance)
return false;
return true;
}
/// <summary>
/// 检查是否为墙壁
/// </summary>
private bool IsWall(Thing thing)
{
// 检查建筑的 def 中是否有 isWall 标签
if (thing.def?.building != null && thing.def.building.isWall)
{
if (Prefs.DevMode)
{
Log.Message($"[JobGiver_InspectBuilding] Excluding wall: {thing.Label}");
}
return true;
}
// 额外的检查:通过 defName 或标签判断
if (thing.def?.defName == "Wall" ||
(thing.def?.thingCategories?.Any(c => c.defName == "Walls") ?? false))
{
return true;
}
return false;
}
/// <summary>
/// 检查是否有其他 Pawn 正在考察这个建筑
/// </summary>
private bool IsBeingInspectedByOther(Thing thing, Pawn currentPawn)
{
foreach (Pawn otherPawn in thing.Map.mapPawns.AllPawnsSpawned)
{
if (otherPawn != currentPawn &&
otherPawn.CurJob != null &&
otherPawn.CurJob.def == JobDefOf_WULA.WULA_InspectBuilding &&
otherPawn.CurJob.targetA.Thing == thing)
{
return true;
}
}
return false;
}
/// <summary>
/// 清理不再存在的 Pawn 的记录
/// </summary>
public static void CleanupInspectionRecords()
{
List<Pawn> toRemove = new List<Pawn>();
foreach (var pair in lastInspectionTicks)
{
if (pair.Key.Destroyed || !pair.Key.Spawned)
{
toRemove.Add(pair.Key);
}
}
foreach (Pawn pawn in toRemove)
{
lastInspectionTicks.Remove(pawn);
}
if (Prefs.DevMode && toRemove.Count > 0)
{
Log.Message($"[JobGiver_InspectBuilding] Cleaned up {toRemove.Count} inspection records");
}
}
public class InspectionCleanupComponent : WorldComponent
{
private int lastCleanupTick = 0;
private const int CleanupIntervalTicks = 6000; // 每100秒清理一次
public InspectionCleanupComponent(World world) : base(world) { }
public override void WorldComponentTick()
{
base.WorldComponentTick();
int currentTick = Find.TickManager.TicksGame;
if (currentTick - lastCleanupTick > CleanupIntervalTicks)
{
JobGiver_InspectBuilding.CleanupInspectionRecords();
lastCleanupTick = currentTick;
}
}
}
}
}

View File

@@ -0,0 +1,221 @@
using RimWorld;
using RimWorld.QuestGen;
using Verse;
using Verse.AI;
namespace WulaFallenEmpire
{
public class QuestNode_AddInspectionJob : QuestNode
{
public SlateRef<Pawn> pawn; // 直接接收 Pawn 对象
public SlateRef<JobDef> inspectionJobDef; // 考察工作定义
public SlateRef<float> inspectionDuration; // 考察停留时间(秒)
public SlateRef<bool> requirePlayerOwned; // 是否要求玩家拥有
public SlateRef<bool> requireAccessible; // 是否要求可到达
protected override bool TestRunInt(Slate slate)
{
if (inspectionJobDef.GetValue(slate) == null)
{
Log.Error("[QuestNode_AddInspectionJob] inspectionJobDef is null");
return false;
}
return true;
}
protected override void RunInt()
{
Slate slate = QuestGen.slate;
// 直接获取 Pawn 对象
Pawn pawnValue = pawn.GetValue(slate);
if (pawnValue == null)
{
Log.Error("[QuestNode_AddInspectionJob] pawn is null");
return;
}
// 检查 Pawn 是否有效且已生成
if (!IsPawnValidAndSpawned(pawnValue))
{
// 如果 Pawn 无效或未生成,记录调试信息但不报错
if (QuestGen.slate.Get<bool>("debugLogging", false))
{
Log.Message($"[QuestNode_AddInspectionJob] Pawn {pawnValue.Name} is not ready for job assignment (Destroyed: {pawnValue.Destroyed}, Spawned: {pawnValue.Spawned}, Map: {pawnValue.Map?.Index ?? -1})");
}
return;
}
// 获取工作定义
JobDef jobDef = inspectionJobDef.GetValue(slate) ?? JobDefOf.Wait;
// 创建并分配工作
Job job = CreateInspectionJob(pawnValue, jobDef, slate);
if (job != null)
{
pawnValue.jobs.TryTakeOrderedJob(job, JobTag.Misc);
if (QuestGen.slate.Get<bool>("debugLogging", false))
{
Log.Message($"[QuestNode_AddInspectionJob] Assigned inspection job to {pawnValue.Name} at position {pawnValue.Position}");
}
}
else
{
if (QuestGen.slate.Get<bool>("debugLogging", false))
{
Log.Message($"[QuestNode_AddInspectionJob] Failed to create inspection job for {pawnValue.Name}");
}
}
}
/// <summary>
/// 检查 Pawn 是否有效且已生成
/// </summary>
private bool IsPawnValidAndSpawned(Pawn pawn)
{
if (pawn == null || pawn.Destroyed)
return false;
if (!pawn.Spawned)
return false;
if (pawn.Map == null)
return false;
return true;
}
/// <summary>
/// 创建考察工作
/// </summary>
private Job CreateInspectionJob(Pawn pawn, JobDef jobDef, Slate slate)
{
// 寻找合适的考察目标
Thing inspectionTarget = FindInspectionTarget(pawn, slate);
if (inspectionTarget == null)
{
if (QuestGen.slate.Get<bool>("debugLogging", false))
{
Log.Message($"[QuestNode_AddInspectionJob] No valid inspection target found for {pawn.Name} on map {pawn.Map}");
}
return null;
}
// 创建工作
Job job = JobMaker.MakeJob(jobDef, inspectionTarget);
// 设置停留时间(转换为 ticks
float duration = inspectionDuration.GetValue(slate);
if (duration > 0)
{
job.expiryInterval = (int)(duration * 60f); // 秒转换为 ticks
}
else
{
job.expiryInterval = Rand.Range(180, 300); // 3-5 秒的随机时间
}
// 设置工作标签
job.def.joyDuration = job.expiryInterval;
if (QuestGen.slate.Get<bool>("debugLogging", false))
{
Log.Message($"[QuestNode_AddInspectionJob] Created inspection job for {pawn.Name} at {inspectionTarget.Label} (Position: {inspectionTarget.Position})");
}
return job;
}
/// <summary>
/// 寻找考察目标
/// </summary>
private Thing FindInspectionTarget(Pawn pawn, Slate slate)
{
bool requirePlayerOwnedValue = requirePlayerOwned.GetValue(slate);
bool requireAccessibleValue = requireAccessible.GetValue(slate);
if (QuestGen.slate.Get<bool>("debugLogging", false))
{
Log.Message($"[QuestNode_AddInspectionJob] Searching for inspection target for {pawn.Name}");
Log.Message($"[QuestNode_AddInspectionJob] Require player owned: {requirePlayerOwnedValue}, Require accessible: {requireAccessibleValue}");
}
// 寻找玩家拥有的建筑
Thing target = GenClosest.ClosestThingReachable(
pawn.Position,
pawn.Map,
ThingRequest.ForGroup(ThingRequestGroup.BuildingArtificial),
PathEndMode.Touch,
TraverseParms.For(pawn),
maxDistance: 50f,
validator: (Thing t) => IsValidInspectionTarget(t, pawn, requirePlayerOwnedValue, requireAccessibleValue)
);
if (QuestGen.slate.Get<bool>("debugLogging", false))
{
if (target != null)
{
Log.Message($"[QuestNode_AddInspectionJob] Found target: {target.Label} at {target.Position}");
}
else
{
Log.Message($"[QuestNode_AddInspectionJob] No target found within range");
}
}
return target;
}
/// <summary>
/// 检查是否有效的考察目标
/// </summary>
private bool IsValidInspectionTarget(Thing thing, Pawn pawn, bool requirePlayerOwned, bool requireAccessible)
{
// 基本检查
if (thing == null || thing.Destroyed)
return false;
// 检查是否玩家拥有
if (requirePlayerOwned && thing.Faction != Faction.OfPlayer)
{
if (QuestGen.slate.Get<bool>("debugLogging", false) && thing.Faction != null)
{
Log.Message($"[QuestNode_AddInspectionJob] Target {thing.Label} faction: {thing.Faction.Name}, required: Player");
}
return false;
}
// 检查是否可到达
if (requireAccessible && !pawn.CanReach(thing, PathEndMode.Touch, Danger.None))
{
if (QuestGen.slate.Get<bool>("debugLogging", false))
{
Log.Message($"[QuestNode_AddInspectionJob] Target {thing.Label} at {thing.Position} is not reachable by {pawn.Name}");
}
return false;
}
// 排除一些不适合的建筑类型
if (thing.def.IsFrame || thing.def.IsBlueprint)
return false;
// 确保建筑是完整的
if (thing is Building building && (building.IsBurning() || building.IsBrokenDown()))
return false;
// 确保不是禁止进入的区域
if (thing.IsForbidden(pawn))
return false;
if (QuestGen.slate.Get<bool>("debugLogging", false))
{
Log.Message($"[QuestNode_AddInspectionJob] Target {thing.Label} at {thing.Position} is valid");
}
return true;
}
}
}

View File

@@ -0,0 +1,194 @@
using System.Collections.Generic;
using System.Linq;
using RimWorld;
using RimWorld.Planet;
using RimWorld.QuestGen;
using Verse;
namespace WulaFallenEmpire
{
public class QuestNode_GeneratePawnWithCustomization : QuestNode
{
[NoTranslate]
public SlateRef<string> storeAs;
[NoTranslate]
public SlateRef<string> addToList;
[NoTranslate]
public SlateRef<IEnumerable<string>> addToLists;
public SlateRef<PawnKindDef> kindDef;
public SlateRef<Faction> faction;
public SlateRef<bool> forbidAnyTitle;
public SlateRef<bool> ensureNonNumericName;
public SlateRef<IEnumerable<TraitDef>> forcedTraits;
public SlateRef<IEnumerable<TraitDef>> prohibitedTraits;
public SlateRef<Pawn> extraPawnForExtraRelationChance;
public SlateRef<float> relationWithExtraPawnChanceFactor;
public SlateRef<bool?> allowAddictions;
public SlateRef<float> biocodeWeaponChance;
public SlateRef<float> biocodeApparelChance;
public SlateRef<bool> mustBeCapableOfViolence;
public SlateRef<bool> isChild;
public SlateRef<bool> allowPregnant;
public SlateRef<Gender?> fixedGender;
public SlateRef<bool> giveDependentDrugs;
// 只保留自定义背景故事功能
public SlateRef<BackstoryDef> childhoodBackstory;
public SlateRef<BackstoryDef> adulthoodBackstory;
public SlateRef<bool> useCustomBackstories;
private const int MinExpertSkill = 11;
protected override bool TestRunInt(Slate slate)
{
return true;
}
protected virtual DevelopmentalStage GetDevelopmentalStage(Slate slate)
{
if (!Find.Storyteller.difficulty.ChildrenAllowed || !isChild.GetValue(slate))
{
return DevelopmentalStage.Adult;
}
return DevelopmentalStage.Child;
}
protected override void RunInt()
{
Slate slate = QuestGen.slate;
PawnKindDef value = kindDef.GetValue(slate);
Faction value2 = faction.GetValue(slate);
bool flag = allowAddictions.GetValue(slate) ?? true;
bool value3 = allowPregnant.GetValue(slate);
IEnumerable<TraitDef> value4 = forcedTraits.GetValue(slate);
IEnumerable<TraitDef> value5 = prohibitedTraits.GetValue(slate);
float value6 = biocodeWeaponChance.GetValue(slate);
bool value7 = mustBeCapableOfViolence.GetValue(slate);
Pawn value8 = extraPawnForExtraRelationChance.GetValue(slate);
float value9 = relationWithExtraPawnChanceFactor.GetValue(slate);
Gender? value10 = fixedGender.GetValue(slate);
float value11 = biocodeApparelChance.GetValue(slate);
DevelopmentalStage developmentalStage = GetDevelopmentalStage(slate);
// 获取自定义背景故事设置
BackstoryDef childhoodBackstoryValue = childhoodBackstory.GetValue(slate);
BackstoryDef adulthoodBackstoryValue = adulthoodBackstory.GetValue(slate);
bool useCustomBackstoriesValue = useCustomBackstories.GetValue(slate);
PawnGenerationRequest request = new PawnGenerationRequest(
value, value2, PawnGenerationContext.NonPlayer, null,
forceGenerateNewPawn: false, allowDead: false, allowDowned: false,
canGeneratePawnRelations: true, value7, 1f, forceAddFreeWarmLayerIfNeeded: false,
allowGay: true, value3, allowFood: true, flag, inhabitant: false,
certainlyBeenInCryptosleep: false, forceRedressWorldPawnIfFormerColonist: false,
worldPawnFactionDoesntMatter: false, value6, value11, value8, value9,
null, null, value4, value5, null, null, null, value10, null, null, null,
null, forceNoIdeo: false, forceNoBackstory: false, forbidAnyTitle: false,
forceDead: false, null, null, null, null, null, 0f, developmentalStage);
request.BiocodeApparelChance = biocodeApparelChance.GetValue(slate);
request.ForbidAnyTitle = forbidAnyTitle.GetValue(slate);
Pawn pawn = PawnGenerator.GeneratePawn(request);
// 确保名字不是数字(如果设置了)
if (ensureNonNumericName.GetValue(slate) && (pawn.Name == null || pawn.Name.Numerical))
{
pawn.Name = PawnBioAndNameGenerator.GeneratePawnName(pawn);
}
// 应用自定义背景故事
if (useCustomBackstoriesValue)
{
ApplyCustomBackstories(pawn, childhoodBackstoryValue, adulthoodBackstoryValue);
}
if (giveDependentDrugs.GetValue(slate) && ModsConfig.BiotechActive && pawn.genes != null)
{
foreach (Gene item in pawn.genes.GenesListForReading)
{
if (item.Active)
{
Gene_ChemicalDependency dep = item as Gene_ChemicalDependency;
if (dep != null && DefDatabase<ThingDef>.AllDefs.Where((ThingDef x) => x.IsDrug && x.GetCompProperties<CompProperties_Drug>().chemical == dep.def.chemical).TryRandomElementByWeight((ThingDef x) => x.generateCommonality, out var result))
{
Thing thing = ThingMaker.MakeThing(result);
thing.stackCount = Rand.Range(1, 3);
pawn.inventory.innerContainer.TryAddOrTransfer(thing);
}
}
}
}
if (storeAs.GetValue(slate) != null)
{
QuestGen.slate.Set(storeAs.GetValue(slate), pawn);
}
if (addToList.GetValue(slate) != null)
{
QuestGenUtility.AddToOrMakeList(QuestGen.slate, addToList.GetValue(slate), pawn);
}
if (addToLists.GetValue(slate) != null)
{
foreach (string item2 in addToLists.GetValue(slate))
{
QuestGenUtility.AddToOrMakeList(QuestGen.slate, item2, pawn);
}
}
QuestGen.AddToGeneratedPawns(pawn);
if (!pawn.IsWorldPawn())
{
Find.WorldPawns.PassToWorld(pawn);
}
}
/// <summary>
/// 应用自定义背景故事
/// </summary>
private void ApplyCustomBackstories(Pawn pawn, BackstoryDef childhood, BackstoryDef adulthood)
{
if (childhood != null)
{
pawn.story.Childhood = childhood;
}
if (adulthood != null)
{
pawn.story.Adulthood = adulthood;
}
// 重新计算技能,因为背景故事会影响技能
if (pawn.skills != null)
{
pawn.skills.Notify_SkillDisablesChanged();
}
// 重新计算工作类型
if (pawn.workSettings != null)
{
pawn.workSettings.Notify_DisabledWorkTypesChanged();
}
}
}
}

View File

@@ -0,0 +1,40 @@
using RimWorld;
using System.Collections.Generic;
using Verse;
namespace WulaFallenEmpire
{
public class StorytellerCompProperties_SimpleTechnologyTrigger : StorytellerCompProperties
{
// 必需配置
public ResearchProjectDef technology; // 要检测的科技
public IncidentDef incident; // 要触发的事件
// 时间配置
public float fireAfterDaysPassed = 0f; // 游戏开始后多少天开始检测
public float checkIntervalDays = 5f; // 检查间隔(天)
// 任务相关配置
public QuestScriptDef questDef; // 关联的任务定义(可选)
public bool preventDuplicateQuests = true; // 防止重复任务
// 派系关系校验 - 新增字段
public FactionDef requiredFaction; // 必须存在的派系
public bool requireNonHostileRelation = true; // 是否要求非敌对关系默认true
public bool requireFactionExists = true; // 是否要求派系必须存在默认true
// 调试配置
public bool debugLogging = false; // 启用调试日志
// 派系过滤(可选)
public List<FactionDef> factionTypeWhitelist;
public List<FactionDef> factionTypeBlacklist;
public bool useFactionFilter = false;
public FactionFilterDefaultBehavior defaultBehavior = FactionFilterDefaultBehavior.Allow;
public StorytellerCompProperties_SimpleTechnologyTrigger()
{
compClass = typeof(StorytellerComp_SimpleTechnologyTrigger);
}
}
}

View File

@@ -0,0 +1,308 @@
using RimWorld;
using System.Collections.Generic;
using Verse;
using System.Linq;
using System.Text;
using RimWorld.Planet;
namespace WulaFallenEmpire
{
public class StorytellerComp_SimpleTechnologyTrigger : StorytellerComp
{
private StorytellerCompProperties_SimpleTechnologyTrigger SimpleProps =>
(StorytellerCompProperties_SimpleTechnologyTrigger)props;
// 重新实现基类的私有属性
private static int IntervalsPassed => Find.TickManager.TicksGame / 1000;
public override IEnumerable<FiringIncident> MakeIntervalIncidents(IIncidentTarget target)
{
// 检查基础条件(天数)
if (IntervalsPassed <= SimpleProps.fireAfterDaysPassed * 60)
yield break;
// 检查是否满足周期
if (!PassesIntervalCheck())
yield break;
// 检查派系关系条件 - 新增检查
if (!PassesRequiredFactionCheck())
yield break;
// 检查派系过滤条件
if (!PassesFactionFilter(target))
yield break;
// 检查科技条件
if (!PassesTechnologyCheck())
yield break;
// 检查是否防止重复任务
if (SimpleProps.preventDuplicateQuests && HasActiveQuest())
yield break;
// 触发事件
IncidentDef techIncident = SimpleProps.incident;
if (techIncident.TargetAllowed(target))
{
if (SimpleProps.debugLogging)
{
Log.Message($"[SimpleTechnologyTrigger] Triggering incident {techIncident.defName} for technology {SimpleProps.technology.defName}");
}
yield return new FiringIncident(techIncident, this, GenerateParms(techIncident.category, target));
}
}
/// <summary>
/// 检查必需派系关系条件 - 新增方法
/// </summary>
private bool PassesRequiredFactionCheck()
{
// 如果没有配置必需派系,直接通过
if (SimpleProps.requiredFaction == null)
return true;
// 查找派系
Faction requiredFactionInstance = Find.FactionManager.FirstFactionOfDef(SimpleProps.requiredFaction);
// 检查派系是否存在
if (SimpleProps.requireFactionExists)
{
if (requiredFactionInstance == null || requiredFactionInstance.defeated)
{
if (SimpleProps.debugLogging)
{
Log.Message($"[SimpleTechnologyTrigger] Required faction {SimpleProps.requiredFaction.defName} does not exist or is defeated");
}
return false;
}
}
// 检查派系关系
if (SimpleProps.requireNonHostileRelation && requiredFactionInstance != null)
{
Faction playerFaction = Faction.OfPlayer;
if (requiredFactionInstance.HostileTo(playerFaction))
{
if (SimpleProps.debugLogging)
{
Log.Message($"[SimpleTechnologyTrigger] Required faction {SimpleProps.requiredFaction.defName} is hostile to player");
}
return false;
}
}
if (SimpleProps.debugLogging)
{
Log.Message($"[SimpleTechnologyTrigger] Required faction {SimpleProps.requiredFaction.defName} check passed");
}
return true;
}
/// <summary>
/// 检查是否满足触发周期
/// </summary>
private bool PassesIntervalCheck()
{
// 简单的周期检查:每 X 天检查一次
int currentInterval = IntervalsPassed;
int checkInterval = (int)(SimpleProps.checkIntervalDays * 60);
// 如果检查间隔为0则每个间隔都检查
if (checkInterval <= 0)
return true;
return currentInterval % checkInterval == 0;
}
/// <summary>
/// 检查科技条件
/// </summary>
private bool PassesTechnologyCheck()
{
if (SimpleProps.technology == null)
{
Log.Error("[SimpleTechnologyTrigger] No technology specified in props");
return false;
}
// 简单检查科技是否已研究完成
bool hasTechnology = SimpleProps.technology.IsFinished;
if (SimpleProps.debugLogging)
{
Log.Message($"[SimpleTechnologyTrigger] Technology {SimpleProps.technology.defName} research status: {hasTechnology}");
}
return hasTechnology;
}
/// <summary>
/// 检查派系过滤条件
/// </summary>
private bool PassesFactionFilter(IIncidentTarget target)
{
// 如果不启用派系过滤,直接通过
if (!SimpleProps.useFactionFilter)
return true;
// 获取目标的派系
Faction faction = GetTargetFaction(target);
if (faction == null)
return false;
// 检查黑名单
if (SimpleProps.factionTypeBlacklist != null &&
SimpleProps.factionTypeBlacklist.Contains(faction.def))
{
if (SimpleProps.debugLogging)
{
Log.Message($"[SimpleTechnologyTrigger] Faction {faction.def.defName} is in blacklist");
}
return false;
}
// 检查白名单
if (SimpleProps.factionTypeWhitelist != null &&
SimpleProps.factionTypeWhitelist.Count > 0)
{
bool inWhitelist = SimpleProps.factionTypeWhitelist.Contains(faction.def);
switch (SimpleProps.defaultBehavior)
{
case FactionFilterDefaultBehavior.Allow:
// 白名单模式:在白名单中或默认允许
if (SimpleProps.debugLogging && !inWhitelist)
{
Log.Message($"[SimpleTechnologyTrigger] Faction {faction.def.defName} not in whitelist, but default behavior is Allow");
}
return true;
case FactionFilterDefaultBehavior.Deny:
// 白名单模式:只有在白名单中才允许
if (inWhitelist)
{
if (SimpleProps.debugLogging)
{
Log.Message($"[SimpleTechnologyTrigger] Faction {faction.def.defName} is in whitelist");
}
return true;
}
else
{
if (SimpleProps.debugLogging)
{
Log.Message($"[SimpleTechnologyTrigger] Faction {faction.def.defName} not in whitelist and default behavior is Deny");
}
return false;
}
}
}
// 如果没有设置白名单,根据默认行为决定
switch (SimpleProps.defaultBehavior)
{
case FactionFilterDefaultBehavior.Allow:
if (SimpleProps.debugLogging)
{
Log.Message($"[SimpleTechnologyTrigger] No whitelist, default behavior is Allow");
}
return true;
case FactionFilterDefaultBehavior.Deny:
if (SimpleProps.debugLogging)
{
Log.Message($"[SimpleTechnologyTrigger] No whitelist, default behavior is Deny");
}
return false;
default:
return true;
}
}
/// <summary>
/// 获取目标的派系
/// </summary>
private Faction GetTargetFaction(IIncidentTarget target)
{
if (target is Map map)
{
return map.ParentFaction ?? Faction.OfPlayer;
}
else if (target is World world)
{
return Faction.OfPlayer;
}
else if (target is Caravan caravan)
{
return caravan.Faction;
}
return Faction.OfPlayer;
}
/// <summary>
/// 检查是否存在活跃的相同任务
/// </summary>
private bool HasActiveQuest()
{
if (SimpleProps.questDef == null)
return false;
bool hasActiveQuest = Find.QuestManager.QuestsListForReading.Any((Quest q) =>
q.root == SimpleProps.questDef && !q.Historical);
if (SimpleProps.debugLogging && hasActiveQuest)
{
Log.Message($"[SimpleTechnologyTrigger] Active quest {SimpleProps.questDef.defName} found, skipping trigger");
}
return hasActiveQuest;
}
/// <summary>
/// 调试方法:显示当前科技触发状态
/// </summary>
public string GetSimpleTechnologyTriggerStatus()
{
StringBuilder status = new StringBuilder();
status.AppendLine($"Simple Technology Trigger: {SimpleProps.technology?.defName ?? "NULL"}");
status.AppendLine($"Research Status: {(PassesTechnologyCheck() ? " COMPLETED" : " NOT COMPLETED")}");
status.AppendLine($"Required Faction: {SimpleProps.requiredFaction?.defName ?? "NONE"}");
status.AppendLine($"Faction Relation: {(PassesRequiredFactionCheck() ? " VALID" : " INVALID")}");
status.AppendLine($"Check Interval: {SimpleProps.checkIntervalDays} days");
status.AppendLine($"Current Interval: {IntervalsPassed}");
status.AppendLine($"Next Check: {GetNextCheckInterval()} intervals");
status.AppendLine($"Can Trigger Now: {PassesIntervalCheck() && PassesTechnologyCheck() && PassesRequiredFactionCheck()}");
// 详细派系信息
if (SimpleProps.requiredFaction != null)
{
Faction faction = Find.FactionManager.FirstFactionOfDef(SimpleProps.requiredFaction);
if (faction != null)
{
status.AppendLine($"Required Faction Status: {(faction.defeated ? "DEFEATED" : "ACTIVE")}");
status.AppendLine($"Relation with Player: {(faction.HostileTo(Faction.OfPlayer) ? "HOSTILE" : "NON-HOSTILE")}");
}
else
{
status.AppendLine($"Required Faction Status: NOT FOUND IN GAME");
}
}
return status.ToString();
}
/// <summary>
/// 计算下一次检查的间隔
/// </summary>
private int GetNextCheckInterval()
{
int checkInterval = (int)(SimpleProps.checkIntervalDays * 60);
if (checkInterval <= 0) return 0;
int currentInterval = IntervalsPassed;
return ((currentInterval / checkInterval) + 1) * checkInterval;
}
}
}

View File

@@ -23,6 +23,7 @@ namespace WulaFallenEmpire
{
public static JobDef WULA_EnterMaintenancePod;
public static JobDef WULA_HaulToMaintenancePod;
public static JobDef WULA_InspectBuilding;
static JobDefOf_WULA()
{

View File

@@ -177,6 +177,8 @@
<Compile Include="HediffComp\HediffCompProperties_SwitchableHediff.cs" />
<Compile Include="HediffComp\WULA_HediffDamgeShield\DRMDamageShield.cs" />
<Compile Include="HediffComp\WULA_HediffDamgeShield\Hediff_DamageShield.cs" />
<Compile Include="Job\JobDriver_InspectBuilding.cs" />
<Compile Include="Job\JobGiver_InspectBuilding.cs" />
<Compile Include="Pawn\Comp_MultiTurretGun.cs" />
<Compile Include="Pawn\Comp_PawnRenderExtra.cs" />
<Compile Include="Pawn\WULA_AutoMechCarrier\CompAutoMechCarrier.cs" />
@@ -228,14 +230,18 @@
<Compile Include="Pawn\WULA_Maintenance\Need_Maintenance.cs" />
<Compile Include="Pawn\WULA_Maintenance\WorkGiver_DoMaintenance.cs" />
<Compile Include="Placeworker\CompProperties_CustomRadius.cs" />
<Compile Include="QuestNodes\QuestNode_AddInspectionJob.cs" />
<Compile Include="QuestNodes\QuestNode_CheckGlobalResource.cs" />
<Compile Include="QuestNodes\QuestNode_GeneratePawnWithCustomization.cs" />
<Compile Include="QuestNodes\QuestNode_Hyperlinks.cs" />
<Compile Include="QuestNodes\QuestPart_GlobalResourceCheck.cs" />
<Compile Include="Stat\StatWorker_Energy.cs" />
<Compile Include="Stat\StatWorker_Maintenance.cs" />
<Compile Include="Stat\StatWorker_NanoRepair.cs" />
<Compile Include="Storyteller\StorytellerCompProperties_ImportantQuestWithFactionFilter.cs" />
<Compile Include="Storyteller\StorytellerComp_ImportantQuestWithFactionFilter.cs" />
<Compile Include="Storyteller\WULA_ImportantQuestWithFactionFilter\StorytellerCompProperties_ImportantQuestWithFactionFilter.cs" />
<Compile Include="Storyteller\WULA_ImportantQuestWithFactionFilter\StorytellerComp_ImportantQuestWithFactionFilter.cs" />
<Compile Include="Storyteller\WULA_SimpleTechnologyTrigger\StorytellerCompProperties_SimpleTechnologyTrigger.cs" />
<Compile Include="Storyteller\WULA_SimpleTechnologyTrigger\StorytellerComp_SimpleTechnologyTrigger.cs" />
<Compile Include="ThingComp\CompAndPatch_GiveHediffOnShot.cs" />
<Compile Include="ThingComp\CompApparelInterceptor.cs" />
<Compile Include="ThingComp\CompPsychicScaling.cs" />

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB