Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zombie slave (Zlave) #8213

Merged
merged 25 commits into from Jul 25, 2014

Conversation

Projects
None yet
@HuXTUS
Copy link
Contributor

commented Jul 12, 2014

Outdated information below, project changed in many things.


Feature for CANNIBAL and PSYCHOPATH traits.

If you don't like this idea, then you are a normal person, not cannibal or psychopath.

What is idea? If you watch episodes Walking Dead, thou me will understand.

zlaves

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:

  • Begin playing with CANNIBAL or PSYCHOPATH traits.
  • Search for 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.
  • Kill zombie brute
  • Use your knife on corpse. If you CANNIBAL or PSYCHOPATH, then in knife menu appear new entry:
    knife
  • Done. On the ground appears new corpse with cut hands and teeth. Wait until it revives.

After reviving zlave will follow you, but not attack.

Interact with zlave:
menu

  • You can try to swap positions with zlave (chance depend on str+dex)
  • You can tear out pheromone ball from zlave. It killed zlave, but near zombies can be friendly.
  • You can attach to zlave one bag and push to it some items (used the multidrop interface). The capacity of the bag is taken.
  • You can drop all items to ground. You can't look into bag robed on zlave, you can only drop the bag on ground with all stuff.
  • upd: new feature (not on screenshot): you can tie/untie zlave if you have short rope.
  • upd: new option (not on screenshot): you can push zlave. For example, on trap.

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:

friends

bool zlave_menu(monster *z)
{

const int cancel = 0;

This comment has been minimized.

Copy link
@BevapDin

BevapDin Jul 12, 2014

Contributor

An enumeration is usually used for this kind of constant values.

This comment has been minimized.

Copy link
@HuXTUS

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.

Copy link
@BevapDin

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.

Copy link
@HuXTUS

HuXTUS Jul 12, 2014

Author Contributor

very reasonable, thanks.

@stk2008

This comment has been minimized.

Copy link

commented Jul 12, 2014

cool maybe havid Zlaves near you limits the amount of scent you give of to :)

@HuXTUS

This comment has been minimized.

Copy link
Contributor Author

commented Jul 12, 2014

@stk2008 too cheat (and more complexity to implement) :)

@stk2008

This comment has been minimized.

Copy link

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 :)


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.

Copy link
@BevapDin

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.

Copy link
@kevingranade

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.

}
}

if (g->u_see(g->u)) {

This comment has been minimized.

Copy link
@BevapDin

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.

@Sthreeve

This comment has been minimized.

Copy link

commented Jul 12, 2014

This PR is a fantastic idea regardless of abnormalities!

@Zireael07

This comment has been minimized.

Copy link
Contributor

commented Jul 12, 2014

I love the idea too!

@@ -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.

Copy link
@kevingranade

kevingranade Jul 12, 2014

Member

else ifs in 1tbs are like:
} else if () {

@@ -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.

Copy link
@kevingranade

kevingranade Jul 12, 2014

Member

Indention for this whole block seems to be off.


if (attach_bag == choice) {

int pos = g->inv_type(_("Bag item:"), IC_ARMOR);

This comment has been minimized.

Copy link
@kevingranade

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.

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.

Copy link
@kevingranade

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.

}
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.

Copy link
@kevingranade

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++
}

g->u.moves -= 150;

int converts = 0;

This comment has been minimized.

Copy link
@kevingranade

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.

Copy link
@HuXTUS

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.

@kevingranade

This comment has been minimized.

Copy link
Member

commented Jul 12, 2014

A few issues.
This first one is a big deal.
The zlave making process should be much more difficult. Having a zombie packmule that follows you around is a huge boost, and you shouldn't get it just because you're a psychopath that can kill a brute.
I think a reasonable way to go would be to require some level of survival and first aid skill to do it, with a chance of pulping the zombie at marginal levels.

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.
To open it up to all players, perhaps check if you've crossed the guilt threshold for that zombie type, or perhaps if you've exceeded it by some amount, like double. So at some point you stop feeling guilty about killing zombies, and even later you're so jaded you see them as cattle to do with as you please. Obviously psychopaths would get a head start on this. See mondeath.cpp mdeath::guilt() for how that works.

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.

@Rivet-the-Zombie

This comment has been minimized.

Copy link
Member

commented Jul 12, 2014

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.

@stk2008

This comment has been minimized.

Copy link

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.
On 12 Jul 2014 21:24, "Angela Graves" notifications@github.com wrote:

How positively horrific!

A cool idea, though part of me insists on protesting the mutilation and
enslavement of my undead brethren.

I like this one.


Reply to this email directly or view it on GitHub
#8213 (comment)
.

@HuXTUS HuXTUS changed the title Zombie slave (Zlave) [WIP] Zombie slave (Zlave) Jul 12, 2014

@HuXTUS

This comment has been minimized.

Copy link
Contributor Author

commented Jul 13, 2014

kevingranade

zlave making process should be much more difficult
would be to require some level of survival and first aid skill to do it,
chance of pulping the zombie

stk2008

But say requires a hi survival level

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.

I'd like this to apply to all or most zombies instead of just one

Yes, concur. I was trying to avoid huge personal armies of zombies. Therefore invented a way with brute.

that way you could have a pacified zombie, or pacified brute, or pacified hulk.

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.

"pacified" effect to a monster that prevents it from attacking you instead of making a new monster type

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.

But I remember that the corpse-item has a member corpse that contains info about monster. May be we can add to his properties new field isZlave?

You could make the pheromone ball cause this effect temporally

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.

guilt threshold

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".

If you loaded them down with too much gear, they could become slowed or immobile

to avoid these thoughts, I chose a strong brute. ) Yes, good if do so, only have to rewrite part of monster processing code.

@tyrael93

This comment has been minimized.

Copy link

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.

@HuXTUS

This comment has been minimized.

Copy link
Contributor Author

commented Jul 13, 2014

Why doesn't the zombie "slave" try to kick you, headbutt you, or just throw himself at you?

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.

@VampyreLord

This comment has been minimized.

Copy link
Contributor

commented Jul 13, 2014

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?!

@HuXTUS

This comment has been minimized.

Copy link
Contributor Author

commented Jul 13, 2014

VampyreLord, please read all comments. There is discussion about all things. You can offer your own implementation.

Why you need to be a 'cannibal' or 'psychopath' to have zlaves?

not to have. to make. work in process.

Also why the extra implementation of the pheromone ball?

Tactics, usefulness zlaves, and why not?

And, only brutes?

So far, yes. Work in process.

@Izicata

This comment has been minimized.

Copy link
Contributor

commented Jul 13, 2014

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.

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.

@KA101

This comment has been minimized.

Copy link
Contributor

commented Jul 14, 2014

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.

@HuXTUS

This comment has been minimized.

Copy link
Contributor Author

commented Jul 14, 2014

So, ok. Then

the zombie "slave" doesn't try to kick you, headbutt you, or just throw himself at you

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 HuXTUS changed the title [CR] Zombie slave (Zlave) Zombie slave (Zlave) Jul 20, 2014

@HuXTUS

This comment has been minimized.

Copy link
Contributor Author

commented Jul 22, 2014

New version:

All players can do zlaves, regardless of traits. But psychopaths has no penalty to morale.

Prerequisites: good survival and first aid (>=5 and >=4).

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 survival, first aid, Int and slightly Dex. The failure affects the complexity of zombies, thus you don't have chance create zlave from brute, bio operator etc with bad skills and stats. With bad stats you can create zlaves from usual weak zombies.

Creating a zlave occurs in continuous activity, speed depends on your first aid.

New feature: push zlave. You can push him to the trap, for example.

@2birdie

This comment has been minimized.

Copy link
Contributor

commented Jul 23, 2014

So it's okay to make zombie slaves just because they're not kids?
That's silly. :P

@HuXTUS HuXTUS changed the title Zombie slave (Zlave) [READY] Zombie slave (Zlave) Jul 23, 2014

@HuXTUS

This comment has been minimized.

Copy link
Contributor Author

commented Jul 23, 2014

2birdie, 18+ ! Children only with the permission of their parents.

@KA101

This comment has been minimized.

Copy link
Contributor

commented Jul 24, 2014

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.

return;
}

const bool tolerance = p->has_trait("PSYCHOPATH") || p->skillLevel("survival") > 9;

This comment has been minimized.

Copy link
@KA101

KA101 Jul 25, 2014

Contributor

OK, PRED3 and PRED4 ought to help here. SAPIOVORE (you consider humans prey animals) should guarantee it.

if (tolerance) {

if (p->has_trait("PSYCHOPATH")) {
add_msg(m_neutral, _("There is nothing to worry."));

This comment has been minimized.

Copy link
@KA101

KA101 Jul 25, 2014

Contributor

"Meh. Saves you having to carry stuff."

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.

Copy link
@KA101

KA101 Jul 25, 2014

Contributor

"Well, it's more constructive than just chopping 'em into gooey meat..."

}
} else {

add_msg(m_bad, _("You are your own nasty for this action."));

This comment has been minimized.

Copy link
@KA101

KA101 Jul 25, 2014

Contributor

"You feel horrible for mutilating and enslaving someone's corpse."

@@ -91,6 +91,7 @@ void game::init_morale()
_("Killed Innocent"),
_("Killed Friend"),
_("Guilty about Killing"),
_("Guilty about mutilating corpse"),

This comment has been minimized.

Copy link
@KA101

KA101 Jul 25, 2014

Contributor

Mutilating Corpse needs caps here, sorry.

@@ -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.

Copy link
@KA101

KA101 Jul 25, 2014

Contributor

Yeah, I'll add that in the merge. (Or Kevin will, looks like he's got it. Thanks, Kevin!)

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.

Copy link
@KA101

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.

@kevingranade

This comment has been minimized.

Copy link
Member

commented Jul 25, 2014

Truly awesome stuff, sorry reviewing and merging is taking so long.

@HuXTUS

This comment has been minimized.

Copy link
Contributor Author

commented Jul 25, 2014

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 kevingranade merged commit e8faa8d into CleverRaven:master Jul 25, 2014

1 check passed

default This has been rescheduled for testing as the 'master' branch has been updated.

@HuXTUS HuXTUS deleted the HuXTUS:zlaves branch Jul 25, 2014

@HuXTUS

This comment has been minimized.

Copy link
Contributor Author

commented Jul 25, 2014

Hooray! but I did not have time to edit the style of texts proposed by KA101. Who will do it now?

@Lain-

This comment has been minimized.

Copy link
Contributor

commented Jul 25, 2014

@HuXTUS I believe Kevin already taken care of it in the merge.

@KA101

This comment has been minimized.

Copy link
Contributor

commented Jul 25, 2014

Yeah, he did. I was holding off in case you wanted to handle it, but wev. It's workable and that's what matters.


z->hurt(100);
z->die(z);

This comment has been minimized.

Copy link
@HuXTUS

HuXTUS Jul 25, 2014

Author Contributor

@BevapDin please look here (hurt, die).

about pull request #8332

@HuXTUS HuXTUS changed the title [READY] Zombie slave (Zlave) Zombie slave (Zlave) Jul 28, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.