[WIP] Necromancy Mod

#1

Special thanks to: Jaso11111(for the idea itself) and Kevin Granade(for clearing up my messy code)
As i can’t figure out how to use github and if the change was merged with the source code or not, here are pieces of code that you probably’ll need to change to make this mod work(wall of text ahead):

  1. in iuse.cpp replace manhack’s code with this:

int iuse::minion(player *p, item *corpse, bool) { // TODO: stash these strings in the item definition so they aren't hard-coded here. std::string minion_type; std::string skill_one; std::string skill_two; std::string failure; std::string success; if( corpse->type->id == "minion_dormant" ) { minion_type = "mon_zombie"; skill_one = "survival"; skill_two = "firstaid"; failure = _("Your %s shakes uncontrollably and turns hostile!"); success = _("Your %s awakes from it's slumber and surveys the area!"); } else if ( corpse->type->id == "blob_dormant" ) { minion_type = "mon_blob"; skill_one = "survival"; skill_two = "firstaid"; failure = _("Your %s shakes uncontrollably and turns hostile!"); success = _("Your %s awakes from it's slumber and surveys the area!"); } else if ( corpse->type->id == "bot_manhack" ) { minion_type = "mon_manhack"; skill_one = "electronics"; skill_two = "computer"; failure = _("You misprogram the %s; it's hostile!"); success = _("The %s flies from your hand and surveys the area!"); } 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)); } } } monster minion( GetMType( minion_type ) ); if (valid.empty()) { // No valid points! p->add_msg_if_player( m_info, _("There is no adjacent square to release your %s in!"), minion.name().c_str() ); return 0; } int index = rng(0, valid.size() - 1); p->moves -= 60; minion.setpos( valid[index].x, valid[index].y, true ); if (rng(0, p->int_cur / 2) + p->skillLevel( skill_one) / 2 + p->skillLevel( skill_two ) < rng(0, 4)) { p->add_msg_if_player( m_bad, failure.c_str(), minion.name().c_str() ); } else { p->add_msg_if_player( m_good, success.c_str(), minion.name().c_str() ); minion.friendly = -1; } g->add_zombie( minion ); return 1; }
2. In iuse.h replace:

with:

  1. in tools.json change manhack’s use_action to "MINION"
    After that just download the mod from here: .zip]http://www.mediafire.com/download/67ptpwmkcvyl87d/Necromancy_Mod[WIP].zip (Yeah, i know the link looks weird)
    It might be buggy and it certainly is unbalanced - that’s why it’s a work in progress.
    I plan on adding new minions and other items so all advice on balancing, bug reports and suggestions are welcome.

Recent changes:
-The blobs require the control chip as intended
-The recipe for dormant blobs should now work without wasting materials

#2

:smiley:
Il begin testin right away! Its for the latest stable release right?

EDIT: Sence the creatures aren’t in yet i tested the recipes a bit.

  1. The recipe for the dormant blob “fails and wastes materials” ALOT. 10 times i tried with spawned in items and 10 times i failed.
  2. The text for the dormant blob recipe claims it needs a control chip. It does not.
#3

[quote=“Jaso11111, post:2, topic:6184”]EDIT: Sence the creatures aren’t in yet i tested the recipes a bit.

  1. The recipe for the dormant blob “fails and wastes materials” ALOT. 10 times i tried with spawned in items and 10 times i failed.
  2. The text for the dormant blob recipe claims it needs a control chip. It does not.[/quote]
    To make the creatures happen you’d have to change some lines in the source code and then compile the game(it’s A LOT of work for people with limited skills - i only managed to compile a ASCII version which i dislike .___.) - though from what little i understand, the creatures will work in the next stable/experimental(?) release. But if you manage to change the code and compile it, the monsters work. You can’t deactivate them though, so once woken, they’ll never sleep again.
    Problem number 1 - just fixed a typo in necromancy.json that might have caused this - re-download from the new link and try again :slight_smile:
    Problem number 2 - seems like i forgot to add it - it’s added now, thanks.
#4

DOUBLE POST TIME :confused:
To everyone interested: i am sorry, but for now, i’ll have to put this mod project on hold.
The reason? Although i think that, thanks to kevin granade i figured out how to add new minions, right now every addition would require compiling the game from the scratch, and i doubt many people here have the patience and skills to do that ._.
So, until the “generic minion iuse” gets added and “strings get stashed in item definition” in one of the next versions of the game, there will be no updates :confused:
Once again - i am sorry. I’ll be adding new items and recipies to .json files though, so when/if it gets added i’ll just upload loads of new creatures to revive.

#5

FYI, if we get this working well, the c++ part will go in the main game, and you’ll be able to enable the necromancer functionality as a mod, so people will not going to have to recompile to play with it.

#6

Yeah, that’s what i figured out - so for now, i’ll be adding new things to the .json and update this thread when they’ll work with the main game :slight_smile:

#7

Yeah, that’s what i figured out - so for now, i’ll be adding new things to the .json and update this thread when they’ll work with the main game :)[/quote]
Well if i can help in anyway just tell me. I love the idea of being a physically frail character, but with a army of minions to fight for you.

#8

Looks like this mod’s kill, eh? Well, just in case there has been progress made in the last handful of years, I was wondering if anybody knew how to use the revival serum. I made a dormant blob just fine, works as intended, but I have no idea what to do with the serum. Eating it would probably be a bad idea, as would injecting it, but I don’t know how to use it on anything else, such as the giant web spider corpse I just brought home. Any help would be appreciated.