Movement Loop Speed bug

Old bugs stored here for reference.
Locked
User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Movement Loop Speed bug

Post by John Adams » Mon Apr 27, 2009 7:19 am

I noticed when trying to build a boat movement path... if the speed param starts slow, but you want it to speed up at certain waypoints, the speed is never increased. The boat will only move as fast as the first encountered speed setting.

This is my movement code for the Overlord's Edge - the boat to Kylong Plains (rough, as I road that boat in Live and just did a bunch of /loc's everytime the heading changed)

Code: Select all

function spawn(NPC)
	-- Commonlands Docks to Kylong Zone Line
	MovementLoopAddLocation(NPC, -1065.64, -144.066, -690.65, 10, 0)
	MovementLoopAddLocation(NPC, -1062.95, -144.066, -692.65, 10, 0)
	MovementLoopAddLocation(NPC, -997.90, -144.066, -736.85, 10, 0)
	MovementLoopAddLocation(NPC, -951.75, -144.066, -761.14, 10, 0)
	MovementLoopAddLocation(NPC, -922.66, -144.066, -776.86, 10, 0)
	MovementLoopAddLocation(NPC, -808.12, -144.066, -839.04, 10, 0)
	MovementLoopAddLocation(NPC, -767.78, -144.066, -861.77, 10, 0)
	MovementLoopAddLocation(NPC, -744.01, -144.066, -881.71, 10, 0)
	MovementLoopAddLocation(NPC, -729.18, -144.066, -897.49, 10, 0)
	MovementLoopAddLocation(NPC, -713.65, -144.066, -918.18, 10, 0)
	MovementLoopAddLocation(NPC, -703.59, -144.066, -940.17, 10, 0)
	MovementLoopAddLocation(NPC, -699.87, -144.066, -961.95, 10, 0)
	MovementLoopAddLocation(NPC, -700.55, -144.066, -984.20, 10, 0)
	MovementLoopAddLocation(NPC, -703.65, -144.066, -1000.82, 10, 0)
	MovementLoopAddLocation(NPC, -711.45, -144.066, -1026.06, 10, 0)
	MovementLoopAddLocation(NPC, -721.09, -144.066, -1047.60, 10, 0)
	MovementLoopAddLocation(NPC, -735.20, -144.066, -1068.14, 10, 0)
	MovementLoopAddLocation(NPC, -748.49, -144.066, -1084.06, 10, 0)

	-- Kylong Zone Line to Commonlands Docks
	MovementLoopAddLocation(NPC, -1288.45, -144.066, -728.51, 10, 0)
	MovementLoopAddLocation(NPC, -1277.95, -144.066, -718.89, 10, 0)
	MovementLoopAddLocation(NPC, -1271.58, -144.066, -713.85, 10, 0)
	MovementLoopAddLocation(NPC, -1264.31, -144.066, -708.28, 10, 0)
	MovementLoopAddLocation(NPC, -1255.45, -144.066, -701.77, 10, 0)
	MovementLoopAddLocation(NPC, -1246.91, -144.066, -695.71, 10, 0)
	MovementLoopAddLocation(NPC, -1238.49, -144.066, -689.90, 10, 0)
	MovementLoopAddLocation(NPC, -1228.15, -144.066, -682.98, 10, 0)
	MovementLoopAddLocation(NPC, -1217.15, -144.066, -675.94, 10, 0)
	MovementLoopAddLocation(NPC, -1205.81, -144.066, -669.05, 10, 0)
	MovementLoopAddLocation(NPC, -1193.87, -144.066, -662.25, 10, 0)
	MovementLoopAddLocation(NPC, -1182.67, -144.066, -656.51, 10, 0)
	MovementLoopAddLocation(NPC, -1172.20, -144.066, -652.04, 10, 0)
	MovementLoopAddLocation(NPC, -1162.56, -144.066, -649.21, 10, 0)
	MovementLoopAddLocation(NPC, -1153.27, -144.066, -648.42, 10, 0)
	MovementLoopAddLocation(NPC, -1143.01, -144.066, -650.39, 10, 0)
	MovementLoopAddLocation(NPC, -1135.75, -144.066, -653.62, 10, 0)
	MovementLoopAddLocation(NPC, -1127.99, -144.066, -658.26, 10, 0)
	MovementLoopAddLocation(NPC, -1121.25, -144.066, -662.45, 10, 0)
	MovementLoopAddLocation(NPC, -1114.17, -144.066, -665.95, 10, 0)
	MovementLoopAddLocation(NPC, -1108.28, -144.066, -668.40, 10, 0)
	MovementLoopAddLocation(NPC, -1102.97, -144.066, -670.86, 10, 0)
	MovementLoopAddLocation(NPC, -1097.51, -144.066, -673.55, 10, 0)
	MovementLoopAddLocation(NPC, -1092.09, -144.066, -676.35, 10, 0)
	MovementLoopAddLocation(NPC, -1086.62, -144.066, -679.25, 10, 0)
	MovementLoopAddLocation(NPC, -1082.99, -144.066, -681.22, 10, 0)
	MovementLoopAddLocation(NPC, -1078.14, -144.066, -683.88, 10, 0)
	MovementLoopAddLocation(NPC, -1072.68, -144.066, -686.89, 10, 0)
	MovementLoopAddLocation(NPC, -1069.09, -144.066, -688.84, 10, 0)
	MovementLoopAddLocation(NPC, -1066.10, -144.066, -690.41, 10, 0)

	-- Wait 60 Seconds at Commonlands Docks
	MovementLoopAddLocation(NPC, -1065.64, -144.066, -690.65, 10, 60)
end
If you use this script, but change the Speed to start at 3, go a few clicks then change to 4, 5...10, you will notice when you run the boat that it always stays at speed 3, very slow on water.

As you see in this script, I finally set speed to 10 for all movements just for testing.

To make the boat, go to Commonlands docks.

Run these commands:

Code: Select all

/spawn create NPC 7940 1 1 "Overlords Edge"
(target the boat you just created)

/move -1062 -144.066 -693.148
/summon

(that should put the boat at the dock)

/spawn add new "OverlordsEdge"
(that adds the spawn to your DB permanently)

(add the SpawnScript above to the new boat spawn ID)

/luadebug start
(starts lua debugging to your chat box)

/reload spawnscripts
/reload spawns
You should now see your boat take off out of the bay. This is just a circular trip for now, just to test the speed change stuff.

On live, boats start off, and end, slower than they travel on the open sea. That is the effect of this test.

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Re: Movement Loop Speed bug

Post by LethalEncounter » Mon Apr 27, 2009 4:10 pm

Hmm, definitely strange. Looking at the code it looks like it should function correctly. I'll have to look at the packets and see if maybe one of the structs is off or something.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Movement Loop Speed bug

Post by John Adams » Mon Apr 27, 2009 4:58 pm

Xanibunib said that on land, ie., in a city, he messed with rats that run around at different speeds - he says the speed changes worked fine. I'm tellin ya, it doesn't. But, could it just be a "water" thing?

Guess I could drag a boat on land and try it.

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Re: Movement Loop Speed bug

Post by LethalEncounter » Tue Apr 28, 2009 6:50 pm

Hmm, that is something I hadn't considered. They might send the speed differently for "swimming" spawns.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Movement Loop Speed bug

Post by John Adams » Wed Apr 29, 2009 7:08 am

While riding a boat is a low priority (unless very simple to fix), there's a few other issues with boats - mostly, a knowledge thing. When parser parses the Overlords Edge boat, it puts it as an NPC in the DB. However, when this NPC boat moves, the player doesn't move along with it... even if the boat structure is solid (see below).

Scatman and I built a boat a long time ago (the "SeaPU Cache", in our GM Hall, btw ;)) and tried different things like NPC vs Object.

Observations:
  • As an Object, I believe we were able to stand on the deck while it moved - tho honestly i cannot remember 100% right now.

    Another thing, there is a "sweet spot" for how high the boat must sit out of the water - AND how deep the water is the boat is sitting in. If the boat is too far below the water line, parts of the structure become unstable, and you fall through.

    Same thing with if the ground BELOW the boat is too shallow, you fall through the deck of the boat.
So I guess what I'm asking is, if the parser makes the boat an NPC, should that be considered the right type of spawn? And if so, there is probably something wrong with the movement packet then as the player cannot ride the moving object. Once I finish fixing my servers, I'll try and spend some time getting more accurate details.

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Re: Movement Loop Speed bug

Post by LethalEncounter » Wed Apr 29, 2009 3:15 pm

I noticed the same thing when I was trying to get the gfay lifts working. Even though the object was solid, it didn't take the character with it. More than likely we need to set a field to a specific value for it to work correctly.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Movement Loop Speed bug

Post by John Adams » Wed Apr 29, 2009 4:41 pm

If you need anything specific collected from live, let one of us know. Though our logs should be loaded with this kinda stuff, I am not sure I ever road a boat with the collector running.

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Re: Movement Loop Speed bug

Post by LethalEncounter » Thu Apr 30, 2009 5:19 pm

I have a feeling that when I when lifts working properly this will also get fixed.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Movement Loop Speed bug

Post by John Adams » Thu Apr 30, 2009 5:39 pm

Well, chop chop man! ;)

Locked

Who is online

Users browsing this forum: No registered users and 0 guests