Page 1 of 3

AC In DAOC

PostPosted: Fri Apr 06, 2012 9:13 pm
by Keedo420
Asheron's Call has always been my favorite MMORPG for a variety of reasons:
1. It was the first one I ever played.
2. It was a classless game (ie any character could train any skill)
3. It had one of my favorite game monsters: the Olthoi
4. You could fight hordes of monsters practically non-stop.
The list goes on...

Anyway, I've been toying with the idea for some time now to bring AC into my second favorite MMORPG...DAOC. Though some monsters (like the Armoredillos and Olthoi) are a tough call, almost every monster in AC has a rough equivalent in DAOC (drudge = goblin, banderling = glashtin, tumerok = gnoll, etc...). The real challenge is going to be designing a universal character class that can use any weapon and train in virtually any spec. This is especially challenging due to the different way that magic is handled in DAOC. In AC, you would train in a school of magic (War Magic for example), then if you knew the proper formula and had the necessary components, you could learn any spell in that school of magic. I've already started (on paper) converting the AC magic schools into DAOC specs. War Magic is going to be the most complicated and will have to be broken into multiple specs: War Magic (Acid), War Magic (Blade), War Magic (Flame), etc. I will of course need to take certain liberties and modify the way certain AC spells act and even create new spells whose names sound like AC spells. Ring spells were the equivalent of PBAOE, but AC didn't have things like GTAOE. Also, since I suspect having too many specs might pose problems, I'm also considering simply making multiple classes which have all have access to common specs, but have access to only one of certain types of specs (for example, all classes would have access to only one War Magic spec - Blademaster would have access to War Magic (Blade) for example but not the other 9 varieties (one War Magic for each damage type)). I probably won't bother renaming the various zones since (as far as I know) it isn't possible to change the text on the maps showing town and dungeon names. Besides, since Asheron's Call was based on the premise of the wizard Asheron accidentally summoning the Olthoi from another world I can just have something similar happen to the world of DAOC. So....with my basic premise for my server explained, here are some initial questions I could use some help with/advice on:

1. I've seen on Storm D2 how the character can equip any weapon, even dual-wield, without having the appropriate Weaponry ability. I would be intersted to know how this was done and if it is possible to do the same with armor, though for armor I will probably choose instead to limit the type of armor the character can wear based on level. Anyone can pick up a weapon and swing it (Large Weapons being an exception) but often, armor (especially Plate) requires knowledge of how to wear it correctly.

2. What would be an appropriate level of skill points to give the character each level so they would be able to spec to level at least 1 spec and still have multiple low levels of a number of other specs or a couple high levels of a few other specs? This is a hard question to answer since some AC skills will need to be handled differently in DAOC. For example, I've decided that the AC skill of Leadership will become a DAOC spec for group buffs, and the AC skill of Running will become a spec for self speed buffs.

3. Is it possible to change the way the tutorial zones work so they are simply just another zone with no level restrictions or anything? I remember playing around in the Hibernia tutorial zone on Storm, and when I died I was spit out into Mag Mell instead of returning to the bind stone in the tutorial zone. I want to eliminate that from happening so it works just like any other zone.

Re: AC In DAOC

PostPosted: Sat Apr 07, 2012 11:03 am
by Dinberg
This sounds like a really interesting project! Nice to see something different round here.

You're going to have to get dirty with the code :D. Don't worry, its not as bad as you think! I think for this project you would be best suited to picking one class from daoc, making all new characters play that class (which you can do in character creation to hard-set them to your chosen) and editing it to include the skills from asherons call. For example purposes, let's take the thane:

http://dolserver.svn.sourceforge.net/vi ... iew=markup
Code: Select all
public override void OnLevelUp(GamePlayer player, int previousLevel)
This is called when a character levels up; any leveling code could be placed in here. I'm not familiar with how Asheron's call played as a game, but if it had anything like a character level you'd want to add that here.

Also note that players may have different skills/speclines from those given by their class; to add new ones you can use
Code: Select all
player.AddAbility(SkillBase.GetAbility(Abilities.Protect, 1));
player.AddSpellLine(SkillBase.GetSpellLine("Stormcalling"));
player.AddSpecialization(SkillBase.GetSpecialization(Specs.Stormcalling));
to add various new things. How much programming experience do you have? Specs.Stromcalling and Abilities.Protect are just constants, so you'll want to add the relevant new ones for AC. You'll also need to add them to the database Abilities, Specialisation and SpellLine tables if you add anything new for any of them. For now, to get familiar with the core, I'd recommend you pick a class, like the thane, and try adding the darkness spell line to it at level 2 - you should see how the system works if you can sort that out ;)

You should also be able to change the required number of spec points to 'level up' in a given specialisation if you delve into the code - as an example, make it so upgrading running always takes two spec points. This will be a little trickier, the logic is probably located in the training client handlers.
http://dolserver.svn.sourceforge.net/vi ... iew=markup

Have a look at that - you'll see alot of character training logic. For example, you could remove the limitation that you can only train up to your level in a specline by altering this conditional check:
Code: Select all
114 if (spec.Level >= client.Player.BaseLevel)
115 {
116 client.Out.SendMessage("You can't train in this specialization again this level!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
117 return;
118 }
Or if you want to change the cost of specialising, why not try changing this at line 125:
Code: Select all
client.Player.SkillSpecialtyPoints -= (ushort)(spec.Level + 1);
You could put in a check to see if (spec.Name == "Running") (*) and if so only deduct one specialisation point, else default to the normal method:
Code: Select all
if (spec.KeyName == "Running")
client.Player.SkillSpecialtyPoints -= 2;
else
client.Player.SkillSpecialtyPoints -= (ushort)(spec.Level + 1);
DISCLAIMER: This is not the best way to do this by a long shot and would be considered bad programming. However, I'm assuming you are new to c#, OO programming and so I'm just giving you the solution that is easiest to understand and get you on your way ;)

Also, there might be something funky going on with the client side training window - it might depict the spec cost for running to increase, even though only two will ever be deducted. This may be hard coded client side, not sure. If so, you can always trick the client by always sending the running skill to be always level 2 in the various client.Out handlers (youll need to change every packet handler though, from 168 to whatever we are on now, which is a bit tedious :D

http://dolserver.svn.sourceforge.net/vi ... iew=markup
Code: Select all
2530 public virtual void SendTrainerWindow()
2531 {
2532 using (var pak = new GSTCPPacketOut(GetPacketCode(eServerPackets.TrainerWindow)))
2533 {
2534 IList specs = m_gameClient.Player.GetSpecList();
2535 pak.WriteByte((byte) specs.Count);
2536 pak.WriteByte((byte) m_gameClient.Player.SkillSpecialtyPoints);
2537 pak.WriteByte(0);
2538 pak.WriteByte(0);
2539
2540 int i = 0;
2541 foreach (Specialization spec in specs)
2542 {
2543 pak.WriteByte((byte) i++);
2544 pak.WriteByte((byte) spec.Level);
2545 pak.WriteByte((byte) (spec.Level + 1)); <-- guessing this is the training cost, set to 2 if spec.KeyName == running
2546 pak.WritePascalString(spec.Name);
2547 }
2548 SendTCP(pak);
2549 }
On the running skill, you needn't make a series of self-haste spells. It might be better to change one of the many property calculators in DOL to exact your specification:

http://dolserver.svn.sourceforge.net/vi ... iew=markup

That's the code for the MaxSpeedCalculator! You could just change it so that if we are calculating the speed of a player, we look at their 'Running' skill to figure out their speed. Then it works truelly in the sense you described; players invest points in this spec line, and as a result always run faster.

As for Q3 - yes! In fact, all of the maps are identical from the clients perspective. You could set the entire thing in a capital if you want, or have RvR in dungeons. PvP in housing? All it requires is changing some code and DB entries. You can also repopulate zones with any of the available mobs to recreate the ones you played in AC.

Sorry this is a bit long - I've waffled a bit. Hope this explains some things. Post if you have a problem, but don't be afraid to get your hands dirty! It'll be quite a big project, but DOL is where I learned C# and the fastest way to do so was to dive right in at the deep end and figure out how it all works.

Best of luck!

Re: AC In DAOC

PostPosted: Sat Apr 07, 2012 11:09 am
by Dinberg
Also, as a quick aside - you can re-do the entire magic system if you want. I've programmed classes before that used a series of 'elements' that were simply spell icons on the clients quickbar, and you clicked them in different orders to create a spell you then unleashed. Everything from 'clicking the icon in the qbar' onwards in casting a spell is server side. You could even have it so that clicking a spell icon makes you swing your weapon, say something in chat, etc etc. I quite like the two worlds 2 magic system, and thought about making something similar for DOL - You click one of several spell containers, then click your elements you want to put inside it, spray/rebound/time modifiers etc, then click the container again to 'release' the cast. Its all possible!

Re: AC In DAOC

PostPosted: Sat Apr 07, 2012 6:01 pm
by Keedo420
This is called when a character levels up; any leveling code could be placed in here. I'm not familiar with how Asheron's call played as a game, but if it had anything like a character level you'd want to add that here.
My project won't be an exact replica of AC. I'm just bringing in my favorite elements. I don't plan on modifying the levelling system since AC had a level cap of over 200. :) I rather like DAOC's level 50 cap + champion levels + realm ranks. Also, there are quite a few things DAOC has that AC didn't (such as large weapons, scythes, certain types of spells, etc). Think of this project as an amalgam of the two with an emphasis on AC.
How much programming experience do you have?
I have actually worked on a DOL server before and created a new class, though that was two years ago. I've also got some experience with python when I made a mod for Mount & Blade. One of the concerns I have with creating this single class for all races is that of the mana/casting stat. AC Had two magic-related stats: Focus and Self. The DAOC classes have only one magic stat per class. That's not really the problem, I'll probably settle on Intelligence for the magic stat. But settling on a single magic stat will make the other three magic-related stats useless. So, that would mean to make sure all races remain relevant, I'll need to modify their stats. For example if they're geared toward using Empathy for magic, I'll need to modify their Intelligence to match their Empathy if possible.
You should also be able to change the required number of spec points to 'level up' in a given specialisation if you delve into the code - as an example, make it so upgrading running always takes two spec points.
I don't think I'll change the way skills are trained either. DAOC has a good system and I don't feel the need to change it. As I said above, I'm not really trying to make a replica of AC. What I'm doing is more along the lines of creating something that AC2 should have been instead of the disappointment that it was. :)
On the running skill, you needn't make a series of self-haste spells. It might be better to change one of the many property calculators in DOL to exact your specification:

http://dolserver.svn.sourceforge.net/vi ... iew=markup

That's the code for the MaxSpeedCalculator! You could just change it so that if we are calculating the speed of a player, we look at their 'Running' skill to figure out their speed. Then it works truelly in the sense you described; players invest points in this spec line, and as a result always run faster.
This idea I like! :) I wonder if something like that would work for the Jump skill as well? Is their a Jump height calculator? Currently I'm planning to make the Jump skill into a spec that includes the Safe Fall and Climbing abilities, but if I can change the jump height as well, that would be perfect. I wouldn't want to increase it so much that a player could jump over keep walls or anything, but sometimes fences are annoying. :) This would also let me hide NPCs in normally inaccessible places.

Re: AC In DAOC

PostPosted: Sat Apr 07, 2012 6:27 pm
by Keedo420
Also, as a quick aside - you can re-do the entire magic system if you want.
I probably won't change the magic system too much. Most of the AC spells have something similar in DAOC. Take AC's War Magic for example. There are 7 basic types with 7 levels which is perfect. 7x7=49. Since characters will start with a War Magic spec, there will be no spell at skill level 1 (I don't plan on having ANY baseline spells), thus speccing the War Magic spec to 50 would give you all 7 levels of all 7 spells. Here are the 7 spell types and what I plan to make them into for DAOC:

Bolt (Bolt of course...)
Streak (DD)
Arc (AOE)
Blast (GTAOE)
Ring (PBAOE)
Volley (Cone)
Wall (Damage Shield)

Now there are certain spell types in DAOC that didn't exist in AC (like Spread Heal and pet summons) and a much wider variety of damage types, so I'm going to make some extra magic specs as well. AC had only 4 magic categories: War Magic, Life Magic, Creature Enchantment, and Item Enchantment. Here are the magic specs I currently have planned:

War Magic
War Magic (Whirling Blade) - Slashing damage spells
War Magic (Piercing Blade) - Thrust damage spells
War Magic (Force) - Crush damage spells
War Magic (Flame) - Heat damage spells
War Magic (Frost) - Cold damage spells
War Magic (Lightning) - Energy damage spells
War Magic (Spark) - Elemental damage
War Magic (Acid) - Body damage spells
War Magic (Void) - Matter damage spells
War Magic (Spirit) - Spirit damage spells

Life Magic - Healing, hot, pot, etc.
Death Magic - Debuffs, lifetaps, disease, etc.
Creature Enchantment - Single target stat buffs
Nature Magic - Root, poison, etc.
Item Enchantment - Haven't put too much thought into this one yet, but will likely include damage add, af buff, maybe blade turn

Obviously I've put the most thought into War Magic and I haven't decided yet how I will do the pet specs. So far it's all on paper.

Re: AC In DAOC

PostPosted: Tue Apr 10, 2012 2:23 am
by Keedo420
You could just change it so that if we are calculating the speed of a player, we look at their 'Running' skill to figure out their speed.
So if I wanted a player's run speed at spec 50 to be double that of level 1, would something like this work do you think?
Code: Select all
speed = 1 + (player.GetModifiedSpecLevel(Specs.RunSkill) * 0.02)

Re: AC In DAOC

PostPosted: Tue Apr 10, 2012 7:43 am
by Graveen
yes, except 1 base speed is awfully slow (try with 50 or 80 as base)

A quick notice, as we all wondered when we started to play DAoC, you can now have quickness which influence move speed :mrgreen:

Re: AC In DAOC

PostPosted: Tue Apr 10, 2012 4:48 pm
by Keedo420
yes, except 1 base speed is awfully slow (try with 50 or 80 as base)

A quick notice, as we all wondered when we started to play DAoC, you can now have quickness which influence move speed :mrgreen:
Ah. I was going for percentage. :) I was basing it off of this:
Code: Select all
if (ServerProperties.Properties.ENABLE_PVE_SPEED)
{
if (speed == 1 && !player.InCombat && !player.IsStealthed && !player.CurrentRegion.IsRvR)
speed *= 1.25; // new run speed is 125% when no buff
}
So modified to include Quickness it should look something like this? I'll probably play around with the multipliers after testing it ingame. Obviously I don't want players running around like The Flash, but there should be a noticeable difference between someone who is quick and trained in running compared to someone who is slow and trained in running. I just want to make sure I have the code right first.
Code: Select all
speed *= 1 + (((player.GetModified(eProperty.Quickness) / 2) * 0.01) + (player.GetModifiedSpecLevel(Specs.RunSkill) * 0.02))

Re: AC In DAOC

PostPosted: Tue Apr 10, 2012 6:04 pm
by Dinberg
Yeah that should work! Did you add Specs.RunSkill to the list of Spec constants?

Re: AC In DAOC

PostPosted: Tue Apr 10, 2012 6:06 pm
by Dinberg
OH, as an aside, you may want to check if there's a cap on run speed, because it may come into effect before you want it to (it'll be server side, afaik the client side cap is limited maybe only by the actual data type max)

Re: AC In DAOC

PostPosted: Tue Apr 10, 2012 11:44 pm
by Keedo420
OK, I haven't actually tested out the run speed code yet. I've been trying to work out the class-less skill system. What I've decided on is to make all classes in all realms use the same base class. Then, a single Trainer will be used to allow the player to choose from ANY class from any realm. However, the only real purpose of classes will be to determine Titles; base HP & WS; Primary, Secondary, and Tertiary stats; and the mana/casting stat. All Specs will be available to all classes. In other words, all classes will simply be a copy of the base class with the above mentioned variations. I'm not even going to get into how I'll handle Vampiirs, but I do have a plan for them. :) ANYWAY, the point of this specific post is that of ClassType. I'd like the Acuity buff to affect all classes, and I figure I can do that by simply making all classes ListCasters. However, I am unsure of what the ClassTypes (Pure Tank, Hybrid, & ListCaster) affect beyond that. At the same time, I don't want to gimp a class simply to give it the benefit of Acuity, so the question is how do the ClassTypes affect the classes?

Re: AC In DAOC

PostPosted: Wed Apr 11, 2012 8:03 am
by Dinberg
Dont forget that things like health points also have Property Calculators associated with them, so you can always add extra scores or alter max health formulae ;)

From memory, Hybrid has a different view of spell lists (only shows the most recent spell of a given spell type - think skald, bard, etc)

Re: AC In DAOC

PostPosted: Wed Apr 11, 2012 4:11 pm
by IStandAloneToo
From memory, Hybrid has a different view of spell lists (only shows the most recent spell of a given spell type - think skald, bard, etc)
I can confirm this. From my memory, you either set this field on the spell or the spell line... Been so long I can't remember which. If I think really hard, I believe it's on the spell line. But, I could be completely wrong there.

Re: AC In DAOC

PostPosted: Thu Apr 12, 2012 9:04 pm
by Keedo420
Well, as an update to this project, with advice from people in Support I have worked through my problems creating new a new class, and have set up a universal trainer to allow new players to choose any class and to allow any class to use it to train. Now I am in the process of creating a variety of new classes. All of the classes will have access to ALL specs and will have the same spec points. Their only differences will be the various primary, secondary, and tertiary stat combos plus mana/casting stat.

Re: AC In DAOC

PostPosted: Thu Apr 12, 2012 9:57 pm
by Dinberg
There must be a neater way of doing this :D

So if I understand correctly, you want to make different classes so that:
-you can have a different acuity stat for each one, so that some races get the advantages they should
-you can have different primary, secondary, tertiary stats depending on player choice

If this is so, I think it might be better to:
-for a), either change the base stats of each race to use a uniform acuity stat like intelligence, eg swap frostalf intelligence/piety values over, or just change the spell handlers to use whichever stat is highest of intelligence/empathy/piety etc.
-for b), you could make an npc that players talk to (or add extra dialogue to the class trainer) to let them choose what their P/S/T skills are.

Otherwise you'll have to have many different classes and itll get messy ;)