Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

The Vyper

Allies
  • Posts

    693
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by The Vyper

  1. I'm running into an odd problem. I've set up a trigger zone to cause a non-unique linked reference to cast a spell at any actor who triggers it. The problem is that the reference will fire at the triggering actor once, and then fire straight north from that point on until the actor exits the trigger zone. If the actor then re-enters the trigger zone, the reference will again fire at them once and then start shooting north. The script I'm using is:

     

    	scn TestTrigZoneDingus01Script
    	Short Triggered
    	Ref Victim
    	Ref Dingus
    	Float Timer
    	Begin OnTriggerActor
    	 If Triggered == 0
       Set Triggered to 1
       Set Dingus to GetParentRef
       Set Victim to GetActionRef 
       Set Timer to 1
     EndIf
    	End
    	Begin GameMode
    	  If Triggered == 1
        If Timer <= 0
          Dingus.Cast MajesticDmgHealth10 Victim
          Set Triggered to 0
        Else
          Set Timer to Timer - GetSecondsPassed
        EndIf
      EndIf
    	End
    	

  2. 13 hours ago, HeyYou said:

    Couldn't you just remove the check for if the actionref is the player?

    I could, but then it would try to fire at the Player whenever any actor walked within range. I need some way to set other actors as the reference targets. Is there a way to set up a TriggerZone to have a non-unique linked reference fire at the triggering actor?

  3. 3 hours ago, ladyonthemoon said:

    It would be faster if you modified the spell itself so that it has a radius range, wouldn't it?

    Modifying the spells won't have any effect. The activator itself is what fires the spells at the Player once the Player gets in range. There are multiple versions of the vanilla script in question (at least one of which fires area effect spells at the Player), but all of them target the Player exclusively. I'm trying to find a way to script the activator to fire at any and all Actors in range. It never made sense to me that the vanilla activators only fired at the Player.

  4. I'm trying to modify the script for those spell-casting stones in Ayleid ruins so they target all actors in range instead of just the Player.

     

    The original script is:

     

    	scn ARTrapEvilStoneAUTOFIRE01SCRIPT
    	; come within range and this thing will shoot a fireball at you (range is 700)
    	float timer
    short ready
    short disabled
    short SpellRank
    	begin onActivate
    	    if isActionRef player == 0
            if disabled == 0
                set disabled to 1
                set timer to 0
            else
                set disabled to 0
            endif
        endif
    	end
    	begin gameMode
    	    if SpellRank == 0 && disabled == 0
    	        if getDistance player < 700 && timer <= 0
                playgroup forward 0
                set ready to 1
                set timer to 8
            
                ;This section will choose the trap spell based on the PC's level... hopefully
                if player.GetLevel <= 5
                    set SpellRank to 1
                elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 )
                    set SpellRank to 2
                elseif ( player.GetLevel >= 11 ) && ( player.GetLevel <= 15 )
                    set SpellRank to 3
                elseif ( player.GetLevel >= 16 ) && (player.GetLevel <= 20)
                    set SpellRank to 4
                elseif ( player.GetLevel >= 21 )
                    set SpellRank to 5
                endif
            endif
        endif
    	    if timer <= 4 && ready == 1 && SpellRank > 0
            ; check to make sure player is still in range
            if getDistance player < 700
                ;Debug message
                ;message "Rank %.0f Freezy Spell", SpellRank, 10
                if SpellRank == 1
                    cast StandardFrostDamageTarget1Novice player
                elseif SpellRank == 2
                    cast StandardFrostDamageTarget2Apprentice player
                elseif SpellRank == 3
                    cast StandardFrostDamageTarget3Journeyman player
                elseif SpellRank == 4
                    cast StandardFrostDamageTarget4Expert player
                elseif SpellRank == 5
                    cast StandardFrostDamageTarget5Master player
                endif
                set ready to 0
                set spellrank to 0
    	        endif
        
        endif
    	    if timer > 0
            set timer to timer - getSecondsPassed
        endif
        
    end
    	begin onReset
    	    reset3DState
        set SpellRank to 0
    end
    

     

    My modified script is:

     

    	scn AATestTrapStoneActor01SCRIPT
    	; come within range and this thing will shoot a fireball at you (range is 1400)
    	float timer
    short ready
    short disabled
    short SpellRank
    Ref Actor
    	begin onActivate
         
         Set Actor to GetActionRef
    	        if disabled == 0
                set disabled to 1
                set timer to 0
            else
                set disabled to 0
            endif
        
    	end
    	begin gameMode
    	    if SpellRank == 0 && disabled == 0
    	        if getDistance Actor < 1400 && timer <= 0
                playgroup forward 0
                set ready to 1
                set timer to 8
            
                ;This section will choose the trap spell based on the PC's level... hopefully
                if player.GetLevel <= 5
                    set SpellRank to 1
                elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 )
                    set SpellRank to 2
                elseif ( player.GetLevel >= 11 ) && ( player.GetLevel <= 15 )
                    set SpellRank to 3
                elseif ( player.GetLevel >= 16 ) && (player.GetLevel <= 20)
                    set SpellRank to 4
                elseif ( player.GetLevel >= 21 )
                    set SpellRank to 5
                endif
            endif
        endif
    	    if timer <= 4 && ready == 1 && SpellRank > 0
            ; check to make sure player is still in range
            if getDistance Actor < 1400
                ;Debug message
                ;message "Rank %.0f Freezy Spell", SpellRank, 10
                if SpellRank == 1
                    cast StandardFrostDamageTarget1Novice Actor
                elseif SpellRank == 2
                    cast StandardFrostDamageTarget2Apprentice Actor
                elseif SpellRank == 3
                    cast StandardFrostDamageTarget3Journeyman Actor
                elseif SpellRank == 4
                    cast StandardFrostDamageTarget4Expert Actor
                elseif SpellRank == 5
                    cast StandardFrostDamageTarget5Master Actor
                endif
                set ready to 0
                set spellrank to 0
    	        endif
        
        endif
    	    if timer > 0
            set timer to timer - getSecondsPassed
        endif
        
    end
    	begin onReset
    	    reset3DState
        set SpellRank to 0
    	end
    	

    This does absolutely nothing; it doesn't fire at anyone or anything, or even play any animations. What do I need to do to get this thing to fire at every creature and/or NPC in range?

  5. Its probably not working because GetActionRef does have issues outside of 'onactivate' or 'ontrigger' events.

     

    http://cs.elderscrolls.com/index.php?title=GetActionRef

     

    So your GetActionRef probably is NULL when you attempt to use it.

     

    There are probably ways around it, setting a variable, then in an update event, check if the variable is set, then do the commands. That would get you to the next frame.

    Ahh, I forgot about the GetActionRef issue. Well, that complicates issues a bit. I just tried using a GameMode block in the script also to no avail:

    
    
    
    
    scn BlarneyInfiltrationAmuletObjectScript
    
    
    
    Short AAWearing
    
    Ref Wearer
    
    
    
    Begin OnEquip
    
      Set Wearer to GetSelf
    
      Set AAWearing to 1
    
    End
    
    
    
    Begin GameMode
    
      If AAWearing == 1
    
        Wearer.SetFactionRank BlarneyFaction, 0
    
      ElseIf AAWearing == 0
    
        Wearer.SetFactionRank BlarneyFaction, -1
    
      EndIf
    
    End
    
    
    
    Begin OnUnEquip
    
      Set AAWearing to 0
    
    End

    Again, I get no error messages when saving the script, but I also get no results in game. Is there any way to actually set this up so it's non actor-specific?

  6. I'm try to create an amulet that will add somebody (Player or NPC) to a faction when equipped, then remove them from the faction when unequipped, but I can't seem to get it to work. My current script is:

    
    
    
    
    scn BlarneyInfiltrationAmuletObjectScript
    
    
    
    Ref Wearer
    
    
    
    Begin OnEquip
    
    Set Wearer to GetActionRef
    
    Wearer.SetFactionRank BlarneyFaction, 0 ;BlarneyFaction is a custom faction unique to this mod
    
    End
    
    
    
    Begin OnUnEquip
    
    Wearer.SetFactionRank BlarneyFaction, -1
    
    End

    I get no errors when I save this script, but see no results in game. What do I need to do to get this to work on NPCs as well as the Player?

  7. Removing the in game name from the door ("East Wing" in this case) is the only way to prevent the destination from showing up. There is a workaround for this, but I'm not sure how "companion friendly" it is.

     

    1. Place two normal doors in the door frames and link them as normal. Position your teleport markers where you want them.

     

    2. Move the doors (but NOT the teleport markers) below the floor so the meshes can't be seen.

     

    3. Make sure both doors are set as Persistent references and give both doors unique Ref IDs. I'll use "ToEastWingRef" and "FromEastWingRef" for scripting purposes.

     

    4. Create two activators that use the same mesh as the door you wish to use (this may require unpacking the mesh from the .bsa). I'll use ToEastWingAct and FromEastWingAct for their editor IDs. Give them in game names appropriate to their function. (i.e., name the ToEastWingAct "East Wing" and the FromEastWingAct "Main Hall", or wherever it is that you'll be teleporting).

     

    5. Attach the following script to the ToEastWingAct activator:

    scn EastWingActScript

     

    Begin OnActivate Player

    ToEastWingRef.Activate Player, 1

     

    End

     

    6. Attach the following script to the FromEastWingAct activator:

    scn EastWingActScript

     

    Begin OnActivate Player

    FromEastWingRef.Activate Player, 1

     

    End

     

    7. Place the ToEastWingAct activator where the door to the east wing goes, then place the FromEastWingAct activator where the return door goes.

     

    That should give the appearance of teleporting while also keeping the destination from showing. As long as you have a SubSpace around the East Wing area, NPCs will know they need to use a door to get there. With the actual teleport doors placed just below the floor, NPCs may be able to activate them and teleport. It might help to rotate the doors so they are parallel to the floor.

  8. Edit: Solved Okay, new question. I'm trying to script an activator to work in the following manner:

    1. Player activates the activator.

    2. A messagebox appears, giving the Player a number of options to select from.

    3. Once the Player chooses an option, the activator disables itself for three days.

    4. Once three days have passed, the activator re-enables itself.

    The script I have so far is:

    
    scn TestMultiChoiceActivatorScript
    
    short Chosen
    
    short Button
    
    Begin onactivate Player
    
    Messagebox "Choose item" "Sword" "Shield" "Bow" "Axe" "Mace"
    
    End
    
    Begin GameMode
    
    Set Button to GetButtonPressed
    
    If Button == 0 && Chosen < 1
    
    Player.AddItem VypSwordLL 1 ;IDs ending in LL are custom leveled lists
    
    Set Chosen to 1
    
    ElseIf Button == 1
    
    Player.AddItem VypShieldLL 1
    
    Set Chosen to 1
    
    ElseIf Button == 2
    
    Player.AddItem VpyBowLL 1
    
    Set Chosen to 1
    
    ElseIf Button == 3
    
    Player.AddItem VypAxeLL 1
    
    Set Chosen to 1
    
    ElseIf Button == 4
    
    Player.AddItem VypMace 1
    
    Set Chosen to 1
    
    Else
    
    Return
    
    Endif
    
    End
    
    
    

    As currently written, that script will only work once, but I need it to work once every three days. How can I set this up so that I can place multiple instances of the activator without needing a unique script for each placement?

  9. Just saw Top Gun in IMAX 3D. The conversion was good and the film looked great, but that wasn't my primary reason for going. My father took me to see Top Gun when it first hit theaters 27 years ago. Granted, the film is a bit mature for a 9-year-old, but I've been fascinated with military aircraft since I was...ummm...born, I think?

    I greatly enjoyed the film at the time, even though I saw a lot of (technical) flaws in it. Seeing it in theaters again was a wonderful trip down memory lane, even though dad's not here to share it.

    Anyone else get to see it, then or now?

  10. What did he change for the films?

    A lot of things, some small, some not.

    The Hobbits originally got their weapons (except for Sting) in the Barrowdowns, not from Aragorn.

    The giant eagles actually talk. Gwaihir (the one that rescued Gandalf from Isengard) was originally sent by Radagast the Brown.

    Aragorn originally received Anduril, Flame of the West, from the sons of Elrond (not Elrond himself) before he met Theodin King in Rohan.

    The Ents originally voted in favor of war before Treebeard saw the devastation of Fangorn wrought by Saruman's Uruk-Hai.

    The Dunedain (long-lived humans like Aragorn) originally helped win the Battle for Gondor. The army of the dead merely helped to take the black ships.

    These are just a few of the changes PJ made. I still think he did a decent job, though.

  11. Hmm...favorite movies...this could take a while.

    Top Gun - Probably my favorite film of all time (and one of the best soundtracks ever). I've been studying military planes since before I could read. I can tell you that the final dogfight scene would never have happened (and why), but I'm glad they put it in. It's the best fictional aerial combat I've ever seen on film.

    Tron - I got a huge kick out of that film. End of line.

    The Dark Crystal - I still enjoy this one. It's also a hit with my nephews.

    The Never Ending Story - It was fun watching Boxey ride a luckdaggit while D.A.R.Y.L. read all about it. :P

    Original Star Wars trilogy - These were awesome. I remember seeing Empire Strikes Back in theaters with my dad when I was just 3. That was fun. A bit confusing for a 3-year-old, but still fun.

    Rumble in the Bronx - Jacki Chan. What more need be said?

    Back to the Future trilogy - These are fun films to watch.

    The Bourne Trilogy - Even though these films aren't even remotely close to the books they're "based" on, they're still really good.

    Mission Impossible I & III - I didn't like the second one and I haven't seen Ghost Protocol, but the first and third are great.

    The Protector - Tony Jaa goes on an epic journey to rescue his pet elephant. Oh, and there's some Muy Thai action here and there. And a few other places.

    Ong-Bak 1, 2, & 3 - More Tony Jaa and some of the best stunts ever performed on screen. No stunt doubles were used for anything or anyone.

    Godzilla 2000 - I'm a big Godzilla fan, so being able to see this in theaters was a real treat.

    That's all I can think of for now.

  12. Unfortunately, Oblivion does not allow much in the way of 'reusability' like you are trying, there really are not any commands for it. (The later games do, especially Skyrim.)

    I am not sure how you would make a 'copy & paste' feature like you want that would work in all cells.

    :( That's what I was afraid of. Oh well, it never hurts to ask. :) Looks like I'll have to make a single color for all levels or use the SetTexturePath command in OBSE.

  13. I am not really sure I follow what you want.

    Yeah, I was in a rush and wasn't sure if I was explaining things right.

    I think you want the stone to enable based on the players level when they enter the cell.

    Yes, but only if it hasn't been enabled and activated within the last seven days.

    Since each script attached to each object will retain its own set of values, you just have the on-load check when it was 'enabled' last and if the time requirement has elapsed or has never been set, then you disable all stones but the one you want based on the players level.

    That's easy enough, but doesn't quite solve the potential problem I foresee:

    1. A level 4 Player character enters Cell01 on day 1. The level 1 stone is enabled and taken by the character.

    2. On day 2, character levels up (character is now level 5; level 2 stones will now be enabled onload).

    3. On day 2 (or any day before day 7), Character enters Cell01 again.

    At this point, less than seven days have passed since the Player grabbed the level 1 stone in Cell01. However, since the Player's level has now increased to the point where level 2 stones will be enabled, I need to find some way to keep the level 2 stone from being enabled in Cell01 until day 7.

    What makes this harder is that I need it to be generic. By that, I mean a single setup that can be used across multiple cells without requiring unique scripts for each cell.

    Is there any way to set things up so that the setup & scripts used in Cell01 can also be used (without modification) in multiple other cells? If needed, I could resort to placing a single activator and use the SetTexturePath OBSE function to change its color depending on Player level, but I don't like making OBSE dependent mods.

  14. I'm working on an update for my Ayleid Power Stones mod that I hope to release sometime next month. In the current version of APS, there are five levels of power stones that all use the same mesh (the same way sigil stones do). The Player activates an activator (that also uses the power stone mesh) and a leveled list is added to the Player's inventory. Here's the script:

    
    ScriptName APSActivatorScript
    
    
    short StartDay
    
    Begin onactivate Player
    
    
    Message " "
    
    Message " "
    
    Player.AddItem APSMasterList 1 ;a nested leveled list that will add a level appropriate stone to the Player inventory
    
    PlaySound ITMGenericUp
    
    Set StartDay to GameDaysPassed
    
    Disable
    
    End
    
    
    Begin GameMode
    
    If ( GameDaysPassed - StartDay ) >= 7 && GetDisabled == 1
    
    Enable
    
    EndIf
    
    
    End
    
    

    I want to change things up a bit. For this version, I want to include 5 different colored stones; one color for each level of stone (5 in all). For this to work, I'll need to place all five power stone activators in the exact same spot in each cell they're in, set them to "initially disabled", and script each one with an onload block that checks the Player's level to ensure only the level appropriate activator gets enabled. That, I can do.

    Here's an example of what I want to happen:

    1. Player enters Vilverin01 on Sundas and grabs a level 3 stone, then leaves Vilverin entirely. It will be seven days until the stone "regenerates" and can be taken again.

    2. Player levels up on Morndas, enabling him/her to get level 4 stones.

    3. Player returns to Vilverin01 right after leveling up and finds no power stone.

    4. Player proceeds to Vilverin02 (previously unvisited) and finds a second power stone, this one level 4.

    5. Player finds another power stone (also level 4) in Vilverin03.

    No. 3 is where I run into a problem. How can I script the stones so that a level appropriate activator will be enabled in a particular cell onload only if the previous level activator was not activated/enabled within the past seven days?

    I need to script this as generically as possible (like the script above) so that what happens with the power stones in one Ayleid ruin would not keep the power stones in any other Ayleid ruin from spawning. Is that even possible without A} using persistent references and B} making ruin-specific activators?

  15. Set the C of G to the centre of the object by changing the z coordinate. You can see the C of G as a small cross in the mesh. Hopefully all you need to change is the z coordinate. Moving it up so that it is closer to the centre of the mesh should fix your problem. Or you can set the MOI of the x and y axes so that they are much higher. This would make the object less likely to rotate around those axes - therefore it won't right itself.

    The C of G is just called Centre in the collision block (bhkRigidBody or bhkRigidbodyT).

    Thanks again! :D Modifying the Center setting was exactly what I needed. The mesh rolls a bit too much when on its side, so there's still some minor tweaking to do (I think increasing the inertia along the X axis should do it). But at least it doesn't try to "stand up" any more.

    I love learning new tricks! :dance:

    I think it is much easier using nifskope, to right-click on the NiTriStrips (or whatever the base block is for the object pieces) and select >Transform >Edit.

    You can then move the mesh piece around and watch where it goes in the view window. This is how I move my objects around the 'center' of the mesh.

    For some reason, this method had no visible effect in game. :shrug: Still something to remember for future reference, though.

  16. I think I understand your question Viper but I`m not very good with NifSkope. Maybe this can help..? :shrug:Link

    Thanks Don! :D I never even knew that site existed. I think it'll come in pretty handy.

    You need to fix the inertia matrix. You have to set the inertia values for each of the major axes. For a mass of 6, try setting m11 to 30, m22 to 35 and m33 to 15. Play with those values until you get the behaviour you want. A higher value is more inertia, so it moves slower. m11 controls the rotation around the x axis, m22 is the y axis and m33 is the z axis.

    Thanks! That solved the rotation problem nicely, but it revealed another one; apparently the "center of gravity" on the modified .nif is very near the bottom. I can send it spinning all over the place, but when it stops all directional movement, it rotates to stand almost vertical rather than resting on its side like it should (a lot like those fun "Bop Bags"). The mesh contains four closely linked components: the great welkynd stone itself, the flare (glowing aura) surrounding it, and two "cloud emitters" (for particle effects). How can I alter the center of gravity so that 1) the mesh stays on whatever side it lands on and 2) the four components stay properly aligned with one another?

  17. I'm trying to add some Havok behavior to a modified version of the Great welkynd Stone (ARGreatWelkyndStoneItem01). I have it working almost right; the new stone moves around when hit, grabbed, etc. The problem is that its axial orientation doesn't change. It will move through space, but will not rotate on any axis. I've used NifSkope to match every havok-related setting I can find with those of a regular welkynd stone, but I still can't get the rotation effect.

    Here are some more pertinent details:

    NiTriStringExtraData:

    Mass = 6.000000

    Ellasticity = 0.300000

    Friction = 0.300000

    Unyielding = 0

    Simulation_Geometry = 2

    Proxy_Geometry = c_ARGreatWelkydStoneItem01

    Use_Display_Proxy = 0

    Display_Children = 1

    Disable_Collisions = 0

    Inactive = 0

    Display_Proxy = <None>

    Collision_Groups = 1

    bhkRigidBody:

    OblivionLayer (both Layer & Layer Copy): OL_CLUTTER

    hkResponseType: RESPONSE_SIMPLE_CONTACT

    MotionSystem: MO_SYS_SPHERE

    DeactivatorType: DEACTIVATOR_SPATIAL

    SolverDeactivation: SOLVER_DEACTIVATION_LOW

    Motion Quality: MO_QUAL_DEBRIS

    What else do I need to change to make this work?

  18. What I suggest is setting a global in the switch script.

    Then in the room with the 'door', you can have a trigger zone that checks for the global. If its set, you then activate the gate.

    Good idea. :thumbup: Unfortunately, I got the same result: no gate activation. :shrug: I give up. :whiteflag: I'm going to have to find some other way of making this light world/dark world setup work. Luckily, I have some ideas on that front.

  19. The 'activate' (will not work) has problems when the object being activated is not loaded into memory. That is why it works after visiting the cell, the object has now been loaded to memory.

    Instead of using activate, why don't you use SetOpenState? It does not need the object loaded into memory.

    My understanding of the OpenState functions is that they only work on doors, but ARGate01 is an activator. Even so, I tried using SetOpenState anyway and got the same result: nothing. I re-checked the wiki to make sure I was using it right and noticed this part:

    Will animate open/closed if the door is loaded.

    My understanding of GameMode blocks is that they run every frame until told to stop. I thought setting references and shorts in onactivate blocks would cause subsequent blocks to use those settings. If that's true, then the 'activate' command wouldn't occur until both Blarney and GetInCell Player equal 1, which should only happen if the Player enters Cell01b after activating the switch. In that case, the gate in question would be loaded when the 'activate' call is made by the GameMode block.

    I know one switch (activator) can be set to activate an activator in another cell because at least two Oblivion realms do this. Random World 2 has four small towers, each with a switch inside it that activates a war gate outside. Random World 4 has two small towers; one has a switch that extends a bridge (activator) linking the two, the other has a switch that extends two bridges linking to the sigil tower. The scripts on the associated switches use the same variables and generic language as ARSwitch01Script and it works fine.

    There has to be some way of making this work, but I just can't figure it out. Should I just scrap the mod and move on?

×
×
  • Create New...