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.

Posted on

Simple Travelroutes – 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
Simply import this AddOns package, neither NuCore nor the NuTools are required. Next, locate “SimpleTravelroutesUI” and “SimpleUnlockroutesUI” in this AddOns prefabs folder. Drag-and-drop both of them into your Canvas. You are done importing SimpleTravelroutes.

Next, locate the “SimpleTravelroute” prefab in this AddOns prefab folder and drag it somewhere into your scene. Place the collider so that it is in a walkable space, so that players can access it. This AddOn uses a collider and not an NPC because that requires much less CPU and RAM on the server side. Player activate the SimpleTravelroutes menu simply by walking into the collider.

You are encouraged to decorate the area around the SimpleTravelroute collider so that it looks like a Griffon Travel Station from World of Warcraft for example.

Usage
Before we go through the process of setting up a network of travel routes, lets learn a bit about how this system is supposed to work in practice:

So imagine the Griffon Travel system from World of Warcraft: Players can use this system to travel from point A to point B (teleport in our case, as there is no visual flight path yet). Plus, players can only travel to destinations they already discovered and they can unlock new travel routes by entering a SimpleTravelroute collider. You as a designer can setup the SimpleTravelroutes prefab as you like to create a network of discoverable and then usable routes.

Now, click on your SimpleTravelroutes prefab that you placed in your scene like described in the “Installation” section above and take a look at its inspector. All the editor data is divided into two sections: The actual Travel destinations and the routes that can be discovered. We now go through all the settings one by one:

Section A: Travelroutes
This section represents the actual targets a player can travel to from this location. It is important to note that the player must know the target route already, this is done by discovering routes first (see section B below). You can add as many elements to this section as you want, the player will see a list of possible travel destinations when entering the collider.

Plus, if you have my SimplePVPRegions AddOn installed as well, you can set a “Realm” that the route belongs to. So only citizens of that realm have access to that route.

  • Only previous discovered routes are accessible by the player
  • Only routes of the same Realm (or set to “None”) are accessible by the player (requires SimplePVPRegions AddOn)

Each entry in this section is furthermore divided into 2 subentries: Same Scene Destination and (if you the FreeNetworkZones AddOn installed) a Other Scene Destination.

A.1 Same Scene Destination
This entry allows a player to travel to another destination within the same scene, according to the limitations explained above (discovered already and matching realm):

  • Destination – Drag any transform into this slot, that will be the teleportation target. You can also use another Travelroutes Area (as it contains a Transform as well) – but you don’t have to. If you do, the player will then automatically discover new routes when reaching the destination.
  • Price per Unit – This is used to calculate the travel cost in gold (set to 0 to make it free). It simply multiplies the distance in Unity units by the price you state here. This saves you from calculating prices manually for each route.
  • Realm – This option is only visible if you use my SimplePVPRegions Addon. It will limit usage of this route to members of that Realm.

A.2 Other Scene Destination
This option is only available when you have the FreeNetworkZones AddOn installed. It allows a player to travel to another scene, represented by another server. Detailed setup of such a network zone is explained elsewhere.

  • Route Name – You have to name your routes with a unique name in order to use them. The names must be unique and are shown to the player when discovered.
  • Scene Path – That is the path to the scene you want to teleport the player to. This is explained in detail in the FreeNetworkZones AddOn.
  • Position – As you cannot simply drag a Transform here, because the destination is in another scene. You have to enter the destination position manually. The positive thing is that you don’t need a Transform as target, in fact you can teleport your player everywhere you want.
  • Fixed Price – As we cannot calculate the distance between two positions in different scenes. You have to state a fixed price (in gold) here as transportation cost (or set to 0).
  • (Realm) – Only if you use my SimplePVPRegions AddOn – the Realm setting from above is also true to the other Scene destination. So you can only use that teleporter if the player is from the same Realm (So you can limit a teleport to be Elf only or Orc only etc.).

Section B: Unlocking Routes
This second section is all about the routes your players will discover when entering the collider. This is the way how players build an atlas of known routes. You have to provide your players with new routes or otherwise new teleportation targets will never appear.

Lets take a look at all settings in the Unlockroutes Section, its also separated into two subsections but there are less settings:

B.1. Same Scene Destination Discovery
Applies to a new route that will be discovered when entering the collider:

  • Destination – Drag and Drop the target destination route into this slot. That can be a transform or any object that contains a transform. It can also be another SimpleTravelroute (suggested).
  • Exp Gain – When discovering this route, the player will be rewarded with this amount of experience (or 0).
  • Realm – This option is only available when you have my SimplePVPRegion AddOn installed as well. This will allow you to limit the discovery of this route to members of the Realm you state here (or “None” to allow access to all Realms). This way you can make a “Elf only” or “Orc only” discoverable route.

B.2. Other Scene Destination Discovery
This whole section requires the FreeNetworkZones AddOn and is only available when you have that AddOn installed.

  • Route Name – Enter the exact name of the target route on another scene here. You must use a unique name. This name is required as destinations on other scenes cannot be added via drag-and-drop.

And thats all about the SimpleTravelroutes AddOn – feel free to design the