Jump to content

Dragon City Mod


Triforce1

Recommended Posts

  • Replies 960
  • Created
  • Last Reply
My personal guess is that the statics loose solidness when they're moved into a colision.

You guessed right. So the ship-static should be OK as it will be moved to the space previously occupied by the ship-creature. After removing the ship-creature the space would be clear.

 

On the NPC flight, the bigger road didn’t work. It seems that the cause is not the cliff edge effect. Back to the drawing board.

Link to comment
Share on other sites

Exactly, it's not the cliff edge, it's the fact that it's not connected to the ground in any way. Try making the virtual path out of two parts connected in a hinge-like way. This way you could tilt the part the NPC's standing on, so that he can go up and down and the other one will always be sloped towards the ground in a certain degree so that the AI can always find a route forward.

 

The only problem would be that the slope could pick up other objects as the NPC strides forward :D. We could limit this effect by making the path realy narrow though. That would decrease the chance of hitting an object yet it would be still walkable - therefore a way forward.

 

And another thing, you will have to place the static a bit lower than the animal. We don't want to risk the player falling trough.

 

EDIT> Now that I think about it again, the fact that the AI can't find a way to the ground isn't a problem. The fact that the npc can't find a way to the desired location is. It's making the pathfinder crazy. What you need to do is to create a path from where the NPC is to where you want him to go. You'd have to basicaly program your own pathfinder script that would spawn a whole virtual pathways for the AI. Moving a small vitual pathway under the NPC just won't do. Unless you could find a way to circumvent the vanila engine pathfinder and force move the NPC in a certain dirrection.

 

I also think that the vanila pathfinder script won't be too dynamic friendly, therefore you'll probably have to spawn the whole virtual pathway before actualy issuing a move order.

Link to comment
Share on other sites

why dont i understand any of this?

 

Jack Sparrow

 

ill put it in simple words for you jack, it wont we cuase it hates you... Sad panda...

 

(not trying to be mean, just a joke.)

Link to comment
Share on other sites

Oh I also figured out why are the corpses "dancing" when you stuck them between doors.

 

My personal guess is that the time in which a certain object is created in a cell decides which object looses it's colision detection capability if two hit-boxes cross. Now, when a player enters a cell all the objects that are meant to be in it are created, the things are most probably created in the order in which the makers of the game added objects in the construction set. And since it's only logical that statics and activators were added first and actors later then statics and activators will be logicaly at the top of the hierarchy. Now, actors have more than one hit box so that the engine can detect where you hit it. NPC have one for each body part mosters probably have less (one for the head, another for the rest). The rest is simple, once you close a door with an NPC in it the frame hit-box pushes the npc into the door. Since there isn't enough space the NPC hit-box and the door hit-box cross, which as the hierarchy tells us makes one or several of the many hit-boxes of a NPC loose it's colision detection ability, the rest of the NPC retains it. After that the bones try to pull the actor together while the door colision tries to push the rest of the limbs away. And havoc ragdoll physics do the rest.

 

This little ramble of mine might seem like useless trivia but shows a nice deal of how the engine probably works, which might be usefull later, right?

Link to comment
Share on other sites

You put me on the right track when you said “The fact that the npc can't find a way to the desired location is. It's making the pathfinder crazy.”

 

Just did A LOT of tests. Everything I could think of without adding too much code. I will spare you the details.

 

Finally I remembered that, when I was developing my mod, I read somewhere that the first thing the pathfinder does is to locate the pathgrid that would take the actor the closest to the target, follow that grid to the gridpoint closest to the target and THEN go to target.

So, I removed the path grid from my test area and, VOILA!, the NPC flew directly to the target.

I presume the NPC was stopping in mid air because it was trying to reach the pathgrid on the ground, even thou the target was just a few feet away at the same height. (I wish I could remove all pathgrids from the game)

 

From my experience with pathgrids at the time, I think that if the pathfinder does not find a grid within some distance (??) it skips this phase and goes straight to the target.

This being true, I could make the NPC dragons always takeoff vertically (by moving it, without collision) and, when it is far enough from any grid, it will start moving by itself along the virtual road (respecting collision).

 

Now, I need to do some extensive coding. Progress will be slow.

Link to comment
Share on other sites

I'm keeping my fingers crossed.

 

You'll be a hero of many in case you manage to find a way to create flying (instead of just floating) Actors.

 

Including me, I'm itching to fill the airspace of Cyrodiil with mosters for some time now. I was also planing to make the cities enterable from above... Adding some ladders to the rooftops.... Removing the damn radar from guards...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...