Jump to content


Photo

[COMPLETE] Externalise Encumbrance Restrictions


  • Please log in to reply
19 replies to this topic

#1 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 17 January 2011 - 09:35 PM

Original request

One more D&D reqest :P
In vanilla game you become slow when carrying too much:
0-100% = full spedd
100-120% - half speed
120%+ - can't move

In D&D it looks like this -
0-33% - full speed
34%-100 - half speed

So, if we set equipment maximum to actual 1/3 from real maximum & changed halved speed range from 100-120% to 100-300% we'll get exectly what D&D says.
After all it's strange, that chars runs allday with 100kg in their backpacks :wacko:


The code looks fairly easy to change here. However, I need to clarify... half-speed 34-100% or 100-300%? So you want characters only to not be able to move at all when they have 1 or 3 times their allowable load by Str [+StrEx modifier]?

Update
Write your own mod for it now that I have simply externalised it. :)

Description

-----Externalise Encumbrance Restrictions [M, X]
Externalises the thresholds for low and high encumbrance to ENCUMBER.2DA

ENCUMBER.2DA
Description
THRESHOLD: The percentage weight above which [ROWNAME] applies. If the THRESHOLD is set to 0, [ROWNAME] never applies. If the THRESHOLD is set to a negative number, the value is treated as invalid and the default hard-coded value is applied.
[ROWNAME]: Either LOW_ENCUMBRANCE (slowed) or HIGH_ENCUMBRANCE (cannot move)

Options:
-0: disabled
-1: enabled


ENCUMBER.2DA
2DA V1.0
0
	THRESHOLD
LOW_ENCUMBRANCE	100
HIGH_ENCUMBRANCE	120

Edited by Ascension64, 19 January 2011 - 03:56 AM.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#2 the bigg

the bigg

    2083 is a prime number.

  • Modder
  • 3331 posts

Posted 18 January 2011 - 05:21 AM

I don't recall D&D rules, but 3rd edition is closer to 33/100 rather than 100/300 (33/66/100 actually). Hoiwever, 33/100 is dumber than Improved Anvil - D&D (and BG2) state that a character with 15 STR can don full plate armor, while (under 33/100 and default BG2 weights and tables) such a character wouldn't even being able to move (and a 18 STR character would *still* be encumbered by full plate). 100/300 is probably generous, but not outrageously so: a standard issue human being *can* easily run and whatnot while carrying 20 kg of stuff if it's well balanced, and similarly it can move around with some difficulty under a 60 kg load.

Italian users: help test the Stivan NPC!

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - TB#Characters - Traify Tool - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Code dumps: Detect custom secondary types - Stutter Investigator

If possible, send diffs, translations and other contributions using Git.


#3 Galactygon

Galactygon

    Modding since 2002

  • Member
  • 938 posts

Posted 18 January 2011 - 06:05 AM

Wouldn't it be best to externalize the whole thing into a .2da file? ie. weight limit percentages and movement rate penalties. We're just adding another hardcoded feature rather than a feature sustainable towards future requests.

-Galactygon

Edited by Galactygon, 18 January 2011 - 06:06 AM.

Posted Image

#4 -Asc64_offline-

-Asc64_offline-
  • Guest

Posted 18 January 2011 - 07:39 PM

Yeah, a good idea. Makes my job harder... :)

#5 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 18 January 2011 - 10:53 PM

Alright, updated. Someone else can write the mod to tweak it.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#6 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 19 January 2011 - 03:56 AM

Another small update that allows you to disable the encumbrance limits, for all those sore losers who like to uber pack mule...

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#7 -@vGur-

-@vGur-
  • Guest

Posted 19 January 2011 - 07:34 AM

Good tweak! You Rock
Bigg, You missed a fact that D&D3 encumberance work with D&D3 weight allowence & D&D3 items weight (NOT bg2), 33-100% or 100-300% - it's only texhnical questions, so if D&D3 says that char with str 13 must suffer penalties between 51-150, than we can set his max weight to 150 and anable penalties for 33-100% or set his max 50 and penalties 100-300%, is it clear?

If not, than look at this table
Encumb.>
D&D3Light D&D3Medium D&D3Heavy BG2Normal BG2Heavy
(speed 30 (speed 20 (speed 20 (speed 60 (speed 30
max dex bonus -*) max dex bonus 3) max dex bonus 1) max dex bonus -*) max dex bonus -*)
Str. Wt. Wt. Wt. Wt. Wt.
1 up to 3 lb. 4?6 lb. 7?10 lb. 1 lb. 2? lb.
2 up to 6 lb. 7?13 lb. 14?20 lb. up to 3 lb. 4 lb.
3 up to 10 lb. 11?20 lb. 21?30 lb. up to 5 lb. 6 lb.
4 up to 13 lb. 14?26 lb. 27?40 lb. up to 15 lb. 16-18 lb.
5 up to 16 lb. 17?33 lb. 34?50 lb. up to 15 lb. 16-18 lb.
6 up to 20 lb. 21?40 lb. 41?60 lb. up to 30 lb. 31-36 lb.
7 up to 23 lb. 24?46 lb. 47?70 lb. up to 30 lb. 31-36 lb.
8 up to 26 lb. 27?53 lb. 54?80 lb. up to 50 lb. 51-60 lb.
9 up to 30 lb. 31?60 lb. 61?90 lb. up to 50 lb. 51-60 lb.
10 up to 33 lb. 34?66 lb. 67?100 lb. up to 70 lb. 71-84 lb.
11 up to 38 lb. 39?76 lb. 77?115 lb. up to 70 lb. 71-84 lb.
12 up to 43 lb. 44?86 lb. 87?130 lb. up to 90 lb. 91-108 lb.
13 up to 50 lb. 51?100 lb. 101?150 lb. up to 90 lb. 91-108 lb.
14 up to 58 lb. 59?116 lb. 117?175 lb. up to 120 lb. 121-144 lb.
15 up to 66 lb. 67?133 lb. 134?200 lb. up to 120 lb. 121-144 lb.
16 up to 76 lb. 77?153 lb. 154?230 lb. up to 150 lb. 151-180 lb.
17 up to 86 lb. 87?173 lb. 174?260 lb. up to 170 lb. 171-204 lb.
18 up to 100 lb. 101?200 lb. 201?300 lb. up to 200 lb. 201-240 lb.
19 up to 116 lb. 117?233 lb. 234?350 lb. up to 500 lb. 501-600 lb.
20 up to 133 lb. 134?266 lb. 267?400 lb. up to 600 lb. 601-720 lb.
21 up to 153 lb. 154?306 lb. 307?460 lb. up to 700 lb. 701-840 lb.
22 up to 173 lb. 174?346 lb. 347?520 lb. up to 800 lb. 801-960 lb.
23 up to 200 lb. 201?400 lb. 401?600 lb. up to 1000 lb. 1001-1200 lb.
24 up to 233 lb. 234?466 lb. 467?700 lb. up to 1200 lb. 1201-1440 lb.
25 up to 266 lb. 267?533 lb. 534?800 lb. up to 1600 lb. 1601-1920 lb.
+10 x 4 x 4 x 4
*=any

#8 the bigg

the bigg

    2083 is a prime number.

  • Modder
  • 3331 posts

Posted 19 January 2011 - 08:20 AM

Repost of the table for clarity:
Spoiler


BG2 tables state that a 10 STR dude can carry 70 lbs without being encumbered, while d20srd.org asserts that a 10 STR dude can carry 33 lbs without being only lightly encumbered. That's where I derived "3rd edition is close to 33/100" from.

That said, both tables are nonsense if compared to reality - a standard issue human being (10~11 STR) *can* carry around more than what 3rd edition says (33 lbs / 14 kg without being noticeably slowed down), but can't do what 2nd edition says (70 lbs / 30 kg without slowdown). I think that applying 75/200 to BG2 values is the closest to reality you can get (50 lbs / 20 kg without slowdown, 140 lbs / 55 kg under some difficulty, can't easily move with more than that).

Italian users: help test the Stivan NPC!

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - TB#Characters - Traify Tool - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Code dumps: Detect custom secondary types - Stutter Investigator

If possible, send diffs, translations and other contributions using Git.


#9 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 19 January 2011 - 03:14 PM

Damn, that means my STR must be < 10... :o

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#10 the bigg

the bigg

    2083 is a prime number.

  • Modder
  • 3331 posts

Posted 28 January 2011 - 01:12 PM

I think this isn't working correctly - the threshold displayed in the Inventory screen shows the result of strmod.2da (irregardless of encumber.2da), the encumbered threshold is 100 lbs independently of your strength and/or LOW_ENCUMBERANCE, while the threshold where you stop moving is HIGH_ENCUMBRANCE (irregardless of your strength).

Italian users: help test the Stivan NPC!

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - TB#Characters - Traify Tool - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Code dumps: Detect custom secondary types - Stutter Investigator

If possible, send diffs, translations and other contributions using Git.


#11 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 29 January 2011 - 04:43 AM

My bung. I did

nWeight (absolute) > nLowEncumbrance (%) and nWeight (absolute) > nHighEncumbrance (%)

when it should be

nWeight * 100 / nWeightAllowance > nLowEncumbrance (%) and nWeight 100 / nWeightAllowance > nHighEncumbrance (%)

.

Will fix for next ver.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#12 ydfhdsfh

ydfhdsfh
  • Member
  • 49 posts

Posted 30 January 2011 - 04:57 AM

extern encumbrance=1 now in v16 causes the game to crash if casting Draw Upon Holy Might. (but not shapechange:irongolem or str/con/wis potions )

Edited by ydfhdsfh, 30 January 2011 - 04:58 AM.


#13 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 30 January 2011 - 10:45 PM

extern encumbrance=1 now in v16 causes the game to crash if casting Draw Upon Holy Might. (but not shapechange:irongolem or str/con/wis potions )

Ah, I cannot reproduce. Can you post a saved game?

I will add checks for divison by zero, but unless your weight allowance wrapped to 0 (or someone modded STRMOD.2DA or STRMODEX.2DA), I don't see that causing a problem for you.

Oh, is your strength > 25?

Edited by Ascension64, 30 January 2011 - 11:04 PM.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#14 ydfhdsfh

ydfhdsfh
  • Member
  • 49 posts

Posted 30 January 2011 - 11:57 PM

So, i tried it on a fresh char and couldnt reproduce too. However a soa or tob game in progress it does crash, in savegames from other playthroughs too. Save atached. Happens on each cleric there, that would be Mazzy and Viconia.
Naked Mazzy doesnt crash
Mazzy with Crom doesnt crash
Mazzy crashes if i have a weapon equipped and something in the the upper equip slots(armor, bracers,helmet, amulet) or offhand weapon.

Very strange.

Attached File  000001291-challenge2.rar   1.12MB   209 downloads

#15 ydfhdsfh

ydfhdsfh
  • Member
  • 49 posts

Posted 31 January 2011 - 12:20 AM

Not a problem anymore in v17 aka doesnt crash. xD Amazing.

Edited by ydfhdsfh, 31 January 2011 - 12:20 AM.


#16 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 31 January 2011 - 12:55 AM

I checked, it was a divide by zero issue. I'll update the code slightly more for later vers so that it will never divide by zero rather than reporting a divide by zero.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#17 Dakk

Dakk
  • Member
  • 398 posts

Posted 31 January 2011 - 10:58 AM

I checked, it was a divide by zero issue. I'll update the code slightly more for later vers so that it will never divide by zero rather than reporting a divide by zero.


Posted Image

#18 -yarpen-

-yarpen-
  • Guest

Posted 05 February 2011 - 05:11 PM

So... is there a possibility of granting bonus to encumbrance via opcode? You know, I mean "allowing character to lift X more lbs'es" - I recall that I was writing about such a thing, and if that's true - it would be quite nice for me.

#19 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 07 February 2011 - 06:07 AM

Possibly...

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#20 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 08 February 2011 - 02:12 AM

So... is there a possibility of granting bonus to encumbrance via opcode? You know, I mean "allowing character to lift X more lbs'es" - I recall that I was writing about such a thing, and if that's true - it would be quite nice for me.

See http://www.shsforums...ost__p__507728.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)