public void Start(GameDataModder gameDataMod) { try { int dummy = 0; var harmony = new Harmony("Hp2LadyJizzMod.Hp2BaseMod"); var femaleJizzToggleCode = new CodeDataMod(10001, "509B82A2A4E16DF3774EA93B133F840F", CodeType.TOGGLE, false, "Female j**z off.", "Female j**z on."); gameDataMod.AddData(femaleJizzToggleCode); var mInit = AccessTools.Method(typeof(UiWindowPhotos), "GetDefaultPhotoViewMode"); var mInitPostfix = SymbolExtensions.GetMethodInfo(() => InitPostfix(ref dummy)); harmony.Patch(mInit, null, new HarmonyMethod(mInitPostfix)); var mRefresh = AccessTools.Method(typeof(UiWindowPhotos), "Refresh"); var mfreshPrefix = SymbolExtensions.GetMethodInfo(() => RefreshPrefix(null)); harmony.Patch(mRefresh, null, new HarmonyMethod(mfreshPrefix)); } catch (Exception e) { Harmony.DEBUG = true; FileLog.Log("EXCEPTION Hp2LadyJizzMod: " + e.Message); } }
public void Start(GameDataModder gameDataMod) { try { var harmony = new Harmony("Hp2RepeatThreesomeMod.Hp2BaseMod"); var localCode = new CodeDataMod(10002, "EA29B6A7A0AB1F669743E6C792F930F7", CodeType.TOGGLE, false, "Lovers' threesome location requirement on.", "Lovers' threesome location requirement off."); gameDataMod.AddData(localCode); var nudeCode = new CodeDataMod(10003, "40F45CA75FE6A9E007131D26FF9D36F6", CodeType.TOGGLE, false, "Nudity durring bonus rounds off.", "Nudity durring bonus rounds on."); gameDataMod.AddData(nudeCode); var PuzzleManager_OnRoundOver = AccessTools.Method(typeof(PuzzleManager), "OnRoundOver"); var LeversThreesomePrefix = SymbolExtensions.GetMethodInfo(() => LoversThreesome(null)); harmony.Patch(PuzzleManager_OnRoundOver, new HarmonyMethod(LeversThreesomePrefix)); var UiDoll_ChangeOutfit = AccessTools.Method(typeof(UiDoll), "ChangeOutfit"); var N69AddNudePrefix = SymbolExtensions.GetMethodInfo(() => N69AddNude(null, -1)); harmony.Patch(UiDoll_ChangeOutfit, new HarmonyMethod(N69AddNudePrefix)); } catch (Exception e) { Harmony.DEBUG = true; FileLog.Log("EXCEPTION Hp2RepeatThreesomeMod: " + e.Message); } }
public void Start(GameDataModder gameDataModder) { //need to be done like this b/c it doesn't have access to definition types :( //ability string[] abilityFiles = Directory.GetFiles("mods/Hp2DataModLoader/abilityMods"); foreach (var file in abilityFiles) { var configString = File.ReadAllText(file); var mod = JsonConvert.DeserializeObject(configString, typeof(AbilityDataMod)) as AbilityDataMod; if (mod != null) { gameDataModder.AddData(mod); } } //ailment string[] ailmentFiles = Directory.GetFiles("mods/Hp2DataModLoader/ailmentMods"); foreach (var file in ailmentFiles) { var configString = File.ReadAllText(file); var mod = JsonConvert.DeserializeObject(configString, typeof(AilmentDataMod)) as AilmentDataMod; if (mod != null) { gameDataModder.AddData(mod); } } //Code string[] codeFiles = Directory.GetFiles("mods/Hp2DataModLoader/codeMods"); foreach (var file in codeFiles) { var configString = File.ReadAllText(file); var mod = JsonConvert.DeserializeObject(configString, typeof(CodeDataMod)) as CodeDataMod; if (mod != null) { gameDataModder.AddData(mod); } } //cutscene string[] cutsceneFiles = Directory.GetFiles("mods/Hp2DataModLoader/cutsceneMods"); foreach (var file in cutsceneFiles) { var configString = File.ReadAllText(file); var mod = JsonConvert.DeserializeObject(configString, typeof(CutsceneDataMod)) as CutsceneDataMod; if (mod != null) { gameDataModder.AddData(mod); } } //dialogTrigger string[] dialogTriggerFiles = Directory.GetFiles("mods/Hp2DataModLoader/dialogTriggerMods"); foreach (var file in dialogTriggerFiles) { var configString = File.ReadAllText(file); var mod = JsonConvert.DeserializeObject(configString, typeof(DialogTriggerDataMod)) as DialogTriggerDataMod; if (mod != null) { gameDataModder.AddData(mod); } } //Energy string[] energyFiles = Directory.GetFiles("mods/Hp2DataModLoader/energyMods"); foreach (var file in energyFiles) { var configString = File.ReadAllText(file); var mod = JsonConvert.DeserializeObject(configString, typeof(EnergyDataMod)) as EnergyDataMod; if (mod != null) { gameDataModder.AddData(mod); } } //GirlData string[] girlFiles = Directory.GetFiles("mods/Hp2DataModLoader/girlMods"); foreach (var file in girlFiles) { var configString = File.ReadAllText(file); var mod = JsonConvert.DeserializeObject(configString, typeof(GirlDataMod)) as GirlDataMod; if (mod != null) { gameDataModder.AddData(mod); } } //GirlPair string[] girlPairFiles = Directory.GetFiles("mods/Hp2DataModLoader/girlPairMods"); foreach (var file in girlPairFiles) { var configString = File.ReadAllText(file); var mod = JsonConvert.DeserializeObject(configString, typeof(GirlPairDataMod)) as GirlPairDataMod; if (mod != null) { gameDataModder.AddData(mod); } } //ItemData string[] itemFiles = Directory.GetFiles("mods/Hp2DataModLoader/itemMods"); foreach (var file in itemFiles) { var configString = File.ReadAllText(file); var mod = JsonConvert.DeserializeObject(configString, typeof(ItemDataMod)) as ItemDataMod; if (mod != null) { gameDataModder.AddData(mod); } } //LocationData string[] locationFiles = Directory.GetFiles("mods/Hp2DataModLoader/locationMods"); foreach (var file in locationFiles) { var configString = File.ReadAllText(file); var mod = JsonConvert.DeserializeObject(configString, typeof(LocationDataMod)) as LocationDataMod; if (mod != null) { gameDataModder.AddData(mod); } } //PhotoData string[] photoFiles = Directory.GetFiles("mods/Hp2DataModLoader/photoMods"); foreach (var file in photoFiles) { var configString = File.ReadAllText(file); var mod = JsonConvert.DeserializeObject(configString, typeof(PhotoDataMod)) as PhotoDataMod; if (mod != null) { gameDataModder.AddData(mod); } } //QuestionData string[] questionFiles = Directory.GetFiles("mods/Hp2DataModLoader/questionMods"); foreach (var file in questionFiles) { var configString = File.ReadAllText(file); var mod = JsonConvert.DeserializeObject(configString, typeof(QuestionDataMod)) as QuestionDataMod; if (mod != null) { gameDataModder.AddData(mod); } } //TokenData string[] tokenFiles = Directory.GetFiles("mods/Hp2DataModLoader/tokenMods"); foreach (var file in tokenFiles) { var configString = File.ReadAllText(file); var mod = JsonConvert.DeserializeObject(configString, typeof(TokenDataMod)) as TokenDataMod; if (mod != null) { gameDataModder.AddData(mod); } } }
public void Start(GameDataModder gameDataMod) { var LolaSoloPhoto = new PhotoDataMod(); var LolaSoloRelationshipCutscene = new CutsceneDataMod(); var EmptyGirlID = 10001; var emptySprite = new SpriteInfo("empty.png", true); var offscrenevector = new VectorInfo(-1000f, -1000f); var emptyPart = new GirlPartInfo() { PartType = GirlPartType.EYEBROWS, PartName = "Empty Part", SpriteInfo = emptySprite, X = 0, Y = 0, MirroredPartIndex = -1, AltPartIndex = -1 }; var emptyExpression = new GirlExpressionSubDefinition() { expressionType = GirlExpressionType.NEUTRAL, partIndexEyebrows = -1, partIndexEyes = -1, partIndexEyesGlow = -1, partIndexMouthClosed = -1, partIndexMouthOpen = -1, eyesClosed = false, mouthOpen = false, editorExpanded = false }; var emptyHairstyle = new GirlHairstyleSubDefinition() { hairstyleName = "Nothing", partIndexFronthair = -1, partIndexBackhair = -1, pairOutfitIndex = 0, tightlyPaired = false, hideSpecials = false, editorExpanded = false }; var emptyOutfit = new GirlOutfitSubDefinition() { outfitName = "Nothing", partIndexOutfit = -1, pairHairstyleIndex = 0, tightlyPaired = false, hideNipples = true, editorExpanded = false }; var LolaPair = new GirlPairDataMod() { Id = EmptyGirlID, IsAdditive = false, FavQuestions = new List <GirlPairFavQuestionInfo>(), GirlDefinitionOneID = EmptyGirlID, GirlDefinitionTwoID = 1, HasMeetingStyleOne = false, HasMeetingStyleTwo = false, IntroductionPair = false, IntroSidesFlipped = false, MeetingLocationDefinitionID = 5, MeetingStyleTypeOne = GirlStyleType.RELAXING, MeetingStyleTypeTwo = GirlStyleType.RELAXING, PhotoDefinitionID = LolaSoloPhoto.Id, RelationshipCutsceneDefinitionIDs = new List <int>() { LolaSoloRelationshipCutscene.Id }, SexDayTime = ClockDaytimeType.MORNING, SexLocationDefinitionID = 11, SexStyleTypeOne = GirlStyleType.RELAXING, SexStyleTypeTwo = GirlStyleType.SEXY, SpecialPair = false }; var NoFocusBagadgeItem = new ItemDataMod() { }; var NoStaminaDropBagadgeItem = new ItemDataMod() { }; var NoStaminaSpendBagadgeItem = new ItemDataMod() { }; var EmptyGirl = new GirlDataMod() { Id = EmptyGirlID, IsAdditive = false, EditorTab = EditorGirlDefinitionTab.DEFAULT, GirlName = "No one.", GirlNickName = string.Empty, GirlAge = 0, DialogTriggerTab = EditorDialogTriggerTab.DEFAULT, SpecialCharacter = true, BossCharacter = false, FavoriteAffectionType = PuzzleAffectionType.FLIRTATION, LeastFavoriteAffectionType = PuzzleAffectionType.FLIRTATION, VoiceVolume = 0f, SexVoiceVolume = 0f, CellphonePortrait = emptySprite, CellphonePortraitAlt = emptySprite, CellphoneHead = emptySprite, CellphoneHeadAlt = emptySprite, CellphoneMiniHead = emptySprite, CellphoneMiniHeadAlt = emptySprite, BreathEmitterPos = offscrenevector, UpsetEmitterPos = offscrenevector, SpecialEffectName = null, SpecialEffectOffset = offscrenevector, ShoesType = ItemShoesType.WINTER_BOOTS, ShoesAdj = string.Empty, UniqueType = ItemUniqueType.TAILORING, UniqueAdj = string.Empty, BadFoodTypes = new List <ItemFoodType>(), GirlPairDefIDs = new List <int>() { LolaPair.Id }, BaggageItemDefIDs = new List <int>() { NoFocusBagadgeItem.Id, NoStaminaDropBagadgeItem.Id, NoStaminaSpendBagadgeItem.Id }, UniqueItemDefIDs = new List <int>(), ShoesItemDefIDs = new List <int>(), HasAltStyles = false, AltStylesFlagName = string.Empty, AltStylesCodeDefinitionID = -1, UnlockStyleCodeDefinitionID = -1, PartIndexBody = 0, PartIndexNipples = 0, PartIndexBlushLight = 0, PartIndexBlushHeavy = 0, PartIndexBlink = 0, PartIndexMouthNeutral = 0, PartIndexesPhonemes = new List <int>() { 0, 0, 0, 0, 0 }, PartIndexesPhonemesTeeth = new List <int>() { 0, 0, 0, 0, 0 }, Parts = new List <GirlPartInfo>() { emptyPart }, DefaultExpressionIndex = 0, FailureExpressionIndex = 0, DefaultHairstyleIndex = 0, DefaultOutfitIndex = 0, Expressions = new List <GirlExpressionSubDefinition> { emptyExpression }, Hairstyles = new List <GirlHairstyleSubDefinition> { emptyHairstyle }, Outfits = new List <GirlOutfitSubDefinition> { emptyOutfit }, SpecialParts = new List <GirlSpecialPartSubDefinition>(), HerQuestions = new List <GirlQuestionSubDefinition>(), FavAnswers = new List <int>() }; gameDataMod.AddData(EmptyGirl); }