diff --git a/About/PublishedFileId.txt b/About/PublishedFileId.txt
new file mode 100644
index 0000000..2c33680
--- /dev/null
+++ b/About/PublishedFileId.txt
@@ -0,0 +1 @@
+1454024362
\ No newline at end of file
diff --git a/Assemblies/MoreFactionInteraction.dll b/Assemblies/MoreFactionInteraction.dll
index 08026c3..0c340f6 100644
Binary files a/Assemblies/MoreFactionInteraction.dll and b/Assemblies/MoreFactionInteraction.dll differ
diff --git a/Defs/CustomChoiceLetters.xml b/Defs/CustomChoiceLetters.xml
index 45515ea..3f81420 100644
--- a/Defs/CustomChoiceLetters.xml
+++ b/Defs/CustomChoiceLetters.xml
@@ -16,4 +16,9 @@
MoreFactionInteraction.ChoiceLetter_DiplomaticMarriage
+
+ MysticalShaman
+ MoreFactionInteraction.ChoiceLetter_MysticalShaman
+
+
diff --git a/Defs/Incidents/Incidents_World_Misc.xml b/Defs/Incidents/Incidents_World_Misc.xml
index 2d51f22..bf92a2f 100644
--- a/Defs/Incidents/Incidents_World_Misc.xml
+++ b/Defs/Incidents/Incidents_World_Misc.xml
@@ -24,6 +24,21 @@
+
+ MFI_MysticalShaman
+
+ Misc
+
+
World
+
+ MoreFactionInteraction.IncidentWorker_MysticalShaman
+ Mystical shaman
+ MysticalShaman
+ 0.8
+ 1
+ 20
+
+
MFI_HuntersLodge
diff --git a/Defs/Incidents/Incidents_World_Quests.xml b/Defs/Incidents/Incidents_World_Quests.xml
index ed27984..3c92388 100644
--- a/Defs/Incidents/Incidents_World_Quests.xml
+++ b/Defs/Incidents/Incidents_World_Quests.xml
@@ -53,7 +53,7 @@
You've received a message from [PAWN_nameDef], {0} of {1}. Their faction recently had diplomatic troubles with another faction and call upon you to negotiate between them and {2}. They've picked a neutral nearby location and invite you to come negotiate.\n\nIt could be a great opportunity to improve relations with their faction, but beware - a poor negotiator can cause more harm than good and even anger them.\n\nThe offer will expire after {3} days, after which [PAWN_nameDef] fears the worst.NeutralEvent0.51
- 12
+ 50
\ No newline at end of file
diff --git a/Defs/WorldObjects/WorldObjects.xml b/Defs/WorldObjects/WorldObjects.xml
index fc057f3..0e7a4ed 100644
--- a/Defs/WorldObjects/WorldObjects.xml
+++ b/Defs/WorldObjects/WorldObjects.xml
@@ -15,4 +15,18 @@
+
+ MFI_MysticalShaman
+
+ The tent where a mystical shaman recides.
+ MoreFactionInteraction.More_Flavour.MysticalShaman
+ FactionPeaceTalks
+ true
+ Expanding/HealerHand
+ 70
+
+
+
+
+
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..17a3183
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018 Mehni
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
diff --git a/Languages/English/Keyed/Incidents.xml b/Languages/English/Keyed/Incidents.xml
index 314463f..bc7e69b 100644
--- a/Languages/English/Keyed/Incidents.xml
+++ b/Languages/English/Keyed/Incidents.xml
@@ -24,9 +24,15 @@
Bumper crop harvestedYour grower {0} has gained {1} growing experience.
- Word of {1}'s charm has reached {0} and they've asked you for {1}'s hand in marriage. Accepting this marriage proposal will cement relations and strengthen faction ties, but {1} will leave your faction to join theirs.
+ Word of {1}'s charm has reached {0} and they've asked you for {1}'s hand in marriage. Accepting this marriage proposal will cement relations and strengthen faction ties, but {1} will leave your faction to join {2}.Diplomatic marriage[PAWN_nameDef] sounds overjoyed. [PAWN_pronoun] is convinced they'll live happily ever after with {0}.\n\nRelations with {1} improved.[PAWN_nameDef] tries [PAWN_possessive] best not to sound rejected.\n\nRelations with {1} have deteriorated somewhat.
+ Someone who claims to be a representative of {0} contacts us with a tall tale of a mystical shaman who has mastered the "healer's hand" to cure any injury or missing part. They'll tell us the location of this mysterious and normally reclusive person for a small fee of {1} silver.
+ Mystical Shaman
+
+ The Shaman emerges from his polyester teepee just before your caravan announces their presence. He judges you silently with one crossed eye that penetrates through each of your caravan members deepest vitae and one eye that quivers more and more as he assesses your groups health. He orders you to wait a respectable distance while he retreats back in his teepee. Moments later you hear the rustling of fabric and the sound of a muffalo being spurred on.\n\nIt seems the mystical shaman packed up and left.
+ The Shaman seems to have been expecting you, and with great practice regales you the tale of his "healer's hands". When he's down he invites {0} in to his teepee. There is a brief shake of the screen before {0} re-emerges, feeling much better.
+
\ No newline at end of file
diff --git a/MoreFactionInteraction/General/MFI_DefOf.cs b/MoreFactionInteraction/General/MFI_DefOf.cs
index c012ccb..c720700 100644
--- a/MoreFactionInteraction/General/MFI_DefOf.cs
+++ b/MoreFactionInteraction/General/MFI_DefOf.cs
@@ -15,7 +15,9 @@ public static class MFI_DefOf
public static SiteCoreDef MFI_HuntersLodgeCore;
public static SitePartDef MFI_HuntersLodgePart;
+
public static WorldObjectDef MFI_FactionWarPeaceTalks;
+ public static WorldObjectDef MFI_MysticalShaman;
//public static IncidentDef MFI_WeddingGuestsArrival;
}
}
diff --git a/MoreFactionInteraction/General/Settings.cs b/MoreFactionInteraction/General/Settings.cs
index a18d97c..61bb842 100644
--- a/MoreFactionInteraction/General/Settings.cs
+++ b/MoreFactionInteraction/General/Settings.cs
@@ -10,8 +10,8 @@ namespace MoreFactionInteraction
public class MoreFactionInteraction_Settings : ModSettings
{
public static int ticksToUpgrade = 3 * GenDate.DaysPerQuadrum * GenDate.TicksPerDay;
- public static float timeModifierBetweenFactionInteraction = 1f;
- public static float traderWealthOffsetFromTimesTraded = 1f;
+ public static float timeModifierBetweenFactionInteraction = 2f;
+ public static float traderWealthOffsetFromTimesTraded = 0.7f;
public void DoWindowContents(Rect rect)
{
@@ -30,8 +30,8 @@ public void DoWindowContents(Rect rect)
public override void ExposeData()
{
Scribe_Values.Look(value: ref ticksToUpgrade, label: "ticksToUpgrade", defaultValue: 2700000);
- Scribe_Values.Look(value: ref timeModifierBetweenFactionInteraction, label: "timeModifierBetweenFactionInteraction", defaultValue: 1f);
- Scribe_Values.Look(value: ref traderWealthOffsetFromTimesTraded, label: "traderWealthOffsetFromTimesTraded", defaultValue: 1f);
+ Scribe_Values.Look(value: ref timeModifierBetweenFactionInteraction, label: "timeModifierBetweenFactionInteraction", defaultValue: 2f);
+ Scribe_Values.Look(value: ref traderWealthOffsetFromTimesTraded, label: "traderWealthOffsetFromTimesTraded", defaultValue: 0.8f);
}
}
diff --git a/MoreFactionInteraction/More Flavour/CaravanArrivalAction_VisitMysticalShaman.cs b/MoreFactionInteraction/More Flavour/CaravanArrivalAction_VisitMysticalShaman.cs
new file mode 100644
index 0000000..ecc7fab
--- /dev/null
+++ b/MoreFactionInteraction/More Flavour/CaravanArrivalAction_VisitMysticalShaman.cs
@@ -0,0 +1,53 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using RimWorld;
+using RimWorld.Planet;
+using Verse;
+
+namespace MoreFactionInteraction.More_Flavour
+{
+ class CaravanArrivalAction_VisitMysticalShaman : CaravanArrivalAction
+ {
+ private MysticalShaman mysticalShaman;
+
+ public override string Label => "VisitPeaceTalks".Translate(mysticalShaman.Label);
+ public override string ReportString => "CaravanVisiting".Translate(this.mysticalShaman.Label);
+
+ public override void Arrived(Caravan caravan)
+ {
+ this.mysticalShaman.Notify_CaravanArrived(caravan: caravan);
+ }
+
+ public CaravanArrivalAction_VisitMysticalShaman()
+ {
+ }
+
+ public CaravanArrivalAction_VisitMysticalShaman(MysticalShaman mysticalShaman)
+ {
+ this.mysticalShaman = mysticalShaman;
+ }
+
+ public static IEnumerable GetFloatMenuOptions(Caravan caravan, MysticalShaman mysticalShaman)
+ {
+ return CaravanArrivalActionUtility.GetFloatMenuOptions(acceptanceReportGetter:
+ () => CanVisit(caravan: caravan, mysticalShaman: mysticalShaman), arrivalActionGetter:
+ () => new CaravanArrivalAction_VisitMysticalShaman(mysticalShaman: mysticalShaman),
+ label: "VisitPeaceTalks".Translate(mysticalShaman.Label),
+ caravan: caravan, pathDestination: mysticalShaman.Tile,
+ revalidateWorldClickTarget: mysticalShaman);
+ }
+
+ public static FloatMenuAcceptanceReport CanVisit(Caravan caravan, MysticalShaman mysticalShaman)
+ {
+ return mysticalShaman != null && mysticalShaman.Spawned;
+ }
+
+ public override void ExposeData()
+ {
+ base.ExposeData();
+ Scribe_References.Look(refee: ref this.mysticalShaman, label: "mysticalShaman");
+ }
+ }
+}
diff --git a/MoreFactionInteraction/More Flavour/ChoiceLetter_MysticalShaman.cs b/MoreFactionInteraction/More Flavour/ChoiceLetter_MysticalShaman.cs
new file mode 100644
index 0000000..2ba7456
--- /dev/null
+++ b/MoreFactionInteraction/More Flavour/ChoiceLetter_MysticalShaman.cs
@@ -0,0 +1,77 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Verse;
+using RimWorld;
+using RimWorld.Planet;
+using MoreFactionInteraction.More_Flavour;
+
+namespace MoreFactionInteraction
+{
+ public class ChoiceLetter_MysticalShaman : ChoiceLetter
+ {
+ public int tile;
+ public Faction faction;
+ public Map map;
+ public int fee;
+ private static readonly IntRange TimeoutDaysRange = new IntRange(min: 5, max: 15);
+
+ public override IEnumerable Choices
+ {
+ get
+ {
+ if (this.ArchivedOnly)
+ {
+ yield return this.Option_Close;
+ }
+ else
+ {
+ DiaOption accept = new DiaOption(text: "RansomDemand_Accept".Translate())
+ {
+ action = () =>
+ {
+ MysticalShaman mysticalShaman = (MysticalShaman)WorldObjectMaker.MakeWorldObject(def: MFI_DefOf.MFI_MysticalShaman);
+ mysticalShaman.Tile = tile;
+ mysticalShaman.SetFaction(newFaction: faction);
+ int randomInRange = TimeoutDaysRange.RandomInRange;
+ mysticalShaman.GetComponent().StartTimeout(ticks: randomInRange * GenDate.TicksPerDay);
+ Find.WorldObjects.Add(o: mysticalShaman);
+
+ TradeUtility.LaunchSilver(map: this.map, fee: this.fee);
+ Find.LetterStack.RemoveLetter(let: this);
+ },
+ resolveTree = true
+ };
+ if (!TradeUtility.ColonyHasEnoughSilver(map: this.map, fee: this.fee))
+ {
+ accept.Disable(newDisabledReason: "NeedSilverLaunchable".Translate(this.fee.ToString()));
+ }
+ yield return accept;
+
+ DiaOption reject = new DiaOption(text: "RansomDemand_Reject".Translate())
+ {
+ action = () =>
+ {
+ Find.LetterStack.RemoveLetter(let: this);
+ },
+ resolveTree = true
+ };
+ yield return reject;
+ yield return this.Option_Postpone;
+ }
+ }
+ }
+
+ public override bool CanShowInLetterStack => base.CanShowInLetterStack && Find.Maps.Contains(item: this.map);
+
+ public override void ExposeData()
+ {
+ base.ExposeData();
+ Scribe_References.Look