BetterStability

A complete re-implementation of the stability system

Total Downloads: 2,553 - First Release: Mar 28, 2015 - Last Update: Jun 15, 2015

4.42857/5, 7 likes
  1. dcode updated BetterStability with a new update entry:

    0.6.0

     
  2. There is a small but when players can't target pillars to upgrade them and this cause huge problems with base raiding.
    So i made a small fix to that:
    Code:
    [HookMethod("OnBuildingBlockUpgrade")]
            private void OnBuildingBlockUpgrade(BuildingBlock block, BasePlayer player, BuildingGrade.Enum grade)
            {
                List<BuildingBlock> supports;
                List<BuildingBlock> supported;
                BuildingBlockHelpers.GetAdjacentBlocks(block, out supports, out supported);         
                if (supports.Count == 0)
                    return;
                foreach(var item in supports)
                {
                    if (item.blockDefinition.fullName == "build/pillar")
                    {
                        if (item.grade < grade)             
                            SetGrade(item, grade);                 
                    }
                } 
            }
         
            /////////////////////////////////////////////////////
            ///  SetGrade(BuildingBlock block, BuildingGrade.Enum level)
            ///  Change grade level of a block
            /////////////////////////////////////////////////////
            private static void SetGrade(BuildingBlock block, BuildingGrade.Enum level)
            {
                block.SetGrade(level);
                block.health = block.MaxHealth();
                block.SendNetworkUpdate(BasePlayer.NetworkQueue.Update);
            }
    
    and insert this:
    Code:
    foreach(var item in supports)
                {
                    if (item.blockDefinition.fullName == "build/pillar")
                    {
                        if (item.grade < block.grade)             
                            SetGrade(item, block.grade);                 
                    }
                }    
    into "UpdateStability" method after "BuildingBlockHelpers.GetAdjacentBlocks(block, out supports, out supported)" row
     
    Last edited by a moderator: Mar 29, 2015
  3. dcode updated BetterStability with a new update entry:

    0.7.0


    [DOUBLEPOST=1427675597][/DOUBLEPOST]From the updated overview page:

    To make pillars upgradeable under all circumstances, BetterStability re-positions walls slightly to keep pillars always accessible from the backside:

    View attachment 7409
     
  4. dcode updated BetterStability with a new update entry:

    0.7.1


    [DOUBLEPOST=1427676558][/DOUBLEPOST]Looks like this isn't working perfectly at the edges of buildings, though, i.e. if the wall prefab includes a crazy pillar on its own :(
     
    Last edited by a moderator: Mar 30, 2015
  5. How about to use my idea with auto upgrade but optionally take cost of pillars upgrade? It can easily be done, i can show you the way if you want.
     
  6. I considered that, too, but I feel like this does not get down to the root. So I am trying something more pragmatic :)
     
  7. for some reason people cant build stairs on blocks at all. i just refunds them. i have tested it myself. i placed a foundation. placed pillars placed walls, then placed a block on said foundation and then stairs on said block...it wont place says its not stable. it works if u do a half high floor only.


    also when u delete a foundation below a floor everything above that floor stays floating
     
    Last edited by a moderator: Apr 2, 2015
  8. Which version are you using?
     
  9. Not possible with that plugin.
     
  10. the current version on this page
     
  11. Have you tried deleting config/BetterStability.json already? Pretty much every update required this till today.

    oxide.unload BetterStability
    # delete the file
    oxide.load BetterStability
    [DOUBLEPOST=1428008287][/DOUBLEPOST]Just built that on my server running the plugin, to be sure. This is apparently working, so there must be something else going on with your setup.
     
  12. will try
    [DOUBLEPOST=1428009750][/DOUBLEPOST]actually i removed all files related to the plugin and the issue stays. ever after 2 restarts

    p.s. this is the only new plugin as well so i know its not anything else
    [DOUBLEPOST=1428010817][/DOUBLEPOST]ahahha found it! it was a config left from a build blocking plugin! all is good with ur plugin now! its working great!
     
    Last edited by a moderator: Apr 2, 2015
  13. after last update

    Code:
    [4/9/2015 5:08:44 PM] [Oxide] 5:08 PM [Error] Failed to call hook 'OnEntityBuilt' on plugin 'BetterStability' (NullReferenceException: Object reference not set to an instance of an object)
     
  14. Sorry, not able to reproduce the error. Let me know once you have an idea how this happens exactly :)
     
  15. dcode updated BetterStability with a new update entry:

    0.7.2

     
  16. Error

    Code:
    [4/10/2015 3:15:13 AM] [Oxide] 3:15 AM [Error] Failed to call hook 'OnEntityBuilt' on plugin 'BetterStability' (NullReferenceException: Object reference not set to an instance of an object)
     
  17. Still not able to reproduce, please provide me with some details on how to trigger this.