Jump to content

[Idea] Arrows have a weigth


the bigg

Recommended Posts

IMHO, if you carry 7532094750394 arrows and 2487987189 scrolls, you migth feel a little encumbered; however, in the game arrows don't have a weight.

 

Solution: increase x10 the weigth allowance, x10 all item weigths, and give arrows, scrolls, etc. a weigth of 1 (or 2, or 5... I don't have a gamebook offhand to give good numbers).

 

Example code for IWD2 (other games may have to duplicate the stuff for STRMOD into STRMODEX, and also check offsets... but this should be good to go):

 

/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////                                                  \\\\\
///// Ammo, Scrolls, Gem & Jewelry Have Weight         \\\\\
/////                                                  \\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\

BEGIN @5600
DESIGNATED 1600

COPY_EXISTING ~strmod.2da~ ~override~
 REPLACE_TEXTUALLY ~TO_HIT~ ~BLANK TO_HIT~
 READ_2DA_ENTRIES_NOW ~_#_#_#strmod_read~ 5
 FOR ("index" = 1; "%index%" < "%_#_#_#strmod_read%"; "index" = "%index%" + 1) BEGIN
   READ_2DA_ENTRY_FORMER ~_#_#_#strmod_read~ "%index%" 4 "max_weigth"
   SET_2DA_ENTRY_LATER ~_#_#_#strmod_set~ "%index%" 4 ("%max_weigth%" * 10)
 END
 SET_2DA_ENTRIES_NOW ~_#_#_#strmod_set~ 5
 REPLACE_TEXTUALLY ~BLANK~ ~     ~

PRINT @1
COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~ // looking for ammo
 READ_SHORT  0x1C "type"
 READ_LONG   0x4c "weight"
 WRITE_LONG  0x4c ("%weight%" * 10)
 PATCH_IF ("%weight%" = 0) BEGIN
   PATCH_IF (("%type%" =  5)        // arrows
          OR ("%type%" = 14)        // bullets
          OR ("%type%" = 24)        // darts
          OR ("%type%" = 31)        // bolts
          OR ("%type%" = 34)) BEGIN // gems
     // weigth = 1/5 of a lb.
     WRITE_LONG 0x4c 2
   END
   ELSE PATCH_IF (("%type%" = 10)         // rings
          OR ("%type%" = 11)) BEGIN  // scrolls
     // weigth: 1/10 of a lb.
     WRITE_LONG 0x4c 1
   END
   ELSE BEGIN // otherwise, it'll weigth 1/2 of a lb.
     WRITE_LONG 0x4c 5
   END
 END
 BUT_ONLY_IF_IT_CHANGES

 

Opinions on the weigth table are welcome.

 

I haven't been able to find the correct reference in the tlk for the "<weight> / <weigth max> lb." line (I'd like to change that to "<weight> / <weigth max> tenths of lb.".

Dynamical patching of descriptions is under work.

 

EDIT: added 1/2 lb. for non specified items, more reports on patches to descriptions and GUI.

Link to comment
I like this idea. Ideally, I think the 50k gold coins would be a bit more of a concern... :) Also, are you tackling item descriptions that include weight?

Unfortunately gold isn't an item, so it isn't possible to give it a weight.

Since changing the weight in the description is easy, I'll hack together an automated patcher.

 

Obviously, the same ain't true for stuff like 'Armor Revision' from Refinements :love:

Link to comment

x by 10 will that look weird on the backpack bam? having 5 digits? wtp is going to change the weight by x 5 that makes max carry weight 8000 @ 25 st. and it keeps it at 4 digits so it won't have any possibility of overlaping (of course the gui in normal bg has more room than wtp's gui so maybe that is not a concern)

Link to comment
Do remember, though, that the interface indicates that the weight is in pounds. Currently, the values are quite reasonable. Upping it ten times results in players being able to carry over a tonne.

Game-play wise this is not true, since I also up the weight of each item x 10.

 

GUI-wise:

arrowweight7yn.th.jpg

True, I'll have to state in the readme that the weight report in the inventory window is tenths of lb. rather than in lb., but we can't fight the engine.

 

However, I'm faced with a terrible decision: should we (I) update everything to tenths of lb., or leave everything in lb. (as is correct) and keep the inconsistency in the inventory window?

 

Alternatively, if somebody can tell me

1) the strref for the weight line in the Inventory GUI.

2) a weight measure unit that is smaller than lb.

 

then I can make everything perfect.

Link to comment
If it helps, 1 ounce = 1/16 of a pound.

 

EDIT: oh, and the abbreviation for ounce is oz.

Thanks :)

 

Implementation:

 

In IWD2, the string ref to search for is 39537. on other games, you can try to find it via the following DOS command:

 

weidu --traify-tlk | find /i "lb." | find "@"

 

(on bash:

weidu --traify-tlk | grep -i "lb\." | grep "@"

)

 

you'll find:

@39537 = ~lb.~

 

you'll just have to

STRING_SET 39537 ~oz.~

 

| 4M 50 |337!!!!!111111111

 

EDIT: missed Nightmare's edit.

Link to comment
Do remember, though, that the interface indicates that the weight is in pounds. Currently, the values are quite reasonable. Upping it ten times results in players being able to carry over a tonne.

The 'lbs' is just a graphic in number*.bam

it's easy enough to change to 'gp' or anything else.

Link to comment

I always thought the weight silliness was a bit of a trade-off for the bulk silliness. In BG2, you could carry 16 suits of leather armor with sufficient strength, but you could not carry 18 different kinds of gem.

 

But you're right. Giving arrows weight might make someone pause before consoling in 9999 arrows. IRL, that would fill a cargo container.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...