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 Development Content Development
  • Search

NPC Faction Colors

VGOEmulator content development topics.

Moderators: Moldew, Jakkal

Post Reply
Advanced search
16 posts
  • Previous
  • 1
  • 2
User avatar
John Adams
Retired
Posts: 4583
Joined: Wed Aug 28, 2013 9:40 am
Location: Phoenix, AZ.
Contact:
Contact John Adams
Website
Re: NPC Faction Colors
  • Quote

Post by John Adams » Thu Jul 17, 2014 7:15 pm

I just re-parsed everything and popped it into my world. I was surprised when I saw colored names and reticles.
ScreenShot_00145.JPG
They were both yellow, and when I clicked on them it turns green, with a familiar blue reticle. These are pets (minions), and this doesn't happen when I target NPCs (because of the faction packets we're not sending yet).

Question to be answered: are Pets (entity type 4096) just handled differently because they are never faction aware to players?
You do not have the required permissions to view the files attached to this post.
Top

User avatar
Xinux
Project Leader
Project Leader
Posts: 2549
Joined: Wed Aug 28, 2013 2:20 pm
Re: NPC Faction Colors
  • Quote

Post by Xinux » Thu Jul 17, 2014 7:34 pm

[quote]Question to be answered: are Pets (entity type 4096) just handled differently because they are never faction aware to players?[/quote]

If i had to guess yes kinda like how players show up correctly in the emu the color of them that is when you click on them.
Top

User avatar
John Adams
Retired
Posts: 4583
Joined: Wed Aug 28, 2013 9:40 am
Location: Phoenix, AZ.
Contact:
Contact John Adams
Website
Re: NPC Faction Colors
  • Quote

Post by John Adams » Mon Jul 21, 2014 6:54 am

Cool. If you haven't done so elsewhere, can you please do the packet layout/flow for Factions here? While it's not super urgent, if it's easy I'd like to bring the world to life with appropriate colorings like you did in your demo.

I can set up a temporary `character_factions` table along with our global `factions` and `faction_alliances` (if that's what we choose to call it).
Top

User avatar
Xinux
Project Leader
Project Leader
Posts: 2549
Joined: Wed Aug 28, 2013 2:20 pm
Re: NPC Faction Colors
  • Quote

Post by Xinux » Mon Jul 21, 2014 10:38 am

Ok going to be doing some guessing on this and i'm not even sure i'm right but here it goes.

When the spawns are sent to the world they have a faction id attached to them and when the client see's that spawn packet i think it checks to see if if the player knows about that faction and then if so it uses the value the player has for that id. Now if the player doesn't then the client sends a request to the server asking for what the player has for a faction value.

OP_ClientNpcFaction

Code: Select all

-- OP_Unknown_862 --
7/17/2014 17:31:01
192.168.1.168 -> 69.174.203.21
0000:	02 00 5E 03 00 00 0C 00 00 00 9E 03 00 00 00 00 ..^.............
0010:	EC 04 9C 01 00 00                               ......
OP_ServerNpcFaction

Code: Select all

-- OP_ServerNpcFaction --
7/17/2014 17:31:02
69.174.203.21 -> 192.168.1.168
0000:	02 00 58 03 00 00 08 00 00 00 9C 01 00 00 00 00 ..X.............
0010:	00 00                                           ..
Top

Zewtastic
Posts: 527
Joined: Wed Jan 29, 2014 12:28 pm
Location: Sunny Sacramento CA. USA
Re: NPC Faction Colors
  • Quote

Post by Zewtastic » Mon Jul 21, 2014 11:06 am

Faction levels
Ally (8000)to(20000)
Good (6000)to(7999)
Sociable (2000)to(5999)
Neutral (1999)to(-1999)
Wary (-2000)to(-5999)
Untrustworthy (-6000)to(-7999) Will talk to you still, and allow you to parley and do quests.
Kill on Sight (-8000)to(-20000)
Top

User avatar
John Adams
Retired
Posts: 4583
Joined: Wed Aug 28, 2013 9:40 am
Location: Phoenix, AZ.
Contact:
Contact John Adams
Website
Re: NPC Faction Colors
  • Quote

Post by John Adams » Mon Jul 21, 2014 12:17 pm

[quote="zingtastic"]Faction levels
Ally (8000)to(20000)
Good (6000)to(7999)
Sociable (2000)to(5999)
Neutral (1999)to(-1999)
Wary (-2000)to(-5999)
Untrustworthy (-6000)to(-7999) Will talk to you still, and allow you to parley and do quests.
Kill on Sight (-8000)to(-20000)[/quote]



[quote="Xinux"]Found faction values in the client.

Code: Select all

  _SGOUIString__SGOUIString(a1, &_gpEmptyWChar);
  v6 = 0;
  v5 = 1;
  if ( a2 > -2000 )
  {
    if ( a2 < 2000 )
    {
      v4 = (int)L"FactionNeutral";
      goto LABEL_17;
    }
    goto LABEL_5;
  }
  if ( a2 >= 2000 )
  {
LABEL_5:
    if ( a2 < 5000 )
    {
      v4 = (int)L"FactionSociable";
      goto LABEL_17;
    }
    goto LABEL_8;
  }
  if ( a2 >= 5000 )
  {
LABEL_8:
    if ( a2 < 8000 )
    {
      v4 = (int)L"FactionGoodwill";
      goto LABEL_17;
    }
LABEL_11:
    v4 = (int)L"FactionAlly";
    goto LABEL_17;
  }
  if ( a2 >= 8000 )
    goto LABEL_11;
  if ( a2 <= -5000 )
  {
    if ( a2 <= -8000 )
      v4 = (int)L"FactionKOS";
    else
      v4 = (int)L"FactionUntrustworthy";
  }
  else
  {
    v4 = (int)L"FactionWary";
  }
[/quote]
Top


Post Reply

16 posts
  • Previous
  • 1
  • 2

Return to “Content Development”

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
  • Development
  • ↳   Content Development
  • ↳   Thestra Adventuring
  • ↳   Qalia Adventuring
  • ↳   Kojan Adventuring
  • ↳   Crafting/Harvesting
  • 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