Jump to content

Basic question: Populating locations with agents

Recommended Posts

I feel like I've got a decent handle on cards and status effects, both for battle and negotiation. Now I'm trying to figure out how to do quests and story content. Unsurprisingly, but still frustratingly, I'm finding it a lot more difficult.

Plaxes and locations, I'm kinda starting to get a grasp on those. Slowly. Convos, okay, I'm starting to see how the logic works. But I can't really test any of those if I can't assign agents to talk to and do stuff with, and that's what's utterly stumping me. I've looked through the Shel example, I've looked through Sal's and Rook's story quests, and I've gotten to the point where I can start my custom character's main quest and get to an empty room. But it's just not clicking for me in terms of even the simplest way to put a desired character in location. Can I just get some advice to point me in the right direction, get me started?

Link to comment
Share on other sites

There are a few ways to access a location:

cxt.location allows you to get the current location in a convo(usually the player location). TheGame:GetGameState():GetLocation(location_id) allows you to access a location by id, and is useful if you want to get a public location. Or if you have a location assigned as a cast member, you can use GetCastMember.

There are a few ways to teleport an agent.

First, if you have an agent and a location, you can directly teleport them using agent:MoveToLocation(location). This is a one-time effect that teleports the agent, but it does not guarantee the agent will stay there. If an agent need to stay in a location for quest related reasons, you can define a collect_agent_locations = function(quest, t) under the quest def, where t is a list of all agent location pairs. Usage:

collect_agent_locations = function(quest, t)
  table.insert (t, { agent = agent, location = location, role = CHARACTER_ROLES.PATRON } )

You can check conditions if an agent's location will change during the quest's lifetime.

If you want to talk to an agent, you can use the debug panels to select an agent, use the top menu to teleport the agent to you or you to the agent. You can set a quest mark on top of an agent(or location) by adding a "mark" field at a quest objective. Usage:

    id = id,
    mark = {"cast_id1", "cast_id2"},

You can also make it a function(quest, t, in_location) in case you want to use a function to set the quest mark on people or locations. t is a table of agent/locations to put the mark on(that you can edit like before) and in_location represents whether you are in a location or not(as opposed to in the travel screen, at least I think this is how it works.)

Link to comment
Share on other sites

Would there be any way to test a certain part?  What if I make one part of a story then work on the next part but then I wanted to change the first part?  Or what if I had 2 parts and wanted to test the second part would I have to go through the whole thing?

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

  • Create New...