Apartment Purchasing [WIP]

This page covers how to setup a purchasing interaction for custom apartments

Knowledge Requirements

Interaction Settings

Basic Settings

  • Purchased Fact:

    • This is the first thing you should setup, give it some unique identifier (Should not contain spaces or special characters)

    • This fact will be set to 1 once the apartment is purchased

  • Apartment Name:

    • This is the main-displayed name of the apartment (On the map, tutorial and messages)

    • This is a LocKey, you can either use WolvenKit's LocKey Browser to find existing ones, or add your own

  • Cost:

    • This is simply the cost of the apartment

  • Use Custom Key (Optional):

    • If activated, the player will be given the specified item when purchasing the apartment

  • Key TweakDBID:

    • This is the TweakDBID of the key item which the player will be given when purchasing the apartment (Unless Use Custom Key is active)

  • Enable Purchase Fact (Optional):

    • If this is set to something, the apartment will only be available for purchasing once the specified quest fact is not 0

Purchase Terminal Settings

Here you can set whether to use a Motel-Style door terminal, or a hand-scanning tablet for the interaction

If you do not want to use any of that, simply use the door terminal and leave the NodeRef empty

  • Purchase Object:

    • What type of object to use for purchasing

    • Door Terminal: Simply wall mounted terminal, no animation

    • Tablet Hand Scanner: Tablet with "hand placing and scan" animation

    • More on this can be found in the "Setting up objects" section

  • Purchase Object NodeRef:

    • NodeRef to the Door Terminal / Tablet

Mappin Settings

  • Purchase Mappin Position:

    • This is where the "Purchase" type mappin will be placed if the apartment is purchasable

  • Purchased Mappin Position:

    • This is where the "Apartment" type mappin will be placed once the apartment is purchased

Usually, you would place the the "Purchase" mappin at the location of the interaction, and the "Purchased" inside the apartment

Image and Message Settings

  • Use Icon Record:

    • If this is turned on, you can specify a UIJournalIcons TweakDB record which is to be used as the apartment image

  • Picture Atlas Path (If Use Icon Record is off):

    • This is the path to your .inkatlas which contains the image to be used

  • Atlas Part (If Use Icon Record is off):

    • This is the name of the atlas part within your .inkatlas which is to be used as the image

  • Purchase Message (Optional):

    • This is a LocKey which is the message which will be sent my El Capitan once the apartment is purchasable (Message contains the text specified by the LocKey + Image)

Tutorial Settings

  • Enable Tutorial:

    • If this is turned on, the tutorial will be shown (Once) if the player is near (<1.5m) the Entrance Position

  • Video Path:

    • Path to a .bk2 file which is the video that will be played

    • Video must have a resolution of 1280x720

  • Video Message:

    • LocKey for the text that will be displayed alongside the video

  • Entrance Position:

    • Position used for triggering the tutorial (When player is <1.5m from the position)

    • Should be placed just behind the apartment's entrance door, to prevent premature triggering)

Setting Up Objects

Purchase Device

  • When using the Tablet interaction, simply use the Tablet Hand Scanner prefab provided in WB

  • When using the Door Terminal interactions, use

    • base\gameplay\devices\apartment_screen\motel_screen_1.ent

    • Assign a NodeRef to it, which you then use as the Purchase Object NodeRef

    • Additionally, expand the Entity Instance Data header and set the following checkboxes to off:

      • controller -> persistentState -> allowAutomaticRentStatusChange

      • controller -> persistentState -> randomizeInitialOverdue

Apartment Door

  • Technically any door that can be opened / closed should work, but for this example we will be using:

    • base\gameplay\devices\doors\final\single_door.ent

    • This door has lots of appearance options

  • The only thing we need to do is set the door to require our apartment key item (You can get it from the Base section in the interaction UI)

    • Spawn the door and select it

    • Expand the Entity Instance Data header

    • Go to controller -> persistentState -> authorizationProperties -> authorizationDataEntry -> keycard

    • Copy the keycard TweakDBID in the keycard field

Last updated