.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 3: The Awakening

Reply
 
Thread Tools Display Modes
  #11  
Old February 20th, 2011, 09:23 AM
Edi's Avatar

Edi Edi is offline
National Security Advisor
 
Join Date: Oct 2003
Location: Helsinki, Finland
Posts: 5,425
Thanks: 174
Thanked 695 Times in 267 Posts
Edi is on a distinguished road
Default Re: Question about Bless bonuses...

If the wiki only lists base stats of the units, and it likely does, it would need some way of calculating the protection and other things. Aside from looking in-game, the Dom3 DB is the closest thing, since it uses base tables to calculate how a unit actually looks like, so it is not off by a whole lot even in the case of protection. The other formulas there are exact.

The DB can also be modified to match a mod by making a copy and then switching base table values to match a mod and look at the final result.
Reply With Quote
  #12  
Old February 20th, 2011, 11:13 AM
Soyweiser's Avatar

Soyweiser Soyweiser is offline
Colonel
 
Join Date: Nov 2008
Posts: 1,735
Thanks: 272
Thanked 120 Times in 93 Posts
Soyweiser is on a distinguished road
Default Re: Question about Bless bonuses...

Quote:
Originally Posted by thejeff View Post
Yeah, that's a useful solution. Rather than suggest a fairly minor tweak to the existing tool, I should get the base data, duplicate all the work that went into setting up the wiki and put up a competing one?
Yeah, that is what I meant. Using the edit button on the wiki is VERBOTEN. Duplicating it the only way. It is impossible to help on the wiki. That would beat the purpose of the wiki of course.

Ps: it came to my attention that the armor/weapon data hasn't been uploaded to the wiki database yet. So, I have asked Lch what I can do to help. If Wolfsbane also acquires the database schema from Lch, we can do some more work on this. Perhaps even add the cap only units to the nation lists. (Else, that will have to be done by hand).

But that also has a problem, protection is reasonably hard to determine. It uses some algorithms which are not entirely understood (by me at least, don't know if the information on the wiki is correct, have not looked at it this year.). And then you have base prot, body prot and head prot. But I'm sure that using the information in the Helpful Dom3 DB and the wiki will make it easy to do.

Edit: looked at the protection page. Well, that will not be to hard to implement. Of course there is the problem of having two pieces of body armor, but I don't know if there are base units that have this.
__________________
I'm acting like a high school girl /\
Bookmark these links:
http://dom3.servegame.com/wiki/
http://wolfsbane.alwaysdata.net/Spells.html
Test stuff, use the debug mod:
http://forum.shrapnelgames.com/showthread.php?t=36453
Reply With Quote
  #13  
Old February 20th, 2011, 11:17 AM

earwicker7 earwicker7 is offline
Sergeant
 
Join Date: Sep 2010
Location: Burbank, CA
Posts: 317
Thanks: 1
Thanked 5 Times in 3 Posts
earwicker7 is on a distinguished road
Default Re: Question about Bless bonuses...

Quote:
Originally Posted by thejeff View Post
I understand why it is that way, but it is terribly misleading. If you know the game well, you'll see that the stats are wrong and figure out why, but if you're new you probably won't even think about it.
Exactly... now that I know what I'm looking at, it makes total sense, but I just accepted (off the top of my head) that what was on there would be the same thing I would get if I right-clicked the unit (it isn't).
Reply With Quote
  #14  
Old February 20th, 2011, 11:34 AM

thejeff thejeff is offline
General
 
Join Date: Apr 2005
Posts: 3,327
Thanks: 4
Thanked 133 Times in 117 Posts
thejeff is on a distinguished road
Default Re: Question about Bless bonuses...

Quote:
Originally Posted by Soyweiser View Post
Quote:
Originally Posted by thejeff View Post
Yeah, that's a useful solution. Rather than suggest a fairly minor tweak to the existing tool, I should get the base data, duplicate all the work that went into setting up the wiki and put up a competing one?
Yeah, that is what I meant. Using the edit button on the wiki is VERBOTEN. Duplicating it the only way. It is impossible to help on the wiki. That would beat the purpose of the wiki of course.
Well, it was what you suggested. Unless one of us misunderstands the nature of this wiki. Of course, you could edit any individual units protection stat, but that would be a huge project, since you'd have to change every unit's page. I thought the wiki (at least the units part of it) was auto-generated from the data dump. It would be far easier to tweak the generating code than to edit each unit.
Granted, once done, that wouldn't have to be a competing site.
Reply With Quote
  #15  
Old February 20th, 2011, 11:37 AM

iRFNA iRFNA is offline
Second Lieutenant
 
Join Date: Apr 2008
Posts: 533
Thanks: 2
Thanked 18 Times in 14 Posts
iRFNA is on a distinguished road
Default Re: Question about Bless bonuses...

The armor calc equation appears to be this, for what it's worth:

Code:
  v3 = sub_506D90(a1, 1); //get overall protection, still dunno head/body mechanics
  v4 = sub_506BF0(a1); //get natural protection
  v5 = (signed int)((unsigned __int64)(1717986919i64 * ((40 - v3) * v4 + 20)) >> 32) >> 4;
  v6 = (signed int)((unsigned __int64)(1717986919i64 * ((40 - v3) * v4 + 20)) >> 32) >> 4;
  result = 40;
  v2 = ((unsigned int)v6 >> 31) + v5 + v3;
  if ( v2 < 40 )
    result = v2;
  return result;
I guess there's a couple other possibilities, here they are:

Code:
  v3 = 2 * sub_506D90(a1, 2); //this and the following 2 lines appear to be calc for head/body/extra prot from bracerish stuff?
  v4 = sub_506D90(a1, 3) + v3;
  v5 = (v4 + sub_506D90(a1, 4)) / 4;
  v6 = sub_506BF0(a1); //get natural prot again
  v7 = (signed int)((unsigned __int64)(1717986919i64 * ((40 - v5) * v6 + 20)) >> 32) >> 4;
  v8 = (signed int)((unsigned __int64)(1717986919i64 * ((40 - v5) * v6 + 20)) >> 32) >> 4;
  result = 40;
  v2 = ((unsigned int)v8 >> 31) + v7 + v5;
  if ( v2 < 40 )
    result = v2;
  return result;
and this one, but it appears to mostly be dealing with a faulty unit index?

Code:
  v1 = 0;
  v8 = 0;
  if ( a1 < 0 )
  {
    result = 0;
  }
  else
  {
    sub_49DFA0(a1 >= 140000, "getprot: bad unr");
    sub_4478E0(a1);
    v2 = 1;
    do
    {
      if ( v2 != 1
        || (v3 = word_1189550[46 * a1], v3 >= 0)
        && !(dword_536228[50 * v3] & 0x10000000)
        && ((v4 = sub_4DFF00(a1, 182, 0), !v4) || BYTE1(v4) & 1 || v4 & 0x80 && !(dword_1189540[23 * a1] & 0x80000000)) )
      {
        v5 = sub_506D90(a1, v2);
        if ( v2 == 2 )
        {
          v1 += 2 * v5;
          v8 += v2;
        }
        else
        {
          v1 += v5;
          ++v8;
        }
      }
      ++v2;
    }
    while ( v2 <= 4 );
    v6 = ((40 - v1 / v8) * sub_506BF0(a1) + 20) / 40 + v1 / v8;
    if ( v6 < 40 )
      result = v6;
    else
      result = 40;
  }
  return result;
This isn't against the rules or anything, is it?

Last edited by iRFNA; February 20th, 2011 at 11:47 AM..
Reply With Quote
The Following User Says Thank You to iRFNA For This Useful Post:
  #16  
Old February 20th, 2011, 11:41 AM
Soyweiser's Avatar

Soyweiser Soyweiser is offline
Colonel
 
Join Date: Nov 2008
Posts: 1,735
Thanks: 272
Thanked 120 Times in 93 Posts
Soyweiser is on a distinguished road
Default Re: Question about Bless bonuses...

Quote:
Originally Posted by earwicker7 View Post
Quote:
Originally Posted by thejeff View Post
I understand why it is that way, but it is terribly misleading. If you know the game well, you'll see that the stats are wrong and figure out why, but if you're new you probably won't even think about it.
Exactly... now that I know what I'm looking at, it makes total sense, but I just accepted (off the top of my head) that what was on there would be the same thing I would get if I right-clicked the unit (it isn't).
Well it isn't intentional. The wiki is simply not complete.

Just as a lot of information about domes is missing.
__________________
I'm acting like a high school girl /\
Bookmark these links:
http://dom3.servegame.com/wiki/
http://wolfsbane.alwaysdata.net/Spells.html
Test stuff, use the debug mod:
http://forum.shrapnelgames.com/showthread.php?t=36453
Reply With Quote
  #17  
Old February 20th, 2011, 11:48 AM
Soyweiser's Avatar

Soyweiser Soyweiser is offline
Colonel
 
Join Date: Nov 2008
Posts: 1,735
Thanks: 272
Thanked 120 Times in 93 Posts
Soyweiser is on a distinguished road
Default Re: Question about Bless bonuses...

Quote:
Originally Posted by thejeff View Post
Well, it was what you suggested. Unless one of us misunderstands the nature of this wiki. Of course, you could edit any individual units protection stat, but that would be a huge project, since you'd have to change every unit's page. I thought the wiki (at least the units part of it) was auto-generated from the data dump. It would be far easier to tweak the generating code than to edit each unit.
Granted, once done, that wouldn't have to be a competing site.
Well, you could have just looked at the templates. Those get the date from the db, and are editable. Still, I don't know if calculations are possible. (It would probably need some sort of math wiki plugin, but I could ask Lch for this information).

And you should have seen the work AncientHistory was doing. (Dunno if he ever finished, got to check that).
__________________
I'm acting like a high school girl /\
Bookmark these links:
http://dom3.servegame.com/wiki/
http://wolfsbane.alwaysdata.net/Spells.html
Test stuff, use the debug mod:
http://forum.shrapnelgames.com/showthread.php?t=36453
Reply With Quote
  #18  
Old February 20th, 2011, 11:50 AM
Soyweiser's Avatar

Soyweiser Soyweiser is offline
Colonel
 
Join Date: Nov 2008
Posts: 1,735
Thanks: 272
Thanked 120 Times in 93 Posts
Soyweiser is on a distinguished road
Default Re: Question about Bless bonuses...

Quote:
Originally Posted by iRFNA View Post
The armor calc equation appears to be this, for what it's worth:
Where did you get this? A decompiler?
__________________
I'm acting like a high school girl /\
Bookmark these links:
http://dom3.servegame.com/wiki/
http://wolfsbane.alwaysdata.net/Spells.html
Test stuff, use the debug mod:
http://forum.shrapnelgames.com/showthread.php?t=36453
Reply With Quote
  #19  
Old February 20th, 2011, 11:51 AM

iRFNA iRFNA is offline
Second Lieutenant
 
Join Date: Apr 2008
Posts: 533
Thanks: 2
Thanked 18 Times in 14 Posts
iRFNA is on a distinguished road
Default Re: Question about Bless bonuses...

Just a disassembler, the "c" code is only pseudo-code. But ya, it's no wonder you guys could never brute force the equation. haha
Reply With Quote
  #20  
Old February 20th, 2011, 03:14 PM
Edi's Avatar

Edi Edi is offline
National Security Advisor
 
Join Date: Oct 2003
Location: Helsinki, Finland
Posts: 5,425
Thanks: 174
Thanked 695 Times in 267 Posts
Edi is on a distinguished road
Default Re: Question about Bless bonuses...

That armor calculation looks correct. I had it somewhere sometime, but either I have lost the email, or just can't find it, or it was in some other venue.

In any case, the armors have hidden attributes for leg and arm protection, which were later not implemented, but which enter into the calculations, which results in all those mysterious additions and multipliers, but which end up with the body prot values we know. The interactions between natural protection, earth magic and so on are then factored in and it's adjusted, so that full earth magic and natural prot are not added.

That's because if they were, high natural protection units would become invulnerable to anything other than armor negating weapons or something that did times x multiplied damage against them (with high strength).
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 05:40 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.