Jump to content

Need help with creature_template


Recommended Posts

Hello I am having trouble figuring out how to change the total sql fields. When ever I start mangos.exe it will load perfect all the way upto creature_template the following error occurs...

2011-01-04 16:57:45 Loading Creature templates...

2011-01-04 16:57:46 ERROR:Error in creature_template table, probably sql file format was updated (there should be 84 fields in sql).

Let me pretty much sum this up for you, I wanna try and figure out where in the mangos-git folder where you can change the creature_template fields from 84 to 90. 90 because thats how many fields I have. I am pretty sure you can edit this somewhere but I have no idea where can someone please help?

Link to comment
Share on other sites

Well, have you applied every database structure update from sql/updates?

Are you using any core modification that may require an update of the table structure and you forgot to execute the queries?

Lastest mangos rev. on master branch with YTDB works fine for me.

You may want to take a look at the wiki: http://getmangos.eu/wiki/Setting_up_MaNGOS

Link to comment
Share on other sites

Well, have you applied every database structure update from sql/updates?

Are you using any core modification that may require an update of the table structure and you forgot to execute the queries?

Lastest mangos rev. on master branch with YTDB works fine for me.

You may want to a look at the wiki: http://getmangos.eu/wiki/Setting_up_MaNGOS

I have applied everything it is up-to-date, I am trying to get the vehicles working correctly but am not sure how to really even do it. Don't give me that link on here where they have the vehicles and you have to merge the files because I dont know how to do that ether. I can compile the server, run it and it will start up fine its just I added colu. to the creature template to try and get the vehicles working

Link to comment
Share on other sites

Ahh, sorry.

Litte late...

Uhm, I think you have to reapply the vehicle patch. Something ist wrong with that... (everything compiles fine, but that doesn't means everything works fine..)

Why not using a repo, where vehicle patch is already applied? rsa's for example

Do you have msn yahoo aim or something where we can talk faster?

Link to comment
Share on other sites

You have problem with SQLStorages.cpp. In my case it looks like:

const char CreatureInfosrcfmt[]="iiiiiiiiiisssiiiiiiiiiiifffiffiifiiiiiiiiiiffiiiiiiiiiiiiiiiiiiiisiiffliiiiiiiliiiiis";
const char CreatureInfodstfmt[]="iiiiiiiiiisssiiiiiiiiiiifffiffiifiiiiiiiiiiffiiiiiiiiiiiiiiiiiiiisiiffliiiiiiiliiiiii";
const char CreatureDataAddonInfofmt[]="iiibbiiiss";
const char CreatureModelfmt[]="iffbii";
const char CreatureInfoAddonInfofmt[]="iiibbiiiss";

Link to comment
Share on other sites

You have problem with SQLStorages.cpp. In my case it looks like:

const char CreatureInfosrcfmt[]="iiiiiiiiiisssiiiiiiiiiiifffiffiifiiiiiiiiiiffiiiiiiiiiiiiiiiiiiiisiiffliiiiiiiliiiiis";
const char CreatureInfodstfmt[]="iiiiiiiiiisssiiiiiiiiiiifffiffiifiiiiiiiiiiffiiiiiiiiiiiiiiiiiiiisiiffliiiiiiiliiiiii";
const char CreatureDataAddonInfofmt[]="iiibbiiiss";
const char CreatureModelfmt[]="iffbii";
const char CreatureInfoAddonInfofmt[]="iiibbiiiss";

I just looked it up and this is the following which I have::::::::::::

const char CreatureInfosrcfmt[]="iiiiiiiiiisssiiiiiiiiiiifffiffiifiiiiiiiiiiffiiiiiiiiiiiiiiiiiiisiiffliiiiiiiliiiiis";

const char CreatureInfodstfmt[]="iiiiiiiiiisssiiiiiiiiiiifffiffiifiiiiiiiiiiffiiiiiiiiiiiiiiiiiiisiiffliiiiiiiliiiiii";

const char CreatureDataAddonInfofmt[]="iiibbiis";

const char CreatureModelfmt[]="iffbii";

const char CreatureInfoAddonInfofmt[]="iiibbiis";

And there is more I just copied the lines that you have listed

Link to comment
Share on other sites

Ok, I had the same problem. This happened to me when I used RSA's vehicles patch.

The one named "732_mangos_vehicle_tables.sql" adds 6 new columns to "creature_template", so that's why you get that error. I don't know how to make it work, I just delete the extra columns so the server is able to start, but this way the patch doesn't work...

I hope someone helps! :D

P.D.: I'm Spanish, sorry for any spelling/grammar mistakes.

Link to comment
Share on other sites

Ok, I had the same problem. This happened to me when I used RSA's vehicles patch.

The one named "732_mangos_vehicle_tables.sql" adds 6 new columns to "creature_template", so that's why you get that error. I don't know how to make it work, I just delete the extra columns so the server is able to start, but this way the patch doesn't work...

I hope someone helps! :D

P.D.: I'm Spanish, sorry for any spelling/grammar mistakes.

Its cool, I still cant get that dam patch to work and what I am trying to figure out is how to change the columns in the creature_template and also for other tables

Link to comment
Share on other sites

Its cool, I still cant get that dam patch to work and what I am trying to figure out is how to change the columns in the creature_template and also for other tables

In order to undo this change you must:

1. Go to SQLYog (or whatever similar program you are using).

2. Find, under mangos, the table "creature_template".

3. Right click, "Alter table...".

4. Select one of the new columns (PowerType, spell 5, spell 6, spell 7, spell 8, VehicleId) and click "Delete" at the bottom.

5. When you have finished with all six columns, click on "Alter".

Anyway, I'm still trying to figure out how to make this patch work. If I find the answer, I'll post it for others with the same problem.

Link to comment
Share on other sites

Its cool, I still cant get that dam patch to work and what I am trying to figure out is how to change the columns in the creature_template and also for other tables

In order to undo this change you must:

1. Go to SQLYog (or whatever similar program you are using).

2. Find, under mangos, the table "creature_template".

3. Right click, "Alter table...".

4. Select one of the new columns (PowerType, spell 5, spell 6, spell 7, spell 8, VehicleId) and click "Delete" at the bottom.

5. When you have finished with all six columns, click on "Alter".

Anyway, I'm still trying to figure out how to make this patch work. If I find the answer, I'll post it for others with the same problem.

Lol no, in the mangos-git in the scripts I am trying to find out how I can make more columns somewhere, because when ever you try and start it up it will give you that error about to many columns

Link to comment
Share on other sites

Like Grandres wrote, in SQLStorages.cpp we have data describing structure of some of the tables in DB. The strings describe what type of data is written in the collumns. So "ibs" means that we have a table with 3 collumns, 1st holds integer data type, 2nd one - boolean and 3rd one - string.

In Your project You have a string describing a table with 84 fields, but in the DB You are using You have 90 fields. So what You have to do now is check the structure of creature_template table, more specifically, the order of collumns and their data types and check this with the string describing it. And then of course add/remove/modify the string so it will have 90 chars and the data types will match the ones in DB.

I hope it is the solution You were looking for and it will be helpful ;)

Link to comment
Share on other sites

It worked!!

Now the server compiled correctly and I could use the vehicles patch ^^

Thank you very much!

But there is something: while I was starting the server, I got a lot of warnings (related to creature_template, creature_loot_template...) and now all NPC's are enemies, neutral and they are level +3 (skull). They also hit incredibly fast.

Tomorrow, I'll look better for this error.

Thanks again all!

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use