Jump to content

DieFeM

Supporter
  • Posts

    874
  • Joined

  • Last visited

Posts posted by DieFeM

  1. I'd say the timer should be outside of the distance conditional.

    Function PlayCustomSound()		; code of the function
    	If Game.GetPlayer().GetDistance(Self) <= 1000	; player is within 1000 game units to this reference
    		RCA_JuggernogJingle.Play(Self)		; play the sound
    	EndIf
    	StartTimerGameTime(0.25, 555)			; restart the timer
    EndFunction

    That way it will continue looping the timer, even if you are more than 1000 units away, until it unloads.

  2. If you look at WorkshopScript.psc you'll notice this property is marked as a constant

    ActorBase Property CustomWorkshopNPC Auto const

    Unfortunately this property cannot be changed during runtime.

    Edit: As the comment of this property points out, this property is meant to override the one in the workshop parent script, so it is probably not set in the workshop reference.

    You can only set that manually, in the CK, editing the script properties, in the object reference from the worldspace/interior, in the render window.

    Quote

    { Patch 1.4: the actor that gets created when a settlement makes a successful recruitment roll - overrides properties on WorkshopParentScript }

     

  3. Let say you have the workshop reference as a property, like this:

    ObjectReference Property WorkshopRef Auto

    You can either replace ObjectReference with WorkshopScript, like this:

    WorkshopScript Property WorkshopRef Auto

    Or you can cast the ObjecetReference as WorkshopScript

    WorkshopScript CastedWorkshopRef = WorkshopRef As WorkshopScript

    Or you can just use (WorkshopRef As WorkshopScript)

    When you have a WorkshopScript object, you only need to assign the new ActorBase like this:

    WorkshopRef.CustomWorkshopNPC = YourBaseNPC

    or

    CastedWorkshopRef.CustomWorkshopNPC = YourBaseNPC

    or

    (WorkshopRef As WorkshopScript).CustomWorkshopNPC = YourBaseNPC

    There might be other methods, but I never needed anything fancier than that.

    • Thanks 1
  4. I never created a mod with MCM, but out of curiosity I've downloaded the demo plugin, and checked config.json, there's an ON/OFF that calls a function:

            {
              "id": "bEnabled:Main",
              "text": "Mod Enabled",
              "type": "switcher",
              "help": "Controls whether the mod is enabled. (demo for ON/OFF switcher control)",
              "valueOptions": {
                "sourceType": "ModSettingBool"
              },
              "action": {
                "type": "CallFunction",
                "form": "MCM_Demo.esp|800",
                "function": "DoActionDemo",
                "params": ["{value}"]
              }
            },

    I guess MCM will replace {value} with true/false depending on the option and passes it to DoActionDemo as argument.

    • Like 2
  5. My suggestion:

    Event/Function ToInitilaize()
    	RegisterForDistanceGreaterThanEvent(Center, NPC, X)
    	RegisterForDistanceLessThanEvent(Center, NPC, X)
    endEvent/Function
    
    Event OnDistanceLessThan(ObjectReference akObj1, ObjectReference akObj2, float afDistance)
    	RegisterForDistanceGreaterThanEvent(Center, NPC, X)
    	;Equip hazmat
    endEvent
    
    Event OnDistanceGreaterThan(ObjectReference akObj1, ObjectReference akObj2, float afDistance)
    	RegisterForDistanceLessThanEvent(Center, NPC, X)
    	;Unequip hazmat
    endEvent

    PS: RegisterForDistanceX registers to receive a single OnDistanceX event, so that you need to register again each time a distance event is received.

    9k18nu.jpg

    • Like 1
  6. Check the first example here: https://falloutck.uesp.net/wiki/RegisterForMagicEffectApplyEvent_-_ScriptObject

    Note that it registers a single event, so you'd need to re-register on every event to continuously checking for magic effects applied.

    For example:

    Event OnInit()
    	RegisterForMagicEffectApplyEvent(Game.GetPlayer())
    EndEvent
    
    Event OnMagicEffectApply(ObjectReference akTarget, ObjectReference akCaster, MagicEffect akEffect)
    	;/ do your thing /;
    	Debug.Trace(akCaster + " applied the " + akEffect + " on " + akTarget)
    	;/ re-register for next effect /;
    	RegisterForMagicEffectApplyEvent(Game.GetPlayer())
    EndEvent

     

  7. Game.GetPlayer() returns an Actor, but akReference is an ObjectReference, I'd say you need to cast the player to an ObjectReference: if akReference == (PlayerRef As ObjectReference)

    but there's another thing, akReference is not meant to be the Actor who equiped the object, but the reference of the object that was equiped by the actor.

    https://falloutck.uesp.net/wiki/OnItemEquipped_-_Actor

    • akReference: The reference that the actor just equipped - if the reference is persistant. Otherwise, None.
  8. Yeah, complex conditions are a headache. There's documentation on how to use them, but the lack of parenthesis makes it an absolute mess.

    Quote

    For example, the expression

    • ((A AND B) OR (C AND D))

    Can be represented by the logically equivalent list of Condition Items

    • (A OR C AND B OR C AND A OR D AND B OR D).

    https://ck.uesp.net/wiki/Category:Conditions#Complex_Conditions

    You have to have a very clear mind to try to make any sense of that gibberish.

  9. 4 minutes ago, Lollia said:

    Hold the phone... 🫢 Can I do that? I was under the impression that if I made all the companion checks ANDs that it would fail, because not all of the checked companions could be currently following at the exact same time.

    Well, not all companions can be currently following you at the exact same time, that's right, and that's why the first example works, but all companions can be "NOT following" you at the same time, that's the point.

    So when you check if they are not following you, you need to use AND, because none (AND) of them should be following you, as opposite to any (OR) of them should be following you.

    So when you use OR, as soon as one of them is true the whole stack of contiguous OR is true.

     

    • Like 1
  10. 9 hours ago, Lollia said:

    Now here's a sample of the conditions to ALLOW certain dialogue responses to play if some of the vanilla companions are NOT CURRENTLY following the player:

    PL      GetValuePercent      Actor Value: 'Health'                >            0.50        AND
    PL      GetLevel                       NONE                                      >=          55.00      AND
    R        GetInFaction              CurrentCompanionFaction     ==         0.000      OR       (Danse)
    R        GetInFaction              CurrentCompanionFaction     ==         0.000      OR       (Deacon)
    R        GetInFaction              CurrentCompanionFaction     ==         0.000      OR       (Nick)

    This one is a rebel and does not work in the slightest degree. It delights in ignoring the CurrentCompanionCondition when it is set to 0. INFURIATING. 😡

    With this condition, no matter what companion you have, or if you have any, it's always to be true as soon as you meet the health and the level.

    For example, if you have Danse as companion, Deacon and Nick would still return 0. Since you're using OR it will always be true, because there is going to be at least 2 of them that are not your companion.

    The solution would be to use AND instead. Danse is not your current companion AND Deacon is not your current companion AND Nick is not your current companion.

    • Confused 1
  11. I suspect the problem is that most fixes rely on a very small number of individuals, maybe just one or two people, which have very rare skills, like making plugins for F4SE and interface mods. In which mods rely many of the DLC sized mods, like, for example, pipboy tabs and extended dialogue interface. They probably are doing their best effort to get these mods working again, but I'm certain they are waiting for bethesda to stop throwing updates, so I'd say we'd need to wait at least a month, maybe.

  12. So, I was scraping things at bunker hill, when I've found something was different, the pillars look like they don't belong there, so that I've search for some screenshot in Google, and yes, they are different than they used to be, is that something from my mods, or they changed them in the next-gen update? 

    My game now:

    ASqW9T.jpg

     

    How it used to be:

    EWo0tc.jpg

  13. No idea how NV does it, sorry. What I've observed is that each limb (or limbs combination) has it's own swf file in the ConditionClips folder, so you would need to create each of the poses of the animation for each limb swf and replace them, I guess you could place the same image in all frames and get a static image if it is too many combinations to draw, also the head is located in a separate swf file, so you need to make sure all your drawings have the head in the same relative position. 

    I'd try to implement just the healthy body and head, and if it works then go with the broken limbs.

    Good luck.

  14. Nifskope used to show textures from vanilla models if I had the resources configured in the settings which is, usually, automatically configured upon installation.

    But now it fails to load all textures, I guess it happens for the same reason xEdit didn't load archives until it got an update that allowed this newer version.

    So, my question is: Is there's any beta or maybe a third party version of nifskope which is able to load next gen ba2 archives?

    Also that could be a misconfiguration on my part, in which case, could anyone tell me if nifskope is actually working with next gen archives?

     

    Thanks in advance.

  15. Whilst using Archive2.exe to pack a lot of new assets, which most never were packed before, I noticed it detects invalid texture formats, among other errors, so it processes the input files. I mean, it does not just pack them like zip or tar. So my guess is that the processing of the files is what has been updated, it probably performs tests that it didn't do before, so I think that this testing, by the output file, doesn't make any difference if the input was already processed, but the new version assumes that certain problems don't occur in an archive packed within this version.

×
×
  • Create New...