guillaumederval Posted June 18, 2009 Report Posted June 18, 2009 Ok thanks. EDIT: How can I search in DBC the real vehicule id?I search with the editor but I don't find...
rastikzzz Posted June 18, 2009 Report Posted June 18, 2009 the vehicle id is sent in packets, if you dont have it, then guess. use ingame .debug spawnvehicle 27894 xxx xxx - guesed vehicle id, in your case try only vehicle ids with one seat and if he will be seating where he should, use that vehicle id -> insert it into vehicle_data, add there flags and related spells ( eg. http://www.wowhead.com/?spell=51421 ) and then data into vehicle_seat_data (your seat, flags (3)) (for eg. vehicle id 116 is used for wintergrasp turrets, simmilar to your case) PS : dont forget to add npc_spellclick for your npc 27894, otherwise you wont be able to enter it
Curious Posted June 18, 2009 Report Posted June 18, 2009 Wanted to PM you this but unable to do so I'm very interesting in your vehicle developement first i could'nt guess how difficult it might be. Looking at the error in the linux build I wanted to ask why don't put all the headers in the .h file ? and just the vehicle.h in the vehicle.cpp ? Looking at those two files you have include unit.h in both
cafabrega Posted June 18, 2009 Report Posted June 18, 2009 Sorry, I can't understand it, so what I've to do if I want to make ridable the wintergrasp tanks ? or the mamut for mor than one player?.
guillaumederval Posted June 18, 2009 Report Posted June 18, 2009 Hello, I tried all the possibilities, and only 116 work.But the player isn't in the cannon! Can someone help me(sorry for bad english)
Curious Posted June 18, 2009 Report Posted June 18, 2009 Hi, Can you give me more information about how to decode the dbc file. i have to admit that i'm completly lost
cafabrega Posted June 18, 2009 Report Posted June 18, 2009 We're all lost, please, someone can post a guide explaining how to configurate and crete the vehicles like cannons, tanks...
kisjaksi Posted June 18, 2009 Report Posted June 18, 2009 a description to the fields of vehicle.dbc is needed. EDIT: i found this in dbcstructure.h: struct VehicleEntry { uint32 m_ID; // 0 uint32 m_flags; // 1 float m_turnSpeed; // 2 float m_pitchSpeed; // 3 float m_pitchMin; // 4 float m_pitchMax; // 5 uint32 m_seatID[8]; // 6-13 float m_mouseLookOffsetPitch; // 14 float m_cameraFadeDistScalarMin; // 15 float m_cameraFadeDistScalarMax; // 16 float m_cameraPitchOffset; // 17 //int m_powerType[3]; // removed in 3.1 //int m_powerToken[3]; // removed in 3.1 float m_facingLimitRight; // 18 float m_facingLimitLeft; // 19 float m_msslTrgtTurnLingering; // 20 float m_msslTrgtPitchLingering; // 21 float m_msslTrgtMouseLingering; // 22 float m_msslTrgtEndOpacity; // 23 float m_msslTrgtArcSpeed; // 24 float m_msslTrgtArcRepeat; // 25 float m_msslTrgtArcWidth; // 26 float m_msslTrgtImpactRadius[2]; // 27-28 char* m_msslTrgtArcTexture; // 29 char* m_msslTrgtImpactTexture; // 30 char* m_msslTrgtImpactModel[2]; // 31-32 float m_cameraYawOffset; // 33 uint32 m_uiLocomotionType; // 34 float m_msslTrgtImpactTexRadius; // 35 uint32 m_uiSeatIndicatorType; // 36 // 37, new in 3.1 // 38, new in 3.1 // 39, new in 3.1 }; EDIT 2: You can open a DBC file with: [mangos source]\\contrib\\dbcEditer\\bin\\pjDbcEditer.exe It works only under Windows, I dont know if its a similar app for linux too.
Curious Posted June 18, 2009 Report Posted June 18, 2009 According to rastikzzz development his Vehicle tble is as follows : [b]CREATE[/b] [b]TABLE[/b] [b]`[/b]vehicle_data[b]`[/b] ( [b]`[/b]entry[b]`[/b] mediumint([color=#009999]5[/color]) unsigned [b]NOT[/b] [b]NULL[/b], [b]`[/b]flags[b]`[/b] mediumint([color=#009999]8[/color]) unsigned [b]NOT[/b] [b]NULL[/b] [b]default[/b] [color=#dd1144]'0'[/color], [b]`[/b]Spell1[b]`[/b] mediumint([color=#009999]8[/color]) unsigned [b]NOT[/b] [b]NULL[/b] [b]default[/b] [color=#dd1144]'0'[/color], [b]`[/b]Spell2[b]`[/b] mediumint([color=#009999]8[/color]) unsigned [b]NOT[/b] [b]NULL[/b] [b]default[/b] [color=#dd1144]'0'[/color], [b]`[/b]Spell3[b]`[/b] mediumint([color=#009999]8[/color]) unsigned [b]NOT[/b] [b]NULL[/b] [b]default[/b] [color=#dd1144]'0'[/color], [b]`[/b]Spell4[b]`[/b] mediumint([color=#009999]8[/color]) unsigned [b]NOT[/b] [b]NULL[/b] [b]default[/b] [color=#dd1144]'0'[/color], [b]`[/b]Spell5[b]`[/b] mediumint([color=#009999]8[/color]) unsigned [b]NOT[/b] [b]NULL[/b] [b]default[/b] [color=#dd1144]'0'[/color], [b]`[/b]Spell6[b]`[/b] mediumint([color=#009999]8[/color]) unsigned [b]NOT[/b] [b]NULL[/b] [b]default[/b] [color=#dd1144]'0'[/color], [b]`[/b]Spell7[b]`[/b] mediumint([color=#009999]8[/color]) unsigned [b]NOT[/b] [b]NULL[/b] [b]default[/b] [color=#dd1144]'0'[/color], [b]`[/b]Spell8[b]`[/b] mediumint([color=#009999]8[/color]) unsigned [b]NOT[/b] [b]NULL[/b] [b]default[/b] [color=#dd1144]'0'[/color], [b]`[/b]Spell9[b]`[/b] mediumint([color=#009999]8[/color]) unsigned [b]NOT[/b] [b]NULL[/b] [b]default[/b] [color=#dd1144]'0'[/color], [b]`[/b]Spell10[b]`[/b] mediumint([color=#009999]8[/color]) unsigned [b]NOT[/b] [b]NULL[/b] [b]default[/b] [color=#dd1144]'0'[/color], [b]`[/b]req_aura[b]`[/b] mediumint([color=#009999]8[/color]) unsigned [b]NOT[/b] [b]NULL[/b] [b]default[/b] [color=#dd1144]'0'[/color], [b]PRIMARY[/b] [b]KEY[/b] ([b]`[/b]entry[b]`[/b]) ) So, looking at the DBC file how should we fill the fields ? A line looks like follows : INSERT INTO vehicle_data VALUES (106, 4, 50896, 0, 50652, 0, 0, 0, 0, 0, 0, 0, 0); As far as i can tell 106 is vehicle ID. for the other fields.....
rastikzzz Posted June 18, 2009 Report Posted June 18, 2009 According to rastikzzz development his Vehicle tble is as follows : [b]CREATE[/b] [b]TABLE[/b] [b]`[/b]vehicle_data[b]`[/b] ( [b]`[/b]entry[b]`[/b] mediumint([color=#009999]5[/color]) unsigned [b]NOT[/b] [b]NULL[/b], [b]`[/b]flags[b]`[/b] mediumint([color=#009999]8[/color]) unsigned [b]NOT[/b] [b]NULL[/b] [b]default[/b] [color=#dd1144]'0'[/color], [b]`[/b]Spell1[b]`[/b] mediumint([color=#009999]8[/color]) unsigned [b]NOT[/b] [b]NULL[/b] [b]default[/b] [color=#dd1144]'0'[/color], [b]`[/b]Spell2[b]`[/b] mediumint([color=#009999]8[/color]) unsigned [b]NOT[/b] [b]NULL[/b] [b]default[/b] [color=#dd1144]'0'[/color], [b]`[/b]Spell3[b]`[/b] mediumint([color=#009999]8[/color]) unsigned [b]NOT[/b] [b]NULL[/b] [b]default[/b] [color=#dd1144]'0'[/color], [b]`[/b]Spell4[b]`[/b] mediumint([color=#009999]8[/color]) unsigned [b]NOT[/b] [b]NULL[/b] [b]default[/b] [color=#dd1144]'0'[/color], [b]`[/b]Spell5[b]`[/b] mediumint([color=#009999]8[/color]) unsigned [b]NOT[/b] [b]NULL[/b] [b]default[/b] [color=#dd1144]'0'[/color], [b]`[/b]Spell6[b]`[/b] mediumint([color=#009999]8[/color]) unsigned [b]NOT[/b] [b]NULL[/b] [b]default[/b] [color=#dd1144]'0'[/color], [b]`[/b]Spell7[b]`[/b] mediumint([color=#009999]8[/color]) unsigned [b]NOT[/b] [b]NULL[/b] [b]default[/b] [color=#dd1144]'0'[/color], [b]`[/b]Spell8[b]`[/b] mediumint([color=#009999]8[/color]) unsigned [b]NOT[/b] [b]NULL[/b] [b]default[/b] [color=#dd1144]'0'[/color], [b]`[/b]Spell9[b]`[/b] mediumint([color=#009999]8[/color]) unsigned [b]NOT[/b] [b]NULL[/b] [b]default[/b] [color=#dd1144]'0'[/color], [b]`[/b]Spell10[b]`[/b] mediumint([color=#009999]8[/color]) unsigned [b]NOT[/b] [b]NULL[/b] [b]default[/b] [color=#dd1144]'0'[/color], [b]`[/b]req_aura[b]`[/b] mediumint([color=#009999]8[/color]) unsigned [b]NOT[/b] [b]NULL[/b] [b]default[/b] [color=#dd1144]'0'[/color], [b]PRIMARY[/b] [b]KEY[/b] ([b]`[/b]entry[b]`[/b]) ) So, looking at the DBC file how should we fill the fields ? A line looks like follows : INSERT INTO vehicle_data VALUES (106, 4, 50896, 0, 50652, 0, 0, 0, 0, 0, 0, 0, 0); As far as i can tell 106 is vehicle ID. for the other fields..... if you dont know how to open dbc, i have exported it here : http://pastebin.com/m2619ecae i am using custom vehicle flags and seat flags, because flags in dbc are too unknown look at shareddefines.h enum CustomVehicleFLags { VF_CANT_MOVE = 0x0001, // vehicle cant move, only turn, maybe handle by some auras? VF_FACTION = 0x0002, // vehicle retain its own faction VF_DESPAWN_NPC = 0x0004, // vehicle will delete npc on spellclick VF_DESPAWN_AT_LEAVE = 0x0008, // vehicle will be deleted when rider leaves VF_CAN_BE_HEALED = 0x0010, // vehicle can be healed VF_GIVE_EXP = 0x0020, // vehicle will give exp for killing enemies VF_MOVEMENT = 0x0040, // vehicle will move on its own, not depending on rider, however rider can cast spells VF_NON_SELECTABLE = 0x0080 // vehicle will be not selectable after rider enter //VF_HAS_FUEL = 0x0100, // TODO : find out what energy type is fuel and implement this }; enum CustomVehicleSeatFLags { SF_MAIN_RIDER = 0x0001, // the one who controlls vehicle, can also cast spells SF_UNATTACKABLE = 0x0002, // hided inside, and unatackable until vehicle is destroyed SF_CAN_CAST = 0x0004, // player/npc can rotate, and cast OWN spells SF_UNACCESSIBLE = 0x0008 // player cant enter this seat by normal way (only by script) }; if you want to make a vehicle, for eg. for npc entry 99999 - first enter data to table npc_spellclick_spells eg [b]INSERT INTO[/b] npc_spellclick_spells [b]VALUES[/b] (99999, 60968, 0, 0, 0, 1); - second, you probably dont have vehicle id for it (real vehicle id is obtained from packets) but you can use any of avaible ids (from vehicle.dbc). As you can see, each vehicle has 1-7 seats. and for eg. you want a vehicle with 4 enterable seats, so first one is vehicle id 26. what is diference between using id 26 and other vehicle id with 4 seats? its in 2 thinghts - in player UI and in diferent seating animation (you can always spawn ingame vehicle with .debug spawnvehicle 99999 xxx to try variety of vehicle ids until you will be satisfied) - then if you have a vehicle id, add it to creature addon template [b]INSERT IGNORE INTO[/b] creature_template_addon [b]VALUES[/b] (99999, 0, 0, 0, 0, 0, 26, NULL, NULL); and to vehicle data too, look at flags above and select some, eg. [b]INSERT[/b] [b]INTO[/b] vehicle_data [b]VALUES[/b] ([color=#009999]26[/color], [color=#009999]4[/color], [color=#009999]51362[/color], [color=#009999]0[/color], [color=#009999]0[/color], [color=#009999]0[/color], [color=#009999]0[/color], [color=#009999]0[/color], [color=#009999]0[/color], [color=#009999]0[/color], [color=#009999]0[/color], [color=#009999]0[/color], [color=#009999]0[/color]); note :for vehicle spells you can use any spell ingame and field req_aura - means what aura must have player to be able to enter it (required for wintergrasp vehicles) - so now if you have vehicle data, add some seat flags, eg. [b]INSERT[/b] [b]INTO[/b] vehicle_seat_data [b]VALUES[/b] (365, 3); -- rider [b]INSERT[/b] [b]INTO[/b] vehicle_seat_data [b]VALUES[/b] (366, 2); [b]INSERT[/b] [b]INTO[/b] vehicle_seat_data [b]VALUES[/b] (367, 2); [b]INSERT[/b] [b]INTO[/b] vehicle_seat_data [b]VALUES[/b] (368, 2); i hope this explained enough to understand
cafabrega Posted June 18, 2009 Report Posted June 18, 2009 thanks rastikzzz i think i have undertood it, only one more thing, in vehicle_seat_data what's the meaning of that numbers? How do you now what's the correct? If it works i think i'm gonna fall in love with mangos...
LordJZ Posted June 18, 2009 Report Posted June 18, 2009 For everyone in need, here is the diff between original 3.1.3 sources and rastikzzz's branch. http://paste2.org/p/271859
kisjaksi Posted June 19, 2009 Report Posted June 19, 2009 Thanks, rastikzzz, i understand it fully. Now, Im trying to script the DK quests, that need vehicle support.
cafabrega Posted June 19, 2009 Report Posted June 19, 2009 Well, at last it workss!!! What I've to do for the vehicles respawn when they are destroyed or abandoned? I want to do an event and that will be better. Edit: Why a vehicle can be destroyed by a player without vehicle but it's no damaged by other vehicles?
Curious Posted June 19, 2009 Report Posted June 19, 2009 Thank you for this great explanation Looking at my DBC file i wasn't able to find such information (vehicle.dbc right ?) I think more and more vehicle will be add to the DB
roby10 Posted June 19, 2009 Report Posted June 19, 2009 hey do i need to compile the mangos in your git?or just import sql files?doesthey work ?can u make a list with vehicles that work?
guillaumederval Posted June 19, 2009 Report Posted June 19, 2009 Can someone help me for http://www.wowhead.com/?npc=27894 ? I follow the instruction but I don't find vehicule entry. I tried all posibilities... Thank you and sorry for bad english. PS: INSERT INTO npc_spellclick_spells VALUES (28781, 60968, 0, 0, 0, 1); INSERT IGNORE INTO creature_template_addon VALUES (28781, 0, 0, 0, 0, 0, 106, NULL, NULL); for http://www.wowhead.com/?npc=28781
Wowka321 Posted June 19, 2009 Report Posted June 19, 2009 small bag. When u drive far from spawnplace (or may be long time on vehicle) to another zone - all around u got crash client Thx, rastikzzz!
rrtn Posted June 19, 2009 Report Posted June 19, 2009 i have updated it for 3.1.3 and is usable now thank you very much, rastikzzz! i now have working vehicles
cafabrega Posted June 20, 2009 Report Posted June 20, 2009 Which is the correct vehicle id for the wintergrasp turrets? because my turrets can move like a tank whith the vehicle id 26
Curious Posted June 20, 2009 Report Posted June 20, 2009 You have to try them one by one using the one with only one seat (most of them are of this kind )
cafabrega Posted June 20, 2009 Report Posted June 20, 2009 Yes, I know, but If we show how we have done these things will be easier to all ¿no? I'm trying, but if someone can say me which may be correctly it'll be quickly to all.
yu_raider Posted June 20, 2009 Report Posted June 20, 2009 @Wowka321 I don't think that crash is produced because of this patch, 0.14 mangos is a bit unstable and there are many client and server craches for now. Especially in areas like Wintergrasp, Naxx and others...
Wowka321 Posted June 20, 2009 Report Posted June 20, 2009 @Wowka321I don't think that crash is produced because of this patch, 0.14 mangos is a bit unstable and there are many client and server craches for now. Especially in areas like Wintergrasp, Naxx and others... No. In this case vehicle cause of crash clent. Try to drive far from spawnplace and all araund u get crash client.
ansonic Posted June 20, 2009 Report Posted June 20, 2009 rastikzzz your banch is good,but you could be implanted the patch for the eye of acherus Here is the patch: http://getmangos.ru/forum/showthread.php?t=19836 http://getmangos.ru/forum/showthread.php?t=19837 http://filebeam.com/a81c92789322e2e65e5443a314b9e74c I have gotten manually gives error I think is the function q corrigr not, thanks
Recommended Posts