Strange NPC appearance on new dump

General support forum. If you require assistance and your problem doesnt fall in any of the other categories, this is the forum for you!

Moderator: Team Members

Forum rules
READ THE FORUM STICKY THREADS BEFORE ASKING FOR HELP!
Most information can be found there, and if not, the posts will help you determine the information required to get assistance from the development team.
Incomplete Help Requests will be locked or deleted.
Post Reply
User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Strange NPC appearance on new dump

Post by Gangrenous » Sat Dec 10, 2016 12:17 pm

I noticed that a few NPC's in Antonica show up as red portals on occasion we you do a respawn. Anyone else notice this? It is not every time either.
You do not have the required permissions to view the files attached to this post.
Resident Dirty Hippy

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Strange NPC appearance on new dump

Post by Jabantiz » Sat Dec 10, 2016 4:05 pm

This is part of the random code, some models have changed over time so an id that use to point to a playable race can now point to random objects/mobs. I thought I fixed most of them, if you see it again, or any other weird object that should be a playable race, can you do a /spawn details and post the model_type id?

User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: Strange NPC appearance on new dump

Post by Gangrenous » Sat Dec 10, 2016 5:43 pm

And it can change on respawn? That is what is baffling to me.
Resident Dirty Hippy

User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: Strange NPC appearance on new dump

Post by Gangrenous » Sat Dec 10, 2016 6:05 pm

Here you go...
You do not have the required permissions to view the files attached to this post.
Last edited by Gangrenous on Wed Apr 12, 2017 10:46 am, edited 1 time in total.
Resident Dirty Hippy

User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: Strange NPC appearance on new dump

Post by Gangrenous » Sat Dec 10, 2016 6:08 pm

This guy too....
You do not have the required permissions to view the files attached to this post.
Resident Dirty Hippy

User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: Strange NPC appearance on new dump

Post by Gangrenous » Sat Dec 10, 2016 6:36 pm

And a Traitorous Farmer
You do not have the required permissions to view the files attached to this post.
Resident Dirty Hippy

User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: Strange NPC appearance on new dump

Post by Gangrenous » Sat Dec 10, 2016 6:44 pm

I am thinking it is randomize since it is actually random...very random. I notice randomize is on.
Resident Dirty Hippy

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Strange NPC appearance on new dump

Post by Jabantiz » Sat Dec 10, 2016 6:47 pm

Yea the random code is to change the appearance of the spawn, so we can have 1 spawn for guard and a bunch of different appearances instead of 1 spawn per appearance and then each location a combination of all those spawns. There is a way to alter what is random, even restrict it to good or evil races, or you can turn it off completely, this is something I haven't messed with to much so not sure what tables is related to this.

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Strange NPC appearance on new dump

Post by Jabantiz » Sat Dec 10, 2016 6:58 pm

15909 is ec/pc/human/human_male_normal_test in the appearance table, just checked the code and that should not be included, anything with test in the name should be excluded. In worlddatabase.cpp make sure you have this function with the updated sql.

Code: Select all

vector<int16>* WorldDatabase::GetAppearanceIDsLikeName(string name, bool filtered) {
	vector<int16>* ids = 0;
	Query query;
	MYSQL_ROW row;
	query.escaped_name = getEscapeString(name.c_str());
	MYSQL_RES* result;
	if (filtered)
		result = query.RunQuery2(Q_SELECT, "SELECT `appearance_id` FROM `appearances` WHERE `name` RLIKE '%s' AND `name` NOT RLIKE 'ghost' AND `name` NOT RLIKE 'headless' AND `name` NOT RLIKE 'elemental' AND `name` NOT RLIKE 'test' AND `name` NOT RLIKE 'zombie' AND `name` NOT RLIKE 'vampire'", query.escaped_name);
	else
		result = query.RunQuery2(Q_SELECT, "SELECT `appearance_id` FROM `appearances` WHERE `name` RLIKE '%s' AND `name` NOT RLIKE 'ghost' AND `name`", query.escaped_name);
	while (result && (row = mysql_fetch_row(result))) {
		if (!ids)
			ids = new vector<int16>;
		ids->push_back(atoi(row[0]));
	}
	return ids;
}

User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: Strange NPC appearance on new dump

Post by Gangrenous » Sat Dec 10, 2016 7:08 pm

No, I have not merged in your updates to mine in a few months. I can certainly do that on Sunday or Monday. I see that change now on 9/16/2016. That is all it is I guess?
Resident Dirty Hippy

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Strange NPC appearance on new dump

Post by Jabantiz » Sat Dec 10, 2016 7:13 pm

yea, updating that first sql statement should solve most of the weird random models but it is possible there is more that I just haven't run across yet.

User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: Strange NPC appearance on new dump

Post by Gangrenous » Sun Dec 11, 2016 7:38 am

If there are I will post a diff
Resident Dirty Hippy

User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: Strange NPC appearance on new dump

Post by Gangrenous » Thu Feb 09, 2017 8:31 pm

FYI, finding when some of these randomize as Model Type 16011, they look like bumps on the terrain. Moving the model around, looks like a flag.
Resident Dirty Hippy

User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: Strange NPC appearance on new dump

Post by Gangrenous » Sun Apr 09, 2017 7:14 am

Here we go, ran into a few more today.
You do not have the required permissions to view the files attached to this post.
Resident Dirty Hippy

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest