Strange NPC appearance on new dump
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.
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.
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Strange NPC appearance on new dump
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
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?
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Re: Strange NPC appearance on new dump
And it can change on respawn? That is what is baffling to me.
Resident Dirty Hippy
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Re: Strange NPC appearance on new dump
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
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Re: Strange NPC appearance on new dump
This guy too....
You do not have the required permissions to view the files attached to this post.
Resident Dirty Hippy
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Re: Strange NPC appearance on new dump
And a Traitorous Farmer
You do not have the required permissions to view the files attached to this post.
Resident Dirty Hippy
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Re: Strange NPC appearance on new dump
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
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
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;
}
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Re: Strange NPC appearance on new dump
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
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.
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Re: Strange NPC appearance on new dump
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
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Re: Strange NPC appearance on new dump
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
Who is online
Users browsing this forum: No registered users and 1 guest