Function: Set New Map Starting Agents: Difference between revisions

From Whiskerwood Official Wiki
Created page with "Category:Arco_Functions = Function: Set New Map Starting Agents = ''Function: Set New Map Starting Agents'' is a Project Arco function defined on the '''ArcoGameInstance''' class. It is used to register the initial set of Agents (NPCs) for a new map by passing an array of Struct: Agent Characteristics values. This function appears in Blueprints as a node with the target type '''Arco Game Instance''' and the name '''Set New Map Starting Agents'''. __TOC__ ==..."
 
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Arco_Functions]]
[[Category:Arco_Functions]]
[[Category:Agents/Whiskers]]
[[Category:Arco Game Instance Class]]
{{Arco_Function_Infobox
| name    = Set New Map Starting Agents
| class  = [[Arco Game Instance]]
| path    = /Script/ProjectArco.ArcoGameInstance::SetNewMapStartingAgents
| bpnode  = Set New Map Starting Agents
| purpose = Registers the starting Agents for a new map using an array of [[Struct: Agent Characteristics]].
| params  = <code>Context</code> (Object), <code>agents</code> (Array&lt;Agent Characteristics&gt;)
| returns = void
}}
= Function: Set New Map Starting Agents =
= Function: Set New Map Starting Agents =


''Function: Set New Map Starting Agents'' is a Project Arco function defined on the '''ArcoGameInstance''' class.   
''Function: Set New Map Starting Agents'' is a Project Arco function defined on the '''[[Arco Game Instance]]''' class.   
It is used to register the initial set of Agents (NPCs) for a new map by passing an array of [[Struct: Agent Characteristics]] values.
It is used to register the initial set of Agents (NPCs) for a new map by passing an array of [[Struct: Agent Characteristics]] values.


Line 77: Line 89:
* [[Struct: Agent Characteristics]]
* [[Struct: Agent Characteristics]]
* [[Arco Game Instance]]
* [[Arco Game Instance]]
* [[Arco Population / Agent Systems]]  <!-- create later if needed -->
 
{{Arco_Functions_Modding}}

Latest revision as of 00:24, 28 November 2025

Arco Function
Name Set New Map Starting Agents
Class Arco Game Instance
Script Path /Script/ProjectArco.ArcoGameInstance::SetNewMapStartingAgents
Blueprint Node Set New Map Starting Agents
Purpose Registers the starting Agents for a new map using an array of Struct: Agent Characteristics.
Parameters Context (Object), agents (Array<Agent Characteristics>)
Returns void



Function: Set New Map Starting Agents

Function: Set New Map Starting Agents is a Project Arco function defined on the Arco Game Instance class. It is used to register the initial set of Agents (NPCs) for a new map by passing an array of Struct: Agent Characteristics values.

This function appears in Blueprints as a node with the target type Arco Game Instance and the name Set New Map Starting Agents.

Overview

When invoked, Set New Map Starting Agents takes an array of Struct: Agent Characteristics definitions and uses them to configure the starting population for a new map or game state.

The function does not return a value; it performs internal setup inside the Arco Framework.

The exact spawning timing and internal storage are handled by the ArcoGameInstance and related systems.

Definition

The function is defined on:

/Script/ProjectArco.ArcoGameInstance::SetNewMapStartingAgents

In Blueprint, it appears as a standard Call Function node with:

  • Exec input: execute
  • Exec output: then
  • Target: Arco Game Instance
  • Parameters: Context, agents

Parameters

Pin / Parameter Type Description
Context Object Reference World or game context object. In most Blueprint usage this can safely be set to Self (the calling object), or another valid UObject associated with the current world.
agents Array<Struct: Agent Characteristics> Array of agent definitions used as the starting population for the new map.

The self / Target pin is automatically set to the default ArcoGameInstance object and is usually not modified.

Blueprint Usage

A typical Blueprint setup looks like:

  1. Create one or more Make Agent Characteristics nodes to define starting agents.
  2. Collect those structs into an Array variable of type Agent Characteristics.
  3. Call Set New Map Starting Agents:
    • Context → plug in Self (or another relevant UObject).
    • agents → plug in the array variable containing your agent definitions.

Example (high-level):

Make Agent Characteristics      Make Agent Characteristics
 ├ agentName = "Marlo"          ├ agentName = "Rini"
 ├ traits   = { "rude" }        ├ traits   = { "swift" }

      ↓ (added to array variable: StartingAgents)

Set New Map Starting Agents
 ├ Context = Self
 └ agents  = StartingAgents

Interaction with Agent Characteristics

This function expects the agents array to be composed of fully-formed Struct: Agent Characteristics values. Each entry can control:

  • Movement and productivity (speed, productivity, carry capacity)
  • Traits (via the traits set)
  • Guild and education status
  • Appearance (skin color, portrait, scale)
  • Various behavior and expectation modifiers

How and when these definitions are turned into active in-world Agents is handled internally by the Arco Framework.

Related


Whiskerwood Modding
Primary Pages: Modding Main Page · Getting Started · Unreal Engine Resource Links
Mod API: Mod API Properties · Mod API Functions
Arco: Arco Structs · Arco Functions · Arco Properties · Arco Enums · Arco Classes
Arco Functions
Function
Function: Set New Map Starting Agents