Ensuring the Palatability of Omnified Dragon’s Dogma

I had the opportunity to stream the recently Omnified Dragon’s Dogma, being fairly confident it was going to be more or less a fairly stable experience. And it definitely was!

Despite this, there were a number of things I couldn’t help but tweak in order to make sure the weirdness of the whole experience was palatable. While mostly everything was working as intended, there were just a number of small annoyances that needed to be eliminated.

The experience also planted some serious inspiration into me, which later that night helped me form some really great ideas that will be a part of something that I’ll be referring to as Omnified 2.0. That’ll be the topic of another article however; and yes, I know I’m being a big tease…

So yeah, exciting things shall be divulged at a later time. For now, let’s go over some of the changes made to make Omnified Dragon’s Dogma better.

I. Epileptic Camera

It wasn’t long before I noticed a frightening issue that had emerged due to Omnification: sometimes the camera would go incredibly spastic, bouncing back and forth from the character’s head.

This resulted in a rather jarring viewing experience, for both me and the viewers! After suffering with it for a bit, and determining the it was being caused with the Abomnification system enabled, I surmised that it was occurring due to “invisible” entities sporting bounding boxes emerging from their intended places and physically getting in the way of the camera.

This idea was further reinforced due to the fact that sometimes the character would get stuck when the camera was spazzing out and could no longer move at all. As stated in the article where we Abomnified Dragon’s Dogma, this is the first game to have so many non-player objects morphing along with the NPCs. Like wheelbarrows and stuff.

That was super cool, but clearly there were also some additional things that were morphing that we don’t want to morph. I attempted to see if there was a way to discern between a “wheelbarrow” and whatever these invisible entities were, but I ended up deeming it to be not worth the time.

So sadly, the morphing wheelbarrows had to go. The determination as to what actually morphs is made by the place at which we insert the Abomnification initiation point. The method I had it inserted into was polling the coordinates of creatures, wheelbarrows, barrels, and the invisible bad things.

So, to rectify the issue, I needed to change where we injected our hook to somewhere that truly only polled for creature coordinates. And that’s what I did. The new location, as well as the updated hook code, can be found at the end of the next section, as it also concerns the Abomnification hook.

II. Equal Morphing Rights for Female Heads

During the process of Abomnifying Dragon’s Dogma, we learned that human character models consist of a number of body parts whose scale is independent to that of the character’s general scaling parameters. We also learned that the scales of these body parts were maintained in data structures separate from that of the character’s location structure, which housed their primary scaling values.

We observed this upon the initial implementation of the Abomnification system; a character’s body would grow in size, yet its head would remain the same. This was contrary to what we observed with monster characters, whose heads would always be proportionate to the size of their bodies.

So we reverse engineered where the scaling parameters were being kept, and devised a method to be able to retrieve these data structures so we could propagate primary scaling changes to the head. And that worked just great on stream!

Except female heads still weren’t morphing. Naturally, if male heads are morphing, then it is only right that female heads also morph. I loaded up my pawn in the character editor to modify her head size while searching for changes in the code, the same method employed when reverse engineering male head scale.

I found that we can retrieve the female head scaling data structure much like we can retrieve the male head scaling data structure, except this time we would use an “indexing offset” of 0x270 to retrieve the scaling structure from the root scaling structure.

Female heads began to morph. Great. But then it was observed that arms weren’t morphing right, neither were the hands. So I spent time figuring out the indices for these body parts as well.

And then they started morphing. But then I noticed it was only the men’s parts which were morphing, so I had to do it all over again for the women!

And then at the end of all that, we started getting unwanted side effects. In particular with the arms being scaled. It basically started to turn the creatures into visual aberrations. For example, the women’s dresses would turn into balloons.

And then I discovered that the length of the arms was actually entirely dependent on the width of the character’s body. The wider the character, the tinier the arms. Modifying the specific arm scaling parameters helped alleviate it a bit, but it wasn’t worth the side effects.

Here’s the list of reverse engineered body part scaling indices, for anyone who is interested:

  • Male Head: 0x8F0
  • Female Head: 0x270
  • Male Right Arm: 0xA90
  • Male Left Arm: 0xD00
  • Female Right Arm: 0x680
  • Female Left Arm: 0x410
  • Male Right Hand: 0xC30
  • Male Left Hand: 0xEA0
  • Female Right Hand: 0x820
  • Female Left Hand: 0x5B0

But I ended up throwing all that away. Keeping things simple is sometimes (hell, often) the best way to go about things. It looks fine, in general, with the only glaring problem left being the weird tiny arms. We’ll take care of that in another section though.

We did keep the female heads though! Here is the updated code for the implementation of the Abomnification system into Dragon’s Dogma:

Updated Abomnification Initiation Hook

// Applies Abomnification scales to human heads.
// eax: A scales structure.
define(omnifyAbomnifyHeadsHook, "DDDA.exe" + 41BD49)

assert(omnifyAbomnifyHeadsHook, 8B 50 20 FF D2)
alloc(abomnifyHeads,$1000, omnifyAbomnifyHeadsHook)


  // Female head scaling structures are accessed with an offset of 0x270.
  // Male head scaling structures are accessed with an offset of 0x8F0.
  cmp ebx,0x270
  je continueAbomnifyHeads
  cmp ebx,0x8F0
  jne abomnifyHeadsOriginalCode  
  sub esp,10
  movdqu [esp],xmm0
  push eax
  // Load the location structure from the scales structure.
  mov eax,[ecx+54]
  // Load the body width scale into the head width scale.
  movss xmm0,[eax+60]
  movd [ecx+80],xmm0
  // Load the body height scale into the head height scale.
  movss xmm0,[eax+64]
  movd [ecx+84],xmm0
  // Load the body depth scale into the head depth scale.
  movss xmm0,[eax+68]
  movd [ecx+88],xmm0
  pop eax
  movdqu xmm0,[esp]
  add esp,10  
  mov edx,[eax+20]
  call edx
  jmp abomnifyHeadsReturn

  jmp abomnifyHeads

There you go. Female heads morph now too! Yay for progress!

III. Simma Down Nah Abomnification!

Damn Dragon’s Dogma Abomnification, ya’ll need to simmah down nah.

I decided, after some reflection, that the ranges of allowed scaling increases were a bit too much for me. There were a few things that annoyed me particularly:

  1. NPCs were getting so short that you wouldn’t be able to see them while talking to them. Sometimes the camera follows the NPC, but usually it does not. So a bumping up of the minimum height scale was in order.
  2. For some strange reason, the wider a character is, the shorter their arms. The range of width allowed to be returned by the Abomnification system was making far too many tiny arms for my liking, so that needed to be reduced as well.
  3. Morphing speeds were a bit too fast for my liking, so I increased the ceiling on the morph steps randomly generated for each creature.

That basically covers it. Here are the updated Abomnification external parameters I’m using for Dragon’s Dogma:

Updated Abomnification External Parameters

  dd #700

  dd #185

  dd #50
  dd #150  

At the time of writing, I have yet to publish an Abomnification detailed overview article, so I apologize if the significance of the above values is lost on the reader!

IV. Running in Circles

The final thing that irritated me was the propensity friendly NPCs had for running in circles when a medium to small distance from the player. This was undoubtedly due to the Predator system screwing with the speed, which was then screwing with the NPCs’ pathfinding.

The best resolution to this, I felt, was to reduce the overall increase the Predator system was causing to NPC movement. I lowered the base enemy speed boost a bit, but also took this as an opportunity to implement a feature I wanted in the Predator system for a while: a configurable multiplier applied to the speed boosts that can happen when the creature is in the Area of Sketchiness and/or the Area of Aggro.

We’ve got one now, and it’s called aggressionSpeedX.

Clearly, the meaning of all this might be lost on the reader as I have yet to publish a detailed overview on the Predator system. I shall do this soon I promise!

Here are the updated external parameters for the Predator system implementation:

Updated Predator External Parameters

  dd (float)1.2
  dd (float)0.8

The movement is much improved, in my opinion, with these parameters. Some circle walking still occurs, but that’s OK. Circles happen.

That’s about it! I’m very excited to play this! Make sure to catch the live gameplay on my stream at https://twitch.tv/omni! Thank you for reading.