Jump to content


bg walking speeds bug


  • Please log in to reply
5 replies to this topic

#1 -@vGur-

-@vGur-
  • Guest

Posted 22 July 2011 - 09:00 AM

Well i used this as fix, but failed, ideas?

//precrated chars fix
COPY ~characters~ ~characters~
  PATCH_IF (("%SOURCE_FILE%" STRING_COMPARE_CASE "*.cre") = 0) BEGIN
    READ_BYTE  0x33 "fx_type"
    READ_LONG  0x2c4 "fx_off"
    READ_LONG  0x2c8 "fx_num"
    WRITE_LONG 0x2c8 ("%fx_num%" + 1)
    INSERT_BYTES   ("%fx_off%") (0x30 + (0xd8 * "%fx_type%"))
      WRITE_SHORT  ("%fx_off%" + (0x08 * "%fx_type%")) 176 // movement rate bonus
      WRITE_BYTE   ("%fx_off%" + 0x02 + (0x0a * "%fx_type%")) 1 // target: self
      WRITE_LONG   ("%fx_off%" + 0x04 + (0x10 * "%fx_type%")) 0xfffffffe // -5 walking speed
      WRITE_LONG   ("%fx_off%" + 0x0c + (0x10 * "%fx_type%")) 9 // instant/permanent
      WRITE_LONG   ("%fx_off%" + 0x12 + (0x18 * "%fx_type%")) 100 // probability
  END
  BUT_ONLY_IF_IT_CHANGES

additionally, i've updated the code for IA compatibility
// this file does nothing, it just allows other mods to detect this component
COPY_EXISTING ~sw1h01.itm~ ~override/cdt01210.g3~

COPY_EXISTING_REGEXP GLOB ~^.+\.cre$~ ~override~
  READ_SHORT 0x28 "anim" ELSE 0
  PATCH_IF ((("%SOURCE_FILE%" STRING_COMPARE_CASE "charbase.cre") 

= 0)
    OR ("%anim%" = 0x5000)
    OR ("%anim%" = 0x5001)
    OR ("%anim%" = 0x5002)
    OR ("%anim%" = 0x5003)
    OR ("%anim%" = 0x5010)
    OR ("%anim%" = 0x5011)
    OR ("%anim%" = 0x5012)
    OR ("%anim%" = 0x5013)
    OR ("%anim%" = 0x5100)
    OR ("%anim%" = 0x5101)
    OR ("%anim%" = 0x5102)
    OR ("%anim%" = 0x5103)
    OR ("%anim%" = 0x5110)
    OR ("%anim%" = 0x5111)
    OR ("%anim%" = 0x5112)
    OR ("%anim%" = 0x5113)
    OR ("%anim%" = 0x5200)
    OR ("%anim%" = 0x5201)
    OR ("%anim%" = 0x5202)
    OR ("%anim%" = 0x5210)
    OR ("%anim%" = 0x5211)
    OR ("%anim%" = 0x5212)
    OR ("%anim%" = 0x5300)
    OR ("%anim%" = 0x5301)
    OR ("%anim%" = 0x5302)
    OR ("%anim%" = 0x5303)
    OR ("%anim%" = 0x5310)
    OR ("%anim%" = 0x5311)
    OR ("%anim%" = 0x5312)
    OR ("%anim%" = 0x5313)
    OR ("%anim%" = 0x6000)
    OR ("%anim%" = 0x6001)
    OR ("%anim%" = 0x6002)
    OR ("%anim%" = 0x6003)
    OR ("%anim%" = 0x6004)
    OR ("%anim%" = 0x6005)
    OR ("%anim%" = 0x6010)
    OR ("%anim%" = 0x6011)
    OR ("%anim%" = 0x6012)
    OR ("%anim%" = 0x6013)
    OR ("%anim%" = 0x6014)
    OR ("%anim%" = 0x6015)
    OR ("%anim%" = 0x6100)
    OR ("%anim%" = 0x6101)
    OR ("%anim%" = 0x6102)
    OR ("%anim%" = 0x6103)
    OR ("%anim%" = 0x6104)
    OR ("%anim%" = 0x6105)
    OR ("%anim%" = 0x6110)
    OR ("%anim%" = 0x6111)
    OR ("%anim%" = 0x6112)
    OR ("%anim%" = 0x6113)
    OR ("%anim%" = 0x6114)
    OR ("%anim%" = 0x6115)
    OR ("%anim%" = 0x6200)
    OR ("%anim%" = 0x6201)
    OR ("%anim%" = 0x6202)
    OR ("%anim%" = 0x6204)
    OR ("%anim%" = 0x6205)
    OR ("%anim%" = 0x6210)
    OR ("%anim%" = 0x6211)
    OR ("%anim%" = 0x6212)
    OR ("%anim%" = 0x6214)
    OR ("%anim%" = 0x6215)
    OR ("%anim%" = 0x6300)
    OR ("%anim%" = 0x6301)
    OR ("%anim%" = 0x6302)
    OR ("%anim%" = 0x6303)
    OR ("%anim%" = 0x6304)
    OR ("%anim%" = 0x6305)
    OR ("%anim%" = 0x6310)
    OR ("%anim%" = 0x6311)
    OR ("%anim%" = 0x6312)
    OR ("%anim%" = 0x6313)
    OR ("%anim%" = 0x6314)
    OR ("%anim%" = 0x6315)
    OR ("%anim%" = 0x6500)
    OR ("%anim%" = 0x6510)
    OR ("%anim%" = 0x683d) //moinesse
    OR ("%anim%" = 0x683e) //moinesse
    OR ("%anim%" = 0x683f) //moinesse
    OR ("%anim%" = 0x6841) //moinesse
    OR ("%anim%" = 0x6845) //moinesse
    OR ("%anim%" = 0x6846) //moinesse
    OR ("%anim%" = 0x6847) //moinesse
    OR ("%anim%" = 0x6848) //moinesse
    OR ("%anim%" = 0x5d4a) //AASIMAR FEMALE, PST
    OR ("%anim%" = 0x5d4c) //CURST TOWNIE FEMALE, PST
    OR ("%anim%" = 0x5d4d) //CURST TOWNIE MALE, PST
    OR ("%anim%" = 0x5d4e) //DUSTMAN FEMALE, PST
    OR ("%anim%" = 0x5d4f) //DUSTMAN MALE, PST
    OR ("%anim%" = 0x5d52) //GITHZERAI, PST
    OR ("%anim%" = 0x5d53) //GODSMAN, PST
    OR ("%anim%" = 0x5d54) //LARGE THUG, PST
    OR ("%anim%" = 0x5d55) //LOWER CLASS TOWNIE, FEMALE, PST
    OR ("%anim%" = 0x5d56) //LOWER CLASS TOWNIE, MALE, PST
    OR ("%anim%" = 0x5d57) //MERCHANT, PST
    OR ("%anim%" = 0x5d58) //MIDWIFE, PST
    OR ("%anim%" = 0x5d59) //PROSTITUTE, PST
    OR ("%anim%" = 0x5d5d) //THUG, PST
    OR ("%anim%" = 0x5d5e) //TIEFLING FEMALE, PST
    OR ("%anim%" = 0x5d5f) //TIEFLING MALE, PST
    OR ("%anim%" = 0x5d60) //TOWNIE WIZARD, PST
    OR ("%anim%" = 0x5d61) //UPPER CLASS TOWNIE, FEMALE, PST
    OR ("%anim%" = 0x5d62) //UPPER CLASS TOWNIE, MALE, PST
    OR ("%anim%" = 0x6410) //CLERIC_MALE_HUMAN, BG1
    OR ("%anim%" = 0x6412) //CLERIC_MALE_ELF, BG1
    OR ("%anim%" = 0x6414) //CLERIC_MALE_DWARF, BG1
    OR ("%anim%" = 0x6416) //CLERIC_MALE_HALFLING, BG1
    OR ("%anim%" = 0x6411) //CLERIC_FEMALE_HUMAN, BG1
    OR ("%anim%" = 0x6413) //CLERIC_FEMALE_ELF, BG1
    OR ("%anim%" = 0x6417) //CLERIC_FEMALE_HALFLING, BG1
    OR ("%anim%" = 0x6420) //FIGHTER_MALE_HUMAN, BG1
    OR ("%anim%" = 0x6422) //FIGHTER_MALE_ELF, BG1
    OR ("%anim%" = 0x6424) //FIGHTER_MALE_DWARF, BG1
    OR ("%anim%" = 0x6426) //FIGHTER_MALE_HALFLING, BG1
    OR ("%anim%" = 0x6421) //FIGHTER_FEMALE_HUMAN, BG1
    OR ("%anim%" = 0x6423) //FIGHTER_FEMALE_ELF, BG1
    OR ("%anim%" = 0x6427) //FIGHTER_FEMALE_HALFLING, BG1
    OR ("%anim%" = 0x6430) //MAGE_MALE_HUMAN, BG1
    OR ("%anim%" = 0x6432) //MAGE_MALE_ELF, BG1
    OR ("%anim%" = 0x6434) //MAGE_MALE_DWARF, BG1
    OR ("%anim%" = 0x6431) //MAGE_FEMALE_HUMAN, BG1
    OR ("%anim%" = 0x6433) //MAGE_FEMALE_ELF, BG1
    OR ("%anim%" = 0x6440) //THIEF_MALE_HUMAN, BG1
    OR ("%anim%" = 0x6442) //THIEF_MALE_ELF, BG1
    OR ("%anim%" = 0x6444) //THIEF_MALE_DWARF, BG1
    OR ("%anim%" = 0x6446) //THIEF_MALE_HALFLING, BG1
    OR ("%anim%" = 0x6441) //THIEF_FEMALE_HUMAN, BG1
    OR ("%anim%" = 0x6443) //THIEF_FEMALE_ELF, BG1
    OR ("%anim%" = 0x6447) //THIEF_FEMALE_HALFLING, BG1
) BEGIN
    READ_BYTE   0x33 "fx_type"
    READ_LONG  0x2b0 "known_off"
    READ_LONG  0x2b8 "slot_off"
    READ_LONG  0x2bc "itm_off"
    READ_LONG  0x2c4 "fx_off"
    READ_LONG  0x2c8 "fx_num"
    WRITE_LONG 0x2c8 ("%fx_num%" + 1)
    PATCH_IF ("%known_off%" >= "%fx_off%") BEGIN
      WRITE_LONG 0x2b0 ("%known_off%" + (0x30 + (0xd8 * 

"%fx_type%")))
    END
    PATCH_IF ("%slot_off%" >= "%fx_off%") BEGIN
      WRITE_LONG 0x2b8 ("%slot_off%" + (0x30 + (0xd8 * "%fx_type

%")))
    END
    PATCH_IF ("%itm_off%" >= "%fx_off%") BEGIN
      WRITE_LONG 0x2bc ("%itm_off%" + (0x30 + (0xd8 * "%fx_type

%")))
    END
    INSERT_BYTES   ("%fx_off%"                              ) 

(0x30 + (0xd8 * "%fx_type%"))
      WRITE_SHORT  ("%fx_off%"        + (0x08 * "%fx_type%"))     

   176 // movement rate bonus
      WRITE_BYTE   ("%fx_off%" + 0x02 + (0x0a * "%fx_type%"))     

     1 // target: self
      WRITE_LONG   ("%fx_off%" + 0x04 + (0x10 * "%fx_type%")) 

0xfffffffd // -4 walking speed
      WRITE_LONG   ("%fx_off%" + 0x0c + (0x10 * "%fx_type%"))     

     9 // instant/permanent
      WRITE_LONG   ("%fx_off%" + 0x12 + (0x18 * "%fx_type%"))     

   100 // probability
  END
  BUT_ONLY_IF_IT_CHANGES

There is additional code for EVERY bg1 anims to be fully compatible with scimitars, katanas and any attack type that weapon uses, BUT I'VE UPLOADED IT MANY TIMES IN LAST FEW YEARS AND NO ONE STILL USE IT, F*CK, THIS FORUM NEEDS A NEW BREATH
IF SOMEONE STILL WHANT TO USE IT, TELL ME (AND MAEBY WE WILL SEE THE BG1 ANIMATION FOR ALL ;)

#2 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 23 July 2011 - 12:11 AM

There is additional code for EVERY bg1 anims to be fully compatible with scimitars, katanas and any attack type that weapon uses, BUT I'VE UPLOADED IT MANY TIMES IN LAST FEW YEARS AND NO ONE STILL USE IT, F*CK, THIS FORUM NEEDS A NEW BREATH

Eh... where did you upload it? I don't even know which mod that code is from (the Fixpack or BGT?). But if you're talking about BG1 animations from IA, those are compatible with katanas and scimitars (except they look like longswords) but not dual wielding because BG1 didn't have that. If you managed to fix that, that would be god-like :P.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#3 -@vGur-

-@vGur-
  • Guest

Posted 23 July 2011 - 02:34 AM

Sory for bed English.

This code from bg2tweaks, bg walking speeds component
In bg2 characters use double moving speed compared to original, so bg1 portion of bwp looks different from original. This component was introduced many years ago in tutu-tweaks mod, along restored bg1 sounds (that i can't find now :( ).
What this component does? Original bg1 animations used moving rate 5 (30 feet per round - original P&P D&D speed), so when character moves You can see him steps upon the ground as it should. Bg1 slaves, fatmans and other not character animations was made with slower moving rate, but uses speed 5 (30/round) so they feets moves slightly incorrect (moonwalk, as Jackson did). In bg2 characters animations was made with bg1 speed in mind but uses speed 10 (60 per round), so they feet moves without any connection with the ground, THIS SUCKS. I like the bg1, more than bg2, and this is one of the reasons. Now bg2tweaks have this component in beta, making creatures with playable animations walking speed 8 (somewhere between original animation speed and used by bg2 engine), it stucks with IA, coz when it looks for creature animations to patch them, they haven't found vanilla animation codes, IA alredy changed them. So creatures with new animations still use speed 10.
The worst look have creatures, that get pst animation, they was created with speed 4 in mind, so they positioning with the ground looks ugly.

SO what we get?
Vanilla bg1:
playable animations inner speed 5, game speed 5 -ok
monks/elminster/drizzt/sarevok/skeleton(notplayable, but works in the same way) inner speed 5, game speed 5 -ok
notplayable/not monster (peasants, merchants, nobles) inner speed 4, game speed 5 -good, but not ok

vanilla bg2:
bg2 playable animations inner speed 6 (halflings runs on speed 6-7), game speed 10 - not good
bg1 monks/elminster/drizzt/sarevok/skeleton inner speed 5, game speed 10 - bad
bg1 notplayable/not monster inner speed 4, game speed 5 -good, but not ok

bwp with IA & bg2Tweaks
bg2 playable animations inner speed 6 (halflings runs on speed 6-7), game speed 8 - good, but not ok
bg1 monks/elminster/drizzt/sarevok/skeleton inner speed 5, game speed 10 - bad
Moinesse playable animations inner speed 6, game speed 10 - bad
pst playable and notplayable/not monster inner speed 4, game speed 10 -ugly
bg1 playable (if used) inner speed 5 engine speed 10 - ugly

another bad thing is bg2 wolf/bear/dog moving speed, can you believe that thay can't catch You? You can ran from them easily.

(Yes, i'haven't practice in english for couple years, so it sucks like the bg2 character speed)

Now I'm working on fix for this all, but need help in patching *.chr files in characters directory, do You know how to do this?

P/S Code for S3/SC anims compatibility that i have mentioned was posted in topic about bg1 anims for bg2, when that mod was in early beta, maeby You used it now(just copy of S1 animation) ;)
BUT Elminster/monk/sceleton/sarevok also can be playable, all that needed for this is additional animation for attack types that was missed in vanills, I have tested the same method as above and copy of existing atcak anims in empty animation slots helps, it's even not noticable that it's not original ;)

#4 -@vGur-

-@vGur-
  • Guest

Posted 23 July 2011 - 02:37 AM

another quick qustion, where the proficency for classes and kits stored now? I looked in weapprof.2da, but it's have only 1 row with kit names. The game runs normally, so this is some engine tweak that i can't find in my weidu.log

#5 10th

10th
  • Member
  • 621 posts

Posted 23 July 2011 - 09:05 AM

another quick qustion, where the proficency for classes and kits stored now? I looked in weapprof.2da, but it's have only 1 row with kit names. The game runs normally, so this is some engine tweak that i can't find in my weidu.log


:blink: It's always in weapprof.2da in BG2. First four columns list all weapon proficency data, while beginning at fifth all classes and kits get a column with their maximum proficency in those weapon proficencies.

10th
Avast! You cannot defeat our titan-mounted submarine staffed by cannibal vikings! - Nodwick

"I grab his deceased spirit and piledrive it back into his body, duplicating raise dead." - Psyren Oots board

#6 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 23 July 2011 - 09:41 AM

pst playable and notplayable/not monster inner speed 4, game speed 10 -ugly
bg1 playable (if used) inner speed 5 engine speed 10 - ugly

You might want to post this in the Infinity Animations forum. Maybe Erephine can do something about it, like cut some frames out (or add frames but that would make them slower). We already have done that for the NWN ported animations, because they have a lot more frames and walk stupid slow otherwise.

another bad thing is bg2 wolf/bear/dog moving speed, can you believe that thay can't catch You? You can ran from them easily.

There is a tweak in SCS(2) for this.

Now I'm working on fix for this all, but need help in patching *.chr files in characters directory, do You know how to do this?

There is an example of this in the IA code for patching BG1 characters (in infinityanimations/lib/t-bg1chars.tpa - scroll down to ACTION_BASH_FOR ~characters~ etc.).

P/S Code for S3/SC anims compatibility that i have mentioned was posted in topic about bg1 anims for bg2, when that mod was in early beta, maeby You used it now(just copy of S1 animation) ;)

Yes, we put this in a long time ago :P.

BUT Elminster/monk/sceleton/sarevok also can be playable, all that needed for this is additional animation for attack types that was missed in vanills, I have tested the same method as above and copy of existing atcak anims in empty animation slots helps, it's even not noticable that it's not original ;)

If you can indicate the code necessary for this, we can put that in too.

As 10th says, weapprof.2da should be good - maybe some mod messed it up. In BG1 there was clasweap.2da instead but I think that is unused in BG2.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle