Code Monkey home page Code Monkey logo

anyrpgcore's Introduction

AnyRPG

Introduction

This project contains the code for the AnyRPG Engine.

AnyRPG is a Role Playing Game engine written in C# for Unity.

It is a 100% free and open source project with the goal of enabling content creators to rapidly create unique and engaging short stories, scenarios, adventures, and even full games.

It accomplishes this by providing a platform with the most common Role Playing Game functionality out of the box so that content creators only need to provide visual assets and story content.

Links

Web Site

http://www.anyrpg.org/

Documentation

Documentation hosting is provided by Gitbook at https://docs.anyrpg.org/

Patreon

https://www.patreon.com/anyrpg

Download Unity Packages and Example Games

http://www.anyrpg.org/downloads/

YouTube Channel

https://www.youtube.com/channel/UC-SiqAyRXR6eijPggFhFG2g

Discord Server

https://discord.gg/huSAuqk

Trello

https://trello.com/anyrpg/

Twitter

https://twitter.com/AnyRPGEngine

Setup

There are 3 ways to install AnyRPG, depending on your preference. They are listed below.

AnyRPG Engine Unity Package Installation

A Unity package that includes this repository, a complex sample game, and all dependencies pre-installed is available for download at http://www.anyrpg.org/downloads/

AnyRPG Core Github Installation

A video tutorial for installing AnyRPG Core version 0.10.1a (and higher) from github can be watched here: https://www.youtube.com/watch?v=oMeWWgNYrYI

  1. Install the correct Unity version to open this project. The current project Unity version is 2021.3.28f1
  2. Clone this repository into a directory on your computer
  3. Open the Unity Hub and add the project
  4. Open the project and install the following Unity packages:
  5. Open the Window menu in Unity and choose 'TextMeshPro' > 'Import TMP Essential Resources'
  6. Open the UMA menu in Unity and choose Global Library. In the Global Library window, choose File > Rebuild From Project

AnyRPG Core Unity Asset Store Package Installation

AnyRPG Core is available on the Unity Asset Store at https://assetstore.unity.com/packages/slug/234361

A video tutorial for installing AnyRPG Core version 0.14.5 (and higher) from the Unity Asset Store can be watched here: https://youtu.be/syI3ohFWVck

A PDF file with instructions for installing AnyRPG Core from the Unity Asset Store can be found at Unity Asset Store Package Setup Guide

Getting Started

Open the Tools menu in Unity and choose 'AnyRPG' > 'Welcome Window'

From the welcome window you can easily

  • Find and open the included sample games
  • Launch the New Game Wizard to setup your own game
  • Find and open online support resources to get in depth help and information about using AnyRPG

anyrpgcore's People

Contributors

grannypron avatar michaelday008 avatar stephabeni avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

anyrpgcore's Issues

UnityEditor namespace not found during build

Some editor scripts are not in the editor folder and since the editor namespace is not available during build, this is causing builds to fail.

All editor scripts that reference the editor namespace should be moved to the editor folder.

sorry to disturb you again but i need a little help

Hello Sorry to disturb you again but I need a little help to intergrate my custom third person controller. The problem is that there is a limitation of 31 layers in unity and anyrpg left me only three layers to use. See below in image, these are the yellow layers required by my controller to work, could you rename your layers to something more universal so that we can overcome the 32 bit layer limitations in unity. i thank you in advance

147083751-e5bf2604-31ae-4d2b-800d-9c9aaf6ba2fa (1)

A lot of errors and pink textures when trying to convert project to hdrp

-Please note that HDRP uses the linear instead of gamma, hence all uma character appear with bright colors in character selection screen
-character selection screen is unselectable in hdrp mode
-I found a lot of uma textures went pink, im not quite sure what to do next
-I tried several times to reinstall anyrpg,
-when I try to create a new game with wizard, it didnt worked
-When I did a search there was around 75 broken links, i suppose anyrpg didnt upload all the packages correctly, so this time i will try to download anyrpg from github, i hope all the assets get imported this time...but i think overall i will need help concerning compatibility of anyrpg with hdrp...that would be too bad not to take advantage of hdrp because i have plans to build my levels quickly with gaia

Example scene

This project needs an example scene to see how it all works. Even if it's just capsules and cubes instead of real models.

Cannot convert blend file to fbx in unity

There is a technical bug in unity where unity cannot convert the dragon blend file to fbx. I had blender 3.0 and i was forced to install blender version 2.80. Now unity is converting the blend file. The people need to be aware of it or else the dragon mount appear invisible in game

Third Party Controller Support

I am wondering if there would be an easy way to integrate third party controllers such as Invector Shooter Template. I also know a lot of the Unity community also uses Ootti or UFPS.

NullReferenceException: Object reference not set to an instance of an object

When looting goblin rangers

NullReferenceException: Object reference not set to an instance of an object
AnyRPG.LootableCharacterComponent.TryToDespawn () (at Assets/AnyRPG/Core/System/Scripts/Interactables/LootableCharacterComponent.cs:147)
AnyRPG.LootableCharacterComponent.HandleTakeLoot (System.String eventName, AnyRPG.EventParamProperties eventParamProperties) (at Assets/AnyRPG/Core/System/Scripts/Interactables/LootableCharacterComponent.cs:104)
AnyRPG.SystemEventManager.TriggerEvent (System.String eventName, AnyRPG.EventParamProperties eventParam) (at Assets/AnyRPG/Core/System/Scripts/GameManager/SystemEventManager.cs:64)
AnyRPG.LootUI.TakeLoot (AnyRPG.LootDrop lootDrop) (at Assets/AnyRPG/Core/System/Scripts/UI/CloseableWindows/LootUI.cs:89)
AnyRPG.LootButton.TakeLoot () (at Assets/AnyRPG/Core/System/Scripts/UI/Buttons/LootButton.cs:68)
AnyRPG.LootManager.TakeAllLoot () (at Assets/AnyRPG/Core/System/Scripts/GameManager/LootManager.cs:60)
AnyRPG.LootUI.TakeAllLoot () (at Assets/AnyRPG/Core/System/Scripts/UI/CloseableWindows/LootUI.cs:70)
UnityEngine.Events.InvokableCall.Invoke () (at <88f69663e9a64d00b2091dd8dfd4d38f>:0)
UnityEngine.Events.UnityEvent.Invoke () (at <88f69663e9a64d00b2091dd8dfd4d38f>:0)
UnityEngine.UI.Button.Press () (at Library/PackageCache/[email protected]/Runtime/UI/Core/Button.cs:68)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at Library/PackageCache/[email protected]/Runtime/UI/Core/Button.cs:110)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at Library/PackageCache/[email protected]/Runtime/EventSystem/ExecuteEvents.cs:50)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at Library/PackageCache/[email protected]/Runtime/EventSystem/ExecuteEvents.cs:262)
UnityEngine.EventSystems.EventSystem:Update() (at Library/PackageCache/[email protected]/Runtime/EventSystem/EventSystem.cs:385)

Reduce use of real-time cameras in unit frames

Frame rates in Unity are inversely proportional to the number of cameras rendering each frame.

Right now, there is a main camera, minimap camera, player unit frame camera, and if you have something focused, a focus unit frame camera all rendering each frame. That drops frame rates to as low as 25% of theoretical maximum.

The work on the minimap to replace with a static rendered image is being tracked under #9

This ticket is to address the issues with the unit frame cameras.

To complete this ticket, real-time rendering of unit frames should be replaced with either/or/both of:

  1. Add player picture to Unit Profile and render that static picture
  2. Come up with some good way to ensure any UMA target is fully rendered, and then take a single snap (less performant because of the real-time snap and will cause temporary lag spike / frame rate drop). This should be a backup method in case no static picture exists on disk already.

Removing these sources of real-time rendering should have a positive effect on frame rates.

Item is equipped if you cannot sell it

In the vendor UI if you cannot sell an item it's equipped instead. If you click quickly through your inventory it may happen that you accidentally sell things you equipped before.

One Handed Sword - B to C

Grabbing the sword from the table, then trying to grab it from your bag and put it in the hand slot on the Character screen will cause the sword to vanish since we don't have the One Handed skill.

Feature: CharacterAppearancePanel Other UMA Races

Great project!

Feature request here.

Right now it looks like the Character Appearance Panel has one spot that is still hard coded.

If we create our own UMA Races or just play with anything other than HumanMaleDCS/HumanMale or HumanFemaleDCS/HumanFemale we presently will need to hard code something in the Core folder. If we can get some editor variables in UnitProfile or Faction or somewhere that makes sense. That would be awesome!

public void SetMale() {
            //Debug.Log("CharacterCreatorPanel.SetMale()");

            if (characterCreatorManager.PreviewUnitController.UnitModelController.UMAModelController.DynamicCharacterAvatar.activeRace.name == "HumanMaleDCS"
                || characterCreatorManager.PreviewUnitController.UnitModelController.UMAModelController.DynamicCharacterAvatar.activeRace.name == "HumanMale") {
                //Debug.Log("CharacterCreatorPanel.SetMale(): already male. returning");
                return;
            }
            femaleRecipe = characterCreatorManager.PreviewUnitController.UnitModelController.UMAModelController.GetAppearanceString();
            femaleButton.UnHighlightBackground();
            maleButton.HighlightBackground();
            //maleButton.HighlightBackground();
            if (maleRecipe != string.Empty) {
                //Debug.Log("CharacterCreatorPanel.SetFemale(): maleRecipe != string.Empty");
                characterCreatorManager.PreviewUnitController.UnitModelController.UMAModelController.DynamicCharacterAvatar.ChangeRace("HumanMaleDCS");
                //characterCreatorManager.PreviewUnitController.UnitModelController.LoadSavedAppearanceSettings(maleRecipe, true);
                characterCreatorManager.PreviewUnitController.UnitModelController.UMAModelController.SetAppearance(maleRecipe);
            } else {
                //Debug.Log("CharacterCreatorPanel.SetMale(): maleRecipe == string.Empty");
                //characterCreatorManager.PreviewUnitController.UnitModelController.UMAModelController.DynamicCharacterAvatar.ChangeRace("HumanMaleDCS");
                characterCreatorManager.PreviewUnitController.UnitModelController.UMAModelController.SetAvatarDefinitionRace("HumanMaleDCS");
                characterCreatorManager.PreviewUnitController.UnitModelController.UMAModelController.PreloadEquipmentModels(true);
                characterCreatorManager.PreviewUnitController.UnitModelController.UMAModelController.ReloadAvatarDefinition();
            }
        }

        public void SetFemale() {
            //Debug.Log("CharacterCreatorPanel.SetFemale()");

            if (characterCreatorManager.PreviewUnitController.UnitModelController.UMAModelController.DynamicCharacterAvatar.activeRace.name == "HumanFemaleDCS"
                || characterCreatorManager.PreviewUnitController.UnitModelController.UMAModelController.DynamicCharacterAvatar.activeRace.name == "HumanFemale") {
                //Debug.Log("CharacterCreatorPanel.SetFemale(): already female. returning");
                return;
            }
            //maleRecipe = characterCreatorManager.PreviewUnitController.UnitModelController.UMAModelController.DynamicCharacterAvatar.GetCurrentRecipe();
            maleRecipe = characterCreatorManager.PreviewUnitController.UnitModelController.UMAModelController.GetAppearanceString();
            maleButton.UnHighlightBackground();
            femaleButton.HighlightBackground();
            //femaleButton.Select();
            if (femaleRecipe != string.Empty) {
                //Debug.Log("CharacterCreatorPanel.SetFemale(): femaleRecipe != string.Empty");
                characterCreatorManager.PreviewUnitController.UnitModelController.UMAModelController.DynamicCharacterAvatar.ChangeRace("HumanFemaleDCS");
                //characterCreatorManager.PreviewUnitController.UnitModelController.LoadSavedAppearanceSettings(femaleRecipe, true);
                characterCreatorManager.PreviewUnitController.UnitModelController.UMAModelController.SetAppearance(femaleRecipe);
            } else {
                //Debug.Log("CharacterCreatorPanel.SetFemale(): femaleRecipe == string.Empty");
                //characterCreatorManager.PreviewUnitController.UnitModelController.UMAModelController.DynamicCharacterAvatar.ChangeRace("HumanFemaleDCS");
                characterCreatorManager.PreviewUnitController.UnitModelController.UMAModelController.SetAvatarDefinitionRace("HumanFemaleDCS");
                characterCreatorManager.PreviewUnitController.UnitModelController.UMAModelController.PreloadEquipmentModels(true);
                characterCreatorManager.PreviewUnitController.UnitModelController.UMAModelController.ReloadAvatarDefinition();
            }
        }

I've got all this set, just no way to allow the Appearance Panel to see them because it is hard coded to HumanMaleDCS/HumanMale or HumanFemaleDCS/HumanFemale, it won't see my HumanFemaleHD, but it will see and save my HumanMaleHD as that is selected as the active race. So we are close.
image
image
image
image

Add 'net' to level colliders that respawns player if they fall through the bottom of the map

Problem:
P-4: You can actually fall off the map being a "Lost soul", but you won't die or restart (for example, near the "body machine"). There is no restart button and the only option is to exit the game. This also affects made games.

Solution:
S-4a: Add something that kills you upon falling off the map.
S-4b: Add a restart game button on menu.

Developer notes:
Although there are level colliders for walls, there is no level collider under the level. This should be pretty easy to implement. A new trigger collider will be placed on top of a solid floor at like -250m or something. When player falls into it, it will respawn them at the default spawn point.

A roof should also be added so you can't be exploded or pushed over the top of the 100m or 250m side walls.

when loading a level, a male character shows for a bit if playing a female

Due to the way that UMA characters are reset, they will always go back to male when in the object pool. To prevent showing a male character for a bit while a zone map is loaded or snapshotted, the loading screen should only be removed once the map snapshot is complete and the character is rendered.

Enhancement: Add a setter to Interactable.interactableName

That way scripts could automatically name an interactable. One example are doors which could get an owner name or a street address. It would also open the possibility to spread interactables procedurally and give them a reasonable name without having to configure each of them.

Add first play control hints

Problem:
P-2: Lack of instructions on how to move. This extends to users of the engine. I was like 4 minutes not knowing how to turn. Mouse does nothing but move the camera, while WASD only strafes. I eventually figured it out, but still moved very awkwardly.

Solution:
S-2a: Add an overlay with text upon commencing the game showing the default key controls and which does what (standard industry practice).
S-2b: Enable some sort of mouse character control system, not just keyboard (this also allows action and platformer functionality).

Bug in 0.10.1a New Game Wizard

Teeny bug in 0.10.1a: Gotta call CreateFolderIfNotExists() on the folder before you call MakeGameManagerPrefabVariant() around line 142 because otherwise it won't be there.

Master and music volume setting ignored

When you start a game the master and music volume in the settings (player preferences) are ignored by the audio manager though the UI shows the saved setting.

UMA_DCS is deprecated, replaced with UMA_GLIB

You can use the UMA_GLIB instead but GameManager has to make aware of that change.

Something like that worked:

        private void SetupPermanentObjects() {
            DontDestroyOnLoad(this.gameObject);
            GameObject umaDCS = GameObject.Find("UMA_DCS");
            if (umaDCS == null) umaDCS = GameObject.Find("UMA_GLIB");
            if (umaDCS == null) {
                //Debug.LogError("SystemGameManager.SetupPermanentObjects(): AnyRPG requires uma.  Ensure that the UMA_DCS prefab is in your loading scene.");
                Debug.Log("SystemGameManager.SetupPermanentObjects(): UMA_DCS prefab not found in scene. UMA will be unavailable");
            } else {
                DontDestroyOnLoad(umaDCS);
            }
        }

Invector Setup templates are missing from github

The Invector template unit is missing from github.

It should be moved from the Engine/Content directory structure to the Engine/Core directory structure.

The process also needs to be streamlined so the New Game Wizard handles as much of the setup as possible.

AnyRPG AI/Third Party AI Support

Hello Again! I am wondering if we are going to be able to integrate third party systems such as Emerald AI. I would rather a complex and easy solution be within AnyRPG but third party support would be awesome.

One Handed Skill

Need One Handed Skill from Skill trainer so we can play with the sword.

Feature: AudioProfile Volume

Allow a different volume setting on AudioProfile's.

Use Case:
image
image

I go to change the music played when selecting/creating a character. I can do this easily with AudioProfile's however I am stuck with the volume of the audio clip. I would need to bounce out the audio file again to have a reduced volume.

If we had a Volume level on the AudioProfile or somewhere clever then we could have better control over such things. And use the same clip at different levels in different places with different AudioProfile's.

Add resolution scaling options

The current UI is basically hard coded for 1920x1080 resolution.

Buttons don't scale their size and although you can drag your UI around, that is only useful for resolutions larger than 1920x1080, not smaller resolutions.

Add option to scale for different resolutions.

character preview panel doesn't swap out gear properly

although going from no gear to some gear in the character panel updates the display, swapping gear just removes the old gear without putting in the new gear. This is likely because a rebuild is called when another rebuild is already happening.

As part of the fix for this issue, the character panel updates should make use of the avatar definition and just apply the new equipment list to it before calling an appearance rebuild.

Add Object Pooling

Currently, the combat text is the only thing that is pooled.

This means all objects that are instantiated at run-time are not re-used. They are created, and permanently destroyed.

This leads to a lot of garbage collection which causes spikes in CPU usage, and dropping frame rates or input and graphic lag.

An object pooling system should be used for instantiation of all objects in the engine. This will involve a bit of work to ensure that all pooled objects can have their properties reset properly on re-use.

For example, a re-used arrow object should not begin immediately heading toward its last target etc.

I - Currency

Pushing I doesn't open up the Currency window. The window does appear to be made correctly to function. (the inventory window has issues.) #11

UI remains squished when switching back from a smaller screen size

This fix requires the window positions to be saved in terms of their anchor position to be fixed so they snap back when going from a smaller screen to a larger one.

Right now windows are saved in terms of absolute screen values so they are relative to the bottom left corner of the screen.

UMA Assets Easy Integration

An easy way to add UMA slot items as rewards for quests/NPC drops that will work with the UMA player avatar.

dead temporary pets do not despawn

Temporary pets captured through necromancy do not despawn when killed.

This means any new pet resurrected with necromancy stays hostile on resurrection.

New game wizard

From #contribute-code:

"[ OPEN ] The engine would be more user friendly with a new game wizard. It should create:
-New folder in root of project with game name
-Resources Folder with subdirectory structure for all scriptableobjects
-A new scene called Game that contains the UMA_DCS prefab and a variant of the GameManager prefab with the game name, version, Resources folder name, already configured.
-A new scene called FirstScene (or a user provided name) that is loaded automatically when a new game is started. This scene can be completely empty or just have a terrain / plane so the character doesn't fall through the map on load
See the invector new character creator for an example of a new thing creation screen popup."

No message is shown when no bags are equipped and inventory is opened

The InventoryCanvas doesn't work in the current build. Pushing "B" doesn't open it. Upon reviewing it in the Hierarchy I can see that it isn't setup as a Window like the rest of the UI. Bags still seem to work though. Also pushing "I" doesn't open up the Currency panel. I will create another issue for that. #12

Implement Minimap Generator with improved performance techniques

Using the minimap causes lag. This is generally because the minimap is implemented as a second camera and the frame rate is inversely proportionate to the number of rendering cameras.

Change to use a system like the one described at https://www.youtube.com/playlist?list=PLxj06lQ-YNLso8RRYGvQeP_ExILPjmAg4 where pre-rendered textures are used.

Original description from the Discord post is:
"The current minimap has bad performance because it renders a view of the map in real time using a second camera. The minimap needs to be updated to use pre-rendered image tiles so the performance hit of having a second camera can be avoided. The current performance his is at least 15 fps. I found this tutorial on YouTube that has the exact type of system I want, but haven't had time to look through it and implement it. I couldn't find a link to any github source for quick implementation. If possible, implement this minimap system."

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.