PDA

View Full Version : Getting boats working...


Scorpious2k
12-29-2003, 12:16 PM
I haven't seen Wumpas online lately and I know he was interested in this. I am going to be working on getting boats working on the Scorpious2k Server as soon as we switch over to 5.3DR2 and was wondering if anyone was interested in helping out...

Bearik
12-29-2003, 12:49 PM
Well I know you can get boats working on grids and i've been able to ride on the boats but I dont see how you could get the boats to zone into another zone.. It just doesn't seem possible.

But one idea I had was make the boats go to the zoneline and maybe stop so you can just walk into the zoneline, then have another boat stopped on the other side for you to zone in on and wait for another boat to come pick you up.. Its sloppy but its all I could think of..

Or just make the boats zone from lets say Butcherblock to East freeport, just skip the OOT part :)

Scorpious2k
12-29-2003, 01:24 PM
Well I know you can get boats working on grids and i've been able to ride on the boats but I dont see how you could get the boats to zone into another zone..

I explained how we did it here: http://www.everquestserver.com/forums/viewtopic.php?t=11781&start=0

It just doesn't seem possible.

Myra tells me she hates the impossible stuff... it takes longer to do. :-)

Kroeg
12-29-2003, 03:20 PM
I'll help if ya like.. Although, with the ships 'turning' each time it hits a waypoint pause.. this might be a bit trickier than you'd like.

Let me know what I can help with... You can also find me in #eqemu and #npcmovdb on irc.

Eglin
12-29-2003, 07:36 PM
Myra tells me she hates the impossible stuff... it takes longer to do. :-)lol... sounds like the little girl from Dr. Ecco's corner in Dr. Dobbs.

Scorpious2k
12-31-2003, 02:00 AM
Myra tells me she hates the impossible stuff... it takes longer to do. :-)lol... sounds like the little girl from Dr. Ecco's corner in Dr. Dobbs.

They (my twins) have gotten spoiled by the "miracles" I pull off with computers. I'm not sure they believe the word impossible actually exists. And if it does they probably just think it means "very difficult". LOL

Scorpious2k
12-31-2003, 02:08 AM
Let me know what I can help with... You can also find me in #eqemu and #npcmovdb on irc.

The first thing we'll need is grids for the ships movement. Most will be type 4 wander types.

Once we have those, we can tweek them with addition waypoints to smooth out movement.

Then we will need to set up the stationary zone-in ships along the moving ship's path and put a waypoint there for the stop.

Finally there is the zone point out to the next zone. I had that hard coded into the program. Unless there is a better way to do it, I'll have to do that again.

Alternately, we could do it backwards... do the zonepoints in the program and then build the grid moving towards that point.

What do you think?

Scorpious2k
12-31-2003, 02:16 AM
I probably shouldn't mention this here....

but I have also figured out how to make the boats work eqlive style... no transfers from boats, no shuttle/cruiser setup... just get on the boat at the docks at one location, ride, zone, ride, zone, ride and get off at the docks at the destination.

This is a much more complicated fix, involving DB, world server and zone server changes. It also requires a little bit of strange thinking (my specialty). In effect, the ships become moving zones.

Anyway, this would probably best be done working with a dev who has a server up. The other way that I have described will be easy, will work, can be understood by non-techies and won't break anything...

Wumpas
01-03-2004, 03:37 PM
Id be glad to help scorpious I even started on it myself a while back witrh wander type 4 and my boat went from Freeport side of OOT to BB side following the correct eqlive path and stoping at the docks of the sister erollisie island :D The problem came when the boat paused at a waypoint it would turn into the dock kind of strangely kroeg pointed out already.

I would love to help here and will start spending some time in #npcmovedb :D

P.S. the trikest part by far in pathing the boats for me so far is getting them to line up with the dock just right. If anyone has loc's for each dock that ensure a "good fit" please let us know : )

P.S> Scorp I am very intrested in knowing how to get boats working eqlive "like" and also your wander type 4 fix for 4X works for 5X as well ive been using it quite sucessfully

JohnRev
01-03-2004, 06:21 PM
I'll help out if need be...

Tell me when, where, and what ya need done...

Scorpious2k
01-04-2004, 01:09 AM
Id be glad to help scorpious

nice to see you're still with us :-)

The problem came when the boat paused at a waypoint it would turn into the dock kind of strangely kroeg pointed out already.

I've seen that. I think it can be fixed with close waypoints near the docks. I'm not sure, but it may be turning towards the next wp. If it is, we just set up a wp that causes it to line up correctly. If its a problem in the program, I happen to know a code tinkerer....

I would love to help here and will start spending some time in #npcmovedb

Great. A lot of help will be needed. I'm not a part of the tcs project and have only been on their irc once.

P.S. the trikest part by far in pathing the boats for me so far is getting them to line up with the dock just right. If anyone has loc's for each dock that ensure a "good fit" please let us know : )

While the meaning of life, the universe, and everything is 42.... the meaning of boat parallel parking is 64 :-)

You can go to the edge of the docks, get the loc. If the X/Y coord (whichever is affected by your forward/backward movement at this dock) goes up when you move foreward add 64 to the value at the edge of the docks, otherwise subtract 64.

P.S> Scorp I am very intrested in knowing how to get boats working eqlive "like" and also your wander type 4 fix for 4X works for 5X as well ive been using it quite sucessfully

We've kept wander type 4 working on our server since I figured it out. Very handy little thing. I have in mind a wander type 5.... <grin>

As for making the boats work like live. Its a bit more complicated. Will require changes to world.exe & zone.exe and a new way of thinking of boats and handling them. I have a new quest command I am working on that will be a precursor to it The "signal" command. Among other things, this command will make it possible to script a conversation between NPCs and eventually make the boats work. Keyword: eventually.

So for now, I think the cruiser/shuttle boat method should be done. The paths from it could probably be used with mods for the eqlive one later.

Scorpious2k
01-04-2004, 01:41 AM
I'll help out if need be...

Everyone is always telling me "you need HELP" so I guess it must be true. :-)

Tell me when, where, and what ya need done...

The first thing we need is grids for all the boats.

This is for everyone who wants to help:

Pick a boat in a zone and create a grid for it so that it moves along the correct path. Post which one you want to do (Wumpas says he already has oot taken care of) and go ahead and start.

If you don't already know, wander type 4 is a single run wander. It goes from wp 1 to the last wp and then depops. This will be the one you want to use in most cases.

When done, post the grid and tell which boat its for. We will need to match it to the correct NPC ID for TCS and Myra databases and any others that may be out there.

Then we can test them on the Scorpious2k server and any other server that wants to take part. Any server op that wants to test, post here.

There are 2 ways we can handle the zoning at the end of the path. We can code it into the program, or come up with a new quest command like "zonenear" that zones all PCs within a certain range of the NPC (boat).

To make this work, quests will be required. In butcher and timerous there are more than 1 boat in close proximity. The only way I see to make those run smoothly and not run into each other is to have a quest file for the main one (the one spawned when the zone is booted) and when it reaches a certain point, it spawns the second, which goes away before the first reappears (using respawn time on the first). This means we will probably need two versions of these quest files: one for perl and one for old style.

So, make your suggestions, lets kick the ideas around and get some grids to play with. When we get it done, we can set it up as a downloadable addon for any DB out there.[/b]

mew972
01-04-2004, 04:16 AM
I guess i can grab the board from oasis to tim. deep and maybe the boat from tim. deep to overthere.

Wumpas
01-04-2004, 04:33 AM
sounds great scorp

The problem with the boats is code related as I did the next waypoint after the dock strait out ahead and this i have triple checked. The tcs guys as well as I have noticed the effect with a paused npc.

I have 1 boat done in oot as i said before now im making the one to go the otherway.

Question which boat went what direction so I get the names right
Stormbreaker, Sirens bane

Thank you for the intrest scorp Id really love to see this working :D

Scorpious2k
01-04-2004, 04:42 AM
I guess i can grab the board from oasis to tim. deep and maybe the boat from tim. deep to overthere.

Great start!!

Scorpious2k
01-04-2004, 04:52 AM
The problem with the boats is code related as I did the next waypoint after the dock strait out ahead and this i have triple checked. The tcs guys as well as I have noticed the effect with a paused npc.

Well, worst case its a program fix. Not that big of a deal.

I have 1 boat done in oot as i said before now im making the one to go the otherway.

Excellent!

Question which boat went what direction so I get the names right Stormbreaker, Sirens bane

I'll leave that one to someone else. My memory hasn't been that good since my last birthday....

Thank you for the intrest scorp Id really love to see this working :D

Me too. It will be great to be able to go for boat rides. And for those purists, who don't like the translocators, the option will be there.

Wumpas
01-04-2004, 08:56 AM
I just talked to krich today and he is still fighting the heading bug for us :D He hasn't found the cause yet but I have confidence he will be able to in time until then we should just continue pathing the boats and ignor the fact that they turn to a strange heading whenever they pause.

He also sais this bug could be responsible for causing mobs to spin funny in combat once in a while.

sugestion to everyone setting up boats get the static boats on both sides of the zones set up before pathing a crusing boat it will save you a headach trying to set up a static boat to match a boat already on a path. :x

Im going to have to whipe my last few WP's and redo them to dock with my other static boat.

as far as names go on the boats im just gona set them and if there wrong someone can change them : )

Wumpas
01-04-2004, 01:04 PM
Scorpious I have OOT boats done you will need to change grid number and npc id's and such to match with your database most likely but the grids i think are pretty good. I am fine tuning dock distances now.

i havnt touched freeport or BB yet.

EDIT -- Since the boats make that wierd turn on pausing i cant finetune the dock distances so OOT is done as far as i can make it until the code bug is uncoverd.

Scorpious2k
01-05-2004, 02:50 AM
Scorpious I have OOT boats done you will need to change grid number and npc id's and such to match with your database most likely but the grids i think are pretty good. I am fine tuning dock distances now.

Great. We need some place to put all these as they come together so everyone can get at them.

i havnt touched freeport or BB yet.

Don't forget you need 2 more boat names for the shuttles (fp & bb). This would be the same as the stationary ones in oot...

I once joked about making a ship called the titanic, and having the Z coord go lower with each waypoint until it sank.... :-)

EDIT -- Since the boats make that wierd turn on pausing i cant finetune the dock distances so OOT is done as far as i can make it until the code bug is uncoverd.

I'm looking at the code. Between Krich and I, you know it will get fixed :-)

Wumpas
01-05-2004, 04:08 AM
Ok ill get BB and Freeport done today as well and fine tune OOT a little more as well.

Also Im going to experiment with speed as I think 0.75 is much too slow for these boats though i could be wrong. as it is it takes about 30+ miniutes to cross the zone each way.

hmm i guess the heading bug is there pause or no pause it just happens very fast without a pause.

Scorpious2k
01-05-2004, 04:16 AM
Tip> If you remove pauses the boat stays on corrrect heading for finetuning dock distances :D

Funny you should mention that. It happens to be the area of code I have been looking at. Seems to be sending and extra position update when it pauses..

Also Im going to experiment with speed as I think 0.75 is much too slow for these boats though i could be wrong. as it is it takes about 30+ miniutes to cross the zone each way.

Tark said it was wayyy to slow, I think he had it set at 4 or 5 (too fast). You might try 2 or 3. Nice steady pace, doesn't take forever but you can still enjoy the trip. Those were 4.4 speeds and some changes may have ocurred.

Wumpas
01-05-2004, 04:52 AM
Scorp on further investigation the heading bug is there no matter if you pause or not :( I really notice it at docks and such could it have somthing to do with proximity to geometry?? or mabe it suffers this effect at all waypoints.

Krich in IRC > "I think the problem is likely a calculation issue or a conversion from int to float issue or a packing the bit field issue."

Hope that helps scorp :)

Edit OOT is very copleted now all docks and static ships link together nicely (right before the ship makes a funny turn) ships speeds changed to 2

now im working on FP and BB

Trumpcard
01-05-2004, 05:25 AM
Just a note, I have seen NUMEROUS casting issues in the past.. You might want to put some cout statements to sit the heading/speed/etc information out during its path to find out where it's getting screwed up at.

Wumpas
01-05-2004, 10:17 AM
ship speed of 2 seems a little fast actuly im going to try 1.5 and let you all know how it works also I placed this on line 752 of mob.cpp

cout<<delta_x<<"|"<<delta_y<<"|"<<delta_z<<"|"<<delta_heading<<"\n";

Was this the corect area it spits out a ton of info when i run a zone but I have no idea what to look for for a problem? Is there any other areas i should ahve a statement like that to compare with? thx for the help. and BB is almost done puttin in the grid for the boat now :D


Hmm i could be reading this wrong or mabe im not looking at the right values but it seems there is no delta_heading change when the boat does its wierd turn it report delta_heading as 0?

note: could be because whare i placed the cout dosn't seem to be refreshing very quickly

Scorpious2k
01-05-2004, 12:17 PM
Just a note, I have seen NUMEROUS casting issues in the past.. You might want to put some cout statements to sit the heading/speed/etc information out during its path to find out where it's getting screwed up at.

Its scary how much we think alike.... I can spam a screen full of debug info faster than anyone else I know. BUT I find the problem because it works :-)

Scorpious2k
01-07-2004, 02:25 AM
Just had a thought... since we need names for the shuttles, why not name them after devs?

The Trumpcard pulls along side the Stormbreaker and stops.....

Wumpas
01-07-2004, 05:11 AM
Right now i have the shuttles called "Wielle" and "Legacy" but changing that will be easy. :D

Ill do it hahaha

(for those that don't know freeport was once called "Wielle" also "The Landing" -- Got to love history :D )

The "Trumpcard" and "Merth" will be the shuttles in oot lol Merth ill throw some wood elf worshipers on there for you :lol: No Trump your married hahaha

Trumpcard
01-07-2004, 06:31 AM
My wife said elf women dont count !

LOL

Wumpas
01-07-2004, 06:32 AM
hahaha ok ill throw 2 elvs on each boat :wink:

A Trumpcard Groupie says ahoy :D

Trumpcard
01-07-2004, 06:34 AM
WOOHOO!

Too bad she won't agree to a barbarian woman, I dig tall chicks that could beat me in a fair fight....

mattmeck
01-07-2004, 06:45 AM
*The Newbieslayer is ready take you where you belong*

:twisted:

Wumpas
01-07-2004, 07:00 AM
EDIT -- removed lol i was pleading for matt not to junkyard the thread then he explained what he really ment by his post I just misunderstood LOL

mattmeck
01-07-2004, 07:20 AM
HUH???? No no no no



I was going along with it...think of a boat named Newbieslayer.........now look at my post again and think of what happens when it stops and you get on it.........

Wumpas
01-07-2004, 07:25 AM
AHHHH LOL

Me understand now hahahahahaha thats great

we could have one named after you in eruds crossing mabe theres lots of boats :D

sorrry for the misunderstanding lol

mattmeck
01-07-2004, 07:27 AM
Rember when Scorps gets made it has to be in a zone where you can add a lot of Scorpions as worshipers :lol:

Wumpas
01-07-2004, 07:35 AM
I wonder now im going to go through the ocean zones and try spawning scorpions after I finish getting my dock distance in BB right its kickin my butt

also Im setting a deadline for myself OOT FP and BB will be complete by monday evening -- gona take a while to add the worshipers :wink:

Scorpious will no dout have to change my id numbers as I started the project with 5.2 and my database has gone through lots of experimentation

Speaking of scorpious how am i going to get my database to you? IRC??? and how is everyone elses progress going??? I need to know what to start on next :)

P.S. ill do any other boats with the new database and source

Scorpious2k
01-07-2004, 09:03 AM
Rember when Scorps gets made it has to be in a zone where you can add a lot of Scorpions as worshipers :lol:

I'm not a dev, I not only don't get a boat named after me, I don't even get a raft!

I was going to suggest naming them after support helpers too, but I imagine the SS Matmeck would be KoS to newbies....

Trumpcard
01-07-2004, 09:06 AM
but I imagine the SS Matmeck would be KoS to newbies

LOL

I'm going to adopt you and Myra...

Scorpious2k
01-07-2004, 09:07 AM
Speaking of scorpious how am i going to get my database to you? IRC???

For some reason, DCC and our router don't get along. We can either transfer with an IM program or find a central depository for the files...

and how is everyone elses progress going??? I need to know what to start on next :)

So far, you are the only one saying they are done. I got side tracked looking for the heading bug and dealing with zone points. I am going to do erudsxing (I have it started) and mew is doing timerous. That leaves all the rest to play with as far as I know.

Scorpious2k
01-07-2004, 09:08 AM
I'm going to adopt you and Myra...

Do I get a bigger allowence than her?

mattmeck
01-07-2004, 09:09 AM
If anyone other the the Devs deserve a boat named after them its Scorp and Myra IMO

Scorpious2k
01-07-2004, 09:18 AM
If anyone other the the Devs deserve a boat named after them its Scorp and Myra IMO

I still like leaving it as an honor for the devs. Myra would settle for butts - low ambitions right now. LOL (she was calculating how many messages she would have to post the other day...)

Besides, the Myra wouldn't even get out of the docks until noon if you didn't drag it! That means we'd need tugboats too.

mattmeck
01-07-2004, 09:23 AM
Besides, the Myra wouldn't even get out of the docks until noon if you didn't drag it! That means we'd need tugboats too


ROFL

Wumpas
01-07-2004, 10:11 AM
hahahaha

thats great you guys are clowns :lol:

I experimented with Fqadmin for pathing and its a hellish nightmare for me either im dumb or that program has some quirks I have yet to learn. anywho for now im going to stick to notepad and mysqlfront as I have been.

I think theres enough boats around for you scorp counting kunark shuttles and if not we could always put a High level size 150 giant scorpion in FOB named after you LOL

P.S. whats the status on the heading issues? anyone find the problem?

mew972
01-07-2004, 02:46 PM
Wierd problems happening....
I start with creating the grid
#grid add 2930 4 2

then spawn some dummy spawns (in place where the waypoints should be)
#spawn WPDUMMY 60

then go through and add the waypoints (i change the last digit for each waypoint 0, 1, 2, 3, 4, ect)
#wp add 2930 1 0

then assign the boat to the grid
#gassign 2930

Finally i repop the zone so the boat will follow the grid
#repop

The boats to go to the first waypoint fine sometimes the second and occosinally the third.. but after the 2nd or the 3rd it seems to go to a random waypoint... any idea why? (using latest dr2 with pearl and myra DB)

Scorpious2k
01-07-2004, 03:05 PM
#grid add 2930 4 2

Note: You will want to use pause type 1 - full pause - for boats. So when you tell it to stop at a dock for 120, it stays there the full 2 minutes. No biggie, easy to fix. Just a comment.

Also I see you are using wander type 4. That has only been in the dev distributed version as of the LAST (1/4) release by Shawn319. I will assume that's the one you have.

The boats to go to the first waypoint fine sometimes the second and occosinally the third.. but after the 2nd or the 3rd it seems to go to a random waypoint... any idea why? (using latest dr2 with pearl and myra DB)

That is a wierd behavior. It may be related to the other problems (heading and vanishing/misplaced mobs). The only thing that comes to mind is that it thinks the boat is somewhere else and is trying to move it back on the grid.... or the server thinks it is on the grid but the client thinks it is somewhere else. The server then tries to move it along the grid and the client moves it where it thinks the boat is at...

Anyway. Working on the bug. Took a little time off from it and did a little work on zone points today. Did about 250 of them, and have them on the server to be tested. Myra is working on them now.

Tomorrow, back to looking at the code and trying to figure this thing out.

Wumpas
01-07-2004, 05:07 PM
The boats to go to the first waypoint fine sometimes the second and occosinally the third.. but after the 2nd or the 3rd it seems to go to a random waypoint... any idea why? (using latest dr2 with pearl and myra DB)

Are you riding the boat or monitoring from a distance like on a dock watching it???

The Client dosent seem to update the boats position corectly unless you are right on it or VERY close im talking like within 20 meters in scale.

If you are more than that distance away the client seems to get confused to whare the boat is and it apears to teleport to random locations. I am not sure if that is desirable operation or if the position should update with the client more frequently then it does.

I might be off base here its just a guess :)

p.s. Once in a while ill have a real hard time with a spawn I tried making just one moving NPC in NKarana for Krich to debug with and no matter what it would not follow its path it would bounce high into the air and walk to random locations that i never waypointed. This might be as you are seeing and may be somthing to do with a set of circumstances (I dont know what but mabe in certain circumstances the pathing wont work "shot in the dark here") by the way that was wander type 1 pause type FULL

Also was the heading bug noticed at all in 5.0 or 5.1 ?? mabe it has to do with what was changed to make movment really fluent in 5.2? Mabe somthing got Omited acidently. There is a lot of code remed out dealing with angle?

Would it be a quicker dirtier fix to somehow make mobs calculate heading to next target after its pause is over?? at the very least least it may find the problem is in between someware.

This is the partial output monitoring calculateheadingtotarget()

Wp#||delta_x||delta_y||delta_z||delta_heading||Hea ding

1|0|0|0|0
1|0|0|0|0|585
1|3.40723|-0.543457|0.00167656|-515|70
1|3.40723|-0.543701|0.00167656|0|70
2|61.2969|-9.77979|0.0301838|0
2|61.2969|-9.77979|0.0301838|0|70
2|3.3916|-0.633789|-0.000461578|1|71
2|3.3916|-0.633789|-0.000461578|0|71
2|3.3916|-0.633545|-0.000459671|0|71
2|33.1904|-6.20508|-0.00451279|0|71
3|-3.3916|0.634033|0.000461578|-128
3|-3.3916|0.634033|0.000461578|-128|-57
3|-3.38184|0.681885|0.000576019|1|-56
3|-3.38184|0.681885|0.000576019|0|-56
3|-3.38184|0.681885|0.000576019|0|-56
3|-3.38184|0.681885|0.000576019|0|-56
3|-3.3916|0.634033|0.000461578|0
3|-3.3916|0.634033|0.000461578|0|-57
3|-3.38184|0.684814|0.000583649|1|-56
3|-3.38184|0.684814|0.000583649|0|-56
3|-3.38184|0.684814|0.000583649|0|-56
3|-3.38184|0.684814|0.000583649|0|-56
3|-3.38184|0.684814|0.000583649|0|-56
3|-3.38184|0.684814|0.000583649|0|-56
3|-3.38184|0.684814|0.000583649|0|-56
3|-3.38086|0.684814|0.000583649|0|-56
3|-3.38086|0.684814|0.000583649|0|-56
3|-3.38184|0.684814|0.000583649|0|-56
3|-3.38086|0.684814|0.000583649|0|-56
3|-3.38184|0.684814|0.000583649|0|-56
3|-3.38086|0.684814|0.000585556|0|-56
4|-51.6387|10.458|0.00890923|0
4|-51.6387|10.458|0.00890923|0|-56

WP 2 is a dockpoint and the ship exibits a "strange heading in game at this waypoint"

also Note: 0|-10|-10|-110|-1024 was spamed alot usualy 21 Iterations between each WP I listed I asumed that it was casued by something else in the zone and cut these out so my post wouldnt be monsterously long.

anything about these numbers seem odd?

Scorpious2k
01-08-2004, 06:04 AM
Wp#||delta_x||delta_y||delta_z||delta_heading||Hea ding

1|3.40723|-0.543457|0.00167656|-515|70
1|3.40723|-0.543701|0.00167656|0|70
2|61.2969|-9.77979|0.0301838|0
2|61.2969|-9.77979|0.0301838|0|70
2|3.3916|-0.633789|-0.000461578|1|71
2|3.3916|-0.633789|-0.000461578|0|71


WP 2 is a dockpoint and the ship exibits a "strange heading in game at this waypoint"


See what happens at wp 2? Looks like a major leap... and a heading of 0 too. Did you set the boat to make a major turn at that point or is this something the server did in error?

Unless I misunderstood something in the code, the delt values are how much to change the valuse. In other words how much to move the NPC from the current position for X/Y/Z and how much to turn (and what direction) in the delta heading.

At the wp, the server sends a different packet. This one contains the actual position thet the NPC should be at. The real X/Y/Z and heading, not delta values. This allows the client to synch with the server so they agree where the NPC is, in case a packet has been lost or rounding on either side has caused a variance.

It is the second type of packet I have become suspicious of.

Wumpas
01-08-2004, 08:20 AM
I see the large jumpo and it is not intentional i cant fatham why its so huge ill run this check on my other boat and see if I get similar numbers

heading 70
heading 70
heading 0 <<<< This look slike the wierd turn to me
heading 70

Scorpious2k
01-13-2004, 06:45 AM
I've been running some tests and have gotten the behavior of moving NPCs some better. I am now convinced its a bad packet (bad data in it) that is causing the problem....

You can check out what it looks like at this point if you would like, my test fixes are running on our server (Scorpious2k).