Repository navigation
Village errands
A player of the Village walk can talk to its villagers. Some villagers give errands: they ask for things that the player gathers, and they pay coins for them. See Village gathering for the things.
The module is extensions/village/talk.mojo. VillageGame builds a Talk from PlayParameters.speakers, and runs it in each tick.
Walk to a villager. When the villager is within 2.2 meters, the prompt says E TALK TO and the villager's name. Press the use button: E on the keyboard, or the west button of a gamepad.
The use button gathers first. It talks only when no spot is in reach.
What the villager says shows in a panel over the prompt for SPEECH_SECONDS, 5 seconds, after the villager's name.
The villager stops for the same time and turns to face the player. Residents.hold stops a person and turns them toward a point at 4 radians a second. Their route waits for them.
A Speaker is a villager, a name and lines. A speaker can also have an Errand. An errand holds the kind of thing wanted, how many, and the coins paid. It also holds what the speaker says to ask and to thank.
ErrandState is a type with is_valid. A bare integer does not compile.
| State | The marker over the speaker's head | A word with the speaker |
|---|---|---|
OFFERED |
A gold ! that turns and bobs |
The speaker asks for the things. The errand is taken. |
TAKEN |
A silver !
|
With enough of the things in the satchel, the speaker takes them and pays. The errand is done. Without, the speaker says how many more they need. |
DONE |
None | The speaker says the next of their lines. |
A speaker with no errand says their lines, one after another. The markers are unlit, so they show in shade and in rain.
The heads-up display lists each errand that is taken and not done in the top right, such as HERBS FOR MAUD 2/5. See Village gathering.
default_speakers gives these speakers:
| Speaker | Villager | Errand | Reward |
|---|---|---|---|
| Maud | The woman by the brick house | Five herbs | 20 coins |
| Osric | The man on the trail | Three ore | 30 coins |
| Wren | The child by the pond | Six berries | 8 coins |
| Aldous | The old man by the framed cottage | Four mushrooms | 15 coins |
| Edith | The woman by the framed house | None | None |
A speaker whose villager is not in the village is left out. Two speakers of one villager are refused. An errand must want one thing or more, and not coins. Its reward must not be negative.
- An errand is given once. The speaker does not give another after it is done.
Tutorials
How-to
- Install
- Run the checks
- GPU backend
- Coverage
- Measure examples
- Add a feature
- Add a scanned building
- Write documentation
Reference
- Scene graph
- Rotations
- Cameras
- Geometry
- Geometry addons
- Lofts and clipping groups
- Sculptor
- Procedural generators
- Meshes and assets
- Lines
- Points and sprites
- Helpers
- Scene objects
- Animated objects
- Raycasting
- Curves and paths
- Animation
- Skinning
- Materials
- Node materials
- TSL functions
- Lights
- Lighting addons
- Fog
- Textures
- Renderer
- Renderer hooks and material flags
- Rasterization
- GPU backend
- Render target
- Post-processing
- GPU computation
- Compute nodes
- Progressive light map
- Gaussian splats
- Voxel global illumination
- SVG renderer
- Image files
- Image decode queue
- Model files
- More model files
- Exporters
- Scene JSON
- Windowing and controls
- C ABI and hosts
- Math
- Norm consumers
- Math addons
- Units
- Coverage tool
- Commands
- Examples
- Benchmarks
- Extensions
- Shared physics
- Physics query snapshots
- Continuous collision
- Tick force restoration
- Water
- Vegetation
- Village
- Streamline
- Animals
- Buildings
- CARLA
- Femur
- Tibia
- Fibula
- Patella
- Knee
- Muscles
- Vessels
- Lymph
- Nerves
- Integument
- Leg
- Foot
- Pelvis
- Torso
- Arm
- Hand
- Head
- Genome
- Game humanoid
- Humanoid fidelity
- Mixamo animations
- Audio-aligned game faces
- Converted assets
- Mesh quality
- Garments
- Outfits and armor
- Cloth and spring bones
- Attire estimates
- Segment inertia
Explanation
- Software rasterizer
- Scene graph as an array
- Linear color
- Normals are not colors
- Perspective correction
- Fixed-point coverage
- Per-fragment shading
- Mipmaps
- Sorted transparency
- Types and checks
- Render hooks as a trait
- Shared CPU and GPU code
- Bands and threads
- PNG structure
- Extensions beside the port
- Scans as building models
- CUDA teardown hang
- Mojo compiler hang