Search Unity

RPG Creation Kit

Discussion in 'Assets and Asset Store' started by silvematt, Feb 12, 2019.

  1. silvematt

    silvematt

    Joined:
    Jul 15, 2016
    Posts:
    143
    I would ask how it doesn't ;)
    From how I see it, an investment makes a product a better product.
    It allows me to do investments on any part of the project I think an investment is worth doing. It allows me to invest without having to earn before, which is in fact a gain in time. I had to do jobs in order to hire the 3D artists who made the models and textures for having them included with the final product. Now if I need audio, more models, UI, VFX, voice over, web servers, an hand with the website, another hand with the documentation, testing, marketing and an endless list of other stuff a developer has to take care of - I can get help quicker, everything is more accessible and I can do even more than planned - making the product a better product.
    I find it very obvious. The fact that I've received it doesn't change what I've said before knowing about it, the launch of the RPG Creation Kit is set on Q3/Q4 of this year, I cannot say this will change because of the grant, the estimate is done in base of the work I have to do and the chunks of time I have.

    Most of assets utilize third-party stuff that are not included in the package but only in the Demo/Screenshots, and it is a good thing to do since for selling something you have to own it with all the required rights.
    I didn't wanted to do it like that, I prefer doing it in the way I'm doing it.

    And to be clear the grant is given by Epic Games to export the RPG Creation Kit to the Unreal Engine, not to make the Unity version a better version. The latter can be a side-effect of the grant being well used, integrally for the project - which is the way I'm planning to do things.

    I hope I've clarified your doubts, I'm here for anything else :)
     
    Last edited: Jun 24, 2021
  2. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    1,141
    I was just wondering what kind of impact it would have on it. I know you are doing various things with it and didn't know if this help with developing stuff faster ect...
     
    silvematt likes this.
  3. lazyradly

    lazyradly

    Joined:
    Oct 26, 2017
    Posts:
    8
    Just checked in, congrats on the Epic Megagrant! Can't wait for the first release of this addon!
     
    Duffer123 and silvematt like this.
  4. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,201
    @silvematt ,

    Hi there! Thought I'd just check in and see how the project is coming along?
     
    silvematt likes this.
  5. silvematt

    silvematt

    Joined:
    Jul 15, 2016
    Posts:
    143
    Hello It's going great! I'm working on the project whenever I can, from next week I'll be able to work full time again and that's when I'll be able to get a lot done to share the progresses!

    I'm currently cleaning up a lot of stuff and fixing bugs, I wrote a new character controller, added game-pad support, and completely switched to the new Unity's Input System.

    I've also designed and started to engineer the Save System, that will finally enter in development next week!

    Since the RPG Creation Kit and its Demo will also include voice-over and lipsync support I've thought about making an external tool in C++ or something to generate lipsync files from audio - the way it should work is you just put your audio file in it, and it generates a .lip file that you plug in the RPG Creation Kit for the actors to use - I think it could generate a decent result while being super fast to use (and editable manually anyway).
    It's a bit early for that but it's something I'd like to have and I'm sure you'd too!

    Other than that when the Save System will be ready there will still be a bunch of stuff to be done - but I've got the time to make sure to release the project in Q4 of this year as announced previously!

    I'll keep you all posted!
     
    lazyradly and Duffer123 like this.
  6. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,201
    @silvematt ,

    Thanks for the update. Building a decent and flexible character controller is no small thing!

    With the Save System hoping you can support runtime customised stuff like (maybe later release) runtime customisable items...

    Looking forward to next updates.

    Best.
     
    silvematt likes this.
  7. lazyradly

    lazyradly

    Joined:
    Oct 26, 2017
    Posts:
    8
    Really looking forward to the first release! Might try to make my own games with it heh.
     
    Duffer123 and silvematt like this.
  8. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,201
    @silvematt , me again, regular monthly check in, how's it going along?
     
    silvematt likes this.
  9. silvematt

    silvematt

    Joined:
    Jul 15, 2016
    Posts:
    143
    Hello! It's going very good! Very close from finishing off the save system as well.
    Will showcase it soon!
     
    Duffer123 likes this.
  10. lazyradly

    lazyradly

    Joined:
    Oct 26, 2017
    Posts:
    8
    Was just checking in too, great to hear! Can't wait to see how it works.
     
    silvematt and Duffer123 like this.
  11. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,201
    Excellent, thanks for the update @silvematt and I look forward to seeing that showcase...!
     
    silvematt likes this.
  12. silvematt

    silvematt

    Joined:
    Jul 15, 2016
    Posts:
    143

    It's time for an update! I've spent the last month and a bit more building the Save System for the RPG Creation Kit, and here is it!

    The Save System takes a lot from RPGs as The Elder Scrolls and Fallout - my aim was to get as close as possible to those (incredible) save systems.

    It is based on JSON files and the standard Unity's JSON Serializer/Deserializer and the use of custom implemented databases. In particular, those Dictionary based databases contains an ID that points to a Reference, a Reference can be literally anything, a GameObject, a string, a Faction, an Item, a NPC or anything else, and most importantly, you can access those databases from anywhere at any time.

    With the use of Dictionaries, not only the lookup time is incredibly fast, but it's enough to save the ID and relevant state of things in the save file, to then quickly reconstruct the scenario upon the next loading.

    The Objects that currently are saved are:

    • Items In World: Position, Worldspace & Cell, State (taken or not).
    • Created Items (the Items that are created at runtime, such as when the Player drops a weapon): Position, Worldspace & Cell, State.
    • Doors: State (Locked/Unlocked, Opened/Closed), Animation - if the door is playing the animation of opening and you save in that exact moment, upon loading the door animation will play starting at the exact frame.
    • Player: Data (gender, appearance), Position, Worldspace & Cell, Attributes, Inventory, Equipment, State (Weapon Drawn, Crouched, Mouse Look), Animations and more.
    • AI: Data (gender, appearance), Poistion, Worldspace & Cell, Attributes, Inventory, Equipment, State (Weapon Drawn, Crouched, Mouse Look), Animations, Dialogues, Behaviour Trees, Enemies fighting, Current Target(s), Ragdoll and more.
    • Cell Information: AI can travel between cells, so the Cells saves the AI that was in them upon saving/unloading. The next time that cell will be loaded, the AI that traveled there will be spawned and it will resume doing what it was doing - while the original reference (the one you determine while making the game) will no longer be used unless the AI returns to its original cell. This is also true for Items, the player can drag an item from a cell to another and it will be saved as it should.
    • Looting Points: Every looting points will be saved, every item inserted or took. You can loot dead AI, so their loot will be saved as well.
    • Mutable: Those are GameObjects that can mutate their state, currently the only thing they do is to remember if something has to be Active or Disabled. For example, there are 2 models of the same statue, one that has the statue intact, the other one broken - after a quest the statue has to be broken - the Mutable allows to remember when the intact statue needs to be active and when it needs to be replaced by the broken one.
    • Quests and Quests State: Every quests and their state will be saved - currently this not yet completed but I'm aiming for the end of the week.

    The Save File contains only information that changed during the game, if the player took an item, that item will be saved, if the player meets an AI, that AI will be saved, if the Player loots into a container, that looting point will be saved, otherwise it won't. This allows for smaller save files, quicker loading/saving and better performances overall.


    You will access the Save files from the Main Menu or the Pause Menu, each save file is represented by a button that when clicked will show information and a screenshot of that Savefile:



    As you would expect, loading each file loads the information stored in that game, you could have finished the game, being in the middle of a quest, in the middle of a fight, the world could be in any state, items could have been taken, AI could be dead or in the opposite side of the world - everything changed is stored in the Save Files and the game is reconstructed from that.



    The following video shows the save of the Items in world, from the default position of the items in the table, you can take, move and recreate the items, and they will be always saved - making the scene the same as it was when you left it.




    In this one instead, the bucket, that is by default present in a cell (the one with the fences), gets dragged until another cell (the one with the house) - upon saving, the item will be where you left it - while the original instance will not be used anymore. You can also notice that the wooden door of the fence is opened (as I've left it).




    In this video I engage in combat with the Imperial Guard and save while in combat, when I load back the save file, the combat will resume. As shown, also the Ragdoll remains in the exact same position:




    In this other one the fight is between AI, upon saving and then loading, they will remember who they were fighting and continue from there.


    And I could go on and on, you can expect the Save System to work as it should.

    As side from this, the Inventory and Equipment code has been completely rewritten in a much more optimized and clean way, lots of bugs have been fixed, and lesser features added.

    There is still a ton of work to do but it doesn't weight at this time. The last new features that have to be added are: Creation of the Player, Lip Sync and Ready Creature AI. And new functionalities as well, such allowing AI to use Doors and such.

    Everything seems to be in line with the time I have and the ETA I gave myself.

    I'm also preparing to develop the Demo which, upon completion, will lead at the end of the development of the V 1.0 of the RPG Creation Kit. I already have plans for post-release, but I will announce them in the future.

    And that's all for now! I'll bring news here as always!
    Thanks for reading : ))
     
  13. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,201
    @silvematt -

    Easily for me the best update yet. That save system is looking majestic!

    Being a bit inventory-obsessional I'm looking forward to any and all updates on that and items too.
     
    silvematt likes this.
  14. silvematt

    silvematt

    Joined:
    Jul 15, 2016
    Posts:
    143
    Thanks!
    As said the Inventory and Equipment was completely rewritten, it waay better than before and it also support future updates such as crafting, enchantments, conditions etc.

    I forgot to mention that now with new Unity Input System there's full Gamepad support for both Game/UI, which is pretty cool too!
     
    Duffer123 and SickaGamer like this.
  15. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,152
    Fantastic work as usual! Question - what about quests with npcs? If an npc leaves their cell, wouldn't it break the quest reference?
     
    silvematt likes this.
  16. silvematt

    silvematt

    Joined:
    Jul 15, 2016
    Posts:
    143

    Heyy thank you!
    Not sure what you mean, NPCs don't hold any quest reference but have elements (such as dialogues, behaviours, events) that lets a quest progress.
    Neither quests holds actual references of GameObjects, but they rather use IDs.

    For instance, a quest is about killing a specific NPC, let's call it Mankar, the quest has 2 stages:
    • 1: Kill Mankar
    • 2: Report to Uriel that Mankar is dead

    When you get the quest, you'll obviously start at Stage 1.

    There are two ways you can make that quest progress:

    1) QuestScript/QuestStageScript: They work very similiar to what is used in the TES Construction/Creation Kit, when a quest starts, you can have a script that runs periodically (Quest Script) or a Script that runs just once, when a Quest Stage is reached (QuestStage Script).
    What you would do is to make a simple QuestScript that does something like that:

    Code (CSharp):
    1.  
    2. if (quest.curStage == 1)
    3. {
    4.     AI ai = null;
    5.     CellInformation.TryToGetAI("MankarID", out ai); // Tries to grab the NPC if he's loaded (present in any loaded cells) - null if he's not
    6.  
    7.     if (ai != null)
    8.     {
    9.         if (!ai.isAlive)
    10.             QuestManager.instance.SetStage("IDofTheQuest", 2); // The quest will progress from there
    11.     }
    12. }
    13.  
    (This is a rough example, you can cache the AI if you already took it to avoid useless TryToGetAI calls every time this script runs)

    And this is enough, this script will run periodically every X seconds you decide, until the quest is completed. If Mankar is loaded and he dies, this script will detect it and make the quest progress.
    You could have complications, such as:
    • What if I've already Killed Mankar
    • What if I want to kill Mankar instantly and I don't know when he will be loaded

    Both can be solved by the help of the Save System.
    The Save File contains all the NPCs you met and their state, so if you already killed Mankar, it's written there.
    You can edit the script to do an extra check:

    Code (CSharp):
    1.  
    2. if (quest.curStage == 1)
    3. {
    4.     AI ai = null;
    5.     CellInformation.TryToGetAI("MankarID", out ai); // Tries to grab the NPC if he's loaded - null if he's not
    6.  
    7.     if (ai != null) // Same thing as above
    8.     {
    9.         if (!ai.isAlive)
    10.             QuestManager.instance.SetStage("IDofTheQuest", 2); // The quest will progress from there
    11.     }
    12.     else if (SaveManager.saveFile.AIData.allAI.ContainsKey("MankarID")) // If we met Mankar before
    13.     {
    14.         AISaveData data = SaveManager.saveFIle.AIData.allAI["MankarID"]; // Grab the entry that contains all the info about Mankar
    15.         if (!data.isAlive) // If he's dead
    16.             QuestManager.instance.SetStage("IDofTheQuest", 2); // The quest will progress from there
    17.     }
    18. }
    19.  
    If you want to kill him instantly, if he's not loaded you can simply add (or edit, if you met him before) in the dictionary of the SaveFile the entry that has as ID "MankarID" and as value an AISaveData with 'isAlive' set at false.
    The script above will run just fine. And the next time he will be loaded, wherever he will be he will be dead.
    This does not affect only the isAlive state, you could change everything from there, postion, cell, inventory, behaviour...

    2) The other way, that is much much simpler is by Events.
    When a loaded AI does something, such as Dying, an instance of 'RPGCreationKit.Events' is triggered and executed.

    Those Events can be:
    • Quest Dealer: Adds a quest
    • Quest Updater: Updates a quest (or adds it at the selected stage)
    • Consequences: Can do various things :/

    So on the "OnDie" callback you will specify something like that:



    When Mankar dies, those Events will be processed and the quest will continue (or it will be added, if it wasn't)

    3) There's actually a third way, which is by using Persistent References (explained in a previous reply), those are essential GameObjects that are inside a special scene that is always loaded, therefore everything in there is always accessible.

    The original goal of those was to have always access to NPCs, that meant every dynamic NPC would have been there, disabled), but with how I designed the Save System I can avoid doing that and do just as I've explained above - while Persistent References can be, well, persistent references to things like locations, doors, transforms, anything you may need.

    I hope I covered your original question, if I didn't please let me know!
     
    Last edited: Sep 8, 2021
    joshcamas, Duffer123 and lazyradly like this.
  17. silvematt

    silvematt

    Joined:
    Jul 15, 2016
    Posts:
    143
    Hello there!

    I've recently reworked some code and made much easier the creation of Quest Objectives and Optional Quest Objectives. For testing that I've created a small Quest that implements that and multiple other functionalities all together.
    Here is it!



    A little update since the last time:
    Save System is completed, you can now save and load quests, quest states and quest consequences upon with everything else. Behaviours, dialogues, states and progresses are saved in the savefiles and correctly reconstructed upon loading.

    Creating the quest above was a very smooth process, there are a still some rough edges (both in gameplay and tools) and I've made a list of things to improve before starting developing the Demo of the RPG Creation Kit and name it the V 1.0

    Thank you for reading!
    Will update as soon as I'll start working on the demo!
     
    lazyradly and Duffer123 like this.
  18. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,201
    Nice....
     
    silvematt likes this.
  19. lazyradly

    lazyradly

    Joined:
    Oct 26, 2017
    Posts:
    8
    Amazing! Good to hear that the save system is fully operational and quest making go smoothly. Best of luck to the rest of your development!
     
    silvematt and Duffer123 like this.
  20. silvematt

    silvematt

    Joined:
    Jul 15, 2016
    Posts:
    143
    Hello everybody!

    Here is a video that showcases the Character Creation process.

    The Character Creation creates a new savegame with settings declared by the developer (like the location, worldspace, cell, rotation, initial inventory and equipment..) - while saving player's choices (gender, face, hair, eyes and so on and so forth).


    Everything is obviously stored in the save-game and loadable at any time!

    A quick note, as said previously you're not bound to those characters and those blendshapes, you could import custom characters with custom blendshapes and that would be ok if you follow some instructions (I'll make sure to write a detailed page on the documentation about that).

    About the FPS models, you can specify different FPS models for each character model and gender, in fact in the case of those models the hands and arms will be of your character's gender.

    And that's pretty much it!

    With that done I'll start very soon the development of the Demo and make sure to update you from time to time.

    Thanks for reading : ))
     
    lazyradly and Duffer123 like this.
  21. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,201
    @silvematt - brilliant, and thanks for the update!

    In terms of polish, the run/walk animations seem a little out of kilter with the speed at which the characters and mobs move across the terrain? (- ironically, it actually reminds me a bit in that sense of the Elder Scrolls series too!)
     
    silvematt likes this.
  22. silvematt

    silvematt

    Joined:
    Jul 15, 2016
    Posts:
    143
    Hey thank you!
    I see what you mean, the AI has two variables you can instantly change anytime, "Walk Speed" and "Run Speed" you can edit those to make the speed more in accordance with the animations.

    I'll try to get the best values for those animations, but it's obvious that overall it would be vastly better with better animations I couldn't make :)
     
    Duffer123 likes this.
  23. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,201
    @silvematt - hey, no worries. I'm guessing we can insert our own animations anyway - and animation overrides?

    (thinking here about abilities and things like resource collecting like mining, smithing, fishing etc)
     
  24. silvematt

    silvematt

    Joined:
    Jul 15, 2016
    Posts:
    143
    Yes, absolutely.

    None of those is planned.
     
    Last edited: Oct 14, 2021
    Duffer123 likes this.
unityunity