VGOEmulator.net

A Development Project for the Vanguard:Saga of Heroes MMO

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • Portal
  • Project Manager
  • Bug Tracker
  • Server List
  • Wiki
  • Donate
  • Login
  • Register
  • Board index Bugs Server Bugs Server Bugs (Closed)
  • Search

Bug 58: I entered the world standing n...

Closed Server Bugs

Moderators: Community Managers, Developers

Locked
  • Print view
Advanced search
8 posts • Page 1 of 1
BugTracker
Posts: 810
Joined: Wed Aug 28, 2013 9:40 am
Bug 58: I entered the world standing n...
  • Quote

Post by BugTracker » Sun Dec 14, 2014 3:02 pm

Bug ID       : 58 - I entered the world standing n... 
Bug Date     : 2014/11/24 06:41:42
Assigned To  : zippyzee
Priority     : High

Category     : VGClient
Sub-Category : Graphics: Character
Severity     : Minor (e.g. Cosmetic)
Reproducible : Every time
Details:
I entered the world standing next to another toon (Zarlore) and he was naked... when I know he was fully equipped before the world crashed. He replaced 1 item and his entire ensemble appeared at once. Must send Appearance updates when new chars log in.
Originated From World: New Telon (1)
Chunk                : Khal (85)
Location             : -6658 -52761 1552
Top

Lokked
Principle Developer
Principle Developer
Posts: 600
Joined: Wed Aug 06, 2014 3:15 pm
Re: Bug 58: I entered the world standing n...
  • Quote

Post by Lokked » Mon Dec 15, 2014 11:28 am

The SendSpawn function is called when a spawn enters the range for a given client at which the client would be allowed to receive information about the spawn. The packet consists of the standard spawn information + the appearance and attachments info. If the character is naked, the "attachments" portion isn't being populated with what equipment the character has.

Zippy, if you need help with this, let me know.
Last edited by Lokked on Wed Dec 17, 2014 10:59 am, edited 1 time in total.
Top

User avatar
John Adams
Retired
Posts: 4582
Joined: Wed Aug 28, 2013 9:40 am
Location: Phoenix, AZ.
Contact:
Contact John Adams
Website
Re: Bug 58: I entered the world standing n...
  • Quote

Post by John Adams » Wed Dec 17, 2014 8:05 am

Ziggy, lol
Top

Lokked
Principle Developer
Principle Developer
Posts: 600
Joined: Wed Aug 06, 2014 3:15 pm
Re: Bug 58: I entered the world standing n...
  • Quote

Post by Lokked » Wed Dec 17, 2014 11:00 am

Sorry, I fixed it :p typo (brain-po).
Top

zippyzee
Developer
Developer
Posts: 1240
Joined: Wed Jul 23, 2014 2:11 pm
Re: Bug 58: I entered the world standing n...
  • Quote

Post by zippyzee » Wed Dec 17, 2014 11:33 am

This gets into some real mysteries that need to be addressed. There are peculiarities with the engine that make no sense. The items are already attached to that character that he sees, so why doesn't he see them? Does that mean the character has his own unreal pawn, and then a another unreal pawn object relative to each other player when they are in range? That doesn't seem to make much sense to me.

If so, then when a character comes into your range, I would then have to find that character's object (relative to you) and attach all the visual items to it. If that were the case, then why does it update when the other character re-equips an item? I've only updated that particular player's unreal pawn, and done nothing relative to the other player. And, how should I update it? Reattach the same items that are already attached to that character's unreal pawn?

This goes into the lingering problem that when you hover over an item in your inventory, you lose the visual attachment to your character. This goes for all equip slots except weapon and shield. Why? I don't get any kind of packet from the client to handle it (as far as I can see). It seems completely handled by the client and the unreal engine, but incorrectly. It's possible there is a message from the client, but it has already been intercepted by someone's code, and I don't know when/where it happens.

Right now, your equipped items are attached to your unreal pawn when you zone into a chunk. That goes for the initial load of the character and any time you zone. I think I recall that being the behavior in-game, there were times you could see the visuals drop and reappear quickly when you chunked.

I need some help here trying to sort out what is going on. If we can solve the hover-over problem we can probably find the answer.
Top

Lokked
Principle Developer
Principle Developer
Posts: 600
Joined: Wed Aug 06, 2014 3:15 pm
Re: Bug 58: I entered the world standing n...
  • Quote

Post by Lokked » Wed Dec 17, 2014 3:40 pm

This is an aspect of the Unreal Engine architecture and how it deals with Actors.

[General Explanation]
All game engines have some list of (possibly transient) objects that represent non-static information in the world. In general, this is everything except the terrain, in non-voxel games. In World of Warcraft, they refer to it as the "Object Manager" and the "Linked List". In UE, it is the Unreal Channels. Unreal Channels must be opened before they can be used, populated with specific data, and then closed in order to be freed up.

[Vanguard - Part of this is our implementation, but most is straight from the Unreal Source, which we don't believe Sigil modified much]
VGO Client expects a channel to be "Opened" with a very specific packet before it can be used to receive information, and in fact, the client will CTD if it receives a non-Opening packet on a Closed channel. This Open packet is generated by the VGO Server in the SendSpawn chain of functions. These functions collect information about the spawn, going through each base Class to obtain this, and the information is compressed using the BitStream* line of Classes. Likewise, there is a RemoveSpawn function which sends the, much simpler, Close Channel packet.

The function SendAndRemoveSpawns() (something like that) loops through each Client object and compares distances to all the other ACTOR objects in the chunk Actor encompasses all spawn objects). If the distance meets the criteria AND the Actor hasn't already been opened for that Client, the Client is sent the Open Channel packet for that Actor. Once this packet is sent, the Client being looped has it's list of Actors Sent updated (so it does not get sent another Open Channel Packet for that particular Actor). This packet includes all the information that the client should know about the spawn, including Attachments. When the client chunks or moves out of range of the Actor, the Close Channel packet is sent to the Client, removing all information stored in the Client about that Actor, and the Actor is removed from the "List of Actors Sent to this Client" on the Server.

Having said all this, I haven't researched in Live how equipment was done. I do know that equipment is included in the Open Channel Packet (01 Packet or Unreal Bitstream or Unreal Packet are other ways we refer to these packets). It seems like at all other times, the equipment information is sent in a regular 03/09 packet, but I'm not sure if this was verified against live. Did live ever send any other 01/Unreal Packets containing Attachment information besides during the Open Channel packet?

[quote="zippyzee"]If so, when a character comes into your range, I would then have to find that character's object (relative to you) and attach all the visual items to it.[/quote]
Yes, and this is already done by the Unreal Channel / SendSpawn system. Whether it's actually including valid Attachment information is another question (it probably isn't, as this system sounds new to you). You will need to look at the (I think) SGOUnrealPawn Class and see how attachments are being formed in the NPC and PC Constructors.

[quote="zippyzee"]If that were the case, then why does it update when the other character re-equips an item? I've only updated that particular player's unreal pawn, and done nothing relative to the other player.[/quote]
I'm having trouble interpreting this question: I'm assuming you mean, "Why, when Player 2 re-equips an item does Player 2's pawn update on Player 1's client? I've only sent the Equipment Changed packet to Player 2".
This very well could be because of the Unreal System, but this is just a guess, as I'm going off memory. The Unreal Actor system is set up with "Has Changed" flags for all of the attributes in the various Classes, sometimes referred to as a "Dirty" Flag. When an attribute changes, it sets bit in a bitmask to 1 to indicate it's changed, and when it comes time to flush out another Unreal Packet to the client, these flags are checked and any "Dirty" attributes are pushed into the packet. It may be that after an item is re-equipped, it flags the whole attachments section as "Dirty" and this is updated via an Unreal Packet.

[quote="zippyzee"]This goes into the lingering problem that when you hover over an item in your inventory, you lose the visual attachment to your character.[/quote]
When you stop hovering over the item, does the appearance come back? Or remain gone?
Whatever your answer, this makes sense to me that the Unreal Channel is never being populated with the appropriate Attachment information. It could be that the information populating the Unreal Channel is the "Base" information for that Actor, and information sent with the 03/09 Packets (which are what you are creating/sending with the OpCodes) is used as temporary information or state information. When mousing over the equipment, the client may be looking at the UnrealChannel information and discovering nothing there.
Is this the same behaviours after you re-equip something? After doing this, can you hover over the item and it remains displayed?
This doesn't explain why Weapon and Shield remain displayed. Perhaps they are being sent as attachments and nothing else is. I don't know without seeing the spawn packets.

You could capture this by Breakpoint, by loading 1 client in, breakpointing the SendSpawn type function in the SGOPCPawn Class, logging in with a second character, and stepping through the creation of the Attachments array. You could create a temporary pointer to the WorldCharacter object within the SGOPCPawn Class by doing something like

Code: Select all

WorldCharacter *character = dynamic_cast<WorldCharacter*>(this->GetActorPointer())
and this way, while stepping through, you could make sure that this SendSpawn line of functions is pulling the information from where it's actually stored (I have a feeling it's not). Note: This pointer is only temporary, so you can mouse over in Visual Studio to see the information fields contained therein.
Top

zippyzee
Developer
Developer
Posts: 1240
Joined: Wed Jul 23, 2014 2:11 pm
Re: Bug 58: I entered the world standing n...
  • Quote

Post by zippyzee » Thu Dec 18, 2014 6:28 am

That is a great explanation, Lokked. Here is what I am currently doing to show equipped items:

Code: Select all

bool WorldCharacter::CharShowEquippedItem(ItemInfo* item) {
	StaticMesh stmesh;
	uint32_t slot;
	int pkgind;

	slot = item->default_slot;

	// Add the item visual to the character
	// Create attachment pair
	pkgind = item->type;
	if (pkgind != 255) // No visual if 255
	{

		SGOAttachmentGroupInfoPair sgo_att;
		sgo_att.package_index = pkgind;
		sgo_att.attachment_index = item->attachment_index;
		sgo_att.vg_inventory_slot = slot;

		//Make item appear on toon
		auto actor = this->GetActorPointer();
		auto actpwn = actor->GetSGOUnrealPawnPointer();
		if (!actpwn){
			LogError(LOG_CHARACTER, 0, "WorldCharacter:Handle Client Equip: Failed to get actpwn!");
			return false;
		}
		actpwn->SetAttachmentGroup(slot, sgo_att);
	}
	return true;
}
I am stuck working on a robotics project for my son's high school team and don't have a lot of time to play with this just yet. If you see something in this snippet that is off, please let me know. Thanks!
Top

Lokked
Principle Developer
Principle Developer
Posts: 600
Joined: Wed Aug 06, 2014 3:15 pm
Re: Bug 58: I entered the world standing n...
  • Quote

Post by Lokked » Fri Dec 19, 2014 1:33 am

That looks appropriate. The next easiest thing to try is capturing packets with the packet collector on New Telon and see what information or process doesn't match the live packets. I may be able to try tomorrow.
Top


Locked
  • Print view

8 posts • Page 1 of 1

Return to “Server Bugs (Closed)”

Jump to
  • Information
  • ↳   Announcements
  • ↳   Dev Chats
  • ↳   Events
  • Community
  • ↳   General Discussions
  • ↳   VGO Team Help Requests
  • ↳   Introductions
  • ↳   Game Features
  • ↳   Wish List
  • ↳   Off-Topic
  • Support
  • ↳   How-To's
  • ↳   General Support
  • ↳   Windows
  • ↳   Linux
  • Bugs
  • ↳   Server Bugs
  • ↳   Server Bugs (Closed)
  • ↳   Content Bugs
  • ↳   Content Bugs (Closed)
  • ↳   Database Bugs
  • ↳   Tools Bugs
  • Board index
  • All times are UTC-07:00
  • Delete cookies
  • Contact us
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD