Jump to content

Erebus

Member
  • Posts

    3
  • Joined

  • Last visited

Posts posted by Erebus

  1. The building with MBG_Killhouse_2_InEditor may also be called land_mbg_killhouse_2 in your database or building scripts. This is why there's a second class construction in the CfgBuildingPos.hpp file that looks like this:

     

    class land_mbg_killhouse_2: MBG_Killhouse_2_InEditor {};

     

    ... which tells the loot system to treat any instance of the building being called the second name the same as the first.

     

    - e

    Ahhh, so I should have left that part in, huh?

     

    Thanks for your quick response! ;)

     

    EDIT- So I just added all the code that was included in the script and pasted it into mine, and got the 'Waiting for Host' error. I noticed that the code has the building numbers a bit...off?:

     

    class land_mbg_killhouse_3: MBG_Killhouse_3_InEditor {};
    class MBG_Killhouse_4_InEditor : Military {
    lootChance = 0.5;
    lootPos[] = {
    {-5.771,-4.366,-3.843},{-5.034,-0.855,-3.843},{-5.611,2.826,-3.843},{-5.56,6.752,-3.843},{0.806,4.743,-3.843},{6.688,6.477,-3.843},
    {7.413,-0.894,-3.843},{4.744,1.314,-2.119},{0.52,-5.068,-0.543},{-2.378,-4.263,-0.543},{-2.25,-0.022,-0.543},{7.028,-0.581,-0.543},
    {5.938,-3.238,-0.543},{-6.629,3.109,-0.543},{5.538,6.209,-0.543},{4.413,4.298,-0.543}
    };
    lootPosZombie[] = {
    {-5.034,-0.85,-3.843},{5.538,6.2,-0.543},{7.413,-0.89,-3.843},{7.028,-0.58,-0.543}
    };
    };
     
    The script changed the number from 3 to 4? Or is that for the last line of script before it? 
  2.  

    Well, that depends on whether or not you have a custom loot system installed.

     

    Step1 would be to install a custom loot system with all default values, before you start changing things. I won't go into that. There are tons of guides available.

     

    Step 2 would be to splice into your existing basic custom loot files any loot specifications you need.

     

    But that's a gross oversimplification... I know.

     

    Look, under Epoch there are four files that control loot spawning.

     

    CfgLoot.hpp and CfgLootSmall.hpp define classes of loot distribution -- they attach names or labels to assortments of items that are grouped together to form a convenient loot class, like "office" or "hunter" or "hospital"...

     

    CfgBuildingLoot.hpp defines classes of buildings and contain particular assortments of loot and zeds. Each type of building defined receives a basic definition of loot class from the first two files and then the configuration data adds base chances for how many zeds and how much loot. Sometimes the specs are entirely in terms of assortments of loot already defined. Sometimes the specs are entirely new assortments unique to a particular type of building. Sometimes it's a mix. Thats the beauty of the system. It's very, very flexible. It defines a hierarchical configuration where any chain of tags can be used to track data down to any specified branch, like using a nifty XML configuration without the XML.

     

    Finally, CfgBuildingPos.hpp assigns, generally, each specific class ID of each specific building, vehicle wreck, fixture, etc, to a class of building types and type of loot assortment AND lists the specific locations within that particular building where things can show up.

     

    SO... if you just want to add buildings, you can use your default loot system because it already defines all the items and assortments in use on your specific mod server. All you need to do is find the building class IDs you need and copy and paste them into your corresponding file.  This assumes the loot assortment class type is defined. As I've said before, I have MilitaryOffice, Construction, and Slum loot assortments defined. If you use ONLY the CfgBuildingPos.hpp file, you would need to make sure any references to those assortment classes are replaced by assortments you have defined, like "Military", "Industrial", and "Residential".

     

    Example:

     

    Let's assume Overpoch uses the same basic four-file system Epoch does and you've already got a basic custom loot system installed on your server or you're explicitly modifying the default config or you're using a mission file with loot config overrides or something. You've built an area that uses the BioTech Hotel, and of course it's not spawning loot.  You can go into MY CfgBuildingPos.hpp and copy out the class definition that starts with:

     

    class Land_aif_hotel_bio: Biotech {
     
    Then there are some assorted variables, three big huge blocks of coordinates, and two a closing bracket-semicolon. All you need to do is paste that entire block into your CfgBuildingPos.hpp -- each class definition stands by itself -- and replace "Biotech" with "Office" or "Industrial" or some other loot assortment your server code supports. And you're done. The building will spawn loot and zeds according to those class definitions.
     
    Once you review and understand how your loot system works, taking the little bits of the expanded system is very straightforward.

     

     

    Okay so I found my CfgLootPos.hpp and copied over your code for the MPG_KillHouse_2_InEditor just like this:

     

    class MBG_Killhouse_2_InEditor : Military {
        lootChance = 0.5;
    lootPos[] = {
    {-1.139,2.284,-2.799},{4.708,5.884,-2.799},{3.996,3.682,-2.799},{5.735,-4.911,-2.799},{2.547,-5.23,-2.799},{-0.453,0.404,-2.799},
    {-6.458,-4.221,-2.799},{-4.776,4.803,-2.799},{-5.59,1.261,-2.799},{4.044,-0.2985,0.502},{5.552,-4.471,0.502},{1.542,-4.25,0.502},
    {-4.869,-4.003,0.502},{1.289,-0.182,0.502},{-5.129,2.894,0.502},{-5.804,-4.118,3.801},{-1.459,4.396,3.801}
    };
    lootPosZombie[] = {
    {4.708,5.88,-2.799},{-5.59,1.26,-2.799},{1.289,-0.18,0.502},{1.542,-4.2,0.502}
    };
    };
     
    And when I pack the PBO, and start up the game, there is no loot spawning at all in that building. I've waited a bit to make sure the loot isn't just taking time to spawn, but I've gotten nothing so far. Am I missing something? I have an OverPoch server, not sure how that would change things. I'm a newb by the way, lol! 
×
×
  • Create New...