Go Back   RunUO - Ultima Online Emulation > RunUO > Core Modifications > Other

Other Cant find a category above, use this one! Core mods not listed above go here!

Reply
 
Thread Tools Display Modes
Old 05-05-2009, 10:23 AM   #1 (permalink)
Bug Hunter
 
Join Date: Aug 2008
Location: Italia, near Britannia
Age: 24
Posts: 4,041
Send a message via MSN to osd_daedalus
Default Fix: increased backpack limit up to 550 stones

Hello!

As ML was launched, OSI raised the maximum backpack capacity from 400 to 550 stones (Stratics Forums - View Single Post - Ultima Online Crafter Help Guides, updated 5 February 2009).

This little patch is meant to make player backpack maximum capacity as it is in OSI.

In Server/Items/Container.cs :

Code:
Index: Container.cs
===================================================================
--- Container.cs    (revision 313)
+++ Container.cs    (working copy)
@@ -1385,7 +1385,7 @@
         }
 
         private static int m_GlobalMaxItems = 125;
-        private static int m_GlobalMaxWeight = 400;
+        private static int m_GlobalMaxWeight = 550;
 
         public static int GlobalMaxItems{ get{ return m_GlobalMaxItems; } set{ m_GlobalMaxItems = value; } }
         public static int GlobalMaxWeight{ get{ return m_GlobalMaxWeight; } set{ m_GlobalMaxWeight = value; } }
Thank you
__________________
If you guys want ML, you are going to have to create it, submit it, and if it is good enough it will more than likely be added to the repository - Jeff
osd_daedalus is offline   Reply With Quote
Old 05-05-2009, 10:32 AM   #2 (permalink)
Master of the Internet
 
Lord_Greywolf's Avatar
 
Join Date: Dec 2005
Posts: 12,209
Send a message via Yahoo to Lord_Greywolf
Default

can do this with out a core mode in containers script in the distro fils by changing the backpacks default weight

just look at how it is done with the strong backpack, and set it up the same using the overrides
__________________
http://www.AoAUO.com

:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :)
Lord_Greywolf is online now   Reply With Quote
Old 05-05-2009, 01:10 PM   #3 (permalink)
Bug Hunter
 
Join Date: Aug 2008
Location: Italia, near Britannia
Age: 24
Posts: 4,041
Send a message via MSN to osd_daedalus
Default

Quote:
Originally Posted by Lord_Greywolf View Post
can do this with out a core mode in containers script in the distro fils by changing the backpacks default weight

just look at how it is done with the strong backpack, and set it up the same using the overrides
Yes, it surely will be better, thank you for the hint!
Just give me 2-3 days before I surrender on this

EDIT: oh, it was so damned easy :P

I will post it, although now the thread should be moved in Modification Suggestion now, since a core modify is not required.

In Scripts/Items/Containers/Container.cs
Code:
Index: Container.cs
===================================================================
--- Container.cs    (revision 313)
+++ Container.cs    (working copy)
@@ -189,7 +189,7 @@
             Layer = Layer.Backpack;
             Weight = 3.0;
         }
-
+        public override int DefaultMaxWeight { get { return 550; } }
         public Backpack( Serial serial ) : base( serial )
         {
         }
Thank you
__________________
If you guys want ML, you are going to have to create it, submit it, and if it is good enough it will more than likely be added to the repository - Jeff

Last edited by osd_daedalus; 05-05-2009 at 05:52 PM.
osd_daedalus is offline   Reply With Quote
Old 06-21-2009, 07:11 AM   #4 (permalink)
Forum Novice
 
koluch's Avatar
 
Join Date: Mar 2004
Location: Wisconsin
Age: 46
Posts: 868
Red face Still a bug

Still a core issue(I believe) or every container you put in your backpack goes from 400 to 550 stones when placed in your Backpack, and when removed and placed on the ground goes back to 400 stones.

Quote:
Originally Posted by osd_daedalus View Post
Yes, it surely will be better, thank you for the hint!
Just give me 2-3 days before I surrender on this

EDIT: oh, it was so damned easy :P

I will post it, although now the thread should be moved in Modification Suggestion now, since a core modify is not required.

In Scripts/Items/Containers/Container.cs
Code:
Index: Container.cs
===================================================================
--- Container.cs    (revision 313)
+++ Container.cs    (working copy)
@@ -189,7 +189,7 @@
             Layer = Layer.Backpack;
             Weight = 3.0;
         }
-
+        public override int DefaultMaxWeight { get { return 550; } }
         public Backpack( Serial serial ) : base( serial )
         {
         }
Thank you
__________________
If the words are coming from someone whose opinion you value, think it over, if not, consider the source.
koluch is offline   Reply With Quote
Old 06-21-2009, 02:13 PM   #5 (permalink)
Master of the Internet
 
Lord_Greywolf's Avatar
 
Join Date: Dec 2005
Posts: 12,209
Send a message via Yahoo to Lord_Greywolf
Default

any container does that, even if the containers max weight is set to 10 stones, when placed in pack can hold 400 then once removed back to 10

or worse, lock it down in house, then unlimited weight i do believe

so it is acting just like normal that way

see the pack istself is also helping to support the smaller pack inside of itself (like placing a bag in a box the bag can nold more until taken out of the box, becasue the box adds support)
and that is why they can hold more weight while in the pack
__________________
http://www.AoAUO.com

:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :)
Lord_Greywolf is online now   Reply With Quote
Old 06-25-2009, 06:18 AM   #6 (permalink)
Forum Novice
 
koluch's Avatar
 
Join Date: Mar 2004
Location: Wisconsin
Age: 46
Posts: 868
Default

Fixed.

Need to make a small change in container.cs in the scripts AND the core.
Makes just the Player Backpack, not the containers inside, 550 stones.Containers placed inside retain their maxdefaultweight.
__________________
If the words are coming from someone whose opinion you value, think it over, if not, consider the source.
koluch is offline   Reply With Quote
Old 06-25-2009, 10:32 AM   #7 (permalink)
Bug Hunter
 
Join Date: Aug 2008
Location: Italia, near Britannia
Age: 24
Posts: 4,041
Send a message via MSN to osd_daedalus
Default

Quote:
Originally Posted by koluch View Post
Fixed.

Need to make a small change in container.cs in the scripts AND the core.
Makes just the Player Backpack, not the containers inside, 550 stones.Containers placed inside retain their maxdefaultweight.
yes, it's already known and fixed. We are awaiting the implementation

But you know, when you mess up with the core times are always longer.
__________________
If you guys want ML, you are going to have to create it, submit it, and if it is good enough it will more than likely be added to the repository - Jeff
osd_daedalus is offline   Reply With Quote
Old 06-25-2009, 10:46 AM   #8 (permalink)
Master of the Internet
 
Lord_Greywolf's Avatar
 
Join Date: Dec 2005
Posts: 12,209
Send a message via Yahoo to Lord_Greywolf
Default

Quote:
Originally Posted by koluch View Post
Fixed.

Need to make a small change in container.cs in the scripts AND the core.
Makes just the Player Backpack, not the containers inside, 550 stones.Containers placed inside retain their maxdefaultweight.
please alsways post fixes, so others may use them as well
__________________
http://www.AoAUO.com

:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :)
Lord_Greywolf is online now   Reply With Quote
Old 06-28-2009, 01:14 PM   #9 (permalink)
Bug Hunter
 
Join Date: Aug 2008
Location: Italia, near Britannia
Age: 24
Posts: 4,041
Send a message via MSN to osd_daedalus
Default

Quote:
Originally Posted by Lord_Greywolf View Post
please alsways post fixes, so others may use them as well
yes sorry, it was on UOG-Demise forums, and now it's useless to post it because Mark included it in the last SVN.
I completely forgot about this thread, sorry about
__________________
If you guys want ML, you are going to have to create it, submit it, and if it is good enough it will more than likely be added to the repository - Jeff
osd_daedalus is offline   Reply With Quote
Old 06-28-2009, 01:23 PM   #10 (permalink)
Master of the Internet
 
Lord_Greywolf's Avatar
 
Join Date: Dec 2005
Posts: 12,209
Send a message via Yahoo to Lord_Greywolf
Default

actualy still good to post,
because not every one uses latest svn because their stuff is so customized, it would take weeks to upgrade it
or they have a custom core and do not want to try and merge changes,
or what ever the reason
__________________
http://www.AoAUO.com

:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :)
Lord_Greywolf is online now   Reply With Quote
Old 06-29-2009, 04:35 AM   #11 (permalink)
Bug Hunter
 
Join Date: Aug 2008
Location: Italia, near Britannia
Age: 24
Posts: 4,041
Send a message via MSN to osd_daedalus
Default

Quote:
Originally Posted by Lord_Greywolf View Post
actualy still good to post,
because not every one uses latest svn because their stuff is so customized, it would take weeks to upgrade it
or they have a custom core and do not want to try and merge changes,
or what ever the reason
You're right, these are unified diffs from svn 313 (before changings to these files) to svn 333 (actual):

In Server/Items/Container.cs:
Code:
Index: Container.cs
===================================================================
--- Container.cs    (revision 330)
+++ Container.cs    (revision 331)
@@ -108,21 +108,14 @@
         {
             get
             {
-                int maxWeight;
-
-                if ( Parent is Container )
+                if ( Parent is Container && ((Container)Parent).MaxWeight == 0 )
                 {
-                    maxWeight = ((Container)Parent).MaxWeight;
-
-                    if ( maxWeight > 0 )
-                        maxWeight = Math.Max( maxWeight, DefaultMaxWeight );
+                    return 0;
                 }
                 else
                 {
-                    maxWeight = DefaultMaxWeight;
+                    return DefaultMaxWeight;
                 }
-
-                return maxWeight;
             }
         }

In Scripts/Items/Containers/Container.cs
Code:
Index: Container.cs
===================================================================
--- Container.cs    (revision 313)
+++ Container.cs    (revision 332)
@@ -190,6 +190,21 @@
             Weight = 3.0;
         }
 
+        public override int DefaultMaxWeight {
+            get {
+                if ( Core.ML ) {
+                    Mobile m = ParentEntity as Mobile;
+                    if ( m != null && m.Player && m.Backpack == this ) {
+                        return 550;
+                    } else {
+                        return base.DefaultMaxWeight;
+                    }
+                } else {
+                    return base.DefaultMaxWeight;
+                }
+            }
+        }
+
         public Backpack( Serial serial ) : base( serial )
         {
         }
This way, only the backpack that does the part of "player backpack", in case ML expansion is activated, will inherit the new 550 weight limit. All other backpacks still have 400 weight limit, unless locked down and secured. Just like OSI.
Attached Files
File Type: zip containerpatches.zip (754 Bytes, 6 views)
__________________
If you guys want ML, you are going to have to create it, submit it, and if it is good enough it will more than likely be added to the repository - Jeff
osd_daedalus is offline   Reply With Quote
Old 06-29-2009, 10:30 AM   #12 (permalink)
Forum Novice
 
koluch's Avatar
 
Join Date: Mar 2004
Location: Wisconsin
Age: 46
Posts: 868
Red face

Quote:
Originally Posted by koluch View Post
Fixed.

Need to make a small change in container.cs in the scripts AND the core.
Makes just the Player Backpack, not the containers inside, 550 stones.Containers placed inside retain their maxdefaultweight.
Sorry was a fast post, but yes the 333 svn has the fix in.
__________________
If the words are coming from someone whose opinion you value, think it over, if not, consider the source.
koluch is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5