Results 1 to 5 of 5

Thread: A lil help here?

  1. #1
    Survivor
    Join Date
    Mar 2016
    Posts
    88
    Rep Power
    0

    A lil help here?

    I'm trying to modify my game but I have questions:
    * What is the mods folder for? The wiki isn't really telling me.
    * How to make crafting return back jars?
    * Is it possible to open the console in the main menu?
    * Is count=all equivalent to count=<number of entries in the group> in loot.xml? Or what? Is there anybody knowledgeable how exactly does the loot system work?
    * Can I make a loot entry to be guaranteed to spawn into a container together with other items, if any?
    * Can I make a block automatically and instantly turn into another block? UpgradeRated has a noticeable delay and also seem to have a random variance.

  2. #2
    Colony Founder Valmar's Avatar
    Join Date
    Jan 2015
    Posts
    4,121
    Rep Power
    1
    Mods folder is used for mods that have custom icons/textures. It's also used for servers when adding Alloc's Server Fixes.

    You can't make crafting return two items - it only can return one. You can make consuming the crafted item return a jar, though.

    Count="all" will tell the lootgroup to, when its called for, to give everything within the group.

    Yes you can make a loot entry that is guaranteed to spawn in a container.

    Yes you can make a block instantly and automatically turn in another. You have the right approach but using the wrong property. Use the plantgrowing class instead and set the growth rate to something like 0.01 to be basically instant.

  3. #3
    Survivor
    Join Date
    Mar 2016
    Posts
    88
    Rep Power
    0
    Thanks! But I'm not quite done yet:

    *
    Count="all" will tell the lootgroup to, when its called for, to give everything within the group.
    I don't get this, I have conflicting ideas on how the loot system works. What exactly does it mean it spawns all listed items? Does it ignore probabilities, or does it make it just to try and place as much entries as possible, respecting them?
    * If yes, then how? I want, for example, all zombies and corpses to always come with clothes, at least one, but not limited to, plus any other items, if any, they are optional, but should still spawn together sometimes.
    * Is it possible to scale up (enlarge) a block that uses a ModelEntity as its shape? I've reused an item's model, but in game it's too small, barely visible.

  4. #4
    Colony Founder Valmar's Avatar
    Join Date
    Jan 2015
    Posts
    4,121
    Rep Power
    1
    I'm not really sure how else to say it. If a group is set to have a count of "all" then if this group is ever called on by a container or other group this group will spawn everything within in that container. Probability will not matter, because it is told to drop EVERYTHING in the group. The only way to get probability in this regard is to set individual items in that group to have a count like "0,1" which would give it a 50% chance of spawning.




    Example:

    <lootgroup name="pistol+ammo" count="all">
    <item name="9mmBullet" count="3,10"/>
    <item name="gunPistol" count="1"/>
    </lootgroup>

    This means that if the pistol+ammo group is ever called on it will always give you one pistol and between 3-10 bullets.


    For what you're after if you want zombies to always drop clothes this is the easiest way to do it, for example...

    First I find the generic zombie loot, lootcontainer 15. I set its "count" to 1. So it will always spawn one thing.

    I then make two new groups above it. genericZombie and genericZombieLoot. I set genericZombie up to drop everything. I will set genericZombieLoot to have a count of "0,2" as this is what the lootcontainer had.

    I will setup the genericZombie group, which again is set to drop "all", to have the clothes group and the genericZombieLoot. I will then make the lootcontainer only have one entry - the genericZombie group.

    So what happens now is the lootcontainer is told to always spawn 1 item. This makes it pull from the genericZombie group - which is set to drop everything. So they will always get clothes from the clothes group and it will pull from the genericZombieLoot. The genericZombieLoot, however, has a count of 0,2 so it may still give nothing. Essentially it will be exactly the same as it is now except now you will always get clothes. Understand?


    <!-- lootcontainer 15 generic zombie loot-->
    <lootgroup name="genericZombieLoot" count="0,2">
    <item group="junk" prob="1"/>
    <item group="clothes" prob="0.19"/>
    <item group="rottenFood" prob="0.062"/>
    <item group="hazmatGear" count="1" prob="0.008"/>
    <item group="questChallenge" count="1" prob="0.0105"/>
    <item group="treasureMaps" count="1" prob="0.0105"/> <!-- total 2% for a quest thing -->
    <item name="facialPiercings" prob=".008"/>
    </lootgroup>

    <lootgroup name="genericZombie" count="all">
    <item group="clothes" />
    <item group="genericZombieLoot" />
    </lootgroup>

    <lootcontainer id="15" count="1" size="4,3" destroy_on_close="false" sound_open="UseActions/open_corpse" sound_close="UseActions/close_corpse" loot_quality_template="baseTemplate">
    <item group="genericZombie" />
    </lootcontainer>



    I do not know of any way to scale model blocks. Tried that before myself for the same reasons but never had any luck at it.
    Last edited by Valmar; 11-01-2016 at 03:16 PM.

  5. #5
    Survivor
    Join Date
    Mar 2016
    Posts
    88
    Rep Power
    0
    Alright, I'm back. Thank you for your help, Valmar. I still have questions, I hope you don't mind them:

    * How to make items other than the small rock to act as a decoy when thrown? I've copied code from the latter to the rotting flesh, it gets thrown, but doesn't seem to attract/distract anything even on a direct hit.
    * Am I right that "prob" in loot.xml (and anywhere else?) is actually a weight of a particular entry in the whole list of them? So say, two items with "prob" of 0.35 and 0.15 respectively mean there is actually 0.7 (0.35/0.5) chance of spawning the first item, and 0.3 for the second?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •