Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upZombie slave (Zlave) #8213
Conversation
HuXTUS
added some commits
Jul 12, 2014
BevapDin
reviewed
Jul 12, 2014
| bool zlave_menu(monster *z) | ||
| { | ||
|
|
||
| const int cancel = 0; |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
HuXTUS
Jul 12, 2014
Author
Contributor
Not understood about enumeration. ) Can you give example?
I use patterns from sources, like this:
int iuse::knife(player *p, item *it, bool t)
...
const int cut_fabric = 0;
const int carve_writing = 1;
const int cauterize = 2;
const int cancel = 4;
This comment has been minimized.
This comment has been minimized.
BevapDin
Jul 12, 2014
Contributor
I saw that pattern just now. Enumerations would work in this case like:
enum choices {
cut_fabric,
carve_writing,
cauterize,
cancel,
};
The entries there are basically seen as const int, but it makes clear that only one of them can be used and that the numeric values of them have no meaning (the code would work just fine with cut_fabric=456 and cancel=298944).
And just to be clear: it does not have to be an enum, it works just fine in its current state.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
stk2008
commented
Jul 12, 2014
|
cool maybe havid Zlaves near you limits the amount of scent you give of to :) |
This comment has been minimized.
This comment has been minimized.
|
@stk2008 too cheat (and more complexity to implement) :) |
This comment has been minimized.
This comment has been minimized.
stk2008
commented
Jul 12, 2014
|
fair enough :p cool feature though could be handy and I am all ways up for seeing more features to this all ready great game :) |
BevapDin
reviewed
Jul 12, 2014
|
|
||
| z->add_effect("has_bag", 1, 1, true); | ||
|
|
||
| add_msg(_("You're wore the %s on your zlave."), it->display_name().c_str()); |
This comment has been minimized.
This comment has been minimized.
BevapDin
Jul 12, 2014
Contributor
I think the item pointer is invalid here, as it gets removed from the inventory (i_rem(pos)). The reference that u.i_at(pos) returned is most likely invalidated here. Strangely it works.
This comment has been minimized.
This comment has been minimized.
kevingranade
Jul 12, 2014
Member
Yea, you can frequently get away with using pointers immediately after they've been invalidated, because nothing has had a chance to overwrite them yet. Two things I would suggest, set it = NULL immediately before or after calling g->u.i_rem(), and move the message somewhere before the removal.
BevapDin
reviewed
Jul 12, 2014
| } | ||
| } | ||
|
|
||
| if (g->u_see(g->u)) { |
This comment has been minimized.
This comment has been minimized.
BevapDin
Jul 12, 2014
Contributor
That means "does the player see the player?", usually true, except when the player is blind, and even than it returns true as the player can apparently always see the spot the player is on.
Make love, not zlave.
That's gone be my personal motto.
If you don't like this idea, then you are a normal person, not cannibal or psychopath.
Well, seems I'm not a normal person, because I like this PR.
This comment has been minimized.
This comment has been minimized.
Sthreeve
commented
Jul 12, 2014
|
This PR is a fantastic idea regardless of abnormalities! |
This comment has been minimized.
This comment has been minimized.
|
I love the idea too! |
kevingranade
reviewed
Jul 12, 2014
| @@ -6264,7 +6314,12 @@ int iuse::knife(player *p, item *it, bool t) | |||
| pos = g->inv(_("Chop up what?")); | |||
| } else if (choice == carve_writing) { | |||
| pos = g->inv(_("Carve writing on what?")); | |||
| } else { | |||
| } | |||
This comment has been minimized.
This comment has been minimized.
kevingranade
reviewed
Jul 12, 2014
| @@ -8461,6 +8656,20 @@ void game::examine(int examx, int examy) | |||
| Pickup::pick_up(examx, examy, 0); | |||
| } | |||
| } | |||
|
|
|||
| if (critter_at(examx, examy) != NULL) | |||
This comment has been minimized.
This comment has been minimized.
kevingranade
reviewed
Jul 12, 2014
|
|
||
| if (attach_bag == choice) { | ||
|
|
||
| int pos = g->inv_type(_("Bag item:"), IC_ARMOR); |
This comment has been minimized.
This comment has been minimized.
kevingranade
Jul 12, 2014
Member
You need to handle the "no item selected" case and bail out before calling i_at() with a bad pos value.
kevingranade
reviewed
Jul 12, 2014
| std::vector<item> result = g->multidrop(dropped_worn, dummy); | ||
| result.insert(result.end(), dropped_worn.begin(), dropped_worn.end()); | ||
|
|
||
| add_msg(_("Are you trying to push things in a zlave bag.")); |
This comment has been minimized.
This comment has been minimized.
kevingranade
Jul 12, 2014
Member
I think you're trying to say, "You try to push some things into a zlave bag.".
I'd drop the "try", just say, "You push some things into the zlave bag.". If any of them fail they'll get the message about it.
kevingranade
reviewed
Jul 12, 2014
| } | ||
| monster &critter = g->zombie(mondex); | ||
| if (critter.type->in_species("ZOMBIE") && critter.friendly == 0 && rng(0, 800) > critter.hp) { | ||
| converts++; |
This comment has been minimized.
This comment has been minimized.
kevingranade
Jul 12, 2014
Member
You can check whether the player can see the zombies being converted here:
if( g->u_see( x, y ) ) {
converts++
}
kevingranade
reviewed
Jul 12, 2014
|
|
||
| g->u.moves -= 150; | ||
|
|
||
| int converts = 0; |
This comment has been minimized.
This comment has been minimized.
kevingranade
Jul 12, 2014
Member
It looks like this is a copy of the code from iuse.cpp in iuse::pheremone().
Instead of copying it, just call it:
item ball("pheromone");
iuse pheromone;
pheromone.pheremone( &(g->u), &ball, true );
While you're at it, you might want to fix the issue BevapDin pointed out, since that problem exists there.
This comment has been minimized.
This comment has been minimized.
HuXTUS
Jul 12, 2014
Author
Contributor
Yes, copy-paste. But I increased radius 4 -> 5 and power rng( 0, 500 ) -> rng(0, 800). Because this pheromone is fresh. )
Discussion is welcomed.
This comment has been minimized.
This comment has been minimized.
|
A few issues. I'd like this to apply to all or most zombies instead of just one, you could add a "pacified" effect to a monster that prevents it from attacking you instead of making a new monster type, that way you could have a pacified zombie, or pacified brute, or pacified hulk. You could make the pheromone ball cause this effect temporally, I never liked the way it makes zombies into allies, but it would make more sense if it pacified them. This one needs to be addressed one way or the other before we land this, because if we land it we start having zlaves in people's savegames, and if we change how it works after that we have to do something about it in the save/load logic. Speaking of saving, there's a technical issue with saving/loading monsters. I haven't checked, but I'm pretty sure if you get too far away from your zlaves, they'll get unloaded, which will clear their effects and destroy their inventories. This isn't your fault, it's more in my ballpark, but I needed to mention it. It probably even happens if you go up or down stairs. These issues are optional, this can get merged without necessarily addressing them. Can always add these on later. This would also allow them to have different stats, both speed and strength. If you loaded them down with too much gear, they could become slowed or immobile, which would provide incentive to get bigger better packmules. |
This comment has been minimized.
This comment has been minimized.
|
How positively horrific! A cool idea, even though part of me insists on protesting the mutilation and enslavement of my undead brethren. I like this one. |
This comment has been minimized.
This comment has been minimized.
stk2008
commented
Jul 12, 2014
|
It would be cool to have it open to all profession types. But say requires a hi survival level or some other combination.
|
HuXTUS
changed the title
Zombie slave (Zlave)
[WIP] Zombie slave (Zlave)
Jul 12, 2014
This comment has been minimized.
This comment has been minimized.
|
kevingranade
stk2008
I thought about it. Also about increasing (practice) in first aid and survival when making zlave. But this is a very simple operation: even I (in real life) can cut off the hand and torn apart the jaw. Zombie can't die from bleeding, thus it is not necessary to be a surgeon. But I agree with you for the game would be better if we do it your way. Let it be so, needed discuss about prerequisites to making zlave and chances of failure.
Yes, concur. I was trying to avoid huge personal armies of zombies. Therefore invented a way with brute.
Good, good, good. Just need to find a balance, not to have zlaves too much. On the other hand, why not... there is no reason to deprive the player of such a possibility. In addition to follow a bunch of zombies is not very convenient, especially if they carry your valuables.
neutralized or harmless or zlave may be (my english not ok)? Zlave is a zombie without hands/jaw, but he is still trying thee to devour. And about implementation: first we have just a corpse, corpses did have an effects (I now can not check)? We must do something with corpse, then zombie revives he must have specified effects. For this reason I made a special type of monster - he revive with needed properties.
Temporary slave? I want to cut zombie hands and hold them forever! ) And if zlave turns to friendly, then other zombies will attack them, and zlave will attack them and run from you.
Idea: how about (among other prerequisites) do making zlave only in good (or very bad?) mood? If not psychopath, player can say "I can't do it, it is too horrible".
to avoid these thoughts, I chose a strong brute. ) Yes, good if do so, only have to rewrite part of monster processing code. |
This comment has been minimized.
This comment has been minimized.
tyrael93
commented
Jul 13, 2014
|
Why doesn't the zombie "slave" try to kick you, headbutt you, or just throw himself at you? We've seen crawling zombies, so the fact that he's just staying there quietly doing nothing really seems stupid. |
This comment has been minimized.
This comment has been minimized.
the vestibular system is poorly developed, he afraid balance to lose. Zombies don't want to hurt you, he wants to eat you, there need only the hands and teeth. |
This comment has been minimized.
This comment has been minimized.
|
Why you need to be a 'cannibal' or 'psychopath' to have zlaves? It doesn't make sense. Also why the extra implementation of the pheromone ball? Seems unnecessary. And, only brutes? What the heck?! |
This comment has been minimized.
This comment has been minimized.
|
VampyreLord, please read all comments. There is discussion about all things. You can offer your own implementation.
not to have. to make. work in process.
Tactics, usefulness zlaves, and why not?
So far, yes. Work in process. |
This comment has been minimized.
This comment has been minimized.
Actually, Cataclysm zombies do just want to kill you. They don't want to eat you, they want to kill you so that the goo can hijack your dead body and make you a zombie. |
This comment has been minimized.
This comment has been minimized.
|
Given how often we disagree, if I say Izicata's right about something, xe probably is. And Izicata's right about the zeds' motivation. These ain't brain-eaters. They're those blobs moving around in Critter suits. If you're dead, they can and will reanimate your corpse. |
This comment has been minimized.
This comment has been minimized.
|
So, ok. Then
because all zombies in DDA have not ability to kicking and headbutting. Yes, he can throw himself at you, but you already can stand on your tile without problems. Or can you think of a reason itself for this. I do not believe that the detailed zombie-karate is what you need. |
HuXTUS
added some commits
Jul 19, 2014
HuXTUS
changed the title
[CR] Zombie slave (Zlave)
Zombie slave (Zlave)
Jul 20, 2014
This comment has been minimized.
This comment has been minimized.
|
New version: All players can do zlaves, regardless of traits. But psychopaths has no penalty to morale. Prerequisites: good Zlave may be made of any zombie type include Hulks, but exclude child (censorship). You can't create zlave with bad morale. And creating zlaves most decreases your morale (if you are not psychopath, or you not very good at survival). Chance of success depends on your Creating a zlave occurs in continuous activity, speed depends on your New feature: push zlave. You can push him to the trap, for example. |
This comment has been minimized.
This comment has been minimized.
|
So it's okay to make zombie slaves just because they're not kids? |
HuXTUS
changed the title
Zombie slave (Zlave)
[READY] Zombie slave (Zlave)
Jul 23, 2014
This comment has been minimized.
This comment has been minimized.
|
2birdie, 18+ ! Children only with the permission of their parents. |
This comment has been minimized.
This comment has been minimized.
|
OK, notice & comment period before I pull this for merge-testing. Any objections or change requests, get 'em in before 9 PM US Eastern, 24 April. |
KA101
reviewed
Jul 25, 2014
| return; | ||
| } | ||
|
|
||
| const bool tolerance = p->has_trait("PSYCHOPATH") || p->skillLevel("survival") > 9; |
This comment has been minimized.
This comment has been minimized.
KA101
Jul 25, 2014
Contributor
OK, PRED3 and PRED4 ought to help here. SAPIOVORE (you consider humans prey animals) should guarantee it.
KA101
reviewed
Jul 25, 2014
| if (tolerance) { | ||
|
|
||
| if (p->has_trait("PSYCHOPATH")) { | ||
| add_msg(m_neutral, _("There is nothing to worry.")); |
This comment has been minimized.
This comment has been minimized.
KA101
reviewed
Jul 25, 2014
| if (p->has_trait("PSYCHOPATH")) { | ||
| add_msg(m_neutral, _("There is nothing to worry.")); | ||
| } else { | ||
| add_msg(m_neutral, _("Ready for anything in order to survive.")); |
This comment has been minimized.
This comment has been minimized.
KA101
Jul 25, 2014
Contributor
"Well, it's more constructive than just chopping 'em into gooey meat..."
KA101
reviewed
Jul 25, 2014
| } | ||
| } else { | ||
|
|
||
| add_msg(m_bad, _("You are your own nasty for this action.")); |
This comment has been minimized.
This comment has been minimized.
KA101
reviewed
Jul 25, 2014
| @@ -91,6 +91,7 @@ void game::init_morale() | |||
| _("Killed Innocent"), | |||
| _("Killed Friend"), | |||
| _("Guilty about Killing"), | |||
| _("Guilty about mutilating corpse"), | |||
This comment has been minimized.
This comment has been minimized.
KA101
reviewed
Jul 25, 2014
| @@ -42,7 +42,8 @@ const std::string &player_activity::get_stop_phrase() const { | |||
| _(" Stop pumping gas?"), _(" Stop training?"), | |||
| _(" Stop waiting?"), _(" Stop using first aid?"), | |||
| _(" Stop fishing?"), _(" Stop mining?"), | |||
| _(" Stop smashing?") | |||
| _(" Stop smashing?"), _(" "), //todo: missed text for ACT_VIBE. No required? | |||
This comment has been minimized.
This comment has been minimized.
KA101
Jul 25, 2014
Contributor
Yeah, I'll add that in the merge. (Or Kevin will, looks like he's got it. Thanks, Kevin!)
KA101
reviewed
Jul 25, 2014
| if (!one_in(g->u.str_cur)) { | ||
| add_msg(_("You pushed the zlave.")); | ||
| } else { | ||
| add_msg(_("You pushed the zlave, but he resisted.")); |
This comment has been minimized.
This comment has been minimized.
KA101
Jul 25, 2014
Contributor
it resisted. We don't specifically gender zeds; clothing is generally considered indicative but that's generated when you drop the zed, and not otherwise tracked.
This comment has been minimized.
This comment has been minimized.
|
Truly awesome stuff, sorry reviewing and merging is taking so long. |
This comment has been minimized.
This comment has been minimized.
|
The main thing that turned out well in the end. Patience and diligence rewarded. (I hope Google Translate does not distort the meaning of). |
kevingranade
merged commit e8faa8d
into
CleverRaven:master
Jul 25, 2014
1 check passed
HuXTUS
deleted the
HuXTUS:zlaves
branch
Jul 25, 2014
This comment has been minimized.
This comment has been minimized.
|
Hooray! but I did not have time to edit the style of texts proposed by KA101. Who will do it now? |
This comment has been minimized.
This comment has been minimized.
|
@HuXTUS I believe Kevin already taken care of it in the merge. |
This comment has been minimized.
This comment has been minimized.
|
Yeah, he did. I was holding off in case you wanted to handle it, but wev. It's workable and that's what matters. |
HuXTUS
reviewed
Jul 25, 2014
|
|
||
| z->hurt(100); | ||
| z->die(z); | ||
|
|
HuXTUS commentedJul 12, 2014
Outdated information below, project changed in many things.
Feature for
CANNIBALandPSYCHOPATHtraits.What is idea? If you watch episodes Walking Dead, thou me will understand.
Zlave is a zombie with cutted hands and teeth. He can not grab you, bash you and bite you.
So, I think, only cannibals and psychopaths can do same with corpses.
Gameplay:
CANNIBALorPSYCHOPATHtraits.zombie brute. Why only zombie brute. Its discutable, well brute's are strong and fast and has many pheromone (read next about it). To be honest, the whole thing in balance.zombie bruteCANNIBALorPSYCHOPATH, then in knife menu appear new entry:After reviving zlave will follow you, but not attack.
Interact with zlave:

str+dex)Well, this feature increased coolness of cannibals and psychopaths, and roleplaying of DDA - more features of surviving in the post-apocalyptic zombie world.
Me and my new three f(r)iends goes to liquor store: