Skyrim:Notepad++ Einrichtung

Aus Skript-Wiki
Version vom 22. August 2012, 17:54 Uhr von Keris (Diskussion | Beiträge) (Die Seite wurde neu angelegt: Notepad++ ist ein Fereware-Texteditor, zum Editieren und Compilieren von Papyrusscripts genutz werden kann. Es kann von der offiziellen [http://notepad-plus-plus.org/do...)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Wechseln zu: Navigation, Suche

Notepad++ ist ein Fereware-Texteditor, zum Editieren und Compilieren von Papyrusscripts genutz werden kann. Es kann von der offiziellen official Notepad++ Site herunter geladen werden. Notepad++ unterstützt Nutzer-definiertes Hervorheben von Syntaxkomponenten und Auto-Vervollständigen, Ausklappen und kann aufgerüstet werden, um Papyrusscripts schnell zu übersetzen. Damit steht eine stabilere Option zur Verfügung als der einfache eingebaute Texteditor.

Installation der Schnell-Übersetzung von Papyrusscripts

  1. Öffne Notepad++
  2. Drücke F5 (run)
  3. Füge die folgende Zeile in die Eingabe im "Run..."-Dialogue-Window in Notepad++ ein:
    "C:\Program Files (x86)\Steam\steamapps\common\skyrim\Papyrus Compiler\ScriptCompile.bat" "$(FILE_NAME)" "$(CURRENT_DIRECTORY)"
    Beachte: Innerhalb der ersten Anführungszeichen sollte der Pfad zu dem Verzeichnis eingefügt werden, in dem sich die ScriptCompile.bat-Datei befindet.
  4. wähle Save...
  5. Nenne es irgendwie sinnvoll wie z.B. "Compile Papyrus"
  6. Erzeuge ein Tastenkürzel falls gewünscht, so wie z.B. CTRL+F5.
  • Man findet das neue Tastenkürzel unter der Menüoption Run oder benutze einfach die Tastatur

(Wenn man feststellt, das bei der Nutzung des Tastenkürzels nichts passiert, sollte man doppelt prüfen, dass man das Tastenkürzel mit der ScriptCompile.bat-Datei und nicht mit der PapyrusCompiler.exe verknüpft hat).

  • man kann das Tastenkürzel unter dem Kommando „Run -> Modify Shortcut/Delete“ ändern
  • Dies compiliert das in Notepad++ Script aktuell markierte Script.



Fortgeschrittene Compiler

Es ist ein weiter fortgeschrittener Compiler verfügbar, der die Möglichkeit bietet, zusätzliche Eingabe-Verzeichnisse zu definiert und etwas mehr Komfort bietet.

Papyrus Compiler


Installation der Sprachdefinition von Papyrus

Notepad++ unterstützt sowohl Auto-Vervollständigen als auch das Hervorheben von Syntaxkomponenten für gängige Sprachen. Die folgenden beiden Abschnitte beschreiben die Arbeitsschritte, die für die Nutzung dieser Besonderheiten für Papyrus erforderlich sind.


Auto-Vervollständigen

  1. Öffne Notepad++
  2. Kopiere den Inhalt dieser Seite in eine neue Datei: Papyrus Autocomplete Language Definitions
  3. Sichere diese neue Datei als papyrus.xml im Notepad++\plugins\APIs Verzeichnis (z.B. C:\Program Files (x86)\Notepad++\plugins\APIs)
  4. In dem Tab Backup/Auto-Completion des Preferences-Fenster des Notepad++ (unter Settings), muss die "Enable auto-completion on each input" angeklickt werden und die Eigenschaften nach Wunsch konfiguriert werden.
    Derzeit haben einige der Funktionen Parameterinformationen verfügbar. Wenn man also "Function parameters hint on input" anklickt, wird man mehr Information zu sehen bekommen, wenn diese Funktion


Hervorheben von Syntaxkomponenten

  1. Erzeuge eine XML-Datei mit dem folgenden Inhalt (man kann es nennen wie man mag und speichern, wo man will):

    <papyrusscript><NotepadPlus>

       <UserLang name="Papyrus" ext="psc">
           <Settings>
               <Global caseIgnored="yes" />
               <TreatAsSymbol comment="yes" commentLine="yes" />
               <Prefix words1="no" words2="no" words3="no" words4="no" />
           </Settings>
           <KeywordLists>
               <Keywords name="Delimiters">"00"00</Keywords>
               <Keywords name="Folder+">Event Function If State While</Keywords>
               <Keywords name="Folder-">EndEvent EndFunction EndIf EndState EndWhile Native</Keywords>
               <Keywords name="Operators">- ! % & ( ) * , . / [ ] | + < = ></Keywords>
               <Keywords name="Comment">1{ 2} 0;</Keywords>
               <Keywords name="Words1">abs acos Activate Add AddAchievement AddDependentAnimatedObjectReference AddForm AddHavokBallAndSocketConstraint AddInventoryEventFilter AddItem AddPerk AddShout AddSpell AddToFaction AddToMap AdvanceSkill AllowBleedoutDialogue AllowPCDialogue Apply ApplyCrossFade ApplyHavokImpulse asin atan AttachAshPile BlockActivation CalculateEncounterLevel CalculateFavorCost CanFastTravelToMarker CanPayCrimeGold CaptureFrameRate Cast Ceiling CenterOnCell CenterOnCellAndWait Clear ClearArrested ClearDestruction ClearExtraArrows ClearForcedMovement ClearKeepOffsetFromActor ClearLookAt ClearPrison ClearTempEffects CloseUserLog CompleteAllObjectives CompleteQuest cos CreateDetectionEvent DamageActorValue DamageAV DamageObject DBSendPlayerPosition DebugChannelNotify DegreesToRadians Delete DeleteWhenAble Disable DisableNoWait DisablePlayerControls Dispel DispelAllSpells DispelSpell DoCombatSpellApply DropObject DumpAliasData Enable EnableAI ENableFastTravel EnableFastTravel EnableNoWait EnablePlayerControls EndFrameRateCapture EquipItem EquipShout EquipSpell EvaluatePackage FadeOutGame FailAllObjectives FastTravel FindClosestActor FindClosestReferenceOfAnyTypeInList FindClosestReferenceOfType FindRandomActor FindRandomReferenceOfAnyTypeInList FindRandomReferenceOfType FindWeather Fire Floor ForceActive ForceActorValue ForceAddRagdollToWorld ForceAV ForceFirstPerson ForceLocationTo ForceMovementDirection ForceMovementDirectionRamp ForceMovementRotationSpeed ForceMovementRotationSpeedRamp ForceMovementSpeed ForceMovementSpeedRamp ForceRefTo ForceRemoveRagdollFromWorld ForceStart ForceTargetAngle ForceTargetDirection ForceTargetSpeed ForceThirdPerson GameTimeToString Get GetActorBase GetActorOwner GetActorReference GetActorValue GetActorValuePercentage GetAlias GetAngleX GetAngleY GetAngleZ GetAnimationVariableBool GetAnimationVariableFloat GetAnimationVariableInt GetAssociatedSkill GetAt GetAV GetAverageFrameRate GetAVPercentage GetBaseActorValue GetBaseAV GetBaseObject GetBribeAmount GetBudgetCount GetBudgetName GetCasterActor GetClass GetClassification GetCombatState GetCombatTarget GetConfigName GetCrimeFaction GetCrimeGold GetCrimeGoldNonViolent GetCrimeGoldViolent GetCurrentBudget GetCurrentDestructionStage GetCurrentGameTime GetCurrentLocation GetCurrentMemory GetCurrentPackage GetCurrentRealTime GetCurrentScene GetCurrentStageID GetCurrentWeather GetCurrentWeatherTransition GetDeadCount GetDialogueTarget GetDistance GetEditorLocation GetEquippedItemType GetEquippedShield GetEquippedShout GetEquippedSpell GetEquippedWeapon GetFactionOwner GetFactionRank GetFactionReaction GetFavorPoints GetFlyingState GetForcedLandingMarker GetForm GetFormID GetGameSettingFloat GetGameSettingInt GetGameSettingString GetGiftFilter GetGoldAmount GetGoldValue GetHeadingAngle GetHeight GetHigestRelationshipRank GetHighestRelationshipRank GetInfamy GetInfamyNonViolent GetInfamyViolent GetItemCount GetItemHealthPercent GetKey GetKeywordData GetKiller GetLength GetLevel GetLeveledActorBase GetLightLevel GetLinkedRef GetLocation GetLockLevel GetLowestRelationshipRank GetMass GetMaxFrameRate GetMinFrameRate GetNoBleedoutRecovery GetNthLinkedRef GetOpenState GetOutgoingWeather GetOwningQuest GetParentCell GetPlatformName GetPlayer GetPlayerControls GetPlayerGrabbedRef GetPlayersLastRiddenHorse GetPositionX GetPositionY GetPositionZ GetRace GetReaction GetRealHoursPassed GetReference GetRefTypeAliveCount GetRefTypeDeadCount GetRegard GetRelationshipRank GetReputation GetScale GetSex GetSitState GetSize GetSkyMode GetSleepState GetStage GetStageDone GetState GetStolenItemValueCrime GetStolenItemValueNoCrime GetTargetActor GetTemplate GetTriggerObjectCount GetValue GetVersionNumber GetVoiceRecoveryTime GetVoiceType GetWidth GetWorldSpace GoToState GtLockLevel HasAssociation HasCommonParent HasEffectKeyword HasFamilyRelationship HasForm HasKeyword HasLOS HasMagicEffect HasMagicEffectWithKeyword HasNode HasParentRelationship HasPerk HasRefType HasSpell HideTitleSequenceMenu IgnoreFriendlyHits IncrementSkill IncrementSkillBy IncrementStat InterruptCast Is3DLoaded IsActionComplete IsActivateChild IsActivateControlsEnabled IsActivationBlocked IsActive IsAlarmed IsAlerted IsAllowedToFly IsArrested IsArrestingTarget IsAttached IsBleedingOut IsBribed IsCamSwitchControlsEnabled IsChild IsCleared IsCommandedActor IsCompleted IsDead IsDetectedBy IsDisabled IsDoingFavor IsEquipped IsEssential IsEuiped IsFactionInCrimeGroup IsFastTravelEnabled IsFightingControlsEnabled IsFlying IsFurnitureInUse IsFurnitureMarkerInUse IsGhost IsGuard IsHostile IsHostileToActor IsIgnoringFriendlyHits IsInCombat IsInDialogueWithPlayer IsInFaction IsInInterior IsInKillMove IsInMenuMode IsInterior IsIntimidated IsInvulnerable IsJournalControlsEnabled IsLoaded IsLockBroken IsLocked IsLookingControlsEnabled IsMapMarkerVisible IsMenuControlsEnabled IsMovementControlsEnabled IsObjectiveCompleted IsObjectiveDisplayed IsObjectiveFailed IsPlayerExpelled IsPlayersLastRiddenHorse IsPlayerTeammate IsPlaying IsProtected IsRunning IsSameLocation IsSneaking IsSneakingControlsEnabled IsSprinting IsStageDone IsStartin IsStarting IsStopped IsStopping IsTrespassing IsUnconscious IsUnique IsWeaponDrawn IsWordUnlocked KeepOffsetFromActor Kill KillSilent KnockAreaEffect LearnAllEffects LearnEffect LearnNextEffect Lock MessageBox ModActorValue ModAV ModCrimeGold ModFactionRank ModFavorPoints ModFavorPointsWithGlobal ModReaction ModRegard MoveTo MoveToInteractionLocation MoveToMyEditorLocation MoveToNode MoveToPackageLocation MoveToWhenUnloaded Mute Notification OpenInventory OpenUserLog OverBudget PathToReference Pause PlaceActorAtMe PlaceAtMe Play PlayAndWait PlayAnimation PlayAnimationAndWait PlayerKnows PlayerMoveToAndWait PlayerPayCrimeGold PlayGamebryoAnimation PlayIdle PlayIdleWithTarget PlayImpactEffect PlaySubGraphAnimation PlaySyncedAnimationAndWaitSS PlaySyncedAnimationSS PlayTerrainEffect PopTo pow PrecacheCharGen PrecacheCharGenClear ProcessTrapHit PushActorAway QueryStat QuitGame QuitToMainMenu RadiansToDegrees RandomFloat RandomInt RegisterForAnimationEvent RegisterForLOS RegisterForSingleLOSGain RegisterForSingleLOSLost RegisterForSingleUpdate RegisterForSingleUpdateGameTime RegisterForSleep RegisterForTrackedStatsEvent RegisterForUpdate RegisterForUpdateGameTime ReleaseOverride RemoteCast Remove RemoveAddedForm RemoveAllInventoryEventFilters RemoveAllItems RemoveCrossFade RemoveDependentAnimatedObjectReference RemoveFromAllFactions RemoveFromFaction RemoveHavokConstraints RemoveInventoryEventFilter RemoveItem RemovePerk RemoveShout RemoveSpell RequestAutoSave RequestModel RequestSave Reset ResetHealthAndLimbs ResetHelpMessage RestoreActorValue RestoreAV Resurrect Revert Say SendAnimationEvent SendAssaultAlarm SendPlayerToJail SendStealAlarm SendStoryEvent SendStoryEventAndWait SendTrespassAlarm SendWereWolfTransformation ServeTime Set SetActive SetActorCause SetActorOwner SetActorValue SetAlert SetAllowFlying SetAlly SetAlpha SetAngle SetAnimationVariableBool SetAnimationVariableFloat SetAnimationVariableInt SetAttackActorOnSight SetAV SetBeastForm SetBribed SetCameraTarget SetCleared SetCrimeFaction SetCrimeGold SetCrimeGoldViolent SetCriticalStage SetCurrentStageID SetDestroyed SetDoingFavor SetEnemy SetEssential SetFactionOwner SetFactionRank SetFogPlanes SetFogPower SetFootIK SetForcedLandingMarker SetFrequency SetGhost SetGodMode SetHeadTracking SetHudCartMode SetInChargen SetINIBool SetINIFloat SetINIInt SetINIString SetInstanceVolume SetIntimidated SetInvulnerable SetKeywordData SetLockLevel SetLookAt SetMotionType SetNoBleedoutRecovery SetNoFavorAllowed SetNotShowOnStealthMeter SetObjectiveCompleted SetObjectiveDisplayed SetObjectiveFailed SetOpen SetOutfit SetPlayerAIDriven SetPlayerControls SetPlayerEnemy SetPlayerExpelled SetPlayerReportCrime SetPlayerResistingArrest SetPlayerTeammate SetPosition SetProtected SetPublic SetRace SetRaction SetReaction SetRelationshipRank SetRestrained SetScale SetSittingRotation SetStage SetUnconscious SetValue SetVehicle SetVoiceRecoveryTime SetVolume ShakeCamera ShakeController Show ShowAsHelpMessage ShowBarterMenu ShowFirstPersonGeometry ShowGiftMenu ShowRaceMenu ShowRefPosition ShowTitleSequenceMenu ShowTrainingMenu sin SplineTranslateTo SplineTranslateToRefNode sqrt Start StartCannibal StartCombat StartFrameRateCapture StartObjectProfiling StartScriptProfiling StartStackProfiling StartTitleSequence StartVampireFeed Stop StopCombat StopCombatAlarm StopInstance StopObjectProfiling StopScriptProfiling StopStackProfiling StopTranslation TakeScreenshot tan TeachWord TetherToHorse ToggleAI ToggleCollisions ToggleMenus Trace TraceConditional TraceStack TraceUser TranslateTo TrapSoul TriggerScreenBlood TryoEnable TryToAddToFaction TryToDisable TryToKill TryToMoveTo TryToRemoveFromFaction TryToReset TryToStopCombat UnequipAll UnEquipItem UnequipItem UnequipShout UnequipSpell UnLockOwnedDoorsInCell UnlockWord UnMute UnPause UnregisterForAnimationEvent UnregisterForLOS UnregisterForSleep UnregisterForTrackedStatsEvent UnregisterForUpdate UnregisterForUpdateGameTime UpdateCurrentInstanceGlobal UsingGamepad Wait WaitForAnimationEvent WaitGameTime WaitMenuMode WillIntimidateSucceed WornHasKeyword</Keywords>
               <Keywords name="Words2">OnActivate OnAnimationEvent OnAttachedToCell OnBeginState OnCellAttach OnCellDetach OnCellLoad OnClose OnCombatStateChanged OnContainerChanged OnDeath OnDying OnDestructionStageChanged OnDetachedFromCell OnEffectFinish OnEffectStart OnEndState OnEnterBleedout OnEquipped OnGainLOS OnGetUp OnGrab OnHit OnInit OnItemAdded OnItemRemoved OnLoad OnLocationChange OnLockStateChanged OnLostLOS OnMagicEffectApply OnObjectEquipped OnObjectUnequipped OnOpen OnPackageChange OnPackageEnd OnPackageStart OnRaceSwitchComplete OnRead OnRelease OnReset OnSell OnSleepStart OnSleepStop OnStoryActivateActor OnStoryAddToPlayer OnStoryArrest OnStoryAssaultActor OnStoryBribeNPC OnStoryCastMagic OnStoryChangeLocation OnStoryCraftItem OnStoryCrimeGold OnStoryCure OnStoryDialogue OnStoryDiscoverDeadBody OnStoryEscapeJail OnStoryFlatterNPC OnStoryHello OnStoryIncreaseLevel OnStoryIncreaseSkill OnStoryInfection OnStoryIntimidateNPC OnStoryJail OnStoryKillActor OnStoryNewVoicePower OnStoryPayFine OnStoryPickLock OnStoryPlayerGetsFavor OnStoryRelationshipChange OnStoryRemoveFromPlayer OnStoryScript OnStoryServedTime OnStoryTrespass OnTrackedStatsEvent OnTranslationAlmostComplete OnTranslationComplete OnTranslationFailed OnTrapHit OnTrapHitStart OnTrapHitStop OnTrigger OnTriggerEnter OnTriggerLeave OnUnequipped OnUnload OnUpdate OnUpdateGameTime OnWardHit</Keywords>
               <Keywords name="Words3">Action Activator ActiveMagicEffect Actor ActorBase Alias Ammo Apparatus Armor AssociationType Book Cell Class ConstructibleObject Container Debug Door EffectShader Enchantment EncounterZone Explosion Faction Flora Form FormList Furniture Game GlobalVariable Hazard Idle ImageSpaceModifier ImpactDataSet Ingredient Key Keyword LeveledActor LeveledItem LeveledSpell Light Location LocationAlias LocationRefType MagicEffect Math Message MiscObject MusicType ObjectReference Outfit Package Perk Potion Projectile Quest Race ReferenceAlias Scene Scroll Shout SoulGem Sound SoundCategory Spell Static TalkingActivator Topic TopicInfo Utility VisualEffect VoiceType Weapon Weather WordOfPower WorldSpace</Keywords>
               <Keywords name="Words4">As Auto AutoReadOnly Bool Conditional Debug Else ElseIf EndProperty Extends False Float Game Global Hidden Import Int Length New None Parent Property Return ScriptName Self String True Utility</Keywords>
           </KeywordLists>
           <Styles>
               <WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
               <WordsStyle name="FOLDEROPEN" styleID="12" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" />
               <WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" />
               <WordsStyle name="KEYWORD1" styleID="5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="1" />
               <WordsStyle name="KEYWORD2" styleID="6" fgColor="800000" bgColor="FFFFFF" fontName="" fontStyle="1" />
               <WordsStyle name="KEYWORD3" styleID="7" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="1" />
               <WordsStyle name="KEYWORD4" styleID="8" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" />
               <WordsStyle name="COMMENT" styleID="1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="3" />
               <WordsStyle name="COMMENT LINE" styleID="2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="2" />
               <WordsStyle name="NUMBER" styleID="4" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" />
               <WordsStyle name="OPERATOR" styleID="10" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="1" />
               <WordsStyle name="DELIMINER1" styleID="14" fgColor="000000" bgColor="FFFF00" fontName="" fontStyle="2" />
               <WordsStyle name="DELIMINER2" styleID="15" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
               <WordsStyle name="DELIMINER3" styleID="16" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
           </Styles>
       </UserLang>
    

    </NotepadPlus></papyrusscript>

  2. Öffne Notepad++
  3. Öffne das "User Defined Language"-Fenster über View -> User-Defined Dialogue...
  4. Wähle "Import..."
  5. Wähle die vorher erzeugte XML-Datei.
  6. Wenn der Import erfolgreich war, sollte ein Bemerkung zu sehen sein: "Import successful."

Nun wird Notepad++ automatisch die Syntaxkomponenten hervorheben, wenn man eine Papyrus-Quellcodedatei ( mit der Erweiterung .psc) öffnet.

Wenn man ein eigenes Script von Grund auf erzeugt, muss man die Sprache manuell auswählen. "Papyrus" sollte unten im Language-Menu in Notepad++ verfügbar sein.


Dunkleres Hervorheben von Syntaxkomponenten

If the above is too bright for your eyes then you can try a darker approach which can be found here Notepad++ Dark.xml]

Weitere Voreinstellungen zum Hervorheben von Syntaxkomponenten

Wenn man beim Hervorheben von Syntaxkomponenten besser passende Farben als die von Notepad++ bevorzugt, findet man eine Alternative unter Syntax_Highlighting .


Papyrus Quellcode-Verschönerung

  1. kann hier gefunden werden: Quellcode-Verschönerung .
  2. Dies Script benötigt die Installation von LUA http://www.lua.org/download.html
  3. Damit das mit Notepad++ läuft einfach F5 drücken, dann
  4. mit Copy & Paste das Folgende in die RUN-Box bringen
  5. <papyrusscript> lua "[install path]\skyindent.lua" -b "$(FULL_CURRENT_PATH)" </papyrusscript>

  6. [install path] ist das Verzeichnis, wo sich das SkyIndent.lua-Beispiel befindet "C:\SkyIndent\"
  7. Wähle Save
  8. Nenne es: SkyIndent
  9. Wähle ein Tastaturkürzel, z.B.: CTRL+F6
  10. Usage skyindent.lua [options] [script.psc]
    Available options are:
            -s[number]  Spacing to indent, TAB spacing is default
            -b          Backup the Papyrus Script
    


    Links