missions/readme.md

134 lines
3.1 KiB
Markdown
Raw Normal View History

2018-05-17 09:48:43 +02:00
Minetest mission mod (missions)
======
Minetest mod for in-game mission creation
2018-05-28 10:12:13 +02:00
Adds blocks to create missions with rewards, timeout and penalties
2018-05-17 09:48:43 +02:00
2018-05-17 10:43:42 +02:00
* Github: [https://github.com/thomasrudin-mt/missions](https://github.com/thomasrudin-mt/missions)
2018-05-17 11:08:19 +02:00
* Forum Topic: [https://forum.minetest.net/viewtopic.php?f=9&t=20125](https://forum.minetest.net/viewtopic.php?f=9&t=20125)
2018-05-17 10:43:42 +02:00
2018-05-28 10:12:13 +02:00
Supported missions:
* Transport (to mission-chest)
* Craft
* Build
* Dig
2018-05-17 09:48:43 +02:00
# Install
* Unzip/Clone it to your worldmods folder
# Blocks
2018-05-17 10:43:42 +02:00
The blocks have no recipe because they should be used by a admin or creative-player.
The nature of the mission-reward could be abused for cheating if a survival-player could craft it.
2018-05-17 09:48:43 +02:00
## Mission-chest (missions:chest)
2018-05-17 10:43:42 +02:00
The mission chest acts as a target for transport-missions. The book in the right-click menu is used as a reference to it (placed in the transport block menu)
2018-05-17 09:48:43 +02:00
# Mission-types
## Transport (missions:transport)
2018-05-17 10:43:42 +02:00
A simple transport mission, in which blocks/items must be place in the target chest (displayed in hud, if started)
This block can be configured only by its owner:
2018-05-28 10:12:13 +02:00
* **Target**: The target mission-chest (book-reference)
2018-05-17 10:43:42 +02:00
* **Time**: Time for the mission in seconds
* **Reward**: Block/Items rewards if the mission is completed
* **Transport**: Blocks/items to transport/craft. All items must be placed in the **to**-chest for mission completion
XP mod fields (for xp_redo, if enabled)
* **XP-Reward** amount of xp to reward on completion
* **XP-Penalty** amount of xp to take away if the mission fails (timeout) must be positive
Buttons:
* **Save** Saves the configuration
* **Start** Starts the mission for the player
2018-05-28 10:12:13 +02:00
## Build
Build nodes
## Dig
Dig nodes/items
## Craft
2018-05-17 09:48:43 +02:00
2018-05-28 10:12:13 +02:00
Craft items
2018-05-17 09:48:43 +02:00
# Depends
* default
2018-05-17 10:50:54 +02:00
* [xp-redo](https://github.com/thomasrudin-mt/xp_redo)?
2018-05-17 09:48:43 +02:00
# Screenshots
## Mission-blocks (chest and mission-types)
![](screenshots/Minetest_2018-05-17-09-18-20.png?raw=true)
Note: **Android screenshot**
## Mission chest with book as reference
![](screenshots/Minetest_2018-05-17-09-18-38.png?raw=true)
## Example transport mission configuration
2018-05-28 10:22:40 +02:00
![](screenshots/Minetest_2018-05-28-10-12-59.png?raw=true)
2018-05-17 09:48:43 +02:00
2018-05-17 10:43:42 +02:00
## Running transport mission
![](screenshots/Minetest_2018-05-17-10-28-35.png?raw=true)
2018-05-28 10:22:40 +02:00
## Running dig-mission
![](screenshots/Minetest_2018-05-28-10-13-28.png?raw=true)
2018-05-17 10:43:42 +02:00
# Lua api
2018-05-17 10:50:54 +02:00
## misssions.start_mission(player, missionSpec)
```lua
missionSpec = {
name = "Mission name",
2018-05-28 09:04:34 +02:00
type = "transport", -- "build", "craft", "dig"
2018-06-29 14:36:01 +02:00
time = 300, -- seconds
cooldown = 600, -- seconds between same mission (name), optional
2018-05-17 10:50:54 +02:00
xp = { -- optional
reward = 100,
penalty = 50
},
reward = {
"default:stone 50"
},
2018-05-28 09:04:34 +02:00
-- build, craft, dig, transport mission
context = {
list: {
"default:stone 10"
}
2018-05-17 10:50:54 +02:00
},
2018-05-28 09:04:34 +02:00
-- transport mission
2018-05-17 10:50:54 +02:00
target = {
x = 100,
y = 200,
z = 300,
title = "Town chest"
}
}
```
2018-05-17 10:43:42 +02:00
2018-05-17 09:48:43 +02:00
# Pull requests / bugs
I'm happy for any bug reports or pull requests (code and textures)
# TODO / Ideas
2018-05-28 10:12:13 +02:00
* Kill mission
* Goto mission
* Walk mission
2018-05-17 10:43:42 +02:00
* Display current missions in sfinv/unified inv
* Mission stats / export
2018-05-17 09:48:43 +02:00
* Persist missions across server-restart (player:set_attribute)
2018-05-17 10:43:42 +02:00
* HUD improvements