Coder Social home page Coder Social logo

unitymultiplayerarpg_propertymanager's Introduction

Property Manager

Property Manager is an addon for MMORPG KIT that enables players to purchase buildings setup in the editor. It is an incomplete system shared primarily for learning purposes. Feel free to adapt for your own needs.

By default, MMORPG Kit enables players to construct their own structures at runtime, for example gameplay from Minecraft or Fortnite. In this implementation, buildings are instead manually placed in the editor and then the creator is set to the purchasing player in-game.

Installation

  1. [:raised_back_of_hand: core mod] add partial to DoorEntity class found in Core/Scripts/GamePlay/BuildingSystems/DoorEntity.cs
public partial class DoorEntity : BuildingEntity
  1. [:raised_back_of_hand: core mod] add new string to public enum UITextKeys found in Core/Scripts/Language/Language.cs
        // Addon - Property Manager
        UI_PROPERTY_MANAGER_PURCHASE_SUCCESS,

and to public static class DefaultLocale

            // Addon - Property Manager
            Texts.Add(UITextKeys.UI_PROPERTY_MANAGER_PURCHASE_SUCCESS.ToString(), "Property purchased");
  1. modify your CanvasGameplay prefab and replace UICurrentBuilding prefab with UICurrentBuilding_PropertyManager found in DenariiGames/UnityMultiplayerARPG/PropertyManager/Prefabs/UI/Share

Usage

Here is where it gets tricky since our implementation will differ substantially from your own. Our building generation and save editor tooling is not part of this mod. The manual steps are as follows (which is why we call it an incomplete system without the automatic building generation):

  1. We first created a new building entity named DoorPlacementEntity copied from the DoorFrameEntity. It is identical except its Building type is set to Foundation instead of Wall. This enables the DoorPlacementEntity to be put anywhere.

  2. Create an item associated with DoorPlacementEntity and add to your game database and optionally the Shop inventory (for purchase by your character).

  3. Modify or create a copy of the DoorEntity. Select Is Property Entrance checkbox on the Door Entity component.

  4. Place the DoorPlacementEntity in-game to write to database. Place a door in the DoorPlacementEntity to write to database.

  5. Modify the buildings table to remove the creatorId and creatorName from the saved DoorPlacementEntity and DoorEntity.

  6. Add the price (integer) for the building in the DoorEntity extraData column.

Plan of intent

Property Manager is a core system being built for our own game. We have a wide ranging list of features we plan to add in no particular order.

  • purchase building
  • set building price
  • rent building
  • sell building
  • see list of buildings
  • set building type: residence, warehouse, shop
  • place building items appropriate to building type
  • hire NPCs appropriate to building type
  • set shop items and pricing
  • collect taxes on shop

unitymultiplayerarpg_propertymanager's People

Contributors

johnmoney avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

unitymultiplayerarpg_propertymanager's Issues

hi

Hello, I have been following this project, still no news?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.