Posted on

SimpleUsageLimits – Complete Guide

Game Designer? Programmer? AddOn Developer? Or just serious about your game project? No matter what – our “Complete Guides” will help you make better games using Unity, uMMORPG3d and our AddOns.


Installation
This AddOn is also very easy to install and use, but requires the latest version of the NuCore. First install the NuCore and then simply import the unity package into your project to have access to all SimpleUsageLimits.

This AddOn does not have a effect on first sight, but modifies the way Items and Skills can be used, equipped and/or activated throughout the game. The AddOn is both: very simple and very powerful.

Skill Limitations using various of my other AddOns as well)

Item Limitations (using various of my other AddOns as well)

Usage
This AddOn allows you to add several usage restrictions and limitations to both Items and Skills. Their settings are 75% the same with only a few differences. Lets go through all the individual settings one by one.

  • Pro-Tip: As uMMORPG is completely skill-based, attacking with a weapon is always bound to a skill as well. It makes therefore no sense to add the restriction for attacking to the weapon, you rather add the restriction to the corresponding attack skill instead.

Item Settings

  • Required Class (Item only) – Restricts usage and/or equipment of this item to the class you set here (assign a player prefab).
  • Required Skill (Item only) – Restricts usage and/or equipment of this item. Requires the assigned skill to be learned by the user.
  • Requires Skill Level (Item only) – Restricts usage and/or equipment of this item. Requires the assigned skill to be at least of the skill level you state here.
  • Skill Active (Item only) – Restricts usage and/or equipment of this item. Requires the Skill to be active in the moment the user wants to use, equip or un-equip the item.
  • Required Realm (Item only) – Requires my SimplePVPZones AddOn. Restricts usage and/or equipment of this item. Requires the user to be of the Realm or its alliedRealm.

Skill Settings

  • Required Equipment (Skill only) – Restricts activation of the skill. Requires the user to have the assigned item equipped on any slot of the character. This allows you to create weapon based skills.
  • Equipment Category (Skill only) – Totally optional and usually not required. Restricts activation of the skill. Requires the user to have the item stated above equipped at the slot (stated by category) that you enter here (this only makes sense if you altered the default slots, have multi purpose slots or items that can go into more than one slot).
  • Required Inventory Item (Skill only) – The item stated here must be in the users inventory in order to activate the skill. The item is not depleted during the process.
  • Depletable Inventory Item (Skill only) – The item stated here must be in the users inventory and will be depleted when activating the skill. This is in addition to the option above.
  • Deplete Amount (Skill only) – The number you state here is the amount of inventory items that will be removed when combined with the above option. This allows you to create Ammunition based weapons.

Item & Skill Settings

  • Min Health (both) – The minimum amount of health (in %) required to use/equip/activate.
  • Health less than (both) – When checked, the option above is inverted (Health must be lower than X in %). Allows you to create rage skills for a barbarian for example.
  • Min Mana (both) – The minimum amount of mana (in %) required to use/equip/activate.
  • Mana less than (both) -When checked, the option above is inverted (Mana must be lower than X in %).
  • Usage Area (both) – the ID number of a area where this item/skill can be used. Explained in detail in the paragraph below.
  • Min Strength etc. (both) – The minimum attribute value the user must have in order to use/equip/activate this item/skill. The length of the list depends if you have my SimpleAttributes and SimpleStamina AddOns installed.
  • Positive Stamina (both) – Requires my SimpleStamina AddOn. When checked, the item/skill can only be used/equipped/activated while Stamina of the player is higher than 0. This allows you to create a item/skill that can only be used while the player is not exhausted.

Usage Areas
This special option allows you to restrict the usage, equip or activation of any item or skill to a certain area within your scene. If you want to limit your item/skill usage to a specific area. You have to drag and drop the “SimpleUsageArea” into your scene. Adjust its size and set an ID number. This number has to be the same as the item/skill – if you want that item/skill to be usable within that area only. You can have multiple areas with the same ID and of course you can have multiple Items/Skills share the same ID if you want. Set to 0 to disable.

  • Pro-Tip: Need ideas? A skill that can only be activated near water or a food item that can only be used while inside a tavern. Something more fancy? Combine this script with my FreeInstantObject and you should be able to create a item that will let the player place a Tent inside a special area (for example near a fireplace).

Additional Information
This AddOn seems quite boring at first, but is in fact one of the most powerful AddOns in my ever growing library. With this AddOn alone, you can give your project a headstart in terms of features and complexity. Just put the various stats and options to creative use. Here is just one example out of a thousand possibilities (please note that this example requires my SimpleSkillStats and SimpleStamina AddOns):

  • Running Skill – Set the Skill to a Buff that increases the players Speed while active. Now check the “Positive Stamina” option. Set all other costs as you like. Essentially you now have a buff that makes the player run faster for a while. Running depletes Stamina – and this Skill requires Stamina to be positive in order to activate. This essentially allows you to create a “Run” skill like in Diablo.
Posted on

Simple PVP Regions – Complete Guide

Game Designer? Programmer? AddOn Developer? Or just serious about your game project? No matter what – our “Complete Guides” will help you make better games using Unity, uMMORPG3d and our AddOns.


Installation
The SimplePVPRegions AddOn is very simple to install, but requires the latest version of the NuCore in order to function. After installing NuCore, simply import this AddOn package into your project and you are done.

Usage
This AddOn will allow you better control over the Player versus Player aspect of your game by dividing your scene into regions where PVP is allowed. It is very important to know, that after installing this AddOn, all PVP activity will be DISABLED by default. No matter where your players are located in the scene, they won’t be able to attack each other anymore.

You now have to manually ENABLE PVP combat by placing one or more SimplePVPRegion Colliders somewhere in your scene. As long as a player is located inside that collider, the following settings can apply. These settings can be adjusted in the SimplePVPRegion Inspector and control the degree of PVP that is possible while a player inside the colliders area:

  • None – If you select none of the available options, PVP combat will be disabled just like if the player was positioned outside of the PVPRegion area.
  • Open PVP – This option has the highest priority and overwrites all other settings. When selected, anyone will be able to attack a player while inside the PVPRegion area.
  • Realm PVP – When this option is checked, members of non-matching realms will be able to attack each other. We take a closer look at this option in the paragraph below.
  • Guild PVP – When checked, only members of non-matching guilds will be able to attack each other (but not members of the same guild).
  • Party PVP – When checked only members of non-matching parties will be able to attack each other (but not members of the same party).

Of course you can check multiple of the settings above. It is very possible to create a Guild + Party PVP area this way. Just note that Open PVP has the highest priority and overwrites all other settings, followed by Realm PVP and so on.

• Pro-Tip: It is recommended to always corner-off your PVP Regions and connect them to other Regions in your scene via a teleporter. If you put a non-PVP region close to a PVP Region, weird things can happen. Players inside a PVP Region might be able to shoot at players outside the Region etc.

Realms
This AddOn adds a new property to all Entities (thats Npcs, Monsters and Players) – the Realm. The Realm represents the Nation, Race or Clan a Entity belongs to. Each Realm can also feature a allied Realm as well.

The Realm allows you to activate Realm PVP as stated above. This will limit PVP activities only to members of non-matching realms (but not members of the same Realm). For example you could have Goblins fight Elves. But Goblins could not fight other Goblins and Elves could not fight other Elves.

• Pro-Tip: Set a Realm to “None” to negate it completely. Monsters that are set to “None” will attack just like the Monsters in a default uMMORPG installation.

AlliedRealm
In addition, there is also a alliedRealm setting that you can use to create Allies. This setting is also available to all Entities (Npcs, Monsters, Players).

For example you could setup that Humans are allied with Elves and Goblins are allied with Undead. Now Humans could attack both Goblins and Undead but not other Humans or Elves and so on.

• Pro-Tip: To have a Realm without an ally, just set the “alliedRealm” to “none”.

Words of Warning
Be careful placing your PVPRegion areas and don’t make them overlap. Those areas should be quite large and always be cornered off. Both players must be located inside such a area in order for the PVP rules to apply. If one of the players is located outside, PVP will be disabled for that player. I always recommend to slice down your world into junks and interconnect them with teleporter’s.

More Uses
If you use this AddOn in combination with my other AddOns, additional uses will become available. For example my SimpleTeleport and SimpleTravelroute AddOns offers a limitation to what Realm can make use of the Teleporter.

Another example is my SimpleUsageLimits AddOn: Combined with SimplePVPZones it will allow you to limit the usage/equipment of certain Items to a specific Realm as well as it’s alliedRealm. So you could create a Magic Sword that is only useable by Humans (and their allies, the Elves).

Posted on

SimpleSummon – Complete Guide

Game Designer? Programmer? AddOn Developer? Or just serious about your game project? No matter what – our “Complete Guides” will help you make better games using Unity, uMMORPG3d and our AddOns.


Installation
The SimpleSummon AddOn requires the NuCore Version 1.15 or higher. First install that or a newer version of NuCore. Next import this AddOn package. Next locate the Resources folder in this AddOns folder and move all Items therein in  the corresponding Resources -> Items folder of your project.

Now locate the Network Manager in your scene and check its inspector. Add to its “Registered Spawnable Prefabs” list the “Bandit Minion” and “Skeleton Minion” prefabs from this AddOns prefabs folder.

Now add the two example items “Mercenary Contract” and “Summon Seketon Book” to a NPC shop or a loot drop in your scene to test them. Run your project, acquire those items and use them in order to test!

Usage
This AddOn allows players to summon/hire Minions that will fight at their side for a limited period of time. You can use this AddOn to simulate Mercenaries (like found in Diablo for example), sidekicks or hirelings. But of course this AddOn can also be used to add a Necromancer or Beastmaster class to your game.

  • Minions are hired/summoned via Item usage
  • Minions behave like a mixture of Monsters and Pets
  • Minions defend their owner, auto attack and move randomly, they also follow
  • Minions stay for a limited time period and then die automatically
  • When their Master dies/logs out, all Minions die automatically
  • Players can summon any amount of Minions, up to a technical maximum
  • When the summon maximum is reached the usage of summon items is disabled
  • Minions can be summoned at a preset level, this allows weaker/stronger Minions
  • Minions themselves do not trigger aggro
  • A future update will add hiring/summoning Minions via skill usage as well.
  • Players cannot force kill (aka: force un-summon) their Minions!

Creating Minions
In order to add a new summonable Minion to your game, you first have to duplicate one of the prefabs in this AddOns prefab folder. It is not possible to use a regular Monster or Pet. Then edit all it’s values in the inspector. You will see that the stats of a Minion are a mix between a Monster and a Pet. Simply duplicate one of the example prefabs that ship with this AddOn:

It is very easy to edit, just a few things to keep in mind:

  • You do not set the summoning duration in the Minion itself, instead its on the item (explained below).
  • You can edit the DefendOwner and AutoAttack options just like a pet, but the player won’t be able to actively toggle these commands while a Minion is summoned. This means you create a Minion for specialized uses instead.
  • Minions have levels but do not gain experience. This allows you to create Minions of varying strength, it also enables you to summon Minions at different levels. You can never summon a Minion at a higher level than the one you stated in the Minions Inspector.
  • Don’t forget to add new Minions to your Network Manager registered spawnable prefabs.

Creating Summon Items
Right now, its only possible to summon Minions via Item use, a later version will add summoning via Skill use as well. You can combine the item stats with any other stats like “Usage Destroy” or “Usage Mana”. Now lets go through all options one by one:

  • Summon Active – Only activate if this is a summon item. De-active this option for all other types of items in your game to prevent unexpected results.
  • Summon Minion – Choose one of the Minion prefabs you created beforehand. Only choose a prefab of the Minion type, do not use any other object or it won’t work.
  • Summon Amount – Set any amount up to the technical maximum. This maximum is shared between all Minions (whatever type they are) a Player has summoned at the same time.
  • Summon Duration – This is the duration in seconds. After that time span the Minion will die automatically. Minions also die when their Master (player) dies or when you logout of the game.
  • Summon Level – The level that Minion is summoned at. This is auto-capped to the amount of levels you create in your Minion prefabs inspector (so if you state 3 here, but your prefab has only level 1, any summoned Minion will be of level 1 instead.

Summoning Limit
There is a technical maximum of how many Minions each player in your game can summon at the same time. You can edit it in the Constants file of this AddOn, although its not recommended to change that. This has been done because too many Minions will cause a lot of additional load to the server. This is also the reason why Minions are summoned via an Item (later also Skill) and do not wander around the gameworld. Because that uses a lot of additional CPU/RAM on the server side and makes no sense in terms of gameplay.

The Summoning Limit is a shared limit between all types of Minions a player can summon. So if the limit is set to 5 and a player Summons 3 Sekeletons, that player will be able to summon another 2 Bandits for a total of 5.

Please note that all Summoning Items are disabled once this limit is reached, they are also disabled if the amount of Minions to be summoned is higher than the total cap. When a Minion dies, the amount is adjusted – so it might be possible for the player to summon Minions again.

• Example 1: You have just one item in your game that lets a player summon 3 Skeletons. After using this item once, any further use is disabled because the total number of summoned skeletons would exceed the technical maximum.

• Example 2: You have two items that allow a player to summon 3 Skeletons or 3 Bandits. After using one of them, the other one is disabled because the total amount would exceed the technical maximum.

Its an idea to provide your players with a number of summoning items of varying summon amounts (like 1 Skeleton, 2 Skeletons, 3 Skeletons) to compensate this limitation.

Posted on

SimpleAttributes – Complete Guide

Game Designer? Programmer? AddOn Developer? Or just serious about your game project? No matter what – our “Complete Guides” will help you make better games using Unity, uMMORPG3d and our AddOns.


Installation
My SimpleAttributes AddOn adds a long awaited feature to uMMORPG: More Stats! But beware, this AddOn requires the NuCore: It modifies the core of uMMORPG because without these modifications this system would be impossible.

So, first install the most recent version of the NuCore (available only to verified users of uMMORPG), next import this AddOn. Then locate the Canvas in your scene and de-activate the old CharacterInfo UI panel (you don’t have to delete it, de-activating it is enough). Now go to this AddOns prefabs folder and drag the new “CharacterInfoUI” panel into your scene. It acts as a replacement for the old one and features the new Attributes and their upgrade buttons.

Finally, select the “Shortcuts” panel in your canvas and assign the new CharacterInfoUI panel to the Character Info Panel slot (this exchanges the button linked to the old CharacterInfo with the new one).

Preamble
This AddOn is tightly tied to the NuCore and in fact was the AddOn that made me create the NuCore, as I do not see any other option to integrate the new functionality into uMMORPG without re-writing the whole asset. Before we start with the Complete Guide, there are several things any programmer and/or game designer should know:

  1. Default uMMORPG uses a SyncVar for each Attribute. This is very limiting as you will soon run into a SyncVar limit issue when adding another one. Also managing individual SyncVars is tedius and not performant.
  2. NuCore by itself exchanges all SyncVar based Attributes with a SyncList. This is much easier to maintain and allows the list to be expanded. Its also possible to save a lot more stats into that list, not just Attributes. In order to make this list work, all values therein have been set to an Integer.
  3. NuCore uses a Getter and Setter combination to address the new Attributs in that SyncList without changing the way the Attributes are adressed in the code. So you can still say: Strength+1 but NuCore will map that “Strength” onto the new SyncList and adjust ist accordingly.
  4. By default, uMMORPG calculates the “Attributes Spendable” with a simple formula that is not saved permanently in the database. But this system only works with 2 attributes. NuCore exchanges that with a permanent “Attributes Spendable” stat that is saved in the database, as there are now many new Attributes (and there could be even more, in the future).
  5. In the inspector window, each attribute is simply labelled “Attribute1” etc. It is not possible to change the displayed name because we cannot have “variable variables” in the inspector. Just hover over the “Attribute1” name to see the real name of that attribute. You can ajdust these names to your liking in the SimpleAttributesConstants file.
  6. I decided against a dynamic list of definable Attributes and went for a much simpler solution instead. Thats because it would require a rather complex approach (probably with a mutable) and would be a pain for any non-programmer to understand and adjust. Instead we now have 6 extra Attributes with fixed effects. I have chosen the most common effects for these stats (those are fixed), but you as a designer can adjust their effectivity and names.
  7. When using my AddOns (including this one) you will notice that I sometimes provide you with a nice ScriptableObject that you can edit using the Inspector. And sometimes (like in the case of SimpleAttributes) i don’t – instead you have to edit a script file in Mono Develop or a text editor. Thats because personally I believe that Scriptable Objects are much slower compared to Constants. I therefore decided to use ScriptableObjects only for things like Items (that must be edited often) and a Constants file for things that rarely change or are just edited one time at the beginning of your projects development. In case of the SimpleAttributes you will most likely edit them 1-3 times during your whole Dev Cycle and then don’t touch them anymore. Therefore having all the values defined as Constants (both secure and fast) made more sense to me.

Usage
SimpleAttributes will add six new, upgradeable Attributes with side-effects to your game – alongside the original two. When using NuCore, the original Attributes (Strength and Intelligence) already have the side effect of adding to your players total Health or Mana, this can be adjusted in the NuCore constants, please check out the NuCore Complete Guide for that.

Our six, new Attributes are designed in the same way, as each one of them will have a additional side effect on one of the other stats that you find in the game. Locate the “SimpleAttributesConstants” file in this AddOns prefab folder and open it with Mono Develop or any text editor of your choice.

You will see small section for each Attribute that can be adjusted to your liking, the template is always the same but with a varying side-effect. Lets take a look at the template itself first:

  • _ATTRIB_XYZ – This is the name of your attribute in various places inside your project. Whatever you put here will be shown to your players in the CharacterInfoUI panel but also in the tooltips and in the editor tooltips as well, when hovering over a inspector slot.
  • _ATTRIB_ACTIVE – You can de-activate the side effect of an attribute with this option. Please note the attribute will still be displayed both in the editor and the game. To remove it from the game, you have to remove it from the CharacterInfoUI panel. Use this option only if you do not want a certain side-effect via Attribute in your game.
  • _SCALE_XYZ – If you set this option to false, a fixed bonus will be added to the stat that is affected by this Attribute. If set to true, the bonus will be a percentage value proportional to the stat it modifies. Example: “Strength” increases “Max Health”, if you set this option to false, each point of strength will add +1 points of Max Health. If you set it to true, each point of strength will add +1% to Max Health.
  • _BONUS_XYZ – This float value is the amount of bonus applied per Attribute point, that can be either a fixed value or a percentage value. Depends on setting the above option to true/false.

Okay, that was the raw outline of how a Attribute template looks like, now lets go through each one of them:

Attribute 1

  • This Attribute affects Damage.
  • Scale True: Each Attribute point will increase Damage by +X %
  • Scale False: Each Attribute point will increase Damage by +X (fixed)

Attribute 2

  • This Attribute affects Defense.
  • Scale True: Each Attribute point will increase Defense by +X %
  • Scale False: Each Attribute point will increase Defense by +X (fixed)

Attribute 3

  • This Attribute affects Block Chance – which is percent based 0-100%
  • Scale True: Each Attribute point will increase Block Chance by +X%
  • Scale False: Each Attribute point will increase Block Chance by +X (fixed)
  • Attention: The bonus value is 0.01f by default, not 1.00f (because this stat is calculated a bit differently, as it ranges from 0 to 100 %).

Attribute 4

  • This Attribute affects Crit Chance – which is percent based 0-100%
  • Scale True: Each Attribute point will increase Crit Chance by +X%
  • Scale False: Each Attribute point will increase Crit Chance by +X (fixed)
  • Attention: The bonus value is 0.01f by default, not 1.00f (because this stat is calculated a bit differently, as it ranges from 0 to 100 %).

Attribute 5 (Block Effect is a new stat made possible via NuCore)

  • This Attribute affects Block Effect – which is percent based 0-100%
  • Scale True: Each Attribute point will increase Block Effect by +X%
  • Scale False: Each Attribute point will increase Block Effect by +X (fixed)
  • Attention: The bonus value is 0.01f by default, not 1.00f (because this stat is calculated a bit differently, as it ranges from 0 to 100 %).

Attribute 6 (Crit Effect is a new stat made possible via NuCore)

  • This Attribute affects Crit Effect – which is percent based 0-100%
  • Scale True: Each Attribute point will increase Crit Effect by +X%
  • Scale False: Each Attribute point will increase Crit Effect by +X (fixed)
  • Attention: The bonus value is 0.01f by default, not 1.00f (because this stat is calculated a bit differently, as it ranges from 0 to 100 %).

Attribute 9 (only available in conjunction with my SimpleStamina AddOn)

  • This Attribute affects Max Stamina.
  • Scale True: Each Attribute point will increase Max Stamina by +X %
  • Scale False: Each Attribute point will increase Max Stamina by +X (fixed)

As you can see, each of the Attributes above is tied to a single side-effect. As there are only a handful of side-effects in the game and each one is unique, it did not make sense to make Attributes fully dynamic. The only thing you could do, would be having both Strength and Intelligence increase a players Critical Chance – and that does neither make sense, nor does it justify the amount of extra work such a system would require.

• Pro Tip: This AddOn (as all of my AddOns) interlocks with my other AddOns to create synergy effects. All these attributes are not available by default so items and skills cannot access them. But together with my FreeItemStats AddOn (for example) you can have items that can manipulate all the new Attributes we see above (so you can have Armor that gives you +5 to “Attribute6” which in return will increase the Crit Effect). This is only possible because number and effect of the attributes are fixed.

So, as a conclusion – my SimpleAttributes AddOn was designed around the KISS principle: Keep it simple stupid. For a much more sophisticated (and complicated) approach, you should check out the Llama Attributes AddOn by another community member. Please note that Llamas AddOn (as good as it is) does NOT interlock into my other AddOns.

Posted on

SimpleBoosters – Complete Guide

Game Designer? Programmer? AddOn Developer? Or just serious about your game project? No matter what – our “Complete Guides” will help you make better games using Unity, uMMORPG3d and our AddOns.


Installation
The SimpleBoosters AddOn requires the NuCore (available only to verified users of uMMORPG), so you have to install the NuCore first in order to make this AddOn work properly in your project. Check out the NuCore installation Guide for more details. NuCore is required because this AddOn changes several core aspects of the uMMORPG engine that could otherwise not be altered.

Then install this AddOn package. Locate the items in this AddOns prefab folder and move them into your projects Resources -> Items folder. Make sure no duplicates are left in the original folder as this will cause errors.

Pro Tip: It is important to move all Items into the Resources folder of your uMMORPG project (this is also true for all other items, skills and quests you might find as part of other AddOns). As only the items inside the main Resources folder are properly indexed and cached when your project is compiled/started. Its also important to have only one single “Resources” folder (although having more wont break your project) as it reduces compile/index time and speeds up your project at runtime.

Thats it, no further modifications are required!

Usage
This AddOn allows you to add Gold, Experience and Coins boosters to your game in order to allow your players to advance faster while a booster effect is active. Premium Booster Items will allow your players to gain more gold, experience or coins while the booster is active, this is a common feature in most mobile and MMO games that is used to make a difference between free and paid players. Its also a typical (moderate) P2W feature that gives players making use of it (paying for it) a headstart. Of course, the price of those booster items is totally up to you, it does not have to be a premium currency.

The whole system is completely based around usable, consumeable booster item that provide a temporary bonus. To setup such a booster, simply edit the item in the inspector. There are different types of boosters available for Gold, Coins, Experience and any combination of those.

Now lets take a look at all booster settings in detail:

  • Booster Type – Select “None” for inactive (all items that are no boosters). Select God, Exp, Coins, Gold and Exp or All for all other types.
  • Booster Duration – This is the duration in seconds the booster effect will be active. It is important to know that the booster effects are permanently saved in the database and the timer will continue to run while the player is offline as well!
  • Booster Effect – This is the effect the booster will have on the chosen statistic, its a float value so 0.5 equals 50%. It is important to note that booster effects stack. So if a player applies 3x Gold Booster with 50% each, the total Gold bonus will stack up to a total of 150%

The active booster effect will increase all Gold, Experience or Coins that the player acquires. This includes kills, loot drops, quest rewards, daily rewards and other sources. The only exception are coins gained from the coins processing function, those won’t be boosted.

It is also important to know that a player – while affected by a gold booster – will gain additional gold when selling items to an NPC.

The reason behind this system is to provide a way of having “premium” players compared to “free to play” players – and allow the premiums to boost themselves via the available booster items. Boosters therefore represent ideal mall items but are also very valueable loot drops or daily rewards. When put to proper use, they will grant your paying (or evangelist) players a moderate (but not unfair) advantage.