Jump to content

Ghaunadaur

Supporter
  • Posts

    796
  • Joined

  • Last visited

Posts posted by Ghaunadaur

  1. Don't start the script with a comment. You can add a documentation string underneath the header like you did with the ActorBase property.

    Scriptname MassReanimate extends ObjectReference
    {Mass Reanimate trigger script}
    
    Also remove the brackets behind PlayerRef, and there's a doubled up endif in the OnTriggerEnter block.
  2. @Arvaaperekele

    You could also use OnPlayerCameraState to trigger when the player is dismounting a horse.

     

    Example

    Event OnInit()
       RegisterForCameraState()
    EndEvent
    
    Event OnPlayerCameraState(int oldState, int newState)
       if (oldState == 10 && newState != 10)
          ; player is dismounting
       endif
    EndEvent
    
  3. The script should extend ReferenceAlias. Also, you copied the script code to the documentation field. That's just a description for the script, so you can leave that empty, and press OK to generate the script.

     

    Now you should have a blank script with just the header line. Right click on the script and select 'edit source' to open the editor. Copy the rest of the code and compile it.

  4. One way to do this:

    Make a new quest and set it start game enabled. Then add a reference alias to quest, for fill type choose specific reference and pick PlayerRef.

    Add this script to the reference alias (give it a more unique name)

    Scriptname GhostScript extends ReferenceAlias
    
    Spell Property FlamesCustom auto
    EffectShader Property GhostFXShader auto
    
    Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference)
    	if (akBaseObject == FlamesCustom)
    		GhostFXShader.Play(GetActorReference())
    		GetActorReference().SetAlpha(0.25)
    	endif
    EndEvent
    
    Event OnObjectUnequipped(Form akBaseObject, ObjectReference akReference)
    	if (akBaseObject == FlamesCustom)
    		GhostFXShader.Stop(GetActorReference())
    		GetActorReference().SetAlpha(1.0)
    	endif
    EndEvent
    

    After that, fill the properties. GhostFXShader is the ghost effect, just hit the auto-fill button to fill it. FlamesCustom would be your spell, you can rename it to the EditorID, so it will auto fill too.

  5. I just realized that the RemoveKeywordFromRef function is exclusive to the SSE version of Papyrus Extender.

    The LE version has a ReplaceKeywordOnRef function, which in theory could work too, but sadly it only lasts for the current game session. :confused:

     

    Sorry about the confusion. Unfortunately I can't think of a practicable way to add and remove keywords for random NPCs, at least for Skyrim LE.

  6. I think you have 2 options.

    1. Papyrus Extender has 'AddKeywordToRef' and 'RemoveKeywordFromRef' functions.

    2. Or use a quest alias. For this method, set up a quest with a reference alias for the player, but leave it empty.

    Make sure to check the 'optional' flag and add the keyword to the alias.

    Then use following script on the magic effect, fill the properties.

    Scriptname SomeScriptName extends ActiveMagicEffect
    
    Actor Property PlayerRef auto
    ReferenceAlias Property PlayerAlias auto
    
    Event OnEffectStart(Actor akTarget, Actor akCaster)
    	if (akTarget == PlayerRef)
    		PlayerAlias.ForceRefTo(PlayerRef)
    	endif
    EndEvent
    
    Event OnEffectFinish(Actor akTarget, Actor akCaster)
    	if (PlayerAlias.GetActorReference())
    		PlayerAlias.Clear()
    	endif
    EndEvent
    

     

  7. xedit is just FO4/SSEdit etc, so you use SSEedit to de-localise, this puts the strings from the english (or your main language) back in the esp? Then you alter and localise again to make new strings?

    Yeah, I know xEdit. What I meant so say was that I never tried to edit a localized plugin with it, so I can't tell if the strings are updated. I know that Creation Kit doesn't. That's why I de-localize the esp, make my edits, then localize again. This method worked well for me. Yes, by de-localizing, the strings will be written back into the esp file.

     

     

    I've been looking at xtranslator, if I understand it correctly, I can make a dictionary of already translated terms from the old strings files such that after localising again I can use that dictionary to translate new strings files? Presumably any new strings shown in xtranslator would be in my main language(english) unless I then manually translated them?

    Exactly. If you exported the translation to a sst file previously, you can just import it again, so you only need to translate the newly added text.

  8. Each time the esp is changed, chances are that the string ID's in the plugin and in the strings files are no longer matching. That would need to be tested in game or checked with xTranslator. I found it safest to redo the strings files after updating the esp.

     

    Same applies to outdated translations. But then it's up to the mod users to ensure they're not using an outdated translation.

     

    Not sure about xEdit, never tried that. I always de-localize the plugin before making any alterations.

  9. I have read allusions to, but no actual statement to the effect, that a mod esp can have automatic translations for a user if one includes strings file with it, one for each language. Some allusions referred to strings files in bsa files, and others to loose files. So, difficulty aside, is this correct?

    Yes, .esp files can be localized with SSEEdit. It's easy to do, just right click on the plugin and choose Other -> Localization -> Localize plugin.

    SSEEdit will then create 3 strings files in the Data\Strings folder, for example

     

    MyMod_English.STRINGS

    MyMod_English.DLSTRINGS

    MyMod_English.ILSTRINGS

     

    Make copies of and rename the files for different languages. In my experience, certain strings won't display correctly when packed in a compressed BSA, and you will get an <lookup failed> error. So either leave the BSA uncompressed or use the loose files.

     

    If it is, then presumably it only applies to the esp but not scripts (message boxes etc.) but I see no reason why a messsage box couldn't display a msg property in the esp.

    That's correct. The strings files will only contain the text that would normally be stored in the .esp file. Text in scripts is not included.

     

    If so, is a strings file in a format that can be given to a translator and it easily altered to suit?

    I'm using xTranslator for editing strings files. Translations can be saved to a SST file and easily be loaded again if you need to make changes later.

  10. Another possibility would be to link those references to an enable parent, like an x-marker. Select all the refs, then press - key to open the batch window and link them to an enable parent all at once. Then select the the x-marker and press STRG+1 to toggle visibility. (If no longer needed, remove the links)

  11. Sorry, Ghaunadur, it is entirely possible. I've done it. I've given the method used. Check my mod Shades Of The Rift, If you like. Here, I remove and adjust textures in a vanilla cell. It works. Not sure why you say it's impossible when \i've done it.

     

    Please re-read the opening post. The OP wants to remove grass at a particular spot when a tent or bedroll is placed there, and add it again when removed, dynamically. I guess it's for a camping mod. This is not possible.

     

    The method you're describing is the process of changing ground texture at a fixed spot with the Creation Kit. There's nothing wrong with that, it's just not what the OP is trying to do.

  12. An easy solution to this would be to place a trigger box at the entrance of Whiterun and add a script to it, that checks for the player level.

    Example:

    Actor Property PlayerRef auto
    Book Property BookToAdd auto
    
    Event OnTriggerEnter(ObjectReference akActionRef)
    	if (akActionRef as Actor == PlayerRef)
    		if (PlayerRef.GetLevel() >= 40)
                            GotoState("Done")
    			PlayerRef.AddItem(BookToAdd, 1)
    			Debug.Notification("Book added to player")
    		endif
    	endif
    endEvent
    
    State done
       ;done
    EndState
    
×
×
  • Create New...