ok i am redoing this for honorbuddy 2.0 so here is the new deal all members in honorbuddy 2.0 must have the override command in their declaration such as
i will not explain what overriding is as that is a complicated and advanced topic of programming just accept that you have to do it period
beforewe begin i want to explain a few points of knowledge you may find usefull
http://msdn.microsoft.com/en-us/library/yzh058ae.aspx
this is from Microsoft they offer a lot of utilities to help you understand the language you are working with
alright variables are another item variables are declared singularly or in multiples you can only declare multiples of the same type
example
ok now in this simple priest routine we are going to use global scope. scope is the range in which you can use a variable.
Scope is very important because it can make or break a large program for what we are doing the overhead it creates keeping them all globaly
will not matter. scope is difficult to explain because you have to understand parent child relationships and is also altered by access modifiers public protected private so on and such.
to globally declare a variable it needs to be declared outside of a member and in the parent class.
example:
ok the string that is declared is still global because it is declared outside of any member and in the class.
I strongly suggest keeping all your variables in one area to avoid confusing spaghetti code (a mess of code strewn everywhere).
this will save you headaches if something goes wrong and this gets alot more complicated.
also keep in mind the best programmers are lazy programmers. why you may ask?
the answer is simple, because we want to do things as easily as possible with the least amount of code, while still keeping things well organized and dynamic.
hard coding is bad in my opinion if you are loading a method with a hard coded value your doing something wrong.
sometimes hard coding is unavoidable but it is rare and means most likely if you can not figure out another way you need to ask for help from a senior dev.
ok, so here is a crash course in c# development what you will need is:
MS Visual Studio C# express get it here - http://www.microsoft.com/express/Downloads/#2008-Visual-CS
patience and the ability to read.
ok to start lets start with a basic form open up vs go to file>new>project a window should appear select class library
after you have done that it will think do some other stuff and show a blank code space
alright on the right side of your screen you should see a item called solution explorer if you do not go to view and click solution explorer under that menu
ok this is the project file you are working on here and its elements . here there should be a gray looking folder that says references right click that folder. Select add reference and there should be tabs at the top of the popup window that appears. The 4th tab should say browse click it and direct the file picker to where you have honor buddy loaded.
there will be some ddl's there select those dlls using the ctrl button and then click ok.
Part 2
ok now to provide a basic template with the basic members that are required by honor buddy dont worry what members or methods are yet just go with it
Code:
public override void combat()
{
// code goes in here
}
beforewe begin i want to explain a few points of knowledge you may find usefull
http://msdn.microsoft.com/en-us/library/yzh058ae.aspx
this is from Microsoft they offer a lot of utilities to help you understand the language you are working with
alright variables are another item variables are declared singularly or in multiples you can only declare multiples of the same type
example
Code:
int var1 = 0,var2 = 12,var 3;
// a integer is a 32 character numeric variable meaning it can accept 32 numbers in it imagine variables as containers that you put whatever you want in them
bool useSpell1 = 0, useSpell2 = 1;
/*this is a boolean variable it has 2 values 0 which is false and 1 which is true and also accept these as overloads which means instead of you typing bool useSpell1 = 0
you can instead type bool useSpell1 = false
*/
string sayThis = "this is what i want it to say"
// a string is a alphanumeric variable meaning it accepts prettymuch any unicode character you can think of and if you reach the limit of string then your doing something horribly wrong
Scope is very important because it can make or break a large program for what we are doing the overhead it creates keeping them all globaly
will not matter. scope is difficult to explain because you have to understand parent child relationships and is also altered by access modifiers public protected private so on and such.
to globally declare a variable it needs to be declared outside of a member and in the parent class.
example:
Code:
using blah;
using blah1;
using blah2;
using blah3;
public class priest : CombatRoutine
{
int var1 = 0; // <---- this is global
public override void combat
{
int var2 = 2; //<----- this is not global but because this member of the class is public the other members of this class can call this integer. point still is it is not global
}
string strOutput = "i am global nuff said"
public override void heal()
{
}
}
I strongly suggest keeping all your variables in one area to avoid confusing spaghetti code (a mess of code strewn everywhere).
this will save you headaches if something goes wrong and this gets alot more complicated.
also keep in mind the best programmers are lazy programmers. why you may ask?
the answer is simple, because we want to do things as easily as possible with the least amount of code, while still keeping things well organized and dynamic.
hard coding is bad in my opinion if you are loading a method with a hard coded value your doing something wrong.
sometimes hard coding is unavoidable but it is rare and means most likely if you can not figure out another way you need to ask for help from a senior dev.
ok, so here is a crash course in c# development what you will need is:
MS Visual Studio C# express get it here - http://www.microsoft.com/express/Downloads/#2008-Visual-CS
patience and the ability to read.
ok to start lets start with a basic form open up vs go to file>new>project a window should appear select class library
after you have done that it will think do some other stuff and show a blank code space
alright on the right side of your screen you should see a item called solution explorer if you do not go to view and click solution explorer under that menu
ok this is the project file you are working on here and its elements . here there should be a gray looking folder that says references right click that folder. Select add reference and there should be tabs at the top of the popup window that appears. The 4th tab should say browse click it and direct the file picker to where you have honor buddy loaded.
there will be some ddl's there select those dlls using the ctrl button and then click ok.
Part 2
ok now to provide a basic template with the basic members that are required by honor buddy dont worry what members or methods are yet just go with it
Code:
code is coming patience
Last edited: