[MOD] PNPC Icon
2 posts
• Page 1 of 1
[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
-
-
Posts: 288
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.-
-
Posts: 288
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest