Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Takeon

10
Posts
A member registered 4 days ago

Recent community posts

(4 edits)

All the functions available are listed in the editor when you copy them into your clipboard from the Lua script part of NPC editing.  

At first glance there is no such thing; there's a bunch of fetching functions for weather, time of day, day of the week and season meant to be used in conjunction with logic gates and conditions.

There's a check for 'sunlight' which I'm unsure is actual sunlight or the amount of light in an area within a float ranging from 0 to 1.

There's oddly a function that dictates the cost of the shed plot, one that states if either the shed is locked or unlocked and finally one that displays text when the conditions for it are met, likely used by Gareth when you try to buy the shed from him, which means you could very easily create a NPC that gives you the shed for free when interacted with using their Lua script editor, not that Gareth's AI needs much convincing to do so as well to begin with.

Everything else is just a garbage collector, math operators, tables.

There's however a list of defined 'default' routines that exist innately within the game which are the following;

read_in_bed, sleep, cook_breakfast, eat_breakfast, work, frollic_on_frozen_river (which is one of the example conditions on the default test character, under the condition that the weather is snowy) and finally silverpine_leisure which is the default activity for 'do whatever' that you should default to when you're done with whatever activity you've set for them if you don't want them to be immobile starring at a wall until the next activity comes up.
That's pretty much all there is.

To sum up the situation, the activity script in Lua isn't meant to interact with NPC knowledge, it's merely a list of activities for the NPC to do under different conditions during their day, it isn't dynamic but completely static, and the NPC will just follow it blindly until interrupted by the player in some way.

Basically a schedule to follow that's more or less complex based on what you tell the NPC to do, like staying at home if the weather is cold or rainy, or going every now and then to visit a certain NPC by walking to their house every tuesday, things like that.

The gossip system is part of a dynamic set of instructions that trigger after the player is done interacting directly with a NPC, and it isn't elaborate in the slightest as far as I know, the NPC just stores a gossip as a loose memory in the NPCMemories nmem file, and acts upon it whenever it is convenient, it's completely unrelated to routines, in fact you can open that nmem file and erase the line that says 'X Npc told me that Player did X' and the rumor vanishes permanently from their memory as if it never happened once you reimport it.

If you were hoping for this game's NPCs to be more flexible than that, and for what you say or do to change their habits, I'm sad to say, and can confirm as I've tried to do so myself even before the NPC editing tools were put in game; 

There is no way, and I mean absolutely none, to modify the habits of a NPC from their usual scheduling using dialogue alone, they'll just keep doing what they do whatever you tell them or convince them to do, with the only exception of following you, gossiping, trying to arrest or murder you, and inviting Mirel to live with you. And even that has its limits; for instance if you were to try and convince Mirel to follow you while her activity dictates that she must return to Thalassar, some invisible voice will force her AI to comply and cut off the conversation before returning to her usual programming. It isn't as elaborate as what you might expect.

(8 edits)

It's quite easy to set up, just launch a game with the coordinate sampling tool on (which is in the editor), use that tool by going into your menu in game to find positions of where you want them to go, write all the positions you want for them to hang at down in a notepad, then return to their NPC edit menu and set a possible routine in the NPC editing tool; give NPC A a target position somewhere in town like chairs in the tavern or some place in town, make them face eachother, say that that the activity of NPC A is 'Is hanging around with NPC B', and NPC B 'Is hanging around with NPC A' with their Visible activity being 'Sitting at the table with their friend' or 'loitering with their friend', after you've done that, check either 'random walk' or 'patrol' in the options under that and the AI will do the rest. Honestly you don't need the AI to set that up, you could simply add it to their Lua script as such;


function GetTargetRoutineID(hour)

    if hour == (insert hour you want it to happen here) then

        return "Is hanging with NPC B"

    elseif hour >= (insert hour here) or hour <= (insert hour it happens +1) then

        return "silverpine_leisure"

end

You can even make exceptions if you want it to be more immersive, like them not hanging out during a snowstorm by adding something like

else 

       if World.GetCurrentWeather() ~= "Snowstorm"         

            return "Hang at home" (or any activity you would create that'd be named like this for when you want them to hang at coordinates at home for example).

You can fine tune it with a bunch of functions that look up the day, weather, season etc, you can see those in the lua script tab of the NPC editor when you press 'copy documentation' which gives you all of them in your clipboard. 

If you mean you'd like them to organically meet with eachother without instructions at random times, then you could just put a routine like 'Hangs around with NPC A/B' as a description, give them both a general meet up point at certain coordinates, then check the dynamic routine writer on and hope the AI generates something for them at random.
Either way what this will do is have them just be near enough eachother to trigger a group conversation, and the activity and NPC lookup will probably make the AI improvise them talking with eachother and acknowledge that they were in the middle of a discussion or activity when you talk to one or both of them at their meeting spot.

If however you meant to say that you'd like the two NPCs to hold conversations, share information and such, I'm sorry to say but none of Silverpine's NPC can do that, the only real 'conversation' or rather NPC to NPC interaction possible that isn't directly controlled by the player is if during one of your conversations one NPC commit to loose memory a 'I will talk to X about that thing that I want to talk to them about after the player initiated conversation with me', and it's usually just a one sentence phrase they'll eventually repeat to another NPC without much context whenever they see them (If possible they usually just decide to rush the other NPC and tell them that sentence immediately).
Well, that or you threatening them or loitering in their house without their authorization, which has them calling for the guard, which breaks the conversation and has them run for Aldric who will then chase you around town to get an explanation from you.
And also that other exception with that one NPC that always ends in your demise... but anyways I digress.
 
Point is they never actually hold actual elaborate conversations that generate memories for them passively, it's always reliant on you as the player conversing with them.

It does, I've done so a few times when the AI hesitates between Interacting with an object to 'recover' what they should give you and actually giving it.

Oh, another place I just found more blue tiles, I blew up a few rocks that spawned near the pond in the Mountain Pond map, and got more of them. 
Not sure if the rocks are supposed to spawn around it like that, but this was the result;

(1 edit)

The pond in question is the Southern Dungeon. I've seen her there a few times.

You can simply correct it in an explicit manner while out of character for the AI to do such, format is like this; '(OOC: Player should've been moved to X location based on the conversation, please move us there for the sake of consistency)' And the AI will usually comply without breaking character.

(5 edits)

It's mentioned as a tooltip of the public knowledge toggle when you hover on it.

  
It's made to be logical; if the NPC hasn't even met the NPC 'holding' the knowledge, how would they know about it?

So basically the other NPCs need to be at least acquainted with that NPC to be aware of the information they hold.

It's quite easy to test and verify as well, try speaking to Mirel about Orson or a hunter in the woods, and she won't have the single-est clue about whoever you're talking about; Gareth knowledge of Orson is private, he just knows Orson personally and Orson delivers him meat every Tuesday, and they're aware of eachother, but neither Celandine nor Gareth hold any public knowledge of Orson, so when you mention Orson to Mirel she just goes 'Ors- who?'.




That is of course if Mirel hasn't met Orson directly due to somehow having both of them in a conversation because she lives with you or something, because otherwise their schedule makes it normally impossible (as far as I'm aware) for both of them to be in Gareth's tavern simultaneously.

If you talk about Isolde to Gareth however, (a personal herbalist friend of Rosalyn, that lives off-screen in the capital and is the person she visits every time she goes out of town) because that is public knowledge of Rosalyn and anyone that knows her, he'll immediately understand what you're mentioning.



To sum it up, yes, it is quite organic and elaborate, and you need to keep track of these interactions as well.

If you're ever curious about the Silverpine's dev NPC creation process, it basically involves using Pony to generate an image of the character with 'anime' semi realistic settings, then TrypoSG to create a 3D model of the character with texture (There is a github for it online that teaches you how to set it up, you'd need to install a few things using CMD if you're on windows, notably Python libraries and such, takes some fiddling especially since you need specific versioning for it to work proper, possibly also setting up a virtual machine for it) once that's done, they took front, back, and side views of the character, and reduced their resolution to a rather low number I can't quite recall.

(1 edit)

Remember that public knowledge is only knowledge known to NPCs who personally are acquainted with that NPC, so usually you want a  NPC everybody knows (that would be Gareth) to be the holder of the information, or to make your own NPC who somehow is acquainted to everybody, they don't even have to be in Silverpine either, just to 'exist' within the world of the game, so you can make it up and give it coordinates that are out of bound or something.

(1 edit)

It seems there is a slight chunking issue with the map of Orson's cabin.
To be more specific; I suspect the trees and rocks generation (which I assume might be a WFC based solution, correct me if I'm wrong) seem to be conflicting with the semi-static road generation of that map, and the overlap causes the game to be confused, and creates a bunch of blue ground tiles under the trees where that one chunk of forest tries to spawn ontop of the dirt road path, where the crossroad leading north and toward Orson's cabin is.