Search Unity

Assets Master Class System - Quickly Create & Populate Classes w/o Writing Code

Discussion in 'Works In Progress - Archive' started by infinitypbr, Mar 9, 2017.

  1. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    EDIT: Here's the latest video. The project is no longer a "First Person Party Based RPG Framework". I mean, it is that, but it's a lot more now. I'm not sure what to call it. So currently "Class System" is good enough.



    The project is basically, I think, a quick way to set up a class structure in Unity. Rather than hard coding your classes, you can create new lists and embed the data in them right in the editor window. You can link to other lists -- basically referencing one class inside another, and as you add, delete or edit class or item names, everything is kept up to date.

    So it's somewhat flexible. Let me know what you think!


    ____________________________

    Hey all! I've started working on a First Person Party Based RPG Framework that I'll be using to make my own game (http://www.TheQuestHerores.com). I'm going to put this on the Asset Store when it's done, for a few reasons:

    1) The money, if any, will help me continue to make the game without having to get a job.
    2) Knowing it'll be on the store gives me more reason to make sure that I do everything as well as I possibly know how, to learn better ways of doing things and to comment all of my code.
    3) I'm hoping others out there who want to make RPGs will be helped out -- making the framework is half the work. I produce all the characters and environments in the InfintyPBR series, so that, along with this, will be most of the work for anyone interested in making a similar game.

    The framework will have a lot of editor scripts to make setting things up easier. One of the big things I have now is a "Proficiency Editor", shown below. Each Class & Race has different proficiency levels for all the skills and stats in the game. So this window lets me somewhat easily edit all the details in a table format.

    Screen Shot 2017-03-08 at 10.58.36 PM.png

    I'm also building a catch-all "First Person RPG Game Data Editor" which is currently mostly a set of foldouts for the various things, shown below as well.

    Screen Shot 2017-03-08 at 11.03.47 PM.png

    Let me know what you think!
     
    Last edited: Mar 22, 2017
    tapawafo and Hormic like this.
  2. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    First WIP video!

     
  3. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    Is the code in C# ?
     
    Martin_H and infinitypbr like this.
  4. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Yep! All of it :)
     
    Martin_H and JBR-games like this.
  5. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Here's what I want to provide:

    * All the generic code to get a game working. If you don't do any changes to the math and stats and systems, you should be able to build your own game quite easily.
    * There will be a selection of solid-color-textured items, characters & enemies that I'll be using to build the "Demo". I don't want people to take the framework and be able to publish the game as is, so the demo will be short and small, mostly aimed at testing every aspect of the system.
    * The UI will be bare bones and intended to test the system, rather than be perfect for game use. I want people to have to make their own UI, so that anyone who actually makes a game with this framework has to make it more unique. No sense in players seeing UI similarities between various games. Also I hate making UIs, so I doubt anything I make will be the best. And, also again, what the UI shows is really dependent on what the developer wants it to show -- some may give hints when you can pick up an object or open a door or what not, while others (like myself) may prefer that users not be given such hints. (Unless, perhaps, they have a skill that would enable the hints).
    * The ability to modify the code will require coding experience. To some degree, you can add new things within the framework -- skills, spells, character classes etc. But beyond that, you'll need to do coding. I'll be trying to figure out how to make the math somewhat unconnected from the stats, but I haven't yet figured that out. I'd like a formula "damage" to be something you can adjust in the editor without code... but I need to figure that out.

    That's about it... It's the code that's important, the part that takes a lot of (often boring) work before you get to start making cool caves and dungeons and monsters. Once the code is done and solid and has all the things needed to make the game, the rest is much easier, I hope.
     
  6. SpectralRook

    SpectralRook

    Joined:
    Feb 9, 2014
    Posts:
    112
    Very impressive. What will make it first person as opposed to an RPG framework manager that allows for any character controller? Is it that you are intending on making it a complete template that heavily integrates with your first person character controller? For example, a spell caster with first person arms, animated for casting various spells you defined; Same for warrior, archer, etc.

    Personally, I'm just interested in what you have already created, regardless of any future plans for a first person character controller. Seams like a huge time-saver for creating an RPG system.

    FYI, your original post url for www.thequestheroes.com has a typo (..Herores.com). Also, your Quests, and more importantly, Patreon links do not work.
     
    infinitypbr likes this.
  7. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    Yeah I dig the editor window that looks very slick.

    I'm working on a sorta Might and Magic-ish game (skewing more Wizardry than M&M) myself. For a while I was trying to turn it into an asset store rpg kit thing but it was pretty tough not to end up with all my game specific systems spread throughout the code. My best attempt was doing a lazy loaded scriptable object singleton (in resources) that contained all the constants and formulas. Like instead of going around configuring items to have X stat (15 dmg, 5 defense, etc) they were all set to be X% of the average. So a sword could be set to 75% of average damage, a special sword to 150% average damage, when I had calls to determine damage or something it passed through that singleton, etc.

    RPGs are such a pain in the ass as you proceed further and the endless edge cases and it became impossible to keep it generic so I gave up on making it able to split off into an asset store product. All those RPG kits I see on the store look like such giant piles of messy code I'm guessing from trying to cover all cases.

    So maybe you'll be more successful limiting your scope to blobber games as you can make a lot of assumptions and not have to make it too generic. I'm eager to hear more of your attempts to develop a M&M style game either way!
     
    infinitypbr likes this.
  8. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Thanks! yeah, the patreon link will come down. My plan is that once I have something that's actually playable, people can sign up for like $1 a month or something to play it and take part in fleshing out quests, fixing issues and all that. idk if anyone will be interested, but that's the goal, like a pre-alpha-launch I suppose?

    So it's a first person party based RPG, which (to me at least) means no first person arms. Instead, the plan is to replicate the experience of Might & Magic VI - VIII.



    It does not age well... :)

    So the game will be similar to that feeling. It's real-time, but has a turn-based mode for combat, so you can take more time picking the right spell and all that. There will be a lot of emphasis on puzzles and solving things out, and I hope to build a decent amount of randomization into the game, including randomizing the layout of some of the dungeons and quests (and solutions), so that each time you play you have to still figure things out.

    I was thinking earlier today that it may be easy enough, once it's complete, to modify it for other game styles. Most of the data would be the same. But we'll see how it ends up going. Some aspects i still have to figure out.

    I will be adding various enemy logic and spell logic -- those two things are important, I think, since both have a lot of various ways of happening in game. Spells can be just a cure spell on a character (with particles on their portrait, for this style, rather than in the game view), or a fireball or an explosion or even a giant meteor shower. Enemies are equally varied: Walking, running, flying, burrowing, big & small, and all that.
     
  9. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    There needs to be more M&M games! :D I wish there were more mobile ones too.

    That's an interesting way of doing the damage! I did a game (http://www.TheBarbarianGame.com) with Might, Stamina and all that, but for that I just added the might value directly to the damage. The math was more simple. For this, I'm attempting to copy the M&M math as closely as possible, since they had a really nice curve as you advanced. Unfortunately there aren't too many resources I've found. There are some, but so far none that lists outright the formulas they use.

    For the generic / specifics, yeah. That's part of the reason I'm frustrated with the character creation scene. There is some code that's more generic, but much of it is boiler plate. I may be able to make it simpler after things are more fleshed out. RPGs really are a beast. This is my 3rd attempt at this type of game -- the first was my first Unity game and i Was not at ALL ready for it. I made "The Barbarian" instead -- the game works, but man do NOT look under the hood.

    A little over a year ago I started working on a similar project, but I think I went about it wrong, and when I got busy I stopped updating it. It was also in Unity script, and over the past few months I've been forcing myself to do my scripts in C#, and I've finally had it click, so things are going well now.

    Back to mobile: I don't want to promise anything, but I am hoping that I can include both mobile & console controls along with the desktop. Since Unity makes it so easy to make a desktop game export for mobile, I figure at some point mobile devices will be so fast that it won't be terribly difficult to make a desktop game work on mobile. And like I said, there needs to be more M&M games for mobile! There really needs to be more fantasy RPGS in general -- REAL rpgs, though, not mobile ones that feature only one or two concepts and keeps you coming back to a home base / store to buy more stuff.
     
  10. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    Yeah blobber style games seem pretty ideal for mobile (same for EoB/DM style) so I'm surprised the only attempts I've seen are pretty half baked.

    Some people were working on a MM6-8 engine rewrite in C++ and a Russian group was trying to do the same in Unity and they might have the old M&M math decompiled somewhere. M&MX was made in Unity (somewhat unfortunately as its poor performance gave some people a bad impression of Unity) so you can just run that through DotPeek or something if you want to check out their damage code. Considering their XP curves were nothing like the older MM games it might not be that helpful though.

    Anywhere you can make things easier definitely go for it! As you said these games don't need hands or player animations and take every shortcut you can. RPGs thrive on content so anything that simplifies adding more content is a good idea.

    Have you decided how you will handle spells/skills/monster abilities? I've gone for the "everything is an item" approach so spells are an infinite use item, monster attacks are a dummy item, etc. That was the approach of some classic CRPGs but its definitely an important decision to make and there's a lot of different ways to accomplish it.
     
    infinitypbr likes this.
  11. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Neat, I wasn't aware of those projects -- I googled some and think I found it. Doesn't look too active -- but still, interesting. I'd be more interested in a 1:1 re-creation that doesn't use the original assets, that uses modern assets instead.

    Can you describe more about what you mean having the spells & monster attacks be "items"?
     
  12. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    You have one logic route for your actors to "use item" rather than have a bunch of different actions like use spell, use ability, use weapon, etc. All items would have the configurable data of range, who they affect, range, power, etc. Obviously you'd need an "ItemType" enum or something so you couldn't equip a spell or drop an ability.

    So when a player attacks they use their equipped weapon but a mob would have a dummy item that just has the range, power, etc configured with no need for a name, icon, and such. A consumable would have an OnComplete effect to reduce the count by 1, a spell would have an OnComplete to reduce spell points, etc.

    Since everything is used the same you don't need to write very similar logic in multiple places. All you perform action logic is the same. No need for a special spell inventory just a normal item inventory marked to only accept spells, an ability inventory that only accepts abilities, etc.

    Seems ideal if you are going for an asset store kit as its easy to just have items or expand out to spells, abilities, etc without having to change the central logic.

    I've seen other approaches especially if the game is going heavy on command pattern as maybe you want everything to be an action and items to just be static data that changes how the action is performed.
     
  13. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149

    Yeah, that may be ideal. I'm probably going to start building an item system, since I want each player to have some items in their inventory based on the skills chosen. I'll think about this for a bit before I head into that!
     
  14. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    I've been playing w/ the idea above, and I think I like it. I can switch my hard-coded "Conditions" and "Skills" to this system.

    It does require some variables that may only apply to one category though. Skill, for instance, will have "Skill Points", which is unique to them, and something the player adds.

    Skills also will require a variable to "multiply effect by skill points".

    This is because each "Inventory.Item" (Skills.BodyBuilding, for instance), can have stat modifications. For Body Building, there will be a "Set Value" of 1 for the stat "Hit Points". However, the actual formula is this...

    HitPoints = (1 * SkillPoints) * SkillLevel + BaseBonus;

    So I'll need three extra variables: multiplyBySkillPoints, multiplyBySkillLevel and baseBonus

    These variables, I think, can really only be used with BodyBuilding or similar skills. They'll be visible in the editor, however, for all other "Inventory.Items", such as "Items.Sword". Unless I can figure out a way to only show groups of variables based on the parent class of an item.
     
  15. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    You could take a look at the approach taken here (last post):
    https://forum.unity3d.com/threads/streamlined-data-entry.395719/#post-2585197
    or here in his demo
    https://github.com/petesimard/datablocks

    They both have conditional attributes that only show in the inspector if they meet some criteria.

    You could also solve this with inheritance (EquipmentItems have an EquipSlotType) or with this method (Attribute that hides EquipSlotType unless ItemType == equipment). To have a pseudo component approach on a ScriptableObject I screwed around with the ItemType enum being a [Flags] once so you could check if the ItemType has Equipment flagged so an item could be multiple types without any edge case coding (like a Helmet that you can also 'use' could be both Equipment and Usable)

    Not sure what's the better approach.
     
    infinitypbr likes this.
  16. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    On Making Custom Variables
    The Problem of the Moment™ is that while I can have user-defined "categories" of Inventories, such as "Skills", "Conditions", "Items", "Spells" etc, I want a way to add custom variables to each category. A developer may easily want a new category in Inventories and need custom variables for it. I do, actually. For "Skills", I need these variables:

    skillPoints
    skillLevel
    (and probably more)

    In my math logic, some skills will modify stats based on skillPoitnts & skillLevel. But these aren't needed for any of the other categories.

    Potential Solution
    I'm thinking of having a class of "Floats", with a Name & Value as the only variables. This way, under each item in "Stats", I can have a List of "Floats". I can also have a function that returns the id # of a "Float" by name....

    So....

    Code (CSharp):
    1. float totalValue = firstPersonRPG.inventories[i].items[t].statModifications[m].modAmount * firstPersonRPG.inventories[i].items[t].floats[0].value * firstPersonRPG.inventories[i].items[t].floats[0].value;
    2.  
    3. // This can also be, if I use a function to find the ID based on a human readable name...
    4.  
    5. float totalValue = firstPersonRPG.inventories[i].items[t].statModifications[m].modAmount * firstPersonRPG.inventories[i].items[t].floats[GetFloatID("skillLevel")].value * firstPersonRPG.inventories[i].items[t].floats[GetFloatID("skillPoints")].value;
    Any thoughts on if this causes any potential problems? I'm thinking it doesn't...but maybe I'm wrong? There could be similar classes for bools and ints.
     
  17. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    That shouldn't be a problem. A serialized dictionary with string keys and float values will work but you probably will end up with few enough mods a regular list you iterate and look for the key is probably better.

    If you poke around the MMX code you'll see they have some dynamic stat collections where they assign stats on the fly based upon buffs and such. I think they are lazy loaded so if something wants to modify a stat on something that lacks it the stat gets created at its default value and then applies the mod. The opposite so if they check the value for "label" and there's no stat it returns 0. They really liked driving everything through csv files so the designers could add things without bothering the programmers presumably.

    Some people also like code generating editor scripts so your stat types and such could be an enum that if you adjust it in an Editor Window gets rewritten to match the configurable value. That makes it configurable but also type safe.
     
    infinitypbr likes this.
  18. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Hmmm yeah dictionary may be better. I've never used one before, but it seems to be what I'm looking for since each custom variable only has a name & value. I've implemented a List version in the code, and that seems to work. I'll look into switching it to a Dictionary before I much more deep into one version. I really do like this "Custom Variable" idea though. It seems versatile.

    Unfortunately I'm on a mac and as far as I know the only way to look into to the code of other games requires a PC.

    M&M X was a disappointment to me -- I couldn't get into it at all. First I had to wait 4 or 5 months for it to be released on the mac, even though the pre-order page said the mac & PC would be released at the same time, so I preordered. But then, when I started the game, the first sign for the town was super pixelated. Like, they just uses a low resolution image or something, and no one decided it was a bad thing. That's telling.

    But then I just didn't get into the game after that. I have no idea why they went back to the grid based movement system.

    [EDIT]
    I think I'm going to stick with the classes. From what I gather, Dictionaries aren't serializable by default, so it may be easier to just use the class and a function instead of the List ID in order to use a human readable name.
     
    Last edited: Mar 14, 2017
  19. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    I dunno about mac stuff, but yeah M&M X wasn't very good. The game felt pretty rushed and uneven. Like the gameplay mechanics were decent and looking at the code it seems well organized but the environments were terrible. Wildly uneven texture quality and they made a ton of performance mistakes that made it run way worse than it should. Slightly uneven floors were created with the terrain engine so they are an incredible number of polys for no reason and walls are similarly thousands of verts instead of using a bump map for details.

    While I like M&M6-8 my favorites are World of Xeen so I was okay with going back to grid based but they screwed it up. Typically grid movement games have fairly grid like environments even if they are polygonal (e.g. Grimrock) so the tactical space is easy to see but the M&M X environment weren't built on grid at all and just had grid markers stuck on it. Movement never felt right.

    btw, if it is helpful I posted the code to my conditional display drawers over here:
    https://forum.unity3d.com/threads/custom-attribute-drawers-always-replace-class-drawers.461097/
    as I've found a little problem with attribute drawers and custom class drawers.
     
    infinitypbr likes this.
  20. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Thanks, I'll check that out and see if I can't learn from it. Everything I'm doing is still somewhat a learning experience :)

    I've completed switching the skills etc to an "Inventories" system, and I really like how it works. I think I'm going to do the same for the main stuff as well. Genders, Races, Classes -- those are things that many games will need, but perhaps not all, and perhaps some games need more than just those things.

    So, I'l have to come up with a name for it, but a Categories.Items system similar to the Inventories.Items should be good. And I think I can devise a way to expose a specific Categories Items list as a selectable. Character Stats, for instance, need to be represented in the "Modification" area. So I have to think on it more, but I Think I can make this so that the entire structure is customizable from the ground up, without any coding.

    Once everything is set up, coding would be required. But that would depend on what kind of game a user wants to make.
     
  21. LadyAth

    LadyAth

    Joined:
    Jan 17, 2014
    Posts:
    158
    @fsbaystudios: If your framework is anything like the amazing quality of your model assets, I am the first on your buyer's list! I watched the video you have on the framework and I really like what I see so far.

    This thread is also very interesting to follow - much to learn from!!!!

    Good luck with the development :)
     
    infinitypbr likes this.
  22. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Here's an update! The video is about 10 minutes long, somewhat rambling, so I apologize for that. But, I just finished a bunch of code that I'm happy with and I think this project is morphing into something unexpected. Thanks to @Fuzzy_Slippers comments, I had switch the "Inventories" to be more versatile.

    I really liked how that ended up, so I thought about maybe switching the main data to be something similar. So now there are two main categories: Data & Inventories. Each allow for any number of named "Categories" (basically entries in a list), and each Category can have as many entries as you'd like. Each Category can also have custom variables (themselves, just entries in lists -- so the variable will have a name and a value). I stuck with Lists instead of Dictionaries because from what I gathered, Dictionaries are more difficult to serialize.

    The main difference between Data and Inventories: Players will have a copy of the Inventories Categories, since the Category Items are things that players can obtain. Not just items like a sword or torch, but anything -- in my game, even "Conditions" such as Poison etc will be an "item".

    The coolest thing, so I think, is that the Items can have a custom variable of one Type: Category. That is, There can be a Data category for "Default Names" (these are character names given by default at the character creation scene in my game). Each entry (Data["Default Names" ID].Item[Item ID]) has a name, and all the "Custom Variables" for that Category. They can be float, int, bool, string -- I plan on adding more like GameObject and Texture2D etc as well -- or even a "DataList", which is a class that holds the name of one of the custom Categories you've created, as well as a int value that refers to the entry in the Data List.

    So in the video I show how the Custom Variables can include the "Race" list and "Gender" list, and a drop-down will allow you to select the name of any item in those lists. This way, I can set a Default Name such as "Spock" to be "Male" and "Elf". It won't be difficult to obtain the data in any game code either.

    I think it's pretty sweet, because now this sort of thing is not just something that can be used for an RPG, but it's actually something that can be used for ANY type of game. I can imagine it being used for puzzle games as well.

     
    LadyAth likes this.
  23. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Such drama in my brain.

    Last night I was very pleased with the progress and the changes I had made.

    But now I'm having second thoughts. It's getting more complicated than its worth -- that is, I think the solution is just as "difficult" as the problem. If the problem is having to code your own classes, something that isn't difficult but just a bit time consuming, then the solution should make that equally not-difficult but less time consuming.

    I'm at the point where I'm needing to add a "Custom Variable" for a list of things. Each class will have a list of skills that they can pick to know at the start of the game. I have a list of skills, and I have a my character Items. (Basically Master.Data[ClassID].x)

    I attempted to use generics to solve this -- to have just one type of entry that can be any "Type", but unfortunately I can't code generic types on both ends it looks like. So then I need to have a list of "DataFloats", "DataInts", "DataBools" etc. That's different from a "DataSingle".

    DataSingle would be used for something like Disposition (Neutral, Good, Evil). Where the class can have a custom variable called "Starting Disposition" of the type Disposition, with one value -- 0, 1 or 2. Disposition[0].name = Neutral. That's easy enough.

    But DataFloats would be used to store things like skill proficiency for each class. The custom variable would be of the type DataFloats, named something like "Skill Proficiency", with a List of <float> values. There would be the same number of entires in that list as there are skills.

    But now I need more code to manage all this, and code to make adjustments when a new skill is added or one is removed.....

    And I'm starting to think it's not really worth it.

    That is, am I making things easier? I don't know. I'm trying to imagine what this will look like at the end...and if it's simpler than just coding custom classes. I'll have to think about this for a minute.
     
  24. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Ok, maybe it's easier. I don't know...I think I'll have to get it a bit better and then let you guys test it out, if any of you want, and let me know if you find it easy to use.

    There is less code now, so that's cool.
     
  25. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Ok, I finished the update, or most of it, and I like it. It is fast. It is pretty easy to figure out. I'm a fan. I'll make another video later tonight. It's better formatted now ,so easier to read.
     
  26. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    LATEST UPDATE!
    Its cooler now.

     
    SpectralRook, John-G and LadyAth like this.
  27. SpectralRook

    SpectralRook

    Joined:
    Feb 9, 2014
    Posts:
    112
    Hard to say without seeing the final product but Class System works for me. Thought, it does seem to be more of a framework for general RPG concepts, not just classes. You could go with a generic name and depend on the description to qualify what it does. When in doubt, try Latin. I think hexis is Latin for skill so maybe something like Hexis - RPG Class System Framework.

     
    Last edited: Mar 18, 2017
    infinitypbr likes this.
  28. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    Class can be a little confusing as it can be a c# 'class' or an rpg 'class'. So throwing in 'rpg' and/or 'data' might make it more clear (e.g. RPG Class System Data Manager).

    Your system looks good. It is always hard to balance coding generic open ended systems with coding to the specific needs. Inevitably the generic systems end up way more complicated. The gain that designers can make changes without any programming seems pretty great for an asset store product though. That is also why I abandoned my generic system for just hard coding a lot of what I need. My code was getting way too tangled and since I'm both the programmer and the designer it wasn't worth the extra bother.

    Earlier in the thread you had mentioned you were curious about the formulas in the old Might and Magic games and I had forgotten that in the hint guides to them they actually have a lot of that math listed. I bought a bunch of them online used for practically nothing so that is something you might want to take a look at.
     
    infinitypbr likes this.
  29. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Haha I got the guide for m&M6 last week, and then ordered the ones for 7-9 :D $25 investment total (most of it in shipping costs!)

    The guide for #6 had some information that helped...not a lot and not everything, but some.

    ____

    Yeah, I almost abandoned the idea as it got more complicated, but I figured it would be worth it to finish it a bit more and "use" it to see how it worked. Once I did that I was convinced this is a good system, or good for many use cases. I showed it last night to some guys at a small meetup and they seemed to really like the idea. It doesn't take all the programming away from things -- a user would still have to know enough coding to work with the data. It just makes setting up the data a lot faster, and allows for some flexibility since you can add and delete items from the categories without messing up the entire system.
     
  30. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Latest Demo. This adds a table extension that lets you see and edit a X/Y Table of data.

     
  31. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    I'm also adding some script references, with some easy-to-remember (I hope) methods for calling data.

    In game, though, instead of "master", it will either be "player[playerID].Float("Stats", "Might", "Value")" or master.player[playerID] etc.

    Screen Shot 2017-03-21 at 8.08.42 PM.png
     
  32. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    HEY! For those of you who are still following this thread.... here's a preview package!

    http://www.InfinityPBR.com/MasterClassSystemPreview.unitypackage

    Bring it into a project (may as well do a new project...just because and just in case).

    To Create a Data Object
    1. From the menu: Assets/Create/SFBayStudios/Master Data Object
    2. Rename it if you'd like. You can have as many of these as you'd like, so you can easily try new data settings and revert back anytime.

    To Edit the Data
    1. From the menu: Windows/SFBayStudios/Master Data Editor
    2. Choose your Scriptable Object

    To Edit Custom Variables in Table Form
    1. From the menu: Windows/SFBayStudios/Table Editor
    2. Choose your Scriptable Object

    _________

    This is just an early version. It all works, I think, and I haven't found any bugs recently. The code is very heavily commented. The "Save" features are a WIP so they're not spiffed up or set up to work (although the basic code was working before, but probably won't as is right now).

    Let me know what you think! I'd be interested in hearing some ideas, thoughts, critiques, comments, and all that :D
     
  33. SpectralRook

    SpectralRook

    Joined:
    Feb 9, 2014
    Posts:
    112
    Small problem with a freshly created scriptable object, where the list is initially empty; the editor scripts don't like that. For the MasterDataEditor script I added an "if(master.data.Count > 0)" on line 114, before the call GUIChooseFromCategories. Though, might make more sense to have the check in GUIChooseFromCategories instead. For the TableEditor script I added the same check on line 59 to the existing "if (showMaster && master". I was able to also avoid the errors just by manually setting the index to 1.

    How would I setup a Category of Items, with a list of Weapons, with a list of Swords, containing a long sword, short sword, etc?
     
  34. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Good catch! It'll be fixed in any future update. There's still a small bug when switching Scriptable Objects in the Table Editor -- looks like some of the code still runs thinking the old object is there, but calls data from the new, bypassing some checks. Its not a giant bug though, just one error line that doesn't' affect anything.

    ____

    First step would be to create a Category called "Items". This, in my view (But i"m sure it can be structured differently), would contain any individual Item that could be picked up, like: Sword, Short Sword, Long Sword, Axe, Battle Axe, Potion, Wand, Bow, Long Bow, Cross Bow, Shrub Root, Bar of Soap etc

    If you want to have a way to differentiate between "Weapons" and other types, create a new Category, perhaps called "Item Types". Perhaps it could be filled with Items called: Weapon, Armor, Quest, Use etc.

    Go back to your Items Category, and add a Custom Variable of type "Item Types", and List Type "Single". This will let you choose a single entry from the Item Types category as its value. You can then call on this data with this type of code: master.Item("Classes", "Archer", "Parent Class").name = Archer;

    Though, you'd change it to "Items", "Sword", "Item Type".

    There should be an example of this in the FirstPersonRPG object -- There's an Items category, along with some items and a "Type" variable that can be "Equip", "Quest", "Learn", or "Use". For the weapons/armor, I'll probably add another variable to choose what kind of equip it is, as for me it could be a weapon, a shield, armor, ring, helmet, boots, belt, cloak etc. I haven't decided if I"ll choose a named type or just an "Equip spot" thing. But there will likely need to be more differentiating for those.

    I'll also need to add a "Number of Uses" int to track how many times an item can be used, as well as something to tell my code what the target of the use can be -- a heal potion may target players, while a fireball scroll may target enemies. I figure a "destroy when empty" boolean would be helpful too, so m scripts can eventually know if the object should be removed when it's last use is out -- a scroll, for instance, vs a bottle of potion, which may be refilled. Or maybe a "Replace when empty", so a "potion bottle" can be replaced with an "empty bottle". That would probably be a GameObject variable. So if the variable is not null, my code knows that it should be replaced with that new object when the use value reaches 0.

    I'm currently working on a special "Inventory" Category, which resides outside of the data structure and is intended to be used only during run time, literally as the "inventory" of a character or system or store etc. It can hold multiple references to Items from any Category, and the values are stand-alone. that way if you have a "Prefix" and "Suffix" Single reference on your Items, the Inventory can hold multiple "Sword" items, each with different settings on their variables. Consider these in-game swords that can be bought, sold etc.

    However, Inventories could also be used to hold all the enemies in any particular level, including their location (I need to add a Vector3 type for variables) and statuses.
     
  35. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Whew. today I finished adding the "Inventory" system. I need to make a video about it, I think. It gets attached to any Category, and then each Item will have it's own. It will be quite useful in these two ways:

    Example 1: Create a category called "Players". Even if your game only has one player -- add one Item per player. In my RPG, it's: Player 1 | Player 2 | Player 3 | Player 4 | Hireling 1 | Hireling 2.

    Now, add an inventory called "Inventory" (creative huh?). Each of the players will have their own inventory. In my game, I'll use this as their in-game inventory. However, Might & Magic VI, the game I want to emulate, started players with a ring each, plus weapons, armor or spell books depending on the skills they chose at the Character Create scene. Once I have my "Items" Category populated with things like "Ring", "Sword" etc, I can add those items to each players Inventory.

    Items added to the Inventory are a clone of the Item, although any changes like name, adding/deleting/renaming custom variables etc, will all be reflected. So if I want the player to start with a "Sword" that has it's Custom Variables modified from the default, I can do that.

    There are functions to Add / Remove items from an inventory, so coding such behavior in game will be easy, as will listing the entire Inventory for GUI and other purposes.

    Example 2: Create a category called "Scenes". Add one Item for each scene in the game. Perhaps name them the same as the scene names, although it doesn't matter if you do that or not. For this, we will add TWO inventories, because we aren't limited in the number of inventories we can add.

    The first will be called "Enemies", and the second "Treasures". As you may expect, we will populate each with Enemies and Treasures accordingly. There will be a Category called "Enemies" and a Category called "Treasures", and while each will have their own in-game scripts and logic, we will use the Inventory system to manage them.

    When we add a new Item (either Enemy or Treasure) to the Inventory, it's a copy of the original. So we can add as many "Goblin" enemies or "Wooden Chest" treasures as we want. Each will retain it's data during game saves. Some possible data we'll include via Custom Variables may be...

    * Health
    * Status
    * Position
    * Rotation
    * Animation Frame

    ...and so on. It really depends on how you want to code your game. For me, if the player saves the game, I'd like the game to start in the exact state that it ended. So when I re-instantiate the enemies, I'll need to know all their Transform data in order to put them back in the right place and in the right state.

    ___

    Anyway, that's a good overview of the point of "Inventories".
     
  36. SpectralRook

    SpectralRook

    Joined:
    Feb 9, 2014
    Posts:
    112
    I'm actually really liking this. There is a bit of a learning curve for understanding how to properly organize everything but once I got past that it became more intuitive.

    Question on best practices for accessing the data. Would this be the best way to pull all Items that have the type of Equip or do you have something I could just call that already does what I'm trying to do? The goal being an efficient way to pull Items for a particular property rather than checking if a property matches for a known item.

    Code (CSharp):
    1.  
    2.  public class Inventory : MonoBehaviour {
    3.     public Master master;
    4.  
    5.     [SerializeField] private List<Items> equipList;
    6.  
    7.     void Start () {
    8.         if (master) {
    9.             equipList = GetDataListByValue ("Items", "Type", "Equip");
    10.         }
    11.     }
    12.  
    13.     private List<Items> GetDataListByValue (string data, string value, string valueName) {
    14.         List<Items> itemsList = new List<Items>();
    15.         if (master) {
    16.             Data mData = master.Data (data);
    17.  
    18.             foreach (Items item in mData.items) {
    19.                 if (master.Item (data, item.name, value).name == valueName)
    20.                     itemsList.Add (item);
    21.             }
    22.         }
    23.         return itemsList;
    24.     }
    25. }
    26.  
     
    infinitypbr likes this.
  37. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Hmmm....let me think this one out loud. I've been writing so many methods into Master.cs that I'm wondering if there's any practical limit to how many I can do. Most take in three strings -- "Category", "Item", "Variable" etc. But I"m making some overloaded versions like "Category", itemID, "Variable", since for my game, looping through all four players is easier to do without having to grab their name to pass. I also just wrote a function that'll randomize the value of a DataSingle Variable. I can then call this at the Start of the Create Game scene:

    Code (CSharp):
    1. for (int i = 0; i < playerName.Count; i++) {
    2.             master.RandomizeDataSingle ("Player", i, "Gender");
    3.             master.RandomizeDataSingle ("Player", i, "Race");
    4.             master.RandomizeDataSingle ("Player", i, "Class");
    5.         }
    And the Gender, Race & Class for each will be randomized. It's helpful, but I"ll need to write a custom one for "Class", because I have 32 classes, and only 8 of them can be chosen at the start of the game. But for Gender & Race, the helper method is helpful.

    Ok, so to your question.

    1. From a List<Items> of Items (assuming all from the same Category/Inventory?), you'd like to...
    2. Return a new List<Items> where...
    3. Custom Variable "Equip" is true?

    I think I may be missing something here. However, the internal structure is like this....

    master.data[int].items[int].bools[int].value;

    So generally to get the value of that boolean, the method I'd include (which is in my version..not sure if it's in your version yet) is [also I'm changing it from "Bool" to "GetBool" to make it match Unity stuff more, and to differentiate from "SetBool"] master.GetBool("Category Name" , "Item Name", "Variable Name");

    And if it's a value from a DataBool, there would be an overloaded method to call: master.GetBool("Category Name", "Item Name", "Variable Name", variableID);

    I don't currently have any methods for returning a List of items. But I do have master.Item() which has a few overloaded methods and will return the Items object.

    Code (CSharp):
    1. // Returns the Item Object
    2.     public Items Item(string dataName, string itemName){
    3.         return data[DataID(dataName)].items[ItemID(dataName, itemName)];
    4.     }
    5.  
    6.     // Returns the Item Object
    7.     public Items Item(string dataName, string itemName, string valueName){
    8.         string valueDataName = data [DataID (dataName)].items [ItemID (dataName, itemName)].dataSingles [ValueID (dataName, itemName, valueName, "dataSingles")].dataName;
    9.         int value = data [DataID (dataName)].items [ItemID (dataName, itemName)].dataSingles [ValueID (dataName, itemName, valueName, "dataSingles")].value;
    10.         return data [DataID (valueDataName)].items [ItemID (valueDataName, ItemName (valueDataName, value))];
    11.     }
    12.  
    13.     // Returns the Item Object
    14.     public Items Item(string dataName, int itemID, string valueName){
    15.         string itemName = ItemName (dataName, itemID);
    16.         string valueDataName = data [DataID (dataName)].items [itemID].dataSingles [ValueID (dataName, itemName, valueName, "dataSingles")].dataName;
    17.         int value = data [DataID (dataName)].items [itemID].dataSingles [ValueID (dataName, itemName, valueName, "dataSingles")].value;
    18.         return data [DataID (valueDataName)].items [ItemID (valueDataName, ItemName (valueDataName, value))];
    19.     }
    20.  
    21.  
    22.  // Returns the Items object of an Inventory item
    23.     public Items Item(string dataName, string itemName, string inventoryName, int inventoryValueID){  
    24.         int v = InventoryID (dataName, itemName, inventoryName);                                                // Get teh ID of the Inventory
    25.         return inventory [v].value [inventoryValueID];                                                            // Return the Items object
    26.     }
    27.  
    The last one is set up for returning an item from the inventory.

    I added a new GetBool method that takes an Item...I'll do the same for the other variables. I wonder if there's a more generic way of doing that.

    But this code would then work:

    Code (CSharp):
    1. List<Items> equippableItems = new List<Items> ();
    2.         for (int i = 0; i < master.GetInventory ("Player", "Player 1", "Inventory").value.Count; i++) {            // For each value (Item) in the Inventory called "Inventory")
    3.             Items inventoryItem = master.GetItem("Player", "Player 1", "Inventory", i);                            // Get the
    4.             if (master.GetBool(inventoryItem, "Eqiuppable"){                                                    // if the custom variable "Eqiuppable" has a value of true
    5.                 equippableItems.Add(inventoryItem);                                                                // Add inventoryItem to the List<Items> equippableItems
    6.             }
    7.         }
    I'm working on my demo Create Character screen, and with that a demo Save & Load function. Once I get that squared away, I'll put up an updated package.

    EDIT: There will likely be more syntax changes as I move forward.
     
  38. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Here's some sample code for my Character Creation scene. At Start(), I first make a copy of the Master scriptable object, otherwise any changes I make will affect the main data, and that wouldn't be good! I'll be saving the data from the copy, when I save, and loading the data into a new copy whenever I load a game. That way the original doesn't get modified.

    Next, I grab a List<Items> of Classes that have a Custom Variable (bool) called "Base Class" set to true.

    For all four players I randomize the Gender & Race DataSingle Custom Variables, and then based on those values I choose a name from the "Default Names" Category. Each Item is a name with a "Race" and "Gender" DataSingle Variable. If the values match the player values, I choose a random name (there are 5 per set).

    Finally I randomize the class based on the list of base classes.

    This is just an example of one way to work the data.

    Code (CSharp):
    1. // Use this for initialization
    2.     void Start () {
    3.         master = Master.Instantiate(masterOriginal) as Master;
    4.  
    5.         // Populate list of base classes
    6.         for (int i = 0; i < master.GetData ("Classes").items.Count; i++) {                                    // For all items in "Classes"
    7.             if (master.GetBool ("Classes", master.GetData ("Classes").items [i].name, "Base Class")) {        // If the "Base Class" variable is true
    8.                 baseClasses.Add (master.GetItem("Classes", master.GetData ("Classes").items [i].name));        // Add this item to the list
    9.             }
    10.         }
    11.  
    12.         // Randomize start values
    13.         for (int i = 0; i < playerName.Count; i++) {                                                        // For each player
    14.             master.RandomizeDataSingle ("Player", i, "Gender");                                                // Randomize the Gender
    15.             master.RandomizeDataSingle ("Player", i, "Race");                                                // Randomize  the Race
    16.             // Based on the start Gender/Race, choose a random name
    17.             List<string> possibleNames = new List<string>();                                                // List to hold the name possiblities
    18.             for (int n = 0; n < master.GetData ("Default Names").items.Count; n++) {                        // For each Default Name
    19.                 // If the name of the dataSingle in the Race spot is the same as the string in the Race spot for the player...
    20.                 if (master.GetDataSingle ("Default Names", n, "Race").name == master.GetDataSingle ("Player", i, "Race").name) {
    21.                     // And the same is true for Gender
    22.                     if (master.GetDataSingle ("Default Names", n, "Gender").name == master.GetDataSingle ("Player", i, "Gender").name) {
    23.                         possibleNames.Add (master.GetData ("Default Names").items [n].name);                // Add the name to the list
    24.                     }
    25.                 }
    26.             }
    27.             if (possibleNames.Count > 0) {                                                                    // If we have some name choices
    28.                 master.SetString("Player", i, "Name", possibleNames[Random.Range(0, possibleNames.Count)]);    // Random Name
    29.             } else {
    30.                 master.SetString ("Player", i, "Name", "Unknown Hero");                                        // Default name
    31.             }
    32.         }
    33.  
    34.         // Radomize Class (but only include base class classes
    35.         if (baseClasses.Count > 0){                                                                            // If there is at least one baseClasses value
    36.             for (int i = 0; i < playerName.Count; i++){                                                        // For each player...
    37.                 Items randomClass = baseClasses[Random.Range(0, baseClasses.Count)];                        // Choose a random base class
    38.                 int randomClassID = master.ItemID("Classes", randomClass.name);                                // Get teh ID of the chosen class
    39.                 master.SetDataSingle("Player", i, "Class", randomClassID);                                    // Set the ID to the dataSingle
    40.             }
    41.         }
    42.     }
     
  39. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Here's an update video!

     
  40. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Well it's 3pm and I'm not done working, but I'm happy that I've got enemy loading & saving going on. The position/rotation at least. So far enemies don't move and there isn't any actual math for damage (or even any way to "attack")....

    But I figure the basics are saving and loading now. As I go through, I find new methods I need to add to the master system... just now I added another "SetVector3()" method...

    Code (CSharp):
    1. // On the enemy script, one for each enemy model
    2.  
    3. master.SetVector3 ("Scenes", sceneName, "Enemies", sceneInventoryID, "Position", transform.position);
    4. master.SetVector3 ("Scenes", sceneName, "Enemies", sceneInventoryID, "Rotation", transform.eulerAngles);
    * When I instantiate the enemy, I pass along the ID number of it's place in the Inventory list, so it knows where to send it's data back to. This is basically saying...

    Category "Scenes", item "Scene Name", Inventory "Enemies" [sceneInentoryID], vector3s "Position" is transform.position. (I say "vector3s", because that's the class I use for any single vector3 value).

    Code (CSharp):
    1. // part of the master script...
    2.  
    3.  public void SetVector3(string dataName, int itemID, string inventoryName, int inventoryID, string variableName, Vector3 vector3){
    4.         string itemName = ItemName (dataName, itemID);
    5.         DataInventory inventory = GetInventory (dataName, itemName, inventoryName);
    6.         for (int i = 0; i < inventory.value [inventoryID].vector3s.Count; i++) {
    7.             if (inventory.value [inventoryID].vector3s [i].name == variableName) {
    8.                 inventory.value [inventoryID].vector3s [i].value.x = vector3.x;
    9.                 inventory.value [inventoryID].vector3s [i].value.y = vector3.y;
    10.                 inventory.value [inventoryID].vector3s [i].value.z = vector3.z;
    11.             }
    12.         }
    13.     }
    The GetVector3() code is very very similar. You'd call it the same, but without a Vector3 value at the end. Because there are 4 (or 5) variables being passed, we know that it's an "Inventory" Vector3, rather than a Vector3 on a regular Item. So there's lots of overloading going on.

    I find its best to add things as I see that I need them, while I build the demo game. There's really no way I could predict what I need and don't need, and I find it's easier to write them as I go, rather than all at once.
     
  41. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    I had a sort of realization this morning while in the shower, one of the best places to have realizations.

    I realized that I was writing the methods in the master.cs script as i needed them. That's fine, but often I'd get stuck, having confused myself between all the different variables required to get the data I needed.

    So I realized two things. First, I need to do a better job of standardizing the verbiage. Instead of "ItemID", I now use "ItemIndex", since "Index" is more specific to what it is...ID works, for me at least, but Index is more widely understood.

    Next, I realized that the data could be most concisely returned if I used the index of each Category, Item, Variable etc. down the line.

    So the most basic method would look like this...

    Code (CSharp):
    1.     public float GetFloat(int dataIndex, int itemIndex, int variableIndex){
    2.         return data[dataIndex].items[itemIndex].floats[variableIndex].value;                                    // Return the value
    3.     }
    4.  
    For ease of use, I want to be able to use the human-readable names that the user has assigned to each section. The "dataIndex" is the index number of a named Data Category. So "Skills", may be 8. It's easier to remember "Skills", and the IDs may change over time while the names, if named properly, don't.

    Before, each method variation would do the same math to find the proper Indexes. That was more lines. So now, each of the alternative methods, where strings can be used instead of ints, each one will convert the string to an int (using another method that searches out the proper int), and then returns the result of the first method, shown above.

    That has removed 1-3 lines or so from each other method, and will likely help keep me from confusing myself, since whenever I need to write a new method, I'll start with the basics, using the index values first, and building up from there.

    So here's all the basic GetFloat options

    Code (CSharp):
    1. /// <summary>
    2.     /// Returns a float value with a Data Category, Item & Variable name or index.
    3.     /// </summary>
    4.     /// <returns>The float.</returns>
    5.     /// <param name="dataIndex">Data index.</param>
    6.     /// <param name="itemIndex">Item index.</param>
    7.     /// <param name="variableIndex">Variable index.</param>
    8.     public float GetFloat(int dataIndex, int itemIndex, int variableIndex){
    9.         return data[dataIndex].items[itemIndex].floats[variableIndex].value;                                    // Return the value
    10.     }
    11.        
    12.     /// <summary>
    13.     /// Returns a float value given the name of the DataCategory, name of the Item, & the Variable Name.
    14.     /// </summary>
    15.     /// <returns>The float.</returns>
    16.     /// <param name="dataName">Data name.</param>
    17.     /// <param name="itemName">Item name.</param>
    18.     /// <param name="variableName">Variable name.</param>
    19.     public float GetFloat(string dataName, string itemName, string variableName){
    20.         int dataIndex = DataIndex (dataName);
    21.         int itemIndex = ItemIndex (dataIndex, itemName);
    22.         int variableIndex = VariableIndex (dataIndex, itemIndex, "float", variableName);
    23.         return GetFloat (dataIndex, itemIndex, variableIndex);
    24.     }
    25.  
    26.     /// <summary>
    27.     /// Returns a float value given the DataCategory Name, Item Index, & Variable Name
    28.     /// </summary>
    29.     /// <returns>The float.</returns>
    30.     /// <param name="dataName">Data name.</param>
    31.     /// <param name="itemIndex">Item index.</param>
    32.     /// <param name="variableName">Variable name.</param>
    33.     public float GetFloat(string dataName, int itemIndex, string variableName){
    34.         int dataIndex = DataIndex (dataName);
    35.         int variableIndex = VariableIndex (dataIndex, itemIndex, "float", variableName);
    36.         return GetFloat (dataIndex, itemIndex, variableIndex);
    37.     }
    38.  
    39.     /// <summary>
    40.     /// Returns a float value given the DataCategory Index, Item Index, & Variable Name
    41.     /// </summary>
    42.     /// <returns>The float.</returns>
    43.     /// <param name="dataIndex">Data index.</param>
    44.     /// <param name="itemIndex">Item index.</param>
    45.     /// <param name="variableName">Variable name.</param>
    46.     public float GetFloat(int dataIndex, int itemIndex, string variableName){
    47.         int variableIndex = VariableIndex (dataIndex, itemIndex, "float", variableName);
    48.         return GetFloat (dataIndex, itemIndex, variableIndex);
    49.     }
     
  42. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    I'm totally still working on this! I got myself a job that started May 1st, so I've been less able to work on things, but....

    The system now builds all the Class scripts for you :) So you can create your class structure, link everything, populate values, all that in the system which (I think) makes it far easier and more intuitive, and then press a button and wait about 15 seconds and BOOM...all the class scripts are created and you can start building your game.

    Want to add more, or change values or relink things? Use the Master Class System to edit and then click the Export button again, and you'll be all set.

    What do you think?

     
    LadyAth and John-G like this.
  43. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    @sfbaystudios ,

    This looks v amazing. What kind of release date and price were you looking at?
     
    infinitypbr likes this.
  44. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Still working on it -- I decided a key component is a save system. Since pretty much most games will need to be able to save data, I figure it would make sense to have that built automatically too. It's still customizable after the fact, but the process changes things slightly, so working on that now. Couple that with a general lack of time due to moving & the new job, and it's taking longer than it otherwise would have.

    But still progressing!
     
  45. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    Excellent. Are you using scriptableobjects classes and/or for saving?
     
    infinitypbr likes this.
  46. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    It does use scriptable objects, which makes it easy to make multiple versions -- I figure that way you could make "Easy" / "Hard", or just test different settings without having to remember / revert... just drag in a different copy of the master object.

    For saving, we can't serialize things like vector3s or game objects etc, so I'm using another scriptable object that holds basically a library of those objects, and then the system saves a reference to that library.
     
  47. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    @sfbaystudios ,

    This looks like a full on RPG kit now?

    What elements if such a kit do you think wouldnt be in a first release?

    With item creation, are you going to cover off item prefixes, affixes and suffixes and resultant buffs and debuffs?

    How are you going to tackle progression/levelling with skills/abilities/rpg classes and generally?
     
  48. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Well, it is and it isn't. It basically should allow most any way of doing things.

    For instance, items / prefixes / suffixes.

    You can create a category called "Items", one called "Prefixes" and one called "Suffixes". In "Items", you'd then create a "Single" variable for "Prefix" and "Suffix".

    A single allows for one element of another category as value. Then, when you have an "Inventory" -- whether it's a player inventory, or a level inventory, or something else, you'd populate the value. By code you can do it just by saying the value = some #, by code you can just select the prefix or suffix from the drop down.

    idk if that makes sense! But, basically, you can create any number of categories, and link them all together in most any way you'd want. The class structure created will then let you call things as you might expect: master.items.prefix = 4 may relate to master.prefixes[4]. So you may want to say something like master.prefixes[master.items.prefix].name = "Poisonous" in your code.

    But it all is managed by the system, which makes it far easier to set up, I think, and then to re-adjust things as needed.
     
    Duffer123 likes this.
  49. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    infinitypbr likes this.
  50. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    After trying to get it working right, I kept hitting hurdle after hurdle. Unfortunately I'm not the best coder, and I quickly realized that I was likely solving problems incorrectly, which sometimes were causing additional problems, so I abandoned the project. I learned a lot through it, and I still like some of it -- the grid for editing class values were great.

    I also got a full time job in May of 2017 and that cut down my free time from a lot to a little :D
     
    Duffer123 likes this.