Important Notice: Effective immediately, all support will be handled through Discord. Read more about the changes coming to Anodyne's services.

[MOD] PNPC Icon

A place to show off (and others to download) completed MODs. Note: support for MODs is handled by third parties, not Anodyne Productions.

Williams Thu Mar 10, 2016 11:01 am

[MOD] PNPC Icon

So I was playing around with some changes to the display of the personnel index the other day for a potential new sim, and I came back to the idea of having a visual way of identifying linked NPCs without having to add the player's main character or name into the suffix of the character, as is often done. Turns out, there is a relatively easy way of doing it, without creating a whole new character class.

In short, the logic I've added to the personnel controller says that if the character has a user account linked to it (user > 0), and is crew_type NPC, to suffix the combadge image with _pnpc; otherwise, do it's usual thing and suffix it with _npc as usual. All that does is change the icon that is used on the crew manifest, giving a visual indicator of the NPC's status as an owned npc, without actually creating a whole new class for it.

I've also added in some logic to the controller and modified the default personnel_index page so that you can display either the full name or last name of the player's main character after the character name, or display the user's name there (which is an optional field in Nova, so you'd have to make sure your players fill that field in). The logic around using the last name of the main character I have figured out works for characters with only a single name - however may not work for characters with a suffix, since all it does is grab the character name, gives the last word in the string.

You can download it here: http://xtras.anodyne-productions.com/it ... /pnpc-icon
Matt aka
Krace / Williams

USS HighlanderMy Xtras Profile
ImageImage

Posts: 288


Williams Thu Mar 10, 2016 11:23 am

Re: [MOD] PNPC Icon

Actually, I figured out a way (by adding some extra logic to the characters model) of not grabbing the suffix, and so I've fixed that little bug. 1.1 uploaded to the Xtras site.
Matt aka
Krace / Williams

USS HighlanderMy Xtras Profile
ImageImage

Posts: 288



Return to Nova MODs

Who is online

Users browsing this forum: No registered users and 1 guest

cron