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

Friendly baby monsters disappear when they grow up #47145

Closed
LyleSY opened this issue Jan 31, 2021 · 21 comments · Fixed by #50377
Closed

Friendly baby monsters disappear when they grow up #47145

LyleSY opened this issue Jan 31, 2021 · 21 comments · Fixed by #50377
Labels
<Bug> This needs to be fixed Monsters Monsters both friendly and unfriendly.

Comments

@LyleSY
Copy link
Contributor

LyleSY commented Jan 31, 2021

Describe the bug

DinoMod includes tameable baby dinos that cannot be tamed when they are adults. The intention is that you can therefore have huge and dangerous dino pets, in the same way that people have pet elephants and tigers today if you put in the time and effort. However, Discord user Elizzyble reports that the baby dinos just disappear instead of growing up into adult dinos with the "friendly" tag, I'm betting because they lack the same "catfood" or whatever tag to enable it.

Steps To Reproduce

  1. Debug spawn a velociraptor egg
  2. Debug time ahead a week or two.
  3. Give the baby raptor catfood.
  4. Debug time ahead a month.
  5. Bye bye pet raptor

Expected behavior

Adult spawns with the "friendly" tag

Versions and configuration

Mods loaded: DinoMod

Additional context

Second test from same player here https://discord.com/channels/598523535169945603/598523535169945607/783899516863774720 Can't find the first report

@BrettDong BrettDong added Mods: Dinomod Anything to do with the Dinoclysm mod (DinoMod) Monsters Monsters both friendly and unfriendly. <Bug> This needs to be fixed labels Jan 31, 2021
@actual-nh
Copy link
Contributor

@Ramza13 - would #42786 be able to help with this?

@Ramza13
Copy link
Contributor

Ramza13 commented Feb 2, 2021

At present nope, there don't exist the right combination of effects and conditions to achieve that. It might be possible to add them without great effort but it feels like overkill. I'm not knowledgeable about tamed monsters but would think you'd just need to find why this works for some animals and not others and fix the gap.

Having said that monsters do store variables so it might be possible to add a more sophisticated version of this where you have to increase how much they like you over time before taming them. That would still require adding some new dialog effect/conditions but would be a task better suited to effect_on_conditions. And a way to possibly use the having a conversation with monster feature it includes.

@LyleSY
Copy link
Contributor Author

LyleSY commented Feb 28, 2021

@Venera3 did some testing to see if this issue happens with the new Dermatik system introduced in #46448 and no, those work as expected. Those have the LARVA tag, not the cattle fodder or bird seed tags, so may be handled differently

@actual-nh
Copy link
Contributor

actual-nh commented Feb 28, 2021

I've looked over the code, and I can't see how LARVA would make a difference. I suspect it's that their maturation is hardcoded in monattack.cpp as mattack::dermatik_growth, which uses poly - this likely (without being told to do otherwise) preserves relationships. Scratch that, sorry. I'm not sure why poly is actually altering friendly; it is not explicit about doing so.

@Venera3
Copy link
Member

Venera3 commented Feb 28, 2021

According to the docs, LARVA only handles if they gib or not, but MONSTER.md can be a bit obtuse. The other difference I can think of is that they get their friendliness set wt their spawn in the hardcoded effect, and I don't know how dogfood etc works under the hood.

@actual-nh
Copy link
Contributor

BTW, if they don't have an applicable *FOOD tag, how does one make them friendly?

@Venera3
Copy link
Member

Venera3 commented Feb 28, 2021

On emergence out of you they have a flat 1-in-3 chance of popping out friendly. It's a bit weird, but it works for now (I have an alternative in mind for whenever mutations catch my fancy).

@actual-nh
Copy link
Contributor

I think I just spotted a bug in the dermatik attack code:

    if( !foe->has_trait( trait_PARAIMMUNE ) || !foe->has_trait( trait_ACIDBLOOD ) ) {
        foe->add_effect( effect_dermatik, 1_turns, targeted, true );
        get_event_bus().send<event_type::dermatik_eggs_injected>( foe->getID() );
    }

Shouldn't that be a &&, not a ||?

@actual-nh
Copy link
Contributor

A couple of things:

@Venera3
Copy link
Member

Venera3 commented Mar 12, 2021

Should I put in a PR for that? Can do if you can do the testing.

Thanks, that would be nice! This week will be a bit better, devtime-wise.

@actual-nh
Copy link
Contributor

actual-nh commented Mar 12, 2021

Should I put in a PR for that? Can do if you can do the testing.

Thanks, that would be nice! This week will be a bit better, devtime-wise.

Assuming this weekend is included in "this week", I think I can manage it.

EDIT: Had a moment this morning.

@LyleSY
Copy link
Contributor Author

LyleSY commented Jun 27, 2021

Working on something else I noticed that one of the newer dinos is missing a juvenile version. That would definitely cause this issue. I'll fix once we're out of content freeze

@LyleSY
Copy link
Contributor Author

LyleSY commented Aug 1, 2021

I've been working on more testing on this and now I see different behavior. Now I just have friendly baby hatchlings forever, even after debugging a couple of years to pass.

@actual-nh
Copy link
Contributor

Are the juveniles of the species in question tameable with food?

@LyleSY
Copy link
Contributor Author

LyleSY commented Aug 1, 2021

Just replicated this with a baby chick with DinoMod disabled. Yes, many are but not all. I couldn't get any to grow up.

@LyleSY
Copy link
Contributor Author

LyleSY commented Aug 1, 2021

And replicated with a baby chick without the FRIENDLY tag.

@LyleSY
Copy link
Contributor Author

LyleSY commented Aug 1, 2021

I tried the same method suggested by mlangsdorf here #37283 and same result, still with DinoMod disabled, just working with one FRIENDLY chick and one normal. Neither upgrade into an adult chicken

@actual-nh
Copy link
Contributor

That looks like something going wrong with the grow_up code. Is zombie evolution still working right? (Currently compiling to check into #50390.)

@actual-nh actual-nh removed the Mods: Dinomod Anything to do with the Dinoclysm mod (DinoMod) label Aug 1, 2021
@LyleSY
Copy link
Contributor Author

LyleSY commented Aug 2, 2021

Oh yeah, zombies are working beautifully, same process applied to a bunch of vanilla zombies:
Screen Shot 2021-08-01 at 9 57 01 PM

@actual-nh
Copy link
Contributor

You may want to either change the title of this issue, or create another one.

@LyleSY
Copy link
Contributor Author

LyleSY commented Aug 2, 2021

Done, thanks. Keeping this alive in case the new one is fixed and this one pops up again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed Monsters Monsters both friendly and unfriendly.
Projects
None yet
5 participants