Modcraft - The community dedicated to quality WoW modding!
Wrath of the Lich King Modding => Serverside Modding => Topic started by: Смердокрыл on August 13, 2015, 02:17:20 pm
-
Hey!
Is it possible to have a gameobject (or a creature or whatever) to be ridden by a player (in the same way as e.g. wowhead.com/npc=33109 ) and at the same time be solid and walkinsideable* like ships and other transports?
*walkinsideable - a word made to compensate the poor vocabulary of the writer. It means something that could be walked in and traveled inside.
-
Look at the flags of a bunch of those npcs that do that and find the flag they have in common.
Most private servers do not have the riding npcs coded very well though, like you jump into it, but you cant move, so you might have to code that yourself.
-
Look at the flags of a bunch of those npcs that do that and find the flag they have in common.
Most private servers do not have the riding npcs coded very well though, like you jump into it, but you cant move, so you might have to code that yourself.
My riding npcs work absolutely perfect, BUT, as they are npcs, they are penetratable, which I do not want. Just to give an example, I want to be able to ride a ship like those in the Stormwind port.
-
The ships are possibly wmos or something, to make a npc have collision you will need to make an object to spawn over it. (This is how the thanksgiving table works.)
-
If you want "ride" and have the interface you should creat a npc however.
-
If you want "ride" and have the interface you should creat a npc however.
I just want to move it around, no special abilities or interface.
-
gameobjects can't move.
-
Gameobjects can be moved, but it's not optimal at all...
Many spam for not much, in the end... x)
The best option is still npcs... or mount, I think ^^'
I had the same idea, few days ago... But I do not yet know how to proceed either... I let germinate the idea :D
-
I think what he is asking about, is how to have custom transports? He/she mentioned ships like those in Stormwind (Assuming he means the ones that have npcs riding them going between maps/locations like Stormwind -> Valiance Keep). So, is that what you mean? Like with the airships in Northrend?
-
You can either create a Vehicle NPC in which passengers and/or driver can enter but I don't know if its possible to make it moveinsidable :P
Other way is to make a transport gameobject. However, there are some limitations with transport gameobjects.
1. The transportation path must be predetermined in both, client and server in the DBCs. Hence a user can not control it.
2. You can only pause the transport animation at specific points which you determine in the paths DBCs.
-
I think what he is asking about, is how to have custom transports? He/she mentioned ships like those in Stormwind (Assuming he means the ones that have npcs riding them going between maps/locations like Stormwind -> Valiance Keep). So, is that what you mean? Like with the airships in Northrend?
Nearly right. I want to have a custom transport (with collision and interior), which I could mount like a vehicle and move around.
-
I think what he is asking about, is how to have custom transports? He/she mentioned ships like those in Stormwind (Assuming he means the ones that have npcs riding them going between maps/locations like Stormwind -> Valiance Keep). So, is that what you mean? Like with the airships in Northrend?
Nearly right. I want to have a custom transport (with collision and interior), which I could mount like a vehicle and move around.
It is just not possible to implement player collision - which is essentially what you want at a specific time.
You can implement it for creatures because you can code them to think there is a barrier there (this is how creatures spreading out is implemented). But not for players since the client capabilities are not there.
You would need to use transports on predetermined routes, as previously said.
-
You can implement it for creatures because you can code them to think there is a barrier there (this is how creatures spreading out is implemented)
That sounds interesting. Can you move the creature around and keep the collision object stick with it? And what do you mean by creatures spreading out?
-
It is just not possible to implement player collision - which is essentially what you want at a specific time.
You can implement it for creatures because you can code them to think there is a barrier there (this is how creatures spreading out is implemented). But not for players since the client capabilities are not there.
You would need to use transports on predetermined routes, as previously said.
That's not entirely true. Well as far as saying that transports on predetermined routes is the only option for him, that's not true. It's not. There is a way to accomplish what he wants.
-
It is just not possible to implement player collision - which is essentially what you want at a specific time.
You can implement it for creatures because you can code them to think there is a barrier there (this is how creatures spreading out is implemented). But not for players since the client capabilities are not there.
You would need to use transports on predetermined routes, as previously said.
Is it possible to make a usual vehicle npc, which, when stopped, would spawn an object (of the same model, but with collision) over itself, and then, when I mount it and start moving, it would despawn the object?
There is a way to accomplish what he wants.
You are the king of intriguing!
Jokes aside, what is it?
-
That's not entirely true. Well as far as saying that transports on predetermined routes is the only option for him, that's not true. It's not. There is a way to accomplish what he wants.
Well this is just bullshit. Post something useful or don't post at all.
Is it possible to make a usual vehicle npc, which, when stopped, would spawn an object (of the same model, but with collision) over itself, and then, when I mount it and start moving, it would despawn the object?
It's possible but would be buggy and too slow to use on a server with players from many locations and a volatile latency. So not a feasible solution really.
edit: Just re-read this again. Yes, that would be very feasible to spawn and remove on start/stop. But not constantly respawning the object while moving along, which is how I read it the first time.
You can implement it for creatures because you can code them to think there is a barrier there (this is how creatures spreading out is implemented)
That sounds interesting. Can you move the creature around and keep the collision object stick with it? And what do you mean by creatures spreading out?
As in like this video: https://youtu.be/DbjAF-atgZ8?t=27 (https://youtu.be/DbjAF-atgZ8?t=27" onclick="window.open(this.href);return false;)
-
There is a way to accomplish what he wants.
You are the king of intriguing!
Jokes aside, what is it?
I'm not known for sharing my techniques...
Well this is just bullshit. Post something useful or don't post at all.
I did post something useful. I gave him a hint. Furthermore, I clarified that you're giving him incorrect information as far as possible solutions being limited. Sorry, I don't hold hands and leave little breadcrumbs for the mouse to find the cheese. That doesn't mean my comment isn't useful. And let me show you what happened the last time some bluebie called bullshit on me in a similar situation: viewtopic.php?f=93&t=9058 (http://modcraft.io/viewtopic.php?f=93&t=9058" onclick="window.open(this.href);return false;)
Or there's the time that Anthony said he was the first to achieve something that I then showed him a video of me doing it a while before. Just because you haven't figured something out doesn't mean it's bullshit that someone else has nor mean it's bullshit because you think it's impossible.
-
If you want to help, actually help. "I KNOW BUT I DON'T TELL" does not help at all, in no possible way. Otherwise, you're the one trolling.
-
to spawn and remove on start/stop
Yeah, thats what I meant. I can imagine how to make it spawn an object (a spell, or a smart script maybe), but how will it remove it? Each time the guid is gonna be different, and its not guaranteed that the guid will increase by 1 every time.
-
to spawn and remove on start/stop
Yeah, thats what I meant. I can imagine how to make it spawn an object (a spell, or a smart script maybe), but how will it remove it? Each time the guid is gonna be different, and its not guaranteed that the guid will increase by 1 every time.
That's not entirely true. Well as far as saying that transports on predetermined routes is the only option for him, that's not true. It's not. There is a way to accomplish what he wants.
I'm not known for sharing my techniques...
What exactly in this six sentences do you call a hint
?
That's the beauty of object orientated programming. You could just store the current object guid that is spawned in the player class and remove it on a movement packet being received, or all the other cases like logout, map change, command...
-
That's the beauty of object orientated programming. You could just store the current object guid that is spawned in the player class and remove it on a movement packet being received, or all the other cases like logout, map change, command...
So if Im planning to use smartAI:
for spawning, the action_type is 50 and target_type is 1. What is the event_type? 28 or 43 maybe?
for despawning, the action_type is 41 and target_type is, I presume, 12? Event type possibly 34?
-
You could also fake a collision by giving your vehicule an invisible aura that bumps those who are too close. That way, people couldn't go through the object when it's moving. But this solution is better for small vehicles and not for these giant ships you want. I never tried it, but I imagine it would be easier to manage little boats, like this one :
(http://img11.hostingpics.net/pics/641239BateauGobelin.jpg)
This aura system is a good addition to the alternation of creature/gameobject phases : it avoids players to get into your boats.
-
The way that Blizzard has ALWAYS done this kind of stuff is by creating transport npcs or simply using mounts, sadly creating an entirely new method is just really complex.
You're talking about essentially recoding the game object handler (The closest in resemblance to your desired collision) to handle movement, which isn't impossible, but I'd imagine it wouldn't be very practical, and would destroy an average PC.
The boat in Shimmering Flats is an example of THE go-to transport NPC, you can't really move inside it like it was a game-object. If Blizzard themselves uses that method, then it's pretty hard to create an alternative, like I said, creating one requires some serious work.
-- but there are workarounds.
I think the easier alternative is to create a new zone, and in that zone, design it like the interior of a ship.
Talking to your own transport NPC, or having a hearthstone device could in theory allow you to go inside your ship, and you can have as many gameobjects as you want in there, as it would be a static zone. So, you're not really walking on, or inside your ship, HOWEVER you can walk inside it, and potentially have a crew onboard if it was an actual zone.
Making a zone that confined and small isn't a new idea, look at the pre-cata war-rooms for Alliance and Horde.
-
I wantED people to walk inside the ship when its moving, just like in a proper ship. But thats not possible.
-
You CAN give it the *illusion* of movement though. You don't need to move the ship, you just need to move everything around the ship. You would still achieve a lot of your desired affect.
You CAN make your ship look like it's moving through the sea, in the middle of the ocean, you can have a bunch of npcs like untargetable icebergs and islands pass by, and have a full crew onboard by making a zone that fits that purpose.
You can even dynamically change which NPC's spawn based on which area of the sea you're in. You could even stop those npcs at will while you're traveling to pick up quests, or turn dynamic npcs into static wmo's that you can actually move on.
Moving those npc paths and the game-object with fluid movement would be awesome, but it'd require some serious work that's probably complex for Blizzard themselves, it does require rewriting code, it isn't as simple as just making things work.
-
Thanks for advising, but I need to have an actual ship, which could be actually mounted and moved around the world.
-
If you want to help, actually help. "I KNOW BUT I DON'T TELL" does not help at all, in no possible way. Otherwise, you're the one trolling.
Incorrect because you're missing the fact that I'm clarifying he's being given misinformation. That is help. I'm sorry if you can't see it that way, but that doesn't mean it's not help. Trolling would be saying nothing and letting the poor chap think there's no viable solution for him.
What exactly in this six sentences do you call a hint
?
That stoneharry gave you wrong information, which may lead you to give up your search for the viable solution. Just like in the thread I linked above Alastor tried to say it wasn't possible (or at least that nobody had managed it), that might lead people to give up. Yet clearly there was a solution. Letting people know it's possible means they shouldn't given up. Allowing people to think it's impossible means they're more likely to give up.
-
Thanks for advising, but I need to have an actual ship, which could be actually mounted and moved around the world.
Have you looked further into the ship system used by Blizzard in Rachet/BootyBay/Menethil/Auberdine/etc?
That may be one of the areas you can work on. All of those paths are pre-programmed, but I can't see why new paths can't be added. (Some were in cataclysm)
And those ARE ships that ARE Wmo's that DO move. I totally forgot about those ships in my initial post.
It may be as simple as adding a few hundred static pre-programmed paths or working out how to make a more dynamic system.
-
Again, I dont need anything pre-programmed. I need a ship which I and my friends could use and move it whenever and wherever we want to.
-
Then you need to dynamically figure out a way to path destinations using the static system as a basis.
-
Then you need to dynamically figure out a way to path destinations using the static system as a basis.
I thought of a spell which worked similarly to an aoe spell (the one where you have a green circle to choose a point on the ground) which would create a waypoint and delete all the other ones. That way I would just click where I want the ship to move.
But that probably requires some serverside cpp editing, which cannot be done, as my serv is pre-compiled.
-
As far as I know you can't make this possible without editing Trinity.
I was suggested a similar idea by a friend some time ago, however, I couldn't implement it because it would require modding WoW too. Not a simple modification but an implementation for dynamically sending DBC updates to the client(s). But for that kind of modification, I guess you'd require editing it in assembly which is difficult to understand at first.
Sending dynamic DBC updates would be pretty useful though, the server could modify a lot of client side stuff.
-
Actually, Im absolutely fine with the despawn/spawn on moving/stopping method. But I have the following questions about it:
for spawning, the action_type is 50 and target_type is 1. What is the event_type? 28 or 43 maybe?
for despawning, the action_type is 41 and target_type is, I presume, 12? Event type possibly 34?
-
No idea why such topic like this has 3 pages but K ....
You want to achiv "Rideable model with collisions" and as far as i know such things does not exists .... soo ... little info
Mount ? Its Rideable K but Mount does not have Collisions
If is mount set for additional seats these players are just bounded to mounted one so they cant move freedomly on ( for exmple ) boat board ...
another little thing just for sure >>> Transport 3D models like zeppelin , boats , turtles used for transport ( in most of cases ) between continents are just objects that follows order of DB / core so there is no chance for player to take override of it ( also it does not mather if its M2 or WMO )
so what you want is little bit impossible but idk about core im not C++ / basic meister ( or what lang is used in core [ clearly i never worked with core itselfs] )
SO maybe you can write some advanced method for vehicles or similiar thing that would be rideable by player and and same time you could transport other players with it " beacuse they are standing on collisions of your model / vehicle "
thats all i can tell ya
-
No idea why such topic like this has 3 pages but K ....
Its only due to the coincidence that the topic of my question has awakened some old confrontation.
so what you want is little bit impossible but idk about core im not C++ / basic meister ( or what lang is used in core [ clearly i never worked with core itselfs] )
I said I'm ok with collision only existing when the vehicle npc is not moving, and being removed once it starts to. But I'm not sure on how to achieve even that:
for spawning, the action_type is 50 and target_type is 1. What is the event_type? 28 or 43 maybe?
for despawning, the action_type is 41 and target_type is, I presume, 12? Event type possibly 34?
-
I said I'm ok with collision only existing when the vehicle npc is not moving, and being removed once it starts to.
I doubt that this is possible without any very ugly hacks, if possible at all. Pretty sure this isn't possible without C++ edits though.
-
It's not possible. There's your answer.
Yes you can have collision spawn and removed when object starts/stops with vehicles.
This random person claiming it is possible is lying and looking for attention.
-
This random person claiming it is possible is lying and looking for attention.
Random person? Sorry, but no. On more than one occasion I've come into threads with people saying shit is impossible or never done before and shown them wrong. You're welcome to think I'm lying. That's your choice. It's an odd choice considering the prior history I have of doing the "impossible".
-
Unless we see any information on how or any proof of that, let's assume it is in fact not possible, and if it were, not feasible.
-
Could anyone finally answer me, please?
for spawning, the action_type is 50 and target_type is 1. What is the event_type? 28 or 43 maybe?
for despawning, the action_type is 41 and target_type is, I presume, 12? Event type possibly 34?
-
Could anyone finally answer me, please?
for spawning, the action_type is 50 and target_type is 1. What is the event_type? 28 or 43 maybe?
for despawning, the action_type is 41 and target_type is, I presume, 12? Event type possibly 34?
ANYONE?
-
It seems like absolutely no-one on modcraft has ever used SmartAI.
Maybe Im too impatient though.
-
That might be likely. You could try asking the emulator developers instead, or read their documentation or code
-
*sight* I wasn't watching this particular thread, so, here I go.:
Ships are WMOs (but can be also M2s) which are transports, which are using taxi paths. The same system is being used for fly paths (gryphons, wywerns) and is handled TaxiNodes.dbc, TaxiPath.dbc and TaxiPathNode.dbc. Check world.transports for list of transports and you can also find there ID of gameobjects which is being used for that particular transport. That object also has taxi path's ID assigned in gameobject_template, and here mentioned DBCs go. So statement that gobs can't move is incorrects. They can. However, they are being moved by premade paths and that can't be changed at all. Players can't control them. I have been using both transports and taxi paths for a while, so in case you would change your mind, I can help you a little bit with them, though there are a few issues I never managed to solve on custom maps (yet), so I can't make system really completely similiar to blizzlike, but in the and it looks nearly same.
Can be gobs moved by using any other than transport system? With some limitations, it should be achievable by actually using that transport system functions, but with another than DBC-stored input data. Transports need 3 points to move - previous, actual and next. You would need to store coords of previous point where transport was (and have some default option here to avoid exceptions), actual coords of transport when next coords are set and well, next coords, set by... spell? It could work, should not be THAT hard at all and would not be buggy or laggy, because transports are gobs, are being moved along and well, client has no problem at all with them. I don't know if there is any other system to move gobs than transport system, but I have never seen such thing in WoW and well, why would Blizzard implement system which is not being used anywhere? Still, I don't say its impossible, I just don't know. Anyway, this transport system of mine might have 2 issues. 1., you need to edit core, and thats problem for you on its own while you have pre-compiled server. 2., while server can be able to move transports by using data from some kind of "Move to" spell, as was already mentioned, transports are being moved by using BOTH client and server side DBCs. And here our problem comes, if server knows how to move transport around but client does not, you can be pretty much screwed, and its quite likely to happen. Sorry to disappoint.
About SAI. I would use event 28 for spawning gob by using action 50 with target either 0 or 1, it should not matter. I would use event 27 for despawning gob by using action 41 with target 13 (I don't know how 12 is being used but... it isn't needed here anyway). That should be simple enough and it should work. Well, you also need that collision model.
Someone mentioned some knd of "bounce" aura which would push away everyone trying to pass that NPC. Tbh, spell aura would be far most effective solution here, but I know no such aura, which would keep pushing players away from afflicted target. If anyone knows such aura, its modified version could be very fruitful here and with correct radius of AoE it might give perfect desired effect even while NPC would be moving. Just btw, what would happen in this case if you would just jump on top of that boat? I suppose you would fall into water and get pushed away from origin of boat afterwards. Well, thats a little bit away from perfect in the end, too. Nvm.
Kojak - post more to showoff sections and less to help request sections if you want to show everyone how awesome arrogant self-righteous and utterly awesome again person and dev you are. But you are in wrong topic for that here. And as long as you can't proof you are not saying bullshit while some of the most experienced devs around say it is bullshit - it simply is for us bullshit. Deal with it kid. And also deal with fact that while you got attention, I doubt it was kind of attention you lack and so desire.
-
Can be gobs moved by using any other than transport system? With some limitations, it should be achievable by actually using that transport system functions, but with another than DBC-stored input data.
I dont think thats the way for me, since I want the ship to be also mounted by several other npcs (e.g. cannons) like this tank (http://wowhead.com/npc=33060) is mounted by a turret (http://wowhead.com/npc=33067) (and I would appreciate if someone told me how its done because I have no idea and I couldnt find a tutorial).
About SAI. I would use event 28 for spawning gob by using action 50 with target either 0 or 1, it should not matter. I would use event 27 for despawning gob by using action 41 with target 13 (I don't know how 12 is being used but... it isn't needed here anyway). That should be simple enough and it should work.
Thanks! I'll try it.
Well, you also need that collision model.
If I just use the same model path (e.g. WorldEXPANSION02DOODADSShipsND_Icebreaker_ship_BG.M2) for both the npc and the gob, it should work, shouldnt it?
Someone mentioned some knd of "bounce" aura which would push away everyone trying to pass that NPC. Tbh, spell aura would be far most effective solution here, but I know no such aura, which would keep pushing players away from afflicted target.
But that wouldnt allow people to enter the ship's interior, would it?
I think Im gonna stick to the spawn/despawn gob idea. Also would be grateful if someone helped with npc riding another npc. And overall your post was very helpful and interesting to read, thank you!
-
I dont think thats the way for me, since I want the ship to be also mounted by several other npcs (e.g. cannons) like this tank (http://wowhead.com/npc=33060) is mounted by a turret (http://wowhead.com/npc=33067) (and I would appreciate if someone told me how its done because I have no idea and I couldnt find a tutorial).
Thats not that big problem at all, at least it should not be. Some ships have NPC crew sailing on them, so there is some system enabling even this. But I don't know where and how is it being set. I only know that ID of NPC "crew" is also in gameobject_template, but I have no idea to what table it reffers.
If I just use the same model path (e.g. WorldEXPANSION02DOODADSShipsND_Icebreaker_ship_BG.M2) for both the npc and the gob, it should work, shouldnt it?
You might get some visual flickering bugs and might have issues with clicking on NPC vehicle to enter it. Some sort of invisible collision object would be far better, if you were able to make/get it.
But that wouldnt allow people to enter the ship's interior, would it?
Not necessarily, it would work for moving NPC version, so you can use in fact both ways together. Push-out aura would be active on NPC only while NPC is moving (when passenger is inside vehicle), and it would be deactivated while NPC is standing (and while collision gob is spawned).
About NPC being "mounted" on another NPC, I can't help you with this while I never really toyed with vehicles much. Btw, I found a little flaw in that SAI script - it might not work for vehicle with more than 1 passenger. For instance, if you have 2 people inside of vehicle and one leaves, but one still remains there... What will happen? I guess I know and its not what we wanted. Well, it seems it won't be that easy.
-
I only know that ID of NPC "crew" is also in gameobject_template, but I have no idea to what table it reffers.
I've seen that but it only has fields for DisplayIDs, so I presume its only visual.
if you were able to make/get it.
Key words:
if you were
Im always ready to learn though. If there is a tutorial, I'd appreciate a link)
Push-out aura would be active on NPC only while NPC is moving (when passenger is inside vehicle), and it would be deactivated while NPC is standing (and while collision gob is spawned).
That is a great idea, I'll surely use it if I succeed in making the spell)
if you have 2 people inside of vehicle and one leaves, but one still remains there... What will happen? I guess I know and its not what we wanted. Well, it seems it won't be that easy.
I did think of this problem and the solution (temporary I hope) I came up with is that the vehicle would only be allowed to move if all the passenger places are occupied. I think this would be achievable via SAI but Im not sure.
-
Can I use event 34 to check if there is any movement or not and depending on that despawning or spawning the gobject?
-
No idea. Just try it, experiment a little bit with some sort of test NPC/gob with test script which fill, for instance, make NPC cast some abilitty, so you will see if event triggers script and under which conditions it triggers script.
I so miss W3 trigger editor... SAI is horrible system to work with.