This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [TUTORIAL] Creating a shell of a class!  (Read 36949 times)

Kobiesan

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 161
    • View Profile
Re: [TUTORIAL] Creating a shell of a class!
« Reply #75 on: May 25, 2016, 03:47:41 am »
I get these errors when compiling.

« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Grymskvll

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 65
    • View Profile
Re: [TUTORIAL] Creating a shell of a class!
« Reply #76 on: May 25, 2016, 07:46:12 am »
Quote from: "Kobiesan"
I get these errors when compiling.


If you're trying to add custom class spellscripts, I just tried this and it seemed to work fine:

Core:
Right click scriptsSpells folder in solution explorer.
Add new item, name it spell_<class>.cpp (just like the existing class script files).
Add whatever you like to your new spell_<class>.cpp. look at existing class spell script files for examples. If you copy+paste, remember to rename sensibly.
Rebuild scripts and worldserver.

SQL:
add entries for your spell scripts in world.spell_script_names

If you just want to test that it works, in Spell.dbc make a duplicate of a spell that relies on a script to work (for example, priests' Guardian Spirit: 47788), check in-game that the original works but the duplicate doesn't (because it has a different spell ID and so doesn't get to use the script yet), then add a new spell script for your duplicate that's exactly the same as the script of the original, with the only difference being the script's classname. Don't forget to add an entry in world.spell_script_names for your duplicate, that's what ties a spell ID (in Spell.dbc) to the script.

By the way, I was making notes for an updated TrinityCore custom class guide and I couldn't figure out why you had to edit playermethods.h, worldsession.cpp and worldsession.h. What did you change in those files?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Kobiesan

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 161
    • View Profile
Re: [TUTORIAL] Creating a shell of a class!
« Reply #77 on: May 25, 2016, 03:22:55 pm »
Quote from: "Grymskvll"
Quote from: "Kobiesan"
I get these errors when compiling.


If you're trying to add custom class spellscripts, I just tried this and it seemed to work fine:

Core:
Right click scriptsSpells folder in solution explorer.
Add new item, name it spell_<class>.cpp (just like the existing class script files).
Add whatever you like to your new spell_<class>.cpp. look at existing class spell script files for examples. If you copy+paste, remember to rename sensibly.
Rebuild scripts and worldserver.

SQL:
add entries for your spell scripts in world.spell_script_names

If you just want to test that it works, in Spell.dbc make a duplicate of a spell that relies on a script to work (for example, priests' Guardian Spirit: 47788), check in-game that the original works but the duplicate doesn't (because it has a different spell ID and so doesn't get to use the script yet), then add a new spell script for your duplicate that's exactly the same as the script of the original, with the only difference being the script's classname. Don't forget to add an entry in world.spell_script_names for your duplicate, that's what ties a spell ID (in Spell.dbc) to the script.

By the way, I was making notes for an updated TrinityCore custom class guide and I couldn't figure out why you had to edit playermethods.h, worldsession.cpp and worldsession.h. What did you change in those files?

So should I not bother with stdafx and creating necromancer.cpp and .h?

Also, I went and looked in playermethods and worldsession and I don't know why I mentioned them. There's nothing of use there.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: [TUTORIAL] Creating a shell of a class!
« Reply #78 on: May 25, 2016, 06:37:06 pm »
Stop trying to hang yourself with the stdafx. I never mentioned it once.  ;)

Do as was written. It's more healthy than trying to do evne more.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Kobiesan

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 161
    • View Profile
Re: [TUTORIAL] Creating a shell of a class!
« Reply #79 on: May 26, 2016, 01:54:03 am »
Quote from: "Ascathos"
Stop trying to hang yourself with the stdafx. I never mentioned it once.  ;)

Do as was written. It's more healthy than trying to do evne more.

I'm trying to do exactly what the guide says. But a lot of it only applies to ArcEmu.

Do these errors mean anything?





Also, I put my new mpq file in my WoW > Data folder and the icon for my class isn't showing up on the character create screen.

If you're wondering, this is what my mpq file looks like.

« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: [TUTORIAL] Creating a shell of a class!
« Reply #80 on: May 26, 2016, 04:14:44 pm »
It either means arcemu is badly coded or you did something wrong.

I just remembered that I wrote a tutorial myself. It's not "everything" but still valid for the utmost part. 3.3.5 only, though. Too much changed with 6.x

viewtopic.php?f=79&t=3756
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Kobiesan

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 161
    • View Profile
Re: [TUTORIAL] Creating a shell of a class!
« Reply #81 on: May 27, 2016, 12:58:14 am »
Quote from: "Ascathos"
It either means arcemu is badly coded or you did something wrong.

I just remembered that I wrote a tutorial myself. It's not "everything" but still valid for the utmost part. 3.3.5 only, though. Too much changed with 6.x

viewtopic.php?f=79&t=3756

I'm not authorized to read that thread.

Also, I'm on TC not ArcEmu which is why a lot of this guide is hard to follow.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: [TUTORIAL] Creating a shell of a class!
« Reply #82 on: May 27, 2016, 01:20:51 am »
They are not even close to each other.
Moved the thread around. YOu can see it now.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Kobiesan

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 161
    • View Profile
Re: [TUTORIAL] Creating a shell of a class!
« Reply #83 on: May 27, 2016, 01:42:13 am »
Quote from: "Ascathos"
They are not even close to each other.
Moved the thread around. YOu can see it now.

Awesome. I'll give your guide a go.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »