okay, double post time!!!
as promised, posting what i think i did the right way(items and recipes) and what i failed to do despite trying(adding an action that would “activate” the minion and the blob item when used).
not sure if that’s how i am supposed to do it but here:
recipe book for necromancy:
{
"type" : "BOOK",
"id" : "abdul_necro",
"name" : "Principles of Post-Mortem Mind Control",
"max_level" : 10,
"description" : "A thick book containing research notes of a mad scientist. It describes various methods of reanimating and controlling the dead. There's a lot of gory details and technical language mixed in, so it's not easy to read.",
"weight" : 2330,
"to_hit" : 0,
"color" : "black",
"intelligence" : 14,
"symbol" : "?",
"material" : ["paper", "null"],
"volume" : 5,
"bashing" : -2,
"cutting" : 0,
"time" : 120,
"fun" : -3,
"skill" : "first aid",
"price" : 20000,
"required_level" : 0
}
recipies for necromancy:
{
"type": "recipe",
"result": "control_chip",
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_TOOLS",
"skill_used": "mechanics",
"skills_required": [["electronics", 5], ["computers", 5]],
"difficulty": 6,
"time": 30000,
"reversible": true,
"decomp_learn": 7,
"autolearn": false,
"book_learn": [[ "abdul_necro", 1 ]
"tools": [
[
[ "screwdriver", -1],
[ "toolset", -1]
],
[
[ "soldering_iron", 10],
[ "toolset", 1]
]
]
"components": [
[
[ "processor", 1]
],
[
[ "RAM", 1]
],
[
[ "power_supply", 1],
[ "plut_cell", 1]
]
[
[ "cable", 2]
]
[
[ "scrap", 2]
]
},{
"type": "recipe",
"result": "blob_dormant",
"category": "CC_OTHER",
"subcategory": "CC_OTHER_TOOLS",
"skill used": "first aid",
"skills_required": [[ "electronics", 2], ["first aid", 4], ["sewing, 1"]]
"difficulty": 5,
"time": 15000,
"reversible": false,
"autolearn": false,
"book_learn": [[ "abdul_necro", 2 ]
"tools":[
[
[ "needle_bone", 30],
[ "needle_wood", 30],
[ "sewing_kit", 30]
],
[
["UPS_off", 1]
]
]
"components":
[
[ "slime_scrap", 10]
]
}
{
"type": "recipe",
"result": "revival_serum",
"category": "CC_CHEM",
"subcategory": "CSC_CHEM_OTHER",
"skill_used": "cooking",
"skills_required": [ "first_aid", 3],
"difficulty": 4
"time": 10000,
"reversible": false,
"autolearn": false,
"book_learn": [[ "abdul_necro", 3 ]
"tools":[
[
[ "chemistry_set", 25],
[ "hotplate", 25],
[ "toolset", 2],
[ "fire", -1]
],
[
[ "chemistry_set", -1]
]
[
[ "vacutainer", -1]
]
]
"components":
[
["slime_scrap", 2]
],
[
["marloss_berry", 1]
]
}
{
"type": "recipe",
"result": "minion_dormant",
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_TOOLS",
"skill_used": "first aid",
"skills_required": [[ "sewing", 6], [ "first aid", 6]],
"difficulty": 7,
"time": 120000,
"reversible": false,
"autolearn" false,
"book_learn": [[ "abdul_necro", 4 ]
"tools": [
[
[ "needle_bone", 30],
[ "needle_wood", 30],
[ "sewing_kit", 30]
],
[
[ "syringe", -1]
]
[
[ "vacutainer", -1]
]
]
"components": [
[
[ "revival_serum", 1]
],
[
[ "meat_tainted", 8],
[ "human_flesh", 8]
],
[
[ "bone", 4]
],
[
[ "blob_dormant", 1]
]
]
}
tools for necromancy:
{
"id" : "control_chip",
"type": "TOOL",
"symbol": ".",
"color": "gray",
"name": "control chip",
"description": "A small device, not bigger than a man's fist. It provides primitive organisms with electric stimulation, reviving them and forcing them to obey your commands. This version only works on blobs.",
"price": 50000,
"material": ["aluminum", "plastic"],
"weight": 100,
"volume": 0,
"bashing": 0,
"cutting": 0,
"to_hit": 0,
"initial_charges": 0,
"charges_per_use": 0,
"turns_per_charge": 0,
"ammo": "NULL",
"category" : "spare_parts",
"use_action": "NONE"
},
{
"id" : "blob_dormant",
"type": "TOOL",
"symbol": ",",
"color": "black",
"name": "dormant blob",
"description": "Several chuncks of blob scraps, stuffed with a control chip and sewn back together. A light shock from the UPS started the chip, bringing the blob back to life. Use this item to wake up the blob.",
"price": 70000,
"material": ["flesh"],
"weight": 1000,
"volume": 1,
"bashing": 0,
"cutting": 0,
"to_hit": 0,
"initial_charges": 0,
"charges_per_use": 0,
"turns_per_charge": 0,
"ammo": "NULL",
"revert_to": "null",
"use_action": "AW_BLOB"
},
{
"id" : "minion_dormant",
"type": "TOOL",
"symbol": ",",
"color": "green",
"name": "dormant minion",
"description": "Your very own undead servant. The blob controlling it's body is in a state of coma, awaiting your orders. Use this item to wake up the minion.",
"price": 600000,
"material": ["flesh"],
"weight": 10000,
"volume": 15,
"bashing": 0,
"cutting": 0,
"to_hit": 0,
"initial_charges": 0,
"charges_per_use": 0,
"turns_per_charge": 0,
"ammo": "NULL",
"revert_to": "null",
"category": "tools",
"use_action": "MINION"
}
comestible for necromancy:
{
"id": "revival_serum",
"type": "COMESTIBLE",
"name": "revival serum",
"spoils_in": 0,
"use_action": "POISON",
"stim": -50,
"container" : "flask_glass",
"comestible_type" : "MED",
"symbol" : "!",
"quench" : -100,
"heal" : -30,
"addiction_potential" : 12,
"nutrition" : -100,
"fun": -10,
"color": "green",
"description": "A potent drug, necessary when performing a revival operation on larger animals(including humans). It induces a violent allergic reactions in living organisms, so using it on yourself is a REALLY bad idea.",
"price": 100000,
"material": "null",
"container" : "flask_glass",
"weight": 1,
"volume": ,
"bashing": 0,
"cutting": 0,
"to_hit": 0,
"tool" : "syringe",
"category": "drugs",
}
failed code for minion and blob actions:
int iuse::aw_blob(player *p, item *, bool)
{
//my crappy programming skills aren't enough to code those guys from a scratch, so i copied and edited manhack's instructions to fit the blob and the minion
std::vector<point> valid; // Valid spawn locations
for (int x = p->posx - 1; x <= p->posx + 1; x++) {
for (int y = p->posy - 1; y <= p->posy + 1; y++) {
if (g->is_empty(x, y)) {
valid.push_back(point(x, y));
}
}
}
if (valid.empty()) { // No valid points!
p->add_msg_if_player(m_info, _("There is no adjacent square to release the blob in!"));
return 0;
}
int index = rng(0, valid.size() - 1);
p->moves -= 60;
monster blob(GetMType("mon_blob"), valid[index].x, valid[index].y);
if (rng(0, p->int_cur / 2) + p->skillLevel("survival") / 2 +
p->skillLevel("first_aid") < rng(0, 4)) {
//if you got the blob through crafting, it shouldn't turn hostile
p->add_msg_if_player(m_bad, _("You fuck something up and the blob turns hostile!"));
} else {
p->add_msg_if_player(_("Your blob awakes from it's slumber and surveys the area!"));
m_blob.friendly = -1;
}
g->add_zombie("mon_blob");
return 1;
}
int iuse::minion(player *p, item *, bool)
{
std::vector<point> valid; // Valid spawn locations
for (int x = p->posx - 1; x <= p->posx + 1; x++) {
for (int y = p->posy - 1; y <= p->posy + 1; y++) {
if (g->is_empty(x, y)) {
valid.push_back(point(x, y));
}
}
}
if (valid.empty()) { // No valid points!
p->add_msg_if_player(m_info, _("There is no adjacent square to release your minion in!"));
return 0;
}
int index = rng(0, valid.size() - 1);
p->moves -= 60;
monster minion(GetMType("mon_zombie"), valid[index].x, valid[index].y);
if (rng(0, p->int_cur / 2) + p->skillLevel("survival") / 2 +
p->skillLevel("first_aid") < rng(0, 4)) {
p->add_msg_if_player(m_bad, _("You fucked something up and your minion turns hostile!"));
} else {
p->add_msg_if_player(_("Your minion awakes from it's slumber and surveys the area!"));
m_zombie.friendly = -1;
}
g->add_zombie("mon_zombie");
return 1;
}