TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 5 of 5

Thread: How does the PlayerFactory link work?

  1. #1
    Member
    Registered: Feb 2000
    Location: Paris, France

    How does the PlayerFactory link work?

    Hello everyone.

    I'm currently tinkering with different aspects of the spawn in Thief, and was wondering how the PlayerFactory link worked.

    To be more specific, what makes a Marker with a PlayerFactory link with the Garrett archetype create a "Player" object which does not really have an equivalent in the Object Hierarchy as far as I can see (it's kind of the "Garrett", but also kind of not). One can see this by typing "set game_mode_backup 0" in the console, going in game, and then exiting back to dromed. If I wanted to manipulate the "Player" object ingame, What are the operations at play here?

    Can anyone help me understand?
    Last edited by Sperry; 24th Jan 2021 at 07:32.

  2. #2
    Member
    Registered: Jan 2001
    Location: Pushing my luck with Dromed
    Quote Originally Posted by Sperry View Post
    what makes a Marker with a PlayerFactory link with the Garrett archetype create a "Player" object
    It's just 'how the engine works'. It's like saying what makes an AI walk from one TrolPt to another just because the 'does patrol' property is set to True.

    The engine looks for any object with a PlayerFactory link to the Garrett archetype, transfers all properties and links from the source of the link to the instance of that, and sets a few properties and links of its own (including the object name). If multiple objects have that link, the engine will use the last one it finds. Linking to any other archetype will create odd results that probably can't be of any use. Disclaimer: under OldDark things might be less stable.

    For spawning the player the easiest approach is to have the starting point teleported.

  3. #3
    Member
    Registered: Feb 2000
    Location: Paris, France
    Thanks for the reply.

    Aside from spawning stuff, I'm particularly interested in the possibility to add and remove links directly to "Player" ingame (and not merely with "Garrett" or the "StartingPoint"). Is there a way to access "Player" through links, S&Rs, Metaprops, or other means?

  4. #4
    Member
    Registered: Jan 2001
    Location: Pushing my luck with Dromed
    Conversations/AIWatchObj/AlertResponse - the field for the target object should say "Player" (no quotes).
    NVScript is a great option. NVMetaTrap, NVLinkBiulder etc. The design note parameters have some sort of target or dest parameter, so the value is just "Player" (this time, quotes are needed).

    E.g. for a teleport trap to only work on the player after some event (example object name= MovePlayer), you could use NVLinkBiulder. Paramters: NVLinkBuilderLinkType="ControlDevice"; NVLinkBuilderLinkSource="MovePlayer"; NVLinkBuilderLinkDest="Player".

    When the link builder is turned on (e.g. button, quest var trigger, etc) it'll then connect the teleport trap to the player.

    For adding or removing S&R I think you'd have to add them to a metaproperty and then add or remove that to/from the player using NVMetaTrap (or as part of a conv etc).

  5. #5
    Member
    Registered: Feb 2000
    Location: Paris, France
    Wonderful, thanks for the info.

    Do you know of a FM which already implements this as an example?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •