Knights of the Fountain
  2106 active members
  235 are online

Year

19

Day

324

Time

17:18:49

Guest
Login
snewsgnewsmessagegeneralfactioninventorycombatroom
Message CentreRPG CentreQuestion Centre
Archives » Custom NPCs scripts and Other Related Questions
Ban Rishchakh

I read the rules but I didn't understand it clearly.

Currently you can code what a custom NPC can say? (can it be a droid?)
Can it be coded so it provides a different options if the player has already interacted with it?

I doubt there's any chance it can provide a reward or do a more complex function than that unofficially.

Can dialogue options disappear based on something? So it's not repetitive.

edit: title


Edited By: Ban Rishchakh on Year 18 Day 309 2:04
____________

Unlimited Power Ltd. - "Energy for Every Being"
Year 18 Day 308 16:37
Lexor Gregain

Currently you can code what a custom NPC can say? (can it be a droid?)
- Yes (no)

Can it be coded so it provides a different options if the player has already interacted with it?
- Yes

I doubt there's any chance it can provide a reward or do a more complex function than that unofficially.
- Curently not for player-made scripts, but it can eg. give you a code for a door with rewards behind, or have it send a DM to a player whom can then provide a reward.

Can dialogue options disappear based on something? So it's not repetitive.
- Yes, can eg. be based on name, race, gender etc.


Year 18 Day 309 0:35
Ban Rishchakh

Thanks. That's good enough for starters. Maybe in the long run an admin could lend a hand for something special.

If i encounter more issues, is it alright to seek assistance here?

Okay, another question. First, I buy the NPC through the CP exchange, then I put the script? or does the admin have to approve the script as well? Can I edit the script as it goes? because, how will I see that it's working? A couple of questions.

Okay, I think the last one. Can the custom art be a non-main character from movie/comics/etc ? In general lines, I know it would still need approval.



Edited By: Ban Rishchakh on Year 18 Day 309 2:03
____________

Unlimited Power Ltd. - "Energy for Every Being"
When you have a Custom-type NPC, you can go to your inventory tab for owned NPCs, then there is option "Edit Script". Admin approval isn't required. Syntax of the code is controlled before you save the script, but if it acctually works you will see when you try to talk with the particular NPC.

I doubt NPC team will accept your request for any character from Star Wars universe. The rules say it:


•Custom NPCs must not be given the same name as any other player, current or otherwise.
•Canon Star Wars characters, real life people, facetiousness (working naughty words into names - bad!), characters from other fantasy stories (and so on), as well as names that aren't actually names: "L3GO M4N, C3P0", will not be accepted.


-
 


But you can use images of the characters from other universes without problems if they are within current rules for art.
Check the CP Exchange, there you will find all rules regarding Custom NPCs.


Edited By: Ontares Phirr on Year 18 Day 309 4:43
____________

Ontares_Phirr_Sig.png
Ban Rishchakh

No, I just meant I wanted to use some images of unfamiliar characters from the movies, someone in the "background", for the art. I don't intend to copy any character. I want to create it but I can't make the custom art.

Thanks for the info. It helps a lot.


____________

Unlimited Power Ltd. - "Energy for Every Being"
Ban Rishchakh

So, to sum it up, custom NPCs have dialogue options but can't manipulate the game?


____________

Unlimited Power Ltd. - "Energy for Every Being"
Yes. The syntax allows you to create all manner of complex functions and text-based interactions, but it cannot Write to Darkness, and it has limited Read capability from Darkness. Check the Guide's Scripting Page for what is available, and use (dbg-env) in your script to see an up-to-date list of functions and their parameter names.


Ban Rishchakh

this looks challenging ...


____________

Unlimited Power Ltd. - "Energy for Every Being"
Yes. There are many challenging aspects. It's best to think of it as writing a Choose-Your-Own-Adventure book. You make up the speech, the responses, the mechanics that govern which step goes next, etc.. It's true there's a lot more you can do with it, but that is probably the most accessible way to look at it.

Check also the Programming Talk forum for threads on SWC-LISP and others who are learning to use it.

For example:

Can it be coded so it provides a different options if the player has already interacted with it?
e.g.: (defvar has-talked? (ovar 'has-talked? #f)) ; make a persistent variable that is unique to the NPC and Character interacting with it (ovar) named has-talked? and have it evaluate to #f by default (ie unless set-var! otherwise)
(defun start
(cond [has-talked? (welcome-back)]
[#t (introduction)]))
(defun introduction
(say "Hello. I am Jorge. Now that I've introduced myself, I shouldn't do that again, so I'm going to set has-talked? to #t (meaning 'True") so this character doesn't see this again. ") (set-var! has-talked? #t))
(defun welcome-back
(say "Hello again!"))

I doubt there's any chance it can provide a reward or do a more complex function than that unofficially.
As with almost all other games, the reward itself isn't the interesting part. The interaction leading up to the reward is the key. Make an interaction interesting for its own sake, and let the rewards follow from PCs. Keep in mind also that there are any number of "imaginary" or manufactured rewards that Players create. Think of all the custom items that exist - collector cards, drink bottles, 'artefacts', etc.. You can use an entirely imaginary asset that is tracked solely through scripts.

Can dialogue options disappear based on something? So it's not repetitive.
e.g. (defun (is-human? targ) (cond [(eq? (get-race targ) "Human") #t][#t #f]))
(defun start (cond [(is-human? character) (say "Hello, Human!")][#t (say "You're not Human!")]))
See also the Guide for another explicit example on that front.


Edited By: Kay Dallben on Year 18 Day 310 6:32
Ban Rishchakh

Thanks, that shed a bit more light and i didn't know there was a forum too. I'll look for more info there and i'm on my way to hire an NPC. I'm looking to create some immersive experience for new faction players, some kind of an adventure. Assigning things could've been useful. And if ships or other things could assume default position so it didn't need too much maintenance. But i'll try to find a way around it. Dialogue can be creative enough.


____________

Unlimited Power Ltd. - "Energy for Every Being"
Yeah, check out the syntax for `send-message` and nominate a set of players from the faction to help run the Quests. It's no different from DMing someone to ask them to assign an asset, just `send-message` lets you do it as part of the script, so you skip the part where the newbie DMs you something vague and unhelpful.

There's lots of record-keeping that can be difficult to move between e.g. Excel sheets tracking Inventory Exports of Assets and a Script Module defining a list that the script looks through, but it's doable.

Feel free to share your work and ask me questions any time.


Ban Rishchakh

that's very good, it will work. I was thinking about something like that.

I will. Thanks very much!


____________

Unlimited Power Ltd. - "Energy for Every Being"
We're going to be exposing some more things to LISP - for example, I think assigning assets is certainly something we will add. Most actions are currently admin-restricted because we were focusing on admin-run quests for a while, but we do see the need to open up additional things for players to be able to do with LISP.

That list of actions is something I'll be taking a look at over the next couple months to see which specifically we can open up and what security measures need to be taken to prevent abuse.


Ban Rishchakh

That will be really great. Assigning ships could smooth out bottlenecks. Add to crewlist could be useful. Maybe I'll share my progress and what I might find useful to have and you can consider its implications. I'll see how I can do that once I have something to share. It's still a language i'll have to understand first.

the starter's guide is great; approval seems to be taking a few days ... found out I need two more npcs )


Edited By: Ban Rishchakh on Year 18 Day 313 6:37
____________

Unlimited Power Ltd. - "Energy for Every Being"