speaks
Junior Member
Posts: 408
inherit
264463
0
Aug 30, 2022 6:54:20 GMT -8
speaks
408
June 2021
speaks
|
Post by speaks on Sept 22, 2021 15:40:59 GMT -8
How do I add extra fields on an NPC to allow things like personality traits, likes and dislikes…
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,849
January 2015
msg
|
Post by Lynx on Sept 22, 2021 15:49:42 GMT -8
How do I add extra fields on an NPC to allow things like personality traits, likes and dislikes… I'd suggest going to the support thread's first post and scroll down to the section labeled Adding More Fields.
|
|
speaks
Junior Member
Posts: 408
inherit
264463
0
Aug 30, 2022 6:54:20 GMT -8
speaks
408
June 2021
speaks
|
Post by speaks on Sept 22, 2021 16:26:09 GMT -8
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Sept 22, 2021 17:52:25 GMT -8
Did you give those newly added fields a value? The author of the plugin ( Brian ) is always the one most qualified to help you since he/she would know how their code better than anybody else would. I am guessing that if no value was filled in, then the field is not shown, but that is a guess since I am not the plugin's author. In other words, if you created the fields you must also give them something to display in order for them to show (?) Tip: You can go straight to the dedicated support thread of a plugin (if it has set one) by clicking the Need Help? link at the bottom left of the plugin configuration in your admin panel
Edit:It also doesn't appear the variables for the new traits were added to the mini-profile Adding More FieldsAs of 1.2.0 you no longer have to edit the source code of the plugin to add new fields. Just go to Plugins > Build > NPC Profiles, click on the User Interface tab, then go to the NPC List tab and add as many fields as you like to the Auto Form section there. This also works for the expansion plugin. The name of the template variable produced by the field is determined by the variable ID you give the field. For example, if the field's variable ID is occupation the variable you'd use to produce that field's value in the mini-profile's HTML is $[user.occupation].
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Sept 23, 2021 19:04:37 GMT -8
speaks I see you added some values to the new trait but I am still not seeing those traits added to the mini-profile so they can be displayed I've highlighted the variables that are currently in the mini-profile none of which I see are any of the newly added traits such as $[user.energy_level]
|
|
speaks
Junior Member
Posts: 408
inherit
264463
0
Aug 30, 2022 6:54:20 GMT -8
speaks
408
June 2021
speaks
|
Post by speaks on Sept 24, 2021 6:08:28 GMT -8
I will have to do this at the library later today
|
|
speaks
Junior Member
Posts: 408
inherit
264463
0
Aug 30, 2022 6:54:20 GMT -8
speaks
408
June 2021
speaks
|
Post by speaks on Sept 24, 2021 9:25:15 GMT -8
Can you possibly go into the codes and fix this. I filled out the new fields earlier and they still aren’t showing. I’m not comfortable going into codes.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Sept 25, 2021 22:05:55 GMT -8
Can you possibly go into the codes and fix this. I filled out the new fields earlier and they still aren’t showing. I’m not comfortable going into codes. I am sorry but I cannot, that ability is not within my power, I am merely a soothsayer. Proboards admins (red names) can travel anywhere and infiltrate any forum like agents in The Matrix. Perhaps the plugin author ( Brian), who is also a secret agent, will be willing but he's very busy these days getting V6 ready for us.
|
|
speaks
Junior Member
Posts: 408
inherit
264463
0
Aug 30, 2022 6:54:20 GMT -8
speaks
408
June 2021
speaks
|
Post by speaks on Sept 26, 2021 10:34:48 GMT -8
Ok, I’m at a loss when it comes to editing codes
|
|
#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Sept 27, 2021 18:37:35 GMT -8
Hi! If you're worried about the changes you make having a detrimental effect I suggest copying any code you're editing and saving it to a text file on your PC/device before editing it on the actual site so that you can simply copy the original version back over and try again if you discover a mistake. Backing up anything you're about to work on allows you to experiment to your heart's content without the lingering fear of irreversible catastrophic failure. Anyways, moving on... Take a look at this bit that renders some of the existing fields: <div class="info" data-item="info"> <br> <div data-item="gender">Gender: $[user.gender]</div> <div data-item="location">Location: $[user.location]</div> </div> If you want to add your new fields after this list you can duplicate one of the existing lines that produces those fields and change the part referencing the field's variable ID to that of the new field you added. You can repeat the process for each new field you want to add. This would result in something like this, which you can add to the end of the HTML for the Mini-Profile in the Profile HTML tab of the plugin: <div class="info"> <br> <div data-item="personality_traits">Location: $[user.personality_traits]</div> <div data-item="likes">Likes: $[user.likes]</div> <div data-item="dislikes">Dislikes: $[user.dislikes]</div> <div data-item="energy_level">Energy Level: $[user.energy_level]</div> </div>
|
|