Jump to content

Citizenbari

Members
  • Posts

    13
  • Joined

  • Last visited

Everything posted by Citizenbari

  1. Here is a link how to fix precombined problems within xedit. Helped me a lot to get control of that sh.... https://forums.nexusmods.com/index.php?/topic/8062503-simple-q-about-identifying-precombined-meshes/
  2. Hi, creationkit website says: UseOwnedOnly (Bool): If true, the actor will pick only target references that the actor owns (whether through Actorbase, Actor, or Faction ownership). Further, it will NOT pick targets that have no owner. (Meant to be useful for setting up Workship towns, along with the Papyrus function SetActorRefOwner.) I tested, that but like always thats not function correct :mad:.. The NPC still uses/picks up targets that have no owner, not only his owned targets/markers. I need to force the NPC to use only his owned targets/markers. Using a patrol package is possible, but the randomness to select targets/markers is not possible (or have i missed something?), but i need the randomness. Alternative to give the npc a small radius and place only his owned targets/markers in that area is possible but will cause that i cant let the npc go to targets/markers which are further away (also bad solution). Has anyone a idea, or am i missing here something with the UseOwnedOnly function ?! EDIT problem solved: I had a second faction on my NPC (who used not only the desired/owned targets/markers), but this faction was set to some targets/markers as ownership some time ago. Althoug i removed the ownership from these targets/markers, the targets/markers still had a ref to these faction as owned :wallbash: . Deleting these faction and making a new one (without attached again to these objects) solved the problem :dance:
  3. Hi, i need help again... The following script does not work (compile) for Fallout 4. I tried to get a script that turns on/off lights due to weather conditions. Rainy weather should turn on the lights and no more raining turn off the lights. If someone knows how this script should look like or has an funtioning script that turns lights on/off depending on weather conditions -> very happy!!!! Scriptname CBJE_LightOnWeather extends ObjectReference ObjectReference Property MainLight Auto Event OnInit() Self.StartTimer(1, 0) EndEvent Event OnTimer(int aiTimerID) If (Weather.GetCurrentWeather().GetClassification() == 2) GoToState("LightsOn") Else GoToState("LightsOff") EndIf Self.StartTimer(1, aiTimerID) EndEvent Event OnLoad() Self.StartTimer(1, 0) EndEvent Event OnUnload() Self.CancelTimer(0) EndEvent State LightsOn Event OnBeginState() MainLight.Enable() EndEvent EndState State LightsOff Event OnBeginState() MainLight.Disable() EndEvent EndState
  4. So i tested that script and it seems to function :dance: :dance: :dance: Only be careful when using (for testing...) "set gamehour to" this will break/irritate the script and causes CTD when loading another savegame again. @DieFeM thank you really for your help here, it helped me really a lot on realizing my new mod i am currently working on :smile: !!!! I will do a longtime test, but dont think that any serious things will happen (hopefully), if so i will report them!
  5. Hi, i need help... The following script from creationkit.com does not work (compile) for Fallout 4. I think it is caused by the "RegisterForSingleUpdateGameTimeAt" function that is not compatible with Fallout 4. I have no scripting experience, only know how to attach them, add properties and undertsand little bit how they work, but cant script by myself. If someone knows how this script should look like or has an funtioning script that turns lights on/off depending on ingame time i would be very very happy!!!! ScriptName TimedLightSwitch extends ObjectReference {Controls a set of lights with a master enable parent marker with this script attached to turn on and off at the times of the day specified by the properties LightsOffTime and LightsOnTime} float Property LightsOffTime = 7.0 auto {The time at which lights should be turned off} float Property LightsOnTime = 18.0 auto {The time at which lights should be turned on} float Function GetCurrentHourOfDay() global {Returns the current time of day in hours since midnight} float Time = Utility.GetCurrentGameTime() Time -= Math.Floor(Time) ; Remove "previous in-game days passed" bit Time *= 24 ; Convert from fraction of a day to number of hours Return Time EndFunction Function RegisterForSingleUpdateGameTimeAt(float GameTime) {Registers for a single UpdateGameTime event at the next occurrence of the specified GameTime (in hours since midnight)} float CurrentTime = GetCurrentHourOfDay() If (GameTime < CurrentTime) GameTime += 24 EndIf RegisterForSingleUpdateGameTime(GameTime - CurrentTime) EndFunction Event OnInit() If (ShouldLightsBeOff()) GoToState("LightsOff") Else GoToState("LightsOn") EndIf EndEvent State LightsOff Event OnBeginState() Disable() RegisterForSingleUpdateGameTimeAt(LightsOnTime) EndEvent Event OnUpdateGameTime() If (ShouldLightsBeOff()) RegisterForSingleUpdateGameTimeAt(LightsOnTime) Else GoToState("LightsOn") EndIf EndEvent EndState State LightsOn Event OnBeginState() Enable() RegisterForSingleUpdateGameTimeAt(LightsOffTime) EndEvent Event OnUpdateGameTime() If (ShouldLightsBeOff()) GoToState("LightsOff") Else RegisterForSingleUpdateGameTimeAt(LightsOffTime) EndIf EndEvent EndState bool Function ShouldLightsBeOff() {Validate the light state based on current time of day} float CurrentTime = GetCurrentHourOfDay() If (CurrentTime >= LightsOffTime) && (CurrentTime < LightsOnTime) return true Else return false EndIf EndFunction
  6. Thank you for your post SKK50, meanwhile Kitcat81 helped me here. The following script does exactly what i needed. I hope it helps others who have equal problem too! The script attached to a workshop object (chair, table whatever, more than one is possible) will count the amount and set it in a GlobalVar (in this case GlobalVar name is "x"). The GlobalVar hast to set in the properties of the script! When the object is destroyed or removed the value will change. GlobalVariable Property XObjectCount Auto Const ; the property must be filled with your global variable Event OnWorkshopObjectPlaced(ObjectReference akReference) XObjectCount.SetValue(XObjectCount.GetValue() + 1) ; adds 1 to the global count when the object is created in the workshop EndEvent Event onWorkshopObjectDestroyed(ObjectReference akReference) XObjectCount.SetValue(XObjectCount.GetValue() - 1) ; removes 1 from the global count when the object is destroyed or stored. EndEvent
  7. Hello, i need some help to solve this problem (my skills end here..), if someone has a solution i would be very very happy :smile: Problem: I want to find out the number of a certain item when it is placed in an settlement. This amount should be available in a GlobalVar, so that I can query this GlobalVar value within packages / conditions. For example: If in Covenant, Taffington Boatshouse and Sanctuary each one of this item is placed then the GlobalVar should contain "3" Right now i am already able to get the info if this object is in the local area placed by using the condition "LocationHasRefType" and assign the Furniture / item to my created ForceRefType category. Additional question: Is it ok to choose already ingame placed item (like a car or road sign) to let an NPC travel to that destination (with an individual package) or does it have to be an xmarker/xmarker heading?!
  8. Hi, thanks for your answer. I was very busy the last days... The thing is, that the escorts have an escort faction when not moved to a settlement. Are the escorts assigned (moved) to a settlement they have both a settler faction and escort faction. The clue would be to find out a way to control these two factions depending on their work times..... For now i have no idea how to solve this...
  9. Hello, I'm working on some improving the immersion of the mod Hookers of the Commonwealth SE (settlement edition). I´m beginner in modding and english is not my native language, what the hell... Here I need help with the following problem: If an escort has been assigned to a settlement, there are currently 2 options: 1. The escort can sandbox and be assigned like normal settler. 2. The escort can be assigned to one of the 3 escort rugs. Then the escort is around there 24/7. With the mod Settlement Markers https://www.nexusmods.com/fallout4/mods/20651 I have already been able to achieve that the escort has a daily routine (sleep, leisure, work). And if assigned to an escort rug no longer 24/7 standing around the rug. I wanted to reach that the Escort uses not only 1 Escort Rug during her working time, but several. What i did: I added the Actor Value Safety to the escort rugs in the CK. With the safety value 2, the escort can use up to 3 escort rugs. Removing the weapon drawn flag in the workshopguardsandbox package is an compromise and would go ok (if not the Escort always draws weapon when leaving an Escort rug). The problem is that the Escort also wants to use regular guard rugs, guard posts. Conversely, the regular guards also want to use escort rugs. Even if i assigned an Escort to 3 rugs it seems that she yet gets assigned sometimes to guard rugs as far as i tested. Any suggestions? ___________________________________________ If someone might have fun to work together on the hole project then let me know. The goal of the project is to create the prerequisite to build a possible immersive nightclub in a settlement. For this i try to improve the immersion of Hookers of the Commonwealth SE and Singin Settler. With the mod Singin Settler I have achieved by fitting, adding to the scenes and adding a global variable (as a song counter) and adding queries (Conditions) exactly that x songs are sung at least one piece, as well as coincidentally with 25% -30% Probability X + 1 songs are sung at one go and X + 2 songs are sung with about 12% probability. Alternatively, songs are sung without a break at one go. The duration of the breaks can be easily adjusted (in the CK...). Before this the singer always could only sing one song make standard break, next song and so on. During the breaks plays individual music. Solved (but not perfect) with a custom Jukebox and custom Soundoutpumodel. Things are still planned, ...as singer changes his clothes near his dressing cupboard and not on stage maybe only x times during worktime ...(should function somehow, because the singer also walks to his microphone!! caused by the singer break package -> targetselector->keyword akasingerfurniture). ...as Escort and player move to linked object placeable in a room (bedroom?!) But one after the other..... Cheers Citizenbari
  10. You can also try out Auto Doors https://www.nexusmods.com/fallout4/mods/8457
×
×
  • Create New...