Dark09188 Posted May 3 Author Posted May 3 (edited) Scriptname Ab0000VogtQuestZusatz extends Quest Conditional ;ADOPTION SYSTEM CROSS-DLC TRANSFER ;The following objects and lists in this DLC need to send or receive data from other DLCs. Formlist property BYOHRelationshipAdoptionPlayerGiftChildMale Auto Formlist property BYOHRelationshipAdoptionPlayerGiftChildFemale Auto Formlist property BYOHRelationshipAdoption_PetAllowedRacesList Auto Formlist property BYOHRelationshipAdoption_PetDogsList Auto bool function CheckCompletionStatus(int[] arrayToCheck, int[] countValue, int partID) if FindArrayIndex(arrayToCheck, partID) > -1 countValue[0] = countValue[0] + 1 ; debug.trace(self + "CheckCompletionStatus: found partID=" + partID + ", countValue=" + countValue[0]) if countValue[0] >= arrayToCheck.length return true endif endif return false endFunction int function FindArrayIndex(int[] myArray, int searchValue) return myArray.Find(searchValue) ; int currentElement = 0 ; while (currentElement < myArray.Length) ; if myArray[currentElement] == searchValue ; ; found - return index ; return currentElement ; endif ; currentElement += 1 ; endWhile ; ; not found: ; return -1 endFunction ; Steward functions function HireSteward(int houseIndex, Actor akNewSteward) Alias_Efil[houseIndex].ForceRefTo(akNewSteward) bHaveAlias_Efil = true ; dismiss the follower DialogueFollower.DismissFollower(0, 0) endFunction function DismissSteward(int houseIndex, Actor akSteward) ; first, check if this actor is currently the steward if Alias_Efil[houseIndex].GetActorRef() == akSteward Alias_Efil [houseIndex].Clear() bHaveAlias_Efil = false endif endFunction function BuyBuildingMaterial(Actor akSteward, int iMaterialType) ; iMaterialType: 0 = Logs, 1 = stone, 2 = clay int houseIndex = GetStewardIndex(akSteward) ; debug.trace(self + " BuyBuildingMaterial from " + akSteward + " for houseIndex=" + houseIndex) if iMaterialType == 0 ; remove player's gold Game.GetPlayer().RemoveItem(Gold001, BYOHHPCostLogs.GetValueInt()) ; add logs directly to player Game.GetPlayer().AddItem(BYOHMaterialLog, BYOHHPAmountLogs.GetValueInt(), true) elseif iMaterialType == 1 ; remove player's gold Game.GetPlayer().RemoveItem(Gold001, BYOHHPCostStone.GetValueInt()) ; add stone to chest ; debug.trace(self + " BuyBuildingMaterial: add " + BYOHHPAmountStone + " stone") (HouseQuests[houseIndex] as Ab0000VogtQuestZusatz).StewardChest.AddItem(BYOHMaterialStoneBlock, BYOHHPAmountStone.GetValueInt()) elseif iMaterialType == 2 ; remove player's gold Game.GetPlayer().RemoveItem(Gold001, BYOHHPCostClay.GetValueInt()) ; add clay to chest ; debug.trace(self + " BuyBuildingMaterial: add " + BYOHHPAmountClay + " clay") (HouseQuests[houseIndex] as Ab0000VogtQuestZusatz).StewardChest.AddItem(BYOHMaterialClay, BYOHHPAmountClay.GetValueInt()) endif endFunction int function GetStewardIndex(Actor akSteward) int houseIndex = 0 while houseIndex <= HouseQuests.length if Alias_Efil[houseIndex].GetActorRef() == akSteward return houseIndex endif houseIndex = houseIndex + 1 endwhile endFunction function BardPlayInstrumental(Actor akBard, String asNewInstrument = "" ) if asNewInstrument != "" (akBard as BYOHHouseBardScript).sInstrument = asNewInstrument endif BardSongs.PlaySong(akBard, (akBard as BYOHHouseBardScript).sInstrument ) endFunction function BardRegisterLocationOwner(Actor akBard) if Game.GetPlayer().IsInFaction(CWSonsFaction) BardSongs.RegisterLocationOwner(UlfricRef) elseif Game.GetPlayer().IsInFaction(CWImperialFaction) BardSongs.RegisterLocationOwner(GeneralTulliusRef) else BardSongs.RegisterLocationOwner(akBard) endif endfunction function HireBard() bBoughtBard = true Game.GetPlayer().RemoveItem(gold001, BYOHHPCostBard.GetValueInt()) endFunction function BuyCow() numCows = numCows + 1 Game.GetPlayer().RemoveItem(gold001, BYOHHPCostCow.GetValueInt()) ; NOTE - cows enable themselves as they are bought by checking numCows endFunction function BuyChicken() numChickens = numChickens + 1 Game.GetPlayer().RemoveItem(gold001, BYOHHPCostChicken.GetValueInt()) ; NOTE - cows enable themselves as they are bought by checking numCows endFunction Quest[] Property HouseQuests Auto {array of house quests} ObjectReference[] Property LogPiles Auto {array of log piles - enable when player has logs available } Location[] Property HouseLocations Auto Keyword Property BYOHHouseBanditAttackKeyword Auto Keyword Property BYOHHouseSkeeverInfestationKeyword Auto Keyword Property BYOHHouseLocationKeyword Auto Int[] Property ChildIDsRoom2 Auto {array of interior IDs that must be built for bAllowChildren to be set true on house quest } int[] property ChildIDsRoom2Count Auto Int[] Property ChildIDsRoom3 Auto int[] property ChildIDsRoom3Count Auto BYOHRelationshipAdoptableScript Property RelationshipAdoptable Auto BYOHRelationshipAdoptionScript Property RelationshipAdoption Auto GlobalVariable Property BYOHHouse1LastVisit Auto GlobalVariable Property BYOHHouse2LastVisit Auto GlobalVariable Property BYOHHouse3LastVisit Auto GlobalVariable Property GameDaysPassed Auto DialogueFollowerScript Property DialogueFollower Auto ReferenceAlias[] Property Alias_Efil Auto MiscObject Property BYOHMaterialGlass Auto MiscObject Property BYOHMaterialStraw Auto MiscObject Property BYOHMaterialClay Auto MiscObject Property BYOHMaterialStoneBlock Auto MiscObject Property BYOHMaterialLog Auto MiscObject Property Gold001 Auto MiscObject Property DeerHide Auto MiscObject Property DeerHide02 Auto GlobalVariable Property BYOHHPAmountClay Auto GlobalVariable Property BYOHHPAmountLogs Auto GlobalVariable Property BYOHHPAmountStone Auto GlobalVariable Property BYOHHPCostClay Auto GlobalVariable Property BYOHHPCostLogs Auto GlobalVariable Property BYOHHPCostStone Auto GlobalVariable Property BYOHHouseLogCount Auto BardSongsScript Property BardSongs Auto Faction Property CWSonsFaction Auto Faction Property CWImperialFaction Auto Actor Property GeneralTulliusRef Auto Actor Property UlfricRef Auto int Property iBanditAttackPercent = 10 Auto GlobalVariable Property BYOHLastAttack Auto float Property fNextAttackDays = 21.0 Auto bool Property bCraftingTriggerBusy Auto Keyword Property WIDragonsToggle Auto int Property iHouseIndex Auto {0 = Tal des Einklangs} Int Property numCows Auto Conditional GlobalVariable Property numCowsMax Auto Int Property numChickens Auto Conditional ObjectReference Property StewardChest Auto Bool Property bHaveAlias_Efil Auto Conditional Bool Property bBoughtBard Auto Conditional GlobalVariable Property BYOHHPCostBard Auto GlobalVariable Property BYOHHPCostCow Auto GlobalVariable Property BYOHHPCostChicken Auto This is a smaller version of the BYOHHouseBuildingScript and BYOHHouseScript. Compiled Fine, the Questfragment compiled also fine, but i don't have any steward dialogue option ingame. Dialoge Set, Seq file Set. See someone why i don't have any steward dialouges. Edited May 3 by Dark09188
Recommended Posts