- UID
- 1442977
- 主题
- 7
- 阅读权限
- 30
- 帖子
- 901
- 精华
- 0
- 积分
- 451
- 金钱
- 2146
- 荣誉
- 0
- 人气
- 0
- 在线时间
- 2958 小时
- 评议
- 0
- 帖子
- 901
- 精华
- 0
- 积分
- 451
- 金钱
- 2146
- 荣誉
- 0
- 人气
- 0
- 评议
- 0
|
下面的内容虽然比较难懂,不过也请伸手党们回帖支持,你们的鼓励也是moder的动力!
多谢热心人提醒,所以尝试了一下把版面写的好看点.楼主建议在所提到的四种文本编辑器中首先考虑使用Sublime Text ,其次是Notepad++ 。暂不考虑使用Emacs,UltraEdit 它们暂时未完成
1.Papyrus是B社新的脚本工具和以前FONV,FO3,Oblivion 脚本有很多改变,具体请点击这里
2.Skyrim版本的Creation Kit自带有Papyrus script编辑编译器,一如既往的简单粗暴
3.B社目前对四种第三方文本编辑器有支持,分别是Notepad++ ,Sublime Text ,Emacs,UltraEdit。
可以在脚本编辑时实现函数,关键字,类型等高亮显示,达到下图效果
这样在编辑近千行的大型脚本再也不眼花了,最重要的是它还可以进行编译
这样在编辑近千行的大型脚本再也不眼花了,最重要的是它还可以进行编译
3.下面以Sublime Text 为例讲解如何让其支持Papyrus script
1.首先确保有Creation Kit ,并且能使用。
2.到Sublime Text官网下载对应操作系统的Sublime Text 2。汉化版,破解版和汉化破解版可以自行百度。
比如我是64位windows操作系统,则下载Windows 64 bit,如果想要免安装版,则点击后面的portable version。
现在我下载的是64位免安装版,把zip文档内内容解压到任意你喜欢的目录。例如C:\Download\Sublime Text 2 Build 2165 x64\
3.首先运行一次Sublime Text,双击 sublime_text.exe,
例如C:\Download\Sublime Text 2 Build 2165 x64\sublime_text.exe,第一次运行可能会比较慢。
正常运行后将其关闭
4.下载Papyrus支持包Papyrus zip file,打开内容如下
如果是安装版,将Papyrus文件夹解压至%APPDATA%\Sublime Text 2\Packages(CK官网说法,未验证)
如果是免安装版,将Papyrus文件夹解压至sublime_text.exe目录的\Data\Packages里。例如C:\Download\Sublime Text 2 Build 2165 x64\Data\Packages\
确认Papyrus文件夹已在Packages文件夹内
4.在上图的基础上进入Papyrus文件夹,找到文件Papyrus.sublime-build ,用记事本打开。
- {
- "cmd": [
- "H:\\Game\\Skyrim5\\Papyrus Compiler\\ScriptCompile.bat",
- "$file"
- ],
- "file_regex": "(^.*\\.psc)\\(([0-9]*),([0-9]*)\\)",
- "selector": "source.papyrus"
- }
复制代码
这里有你要修改的地方,其中H:\\Game\\Skyrim5是游戏执行文件目录,改成你自己的游戏目录。如果CK能成功安装执行,游戏执行文件目录里应会有Papyrus Compiler文件夹,其中会有ScriptCompile.bat文件。务必使用双斜杠”\\“
5.用记事本打开ScriptCompile.bat文件(如您是正版用户,并且正常安装stream版CK,则可以跳过此步骤)
- "H:\Game\Skyrim5\Papyrus Compiler\PapyrusCompiler.exe" %1 -f="TESV_Papyrus_Flags.flg" -i"H:\Game\Skyrim5\Data\Scripts\Source" -o="H:\Game\Skyrim5\Data\Scripts"
- Pause
这里有你要修改的地方,其中H:\Game\Skyrim5是游戏执行文件目录,改成你自己的游戏目录。
完成以上步骤后,就可以更加方便的编辑CK脚本了。
PS:如果需要的人多,稍后放出整合好的的版本,不需要众多修改步骤,直接解压即可使用。
1.现在验证是否能正常使用。运行Creation Kit 。
2.点击Load Master/Plugin Files,skyrim.esm为主文件,确定。
3.点击菜单Gameplay -> Papyrus Manager
4.双击其中一个脚本编辑,选择编辑器
5.确定后查看Sublime Text 2是否显示正常
6.按F7编译
一切正常后脚本编辑器就可以正常使用了
此文资料来源www.creationkit.com
Sublime Text 2的更详细使用信息,请查看www.sublimetext.com
需要英文原资料请点击这里
这里讲解Notepad++对Papyrus script的支持
1.首先和Sublime Text一样,确认CK能正常运行。
2.至http://notepad-plus-plus.org/download/v5.9.8.html 页面下载Notepad++
这里我选Notepad++ v5.9.8 zip package ,免安装,将压缩包里内容解压至任意你喜欢的位置。
它会有两个版本,ansi和unicode,这里我选unicode的。
3.先把Notepad++改成中文界面。运行notepad++.exe,点击Settings-> Preferences,在Localization选择简体中文或繁体中文。
先不要关闭此设置界面,选择“备份与自动完成”标签,勾选“所有输入均启用自动完成”和“输入时提示函数参数”(可选)
点击关闭完成中文化设置
4.关闭Notepad++,转至- http://www.creationkit.com/File:Papyrus.xml
复制代码
下载最新的Papyrus.xml文件。
点击这里下载2012年2月7日版本
Papyrus.xml放入notepad++.exe所在文件夹内的\plugins\APIs文件夹中
例如notepad++.exe在此目录C:\Download\npp.5.9.8.bin\unicode,则Papyrus.xml放入C:\Download\npp.5.9.8.bin\unicode\plugins\APIs
5.用记事本编辑一个XML文件,将下面代码保存入文本里,例如存为PHL.xml
- <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>
复制代码
6.打开notepad++,点击 视图->自定义语言对话框 ,点击导入,选择之前手工编辑的XML文件,导入成功后,可看到自定义语言里有Papyrus选项,选择它,然后关闭(右上角的X)
7.点击 运行->运行,或者按F5,在对话框中填入 "H:\Game\Skyrim5\Papyrus compiler\ScriptCompile.bat" $(FILE_NAME) 。其中H:\Game\Skyrim5是你的游戏目录,请按照自己的安装情况修改,请注意双引号必须包含,点击保存。
在Name中填入名称,如Papyrus Compile,在Name标签下面可按喜好选择快捷键,点击OK,然后关闭运行对话框。
用记事本打开ScriptCompile.bat文件
- "H:\Game\Skyrim5\Papyrus Compiler\PapyrusCompiler.exe" %1 -f="TESV_Papyrus_Flags.flg" -i"H:\Game\Skyrim5\Data\Scripts\Source" -o="H:\Game\Skyrim5\Data\Scripts"
- Pause
复制代码
这里有你要修改的地方,其中H:\Game\Skyrim5是游戏执行文件目录,改成你自己的游戏目录。
8.检查设置是否生效。语言里是否有Papyrus选项 以及 运行里是否有Papyrus Compile选项
9.验证和编译,看看能否正常使用。打开CK,选择 GamePlay -> Papyrus Manager,双击一个文件如Actor,选择打开方式NotePad++
看看高亮显示和自动完成是否正常
点击 运行-> Papyrus Compile 测试编译是否正常
|
附件: 你需要登录才可以下载或查看附件。没有帐号?注册
-
总评分: 金钱 + 30
查看全部评分
|