g2mXagent Posted October 20, 2018 Share Posted October 20, 2018 SCRIPT: how to get actor's name without F4SE? Link to comment Share on other sites More sharing options...
ZeroAndOne Posted October 20, 2018 Share Posted October 20, 2018 I was a script kiddie on Obscript, it's what we had before Papyrus. In those days it was all Editor Id or Reference Id if it had a custom name in the reference. So like like say it's Codsworth, go in the world, find the reference for Codsworth. That's the version of the Editor Id that is placed in the world. Like the player. 00000007 is the Editor Id or Form Id that is the player. Place that form into the world and it becomes 00000014 which is the player reference. If it helps, it's a reference to the form, like a form that has to be filled out, if it helps you remember. The player reference doesn't exist until the game starts, if that blows your mind. Come on, think about it. We don't exist unless we start the game. It's a old joke. NATE & NORA are both in Vault 111 as potential 00000014 player references, but which actually exists! LOL I can't wait to mess with the head of a Ai program. Any Fookin Way... If a actor's name is information that is typed into the Editor Id or Form Id. Well, that's just information that is on the Form. It's not actor value/data all that stuff is built into the game or SDK from programing. It's the whole purpose of the form. And you know what Mr. Smith in the Matrix says about 'Purpose'? Ouuu, spooky Y2K music plays. LOL So the .exe knows that when it comes time to display something to the player, it's the name, or the in-game name. You wouldn't call upon a N99 10mm pistol to find out the name. It's just something that was built into the SDK/Game. A better question might be why do you want to call up an actor's name. I don't know, there were not many details. However, in the old days. These references that were going to be called upon by a script had a custom name that was put on the reference. Codsworth is the actor name, but go to that placed reference in the world, double click it, it probably has a custom Editor Id name, which like the player (although the player doesn't exist yet, cause we're in the SDK, game hasn't started) 0000007 Player Editor Id Form Id && 00000014 Reference Id. If it existed, go to that 00000014 to double click the placed reference in the SDK and at the top is a spot to fill out a Editor Id. Let's just say it's Codsworth, he's the player now. You go Codsworth, good for you for taking the initiative. You know that this actor's name is Codsworth, so you fill out the Reference Editor Id box, with the same name. Codsworth. Call that on a script all you want, and it would return as that. It's not a good idea. Because usually this stuff is named Codsworth001 or like CodsworthMQ1. It's all hidden, behind the scenes, smoke & mirrors. Editor Ids & Named Reference Editor Ids all have custom names, and to serve a custom purpose. This way the names won't overlap. Are you calling upon Codsworth in the wasteland or Codsworth as the actor existed in Pre-War, two different times, two different worlds. Throw in a long game, DLC, and tons of mods pretty soon the names overlap, then the script is calling up something which has multiple versions. The the poop starts to break. It's just theoretical. There are listings of every console command in the game if you want to try your luck on finding a command that returns the in-game name for something. You could look at other scripters libraries, I hear that helps. All the vanilla scripts. Then also there is a section of the official Wiki for the SDK (the creation GECK, ha hah!) which deals with Papyrus specifically, though I would suggest to not try to avoid F4SE, as it's used by everyone. I use Papyrus Tutorial Page as my homepage actually, but the wiki has many uses. Let's look at some scripts, Hoo Ray! Scriptname vaultExitElevatorSCRIPT extends ObjectReference {Handle the RESPEC options and then the one-time elevator on the interior-side. Separate trigger for exterior animations.} IMAGESPACEMODIFIER PROPERTY VaultExitISFX AUTO OBJECTREFERENCE PROPERTY elevator AUTO ARMOR PROPERTY FXVault111ExitIdleLookUpInElevatorArmor AUTO IDLE PROPERTY elevatorLook AUTO FLOAT PROPERTY blindWait AUTO FLOAT PROPERTY elevatorWait AUTO FLOAT PROPERTY animWait AUTO BOOL DOONCE=TRUE QUEST PROPERTY MQ102 Auto Message Property CharGenFinalChangesMenu Auto int ButtonPressed = 0 Quest Property DialogueVault111 Auto ObjectReference Property RespecMoveMarker Auto Idle Property ElevatorFaceCamera Auto Idle Property ElevatorBodyCamera Auto Int MovedPlayer = 0 InputEnableLayer Property RespecEnableLayer Auto Hidden ObjectReference Property RespecLightingEnableMarker Auto OBJECTREFERENCE Property V111EnableRaiseElevatorTriggerEnableMarker Auto Keyword Property AnimFaceArchetypePlayer Auto Const {Store Player Face Archetype. We need to switch player to Neutral while in the menu.} ObjectReference Property V111ExitLightingEnableMarker Auto Const EVENT ONTRIGGERENTER(OBJECTREFERENCE obj) IF(obj == game.getPlayer() && DOONCE) DOONCE = FALSE ;update QT (MQ102 as MQ03QuestScript).ReSpecDone=1 ;WJS - Disable Pipboy Controls (MQ102 as MQ03QuestScript).DisablePipboy() RegisterForMenuOpenCloseEvent("SPECIALMenu") RegisterForMenuOpenCloseEvent("LooksMenu") RegisterForLooksMenuEvent() ;disable controls RespecEnableLayer = InputEnableLayer.Create() RespecEnableLayer.DisablePlayerControls(abCamSwitch = True) ;disable exit vault lighting V111ExitLightingEnableMarker.Disable() ; pop character menu DialogueVault111.SetStage(98) Utility.Wait(1.0) ShowCharacterMenus() ENDIF ENDEVENT Function ShowCharacterMenus() Actor PlayerREF = Game.GetPlayer() ButtonPressed = CharGenFinalChangesMenu.Show() If ButtonPressed == 0 Game.ShowSPECIALMenu() ElseIf ButtonPressed == 1 Game.FadeOutGame(True, True, 0.0, 1.0, True) ;make sure player has CharGen Skeleton for editing PlayerREF.SetHasCharGenSkeleton() ;make sure player face is neutral PlayerREF.ChangeAnimFaceArchetype(None) ;enable lighting RespecLightingEnableMarker.Enable() Utility.Wait(2.0) If MovedPlayer == 0 MovedPlayer == 1 PlayerREF.Moveto(RespecMoveMarker) EndIf Game.ForceThirdPerson() Utility.Wait(1.0) PlayerREF.PlayIdle(ElevatorFaceCamera) Utility.Wait(3.0) Game.FadeOutGame(False, True, 0.0, 1.0) Game.ShowRaceMenu(uimode = 1) ElseIf ButtonPressed == 2 UnRegisterForMenuOpenCloseEvent("SPECIALMenu") UnRegisterForMenuOpenCloseEvent("LooksMenu") MenusDone() ENDIF EndFunction Function MenusDone() Actor PlayerREF = Game.GetPlayer() RespecLightingEnableMarker.Disable() ;Game.RequestSave() Game.ForceFirstPerson() ; Vault tec message DialogueVault111.SetStage(100) ; start the elevator elevator.PlayAnimation("stage3") ;utility.wait(blindWait) ; play the blind FX ;VaultExitISFX.apply(1) ;emergency lights in the vault turn off (MQ102 as MQ03QuestScript).ResetVaultLights() ;turn on a trigger that's used to allow the player to use the elevator again V111EnableRaiseElevatorTriggerEnableMarker.Enable() ;clear out cached facegen data PlayerREF.SetHasCharGenSkeleton(False) ;set player face back PlayerREF.ChangeAnimFaceArchetype(AnimFaceArchetypePlayer) ;Game.PrecacheCharGenClear() Utility.wait(5.0) Game.FadeOutGame(true, true, 0.5, 1.0, true) EndFunction ;when menus close, re-pop the main menu Event OnMenuOpenCloseEvent(string asMenuName, bool abOpening) if (asMenuName == "SpecialMenu") && (abOpening == False) ShowCharacterMenus() ElseIf (asMenuName == "LooksMenu") && (abOpening == False) ShowCharacterMenus() EndIf EndEvent ;handle player transitioning between body and face Event OnLooksMenuEvent(int aiFlavor) ;player edits body If aiFlavor == 10 Game.GetPlayer().PlayIdle(ElevatorBodyCamera) ;player edits face ElseIf aiFlavor == 11 Game.GetPlayer().PlayIdle(ElevatorFaceCamera) EndIf EndEvent Function DeleteMyInputLayer() RespecEnableLayer = none Self.Disable() EndFunction Link to comment Share on other sites More sharing options...
Evangela Posted October 20, 2018 Share Posted October 20, 2018 I think you and the rest of the modding community would love to know the answer to that question. Link to comment Share on other sites More sharing options...
ZeroAndOne Posted October 20, 2018 Share Posted October 20, 2018 LOL Use FOSE ROFL F4SE. It contains a GetName function. Stop being new. Everyone uses F4SE. You won't get the best modding has to offer unless you are using the community script extender. I get it. You are afraid to run a realtime patch on your game which injects additional scripting commands. But it's not a big deal. I'm not sure how anyone lives without the script extender. That or other games which have scripting additions. All the really good mods require some scripting. Link to comment Share on other sites More sharing options...
shavkacagarikia Posted October 21, 2018 Share Posted October 21, 2018 There is no rational way to do that without f4se.Though of course you can make quest, add script on it, inside make a struct that has two members of type actorbase and string. Then make array property of that struct type. Go in properties and fill it with that thousands! of actorbase forms and appropriate names. After thats done you can look for needed actor in that struct array actors and if its found return a string member that would be a name. As you probably guessed this is very unoptimized, slow and bad way that works only with base actor forms and excludes overriden names for references. Link to comment Share on other sites More sharing options...
SKKmods Posted October 21, 2018 Share Posted October 21, 2018 How do you want to use the actor name ? If it's for display then <alias=textreplacement> is the thing, but it's not a script property to act on if that's your thing. ps why not use F4SE ? Because the principle audience may be xbox e.g. if your producing combat experiences rather than tits and tiles. Link to comment Share on other sites More sharing options...
g2mXagent Posted October 22, 2018 Author Share Posted October 22, 2018 Thank you for your answer, I think I have found the answer. Love you guys! Link to comment Share on other sites More sharing options...
ZeroAndOne Posted October 23, 2018 Share Posted October 23, 2018 "And Carrots Love You Man, Carrots Love You." LOL, 0&1 Link to comment Share on other sites More sharing options...
Recommended Posts