User talk:KA101

From The Cataclysm: Dark Days Ahead Wiki
Revision as of 17:29, 25 August 2017 by Rolltide (talk | contribs) (→‎Who Hosts the server?: new section)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Hey KA101,

Can you get me a list of all the enemy flags, special abilities and death abilities and what they do? Maybe angers, fears and placates as well?

A lot of new flags and abilities have been added since the enemies were created in 0.8 and I'd like to get everything updated in one go, but I don't want to guess at what some of them do when I wright there descriptions. I tried looking for them, but couldn't find anything and I wouldn't even now where to start looking if I looked at the code directly.

--JayJayForce (talk) 06:34, 5 December 2014 (CAT)

Long discussion and explanation of various flags follow:

JSON_FLAGS.md in the /doc folder. Actual code for abilities and deaths is monattack and mondeath.cpp, respectively: src.

REGEN_## is per turn, FISHABLE means that using a fishing rod can grab one, kill it, and drop it at your feet (that's how fishing works, and yes, you can fish all the fish from a river :-( ).

ANTQUEEN lays eggs if she doesn't have anyone around to tend/feed. (Frankly we should have worker ants that do so and the queen just pumping out eggs, but wev.) SCIENCE's mouth beam has a chance to mutate you, and radiates you on failure. VORTEX also throws furniture and gear around, great mess-causer that. STARE is the floating eye's special, which either destroys anything blocking line of sight between it and you, or inflicts teleglow. PHOTOGRAPH is the eyebot thing and is currently police-only. The tankbot's 120mm is not listed. (My fault on that one, but it's not directly called in the code--only through MULTI_ROBOT.

UPS is now a passive item, so those flags can be ignored.

PICKAXE now actually digs: it's a jackhammer that takes forever and drains hunger/thirst/fatigue and adds pain, but doesn't cost gasoline. DEJAR should convert a sealed jar of X into an open container than can be eaten from, etc. ABSORBENT is the towel and can be used to remove Wet morale effects. The oxy bottle can be used to obtain 02, I'd imagine, and the atomic battery tag probably is the mod (use it to convert a device to run off plutonium cells).

Hoping that helps. KA101 (talk) 09:12, 6 December 2014 (PST)


Thanks for the response KA101!

I found monattack and mondeath.cpp after downloading the source, but they're a bit technical for me. I can't for the life of me find JSON_FLAGS.md though. I looked through the stable, experimental and source and couldn't find it anywhere. I typed it into Google though and got a fairly decent page on Github that has most of what I'm looking for. Combined with your descriptions, that should last me a while.

There are a few I just can't find though: the bio-operators' bio_op_takedown and the bloated zombies' suicide special abilities. I Googled bio_op_takedown and found only four ( now five ) results, two from the wiki and two from Github. The Github ones didn't help, but I at least got a description from them for the bloated zombies' Gas death function. I might also need a bit more description with some fungus ones, namely: fungus_big_blossom, FUNGUS_FORTIFY, FUNGUS_BRISTLE, FUNGUS_INJECT and FUNGUS_HAZE, the Github page that fungus_big_blossom brings up in Google isn't very descriptive of what some of them do.

--JayJayForce (talk) 09:53, 6 December 2014 (CAT)

I wrote the fungus ones and the bio-op takedown. Fungus ones I'll cover briefly; the bio-op has a walk-through below.

The haze releases the "fungal haze" field around a fungal blossom. Fungal haze fields transform terrain, infect, fungalize, or kill critters that breathe 'em, and rapidly convert forests, but that's handled in field.cpp.

The big_blossom has a wider range, and can/will smother fire within six tiles of itself. In practice, that tends to perpetuate fires around the perimeter and I should look into tweaking that code too.

Inject is the fungal tendril's move. It will generally try to inject you with live spores (immediate fungal infection if successful) but if you're already most of the way toward Mycus, it'll peaceably wave you toward the tower. Mycus folks get it to go friendly.

Bristle is the fungal hedgerow. It's essentially a higher-powered version of the tendril, and will be friendly to Mycus folks.

Fortify is the fungal tower. It first checks for whether you're eligible to be given the last part of the Mycus prereqs, and if so there's an option to just skip the fight and get injected with the gel. Otherwise, it rebuilds the fungal hedgerow if needed, then either spawns a fungal tendril near/on you or directly attacks with a much larger tendril that is quite likely to give a fungal infection. Won't attack Mycus folks but isn't much help for 'em either.

Here's the bio-op takedown code, line by line.

   if (rl_dist(z->posx(), z->posy(), g->u.posx, g->u.posy) > 1) {
   return;
  • 1) It has to be adjacent: if range greater than 1, the special aborts via the return, but is still "charged", so it can grab at you as soon as it gets within range.
   z->reset_special(index); // Reset timer
   add_msg(_("The %s mechanically grabs at you!"), z->name().c_str());
   z->moves -= 100;
  • 2) OK, it's gonna grab, so the special "charge" is used up. No matter what happens now, it has to wait for the special cooldown to expire before it can grab again. DDA tells you that you've been grabbed-at; the %s is a blank filled by the z->name call. And it takes the zed's full turn to do the grab, no matter what happens.
   if (g->u.uncanny_dodge()) {
       return;
   }
   // Can we dodge the attack? Uses player dodge function % chance (melee.cpp)
   int dodge_check = std::max(g->u.get_dodge() - rng(0, z->type->melee_skill), 0L);
   if (rng(0, 10000) < 10000 / (1 + (99 * exp(-.6 * dodge_check)))) {
       add_msg(_("You dodge it!"));
       g->u.practice( "dodge", z->type->melee_skill * 2 );
       g->u.ma_ondodge_effects();
       return;
   }
  • 3) These are pretty standard dodge code. If the PC has the Uncanny Dodge bionic installed and available, they'll bullet-time out of the takedown. Otherwise, dodge roll, and if it succeeds, we stop here thanks to hitting a return.
   // Yes, it has the CQC bionic. <-That's me noting how the zed can pull off a comparatively complex move by zed standards.
   body_part hit = num_bp;
   if (one_in(2)) {
       hit = bp_leg_l;
   } else {
       hit = bp_leg_r;
   }
  • 4) That's a fairly random target-picker. Half the time, kick the one leg, otherwise, kick the other.
   // Weak kick to start with, knocks you off your footing
   int dam = rng(3, 9);
   // Literally "The zombie kicks" vvvvv |  FIXME FIX message or comment why Literally.
   //~ 1$s is bodypart name in accusative, 2$d is damage value.
   add_msg(m_bad, _("The zombie kicks your %1$s for %2$d damage..."),
   body_part_name_accusative(hit).c_str(), dam);
   g->u.deal_damage( z, hit, damage_instance( DT_BASH, dam ) );
  • 5) At this point, the player has failed to dodge the attack and blocking would just give the bio-op a better handle. It's a two-part takedown; this part was the initial kick to set the player up for the slam. I'm pretty confident the FIXME has been fixed but since I didn't put it in there I don't know what the exact complaint was. May nuke it tonight. //~ in the third comment line there indicates that it's written for the translators' benefit and they will see it in their string viewer: helpful when writing strings that might not make sense for translators. The actual kick happens in the last line there: g->u specifies the player character, who is dealt damage by the bio-op z, to the leg "hit", of the bashing type, in the amount dam.
   // At this point, Judo or Tentacle Bracing can make this much less painful
   if ( !g->u.is_throw_immune()) {
       if (!g->u.has_trait("LEG_TENT_BRACE") && (g->u.footwear_factor() == 1 ||
               (g->u.footwear_factor() == .5 && one_in(2))) ) {
           if (one_in(4)) {
               hit = bp_head;
               dam = rng(9, 21); // 50% damage buff for the headshot.
               add_msg(m_bad, _("and slams you, face first, to the ground for %d damage!"), dam);
               g->u.deal_damage( z, hit, damage_instance( DT_BASH, dam ) );
           } else {
               hit = bp_torso;
               dam = rng(6, 18);
               add_msg(m_bad, _("and slams you to the ground for %d damage!"), dam);
               g->u.deal_damage( z, hit, damage_instance( DT_BASH, dam ) );
           }
           g->u.add_effect("downed", 3);
       }
  • 6) This is the usual slam. If you are using Judo or have the upgraded leg tentacles and their suckers/hooks aren't covered with footgear (I think that looks bugged though, so remind me to take a look later), you can get out of the slam or at least the knockdown. Otherwise, CRUNCH. The damage is similar to the previous kick damage, but to more serious body parts and doing more damage. Kicker is the knockdown at the end there: the effect gets deducted by one on the turn it's imposed, so you're in for up to two more rounds of punishment before you're able to respond.
   } else if (!thrown_by_judo(z, -1)) {
       // Saved by the tentacle-bracing! :)
       hit = bp_torso;
       dam = rng(3, 9);
       add_msg(m_bad, _("and slams you for %d damage!"), dam);
       g->u.deal_damage( z, hit, damage_instance( DT_BASH, dam ) );
   }
   g->u.practice( "dodge", z->type->melee_skill );

}

  • 7) This is what happens if you aren't a judoka (judo user) but, as the comment says, were saved by your tentacle-bracing. You take another hit, about the same as the initial kick, to the torso and are not knocked down. In either case, you get dodge XP even if you failed to dodge, since you rolled for it. And the function ends here with final brace closure.

And that should clear things up a little. Thanks for your work on the wiki! KA101 (talk) 19:43, 7 December 2014 (PST)


Thanks for the info! :)

Always nice to hear from a dev directly. I will study your code breakdown for bio_op takedown when I get a chance. I want to get into coding and will be taking a bridging course in January before going to Uni to learn more about it for my course (Studying Mechatronics).

If (when) I need any more help, I'll probably contact you or another dev via the forums. The wiki is way too clunky for this. Been wanting to make a account there for a while, but just been putting it off. I'm really shy IRL and that translates into being way too hesitant to create forum accounts ( and then feeling obliged to use them regularly >_< ).

I'm glad too help out with the wiki, even my sister likes watching me work, but it's nothing compared to what you devs do! Feels kind of like I'm fighting a losing game with the amount of content you guys (and gals) put up. I'm half expecting 0.C to be released just as I finish with monsters :P

--JayJayForce (talk) 19:23, 8 December 2014 (CAT)


Thanks for the hello mate! I just posted my question to Bevap now. :-) I'm also a bit new to wiki editing so tips if you got time would be great! :-) -Davek

Well I may not be KA101, I'll share what I learnt from throwing myself headlong into this:
Basic editing of a page is easy and straightforward, but you mustn't forget to put new pages into a Category and add them to any relevant Navbars or pages. I've seen plenty of such "rogue" pages without any of the relevant links. A good idea to avoid this is to look for a page that is done correctly and see which templates they use and what pages link to them.
Templates can be very important. They are used throughout the wiki, some places more than others. You should always know what each of the templates on a page does so you know where to go if there is a problem. Changing a template to suit your needs can vary from being very easy to very difficult, it all depends on what you need to change. For more complex changes, it pays to know the technical side of everything.
The biggest advice I can give you, however, is to go to MediaWiki to learn all the ins and outs. I didn't do that at the beginning, but when Kenoxite cleaned up some of my code and I saw how well he did it and the links he gave me, it made me regret not going there sooner. ( I got the spoiler knowledge from the wiki today. It might be better to search via Google than the wiki for what you want though, the wiki can have a lot of false leads come up in the search results for even a simple trick. )
JayJayForce (talk) 11:45, 17 December 2014 (PST)

JayJayForce is the wiki guy. I'm just the dev who somehow manages to be everywhere at once, and therefore got the wiki adminship. That said, most folks aren't very good at templating/categorizing their pages, so folks patrolling that would be helpful. (Most folks probably won't notice that an example page is improperly written, for that matter.  :-/ )

One thing I'd point out is that 0.B/latest stable is the baseline reference point, not the sole one. Feel free to keep the wiki updated to experimental spec if desired, but 1) make a note that it's in latest experimental, 2) there's no obligation to do so, as experimental is about as mobile a target as wikis can get. (Someone once reverted a mutation update because it wasn't that way in stable 0.A at the time. True, it wasn't, but it was gonna be in the next stable, and I have zero interest in having to go back weeks/months of development when the itch to document hits.)KA101 (talk) 17:12, 17 December 2014 (PST)

Who Hosts the server?

KA101,

We can't fix anything until we block the spam. If you have or know someone who has SSH access, please let me know. Send an email to 'ssh-access@grr.la', I can respond from my real email.

Regards, Bits