New to the forum? Say hello in this topic! Make sure to read the rules.
RULE NR 3 UPDATED: Don't hurt, harass or provoke other forum members or people.

Handle NPC names through script

Share questions and tutorials related to the ScriptAPI and give suggestions for new functions you want to see.
Forum rules
By using the forum you agree to the following rules.
Post Reply
User avatar
JakSparro98
Superfighter
Superfighter
Posts: 257
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 19

Handle NPC names through script

Post by JakSparro98 » Mon Nov 27, 2017 10:47 pm

I would suggest a couple of quite obvious addition (that maybe are already planned but since the last small update didn't covered that lacks I will post it anyway) regarding the handling of the NPC's names through code:

An overload of the existent Game.CreatePlayer with the possibility to specify the name of the player.
Game.CreatePlayer(Vector2 worldPosition, string PlayerName);
Access the Name field of the IObjectPlayerSpawnTrigger.
IObjectPlayerSpawnTrigger.GetPlayerName();
The first suggestion could also be replaced by an addition for the IPlayer class that provides a method for setting the NPC name.

Also I want to ask, what the profile ID in the profile info is supposed to do?
I thought it was for assigning a name to the player using that profile, but the user ID and name are two distinct variables.
What is the meaning of having an ID for the profile and another ID for the profile info object? (that, moreover, when I try to click on the button on the right of the profile ID field I get some kind of random names, more similar to be NPC names instead of IDs)
0 x

User avatar
Gurt
Lead Programmer
Lead Programmer
Posts: 901
Joined: Sun Feb 28, 2016 3:22 pm
Title: Lead programmer
Started SFD: Made it!
Location: Sweden
Gender:
Age: 27

Post by Gurt » Tue Nov 28, 2017 12:09 am

Handling of NPC names have gone through some recent changes to allow for custom names. Guess we missed the option to change it directly through code. The profile ID is left-over junk and isn't used for anything. We can't think of everything :)
2 x
Gurt

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 257
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 19

Post by JakSparro98 » Tue Nov 28, 2017 12:25 am

Gurt wrote:
Tue Nov 28, 2017 12:09 am
[..]We can't think of everything :)
The thread wasn't supposed to mortify you, I just wanted to know the purposes of things I really can not understand the uses.
Take this thread just as a reminder, even because you cannot think of everything, it's completely legitimate, my only worry was that my behavior could make me look like a pain in the ass.

By the way,I would really like to see the random name generator as an standalone method for populating NPC names faster, it would be a pity to throw away a so good nordic names generator ;)
1 x

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests