PDA

View Full Version : Change NPC Apperance


brokentechnology
01-29-2014, 11:18 AM
Hello!

I'm working on an epic quest that is laid out as follows:

You either align yourself with Freeport / Qeynos (EQ2-like) and the quest will you take through a story line of which faction controls the city.

So Freeport could control Qeynos and Qeynos to Freeport. When this happens, I would like to change the guards to match their respective colors (Pretty much a database appearance update)

Is anything like this even possible? I know you can change some stats but not sure if the quest system can interact with the database doing a mass change.

Township EQ
01-29-2014, 11:59 AM
Hello!

I'm working on an epic quest that is laid out as follows:

You either align yourself with Freeport / Qeynos (EQ2-like) and the quest will you take through a story line of which faction controls the city.

So Freeport could control Qeynos and Qeynos to Freeport. When this happens, I would like to change the guards to match their respective colors (Pretty much a database appearance update)

Is anything like this even possible? I know you can change some stats but not sure if the quest system can interact with the database doing a mass change.

sub EVENT_SPAWN {
$npc_name = $npc->GetCleanName();
if($npc_name=~/freeport/i) {
$npc->SetRace(1); #:: Set NPC Race - Qeynos Citizen: 71 | Freeport Guards: 44
$npc->SetTexture(1); #:: Set NPC Texture
}
if($npcname=~/qeynos/i) {
$npc->SetRace(1);
$npc->SetTexture(1);
}
}

Pretty simple an easy thing to do.. you'll have to figure out which texture is the actual guard on both of those races.. but that's just a matter of #showstats'ing one of the existing ones.

You can add this into your global default.pl or you can just put the one on the bottom into each individual script.

sub EVENT_SPAWN {
$npc->SetRace(1); #:: Set NPC Race - Qeynos Citizen: 71 | Freeport Guards: 44
$npc->SetTexture(1); #:: Set NPC Texture
}

Another non-perl way of doing it is to #npcedit race/texture the NPC in-game.. or change its information in the npc_types table in your database.

Nydosa
01-30-2014, 12:36 AM
You can also check out Spawn Conditions as outlined here a little:
http://www.eqemulator.net/wiki/wikka.php?wakka=SpawnConditions

I'd also recomend checking out the quests associated with Sleepers (the four dragons) as a good example.

This might take a bit more work, but could let you have separate factions and npcs that spawn (a cosmetic/texture change would leave freeport guards on freeport faction despite looking like qeynos guards).

brokentechnology
01-30-2014, 04:27 PM
You can also check out Spawn Conditions as outlined here a little:
http://www.eqemulator.net/wiki/wikka.php?wakka=SpawnConditions

I'd also recomend checking out the quests associated with Sleepers (the four dragons) as a good example.

This might take a bit more work, but could let you have separate factions and npcs that spawn (a cosmetic/texture change would leave freeport guards on freeport faction despite looking like qeynos guards).

So somewhat of a if -> freeport faction -> alter -> qeynos faction and vice versa? My ultimate goal is to strip the other starting cities and go for a EQ2-like system, but not sure how to wedge into the story unless I make my own expansions and lore behind each...such as all original EQ content, than Kunark could be an expansion with different content er something like that.

Nydosa
01-30-2014, 08:09 PM
Spawn Conditions are what makes the Day/Night cycle work. They can be queued with a quest script, and give you a second set of NPCs that will spawn.

You would then, I believe, have to add in the new NPC spawn points at the various points around the town. It would be somewhat labor intensive.

This would let you give each guard a unique name, look, faction, loot set, ect.

knowom
01-30-2014, 10:48 PM
This gives me a really cool idea on a way to use spawn conditions Day/Night cycles. You could make a city under control by one faction during the day and a different one at night. Kithicor was done similar to that essentially, but doing it with a city is more interesting. You could even phase in certain sets of opposing npc faction spawns to gradually spawn at sunrise and sunset then remaining static for awhile until the next cycle.

Now by phasing them in you could create a cycle of conflict between NPC's during those hours. The dynamics of it could be really impressive you could kind of create a sort of Trojan Horse atmosphere if you will where a city gets ransacked during the night.

Nydosa
01-30-2014, 11:46 PM
Shards of Dalaya has done some of that to a lesser extent. They have merchants and stores closing at night, along with some shady merchants coming out. I could see some more intense rotations being interesting...perhaps gambling, criminals, and drunks that attack you if you get too close. Hehe.

sorvani
01-31-2014, 11:42 AM
Qeynos already has the corrupt guards spawning in the evening. Just need to expand upon it.

This gives me a really cool idea on a way to use spawn conditions Day/Night cycles. You could make a city under control by one faction during the day and a different one at night. Kithicor was done similar to that essentially, but doing it with a city is more interesting. You could even phase in certain sets of opposing npc faction spawns to gradually spawn at sunrise and sunset then remaining static for awhile until the next cycle.

Now by phasing them in you could create a cycle of conflict between NPC's during those hours. The dynamics of it could be really impressive you could kind of create a sort of Trojan Horse atmosphere if you will where a city gets ransacked during the night.