FORUM ARCHIVED

How do I make an item include random bonuses

Discussion in 'Modding' started by Bohandas, Jun 22, 2012.

  1. Bohandas

    Bohandas Member

    How do I make an item include random bonuses? I tried including the <artifact quality="#" /> tag but it didn't do anything.

    for example, the following item spawns with no random bonuses:

    <item name="Candle of Conflagration" iconFile="items/quest_crystal_candle.png" overrideClassName="Candle" artifact="1">
    <price amount="2500" />
    <armour level="9" type="shield" />
    <artifact quality="2" />
    <damagebuff conflagratory="10" />
    <secondarybuff id="18" amount="7"/> <!-- sight radius -->
    <secondarybuff id="17" amount="4"/> <!-- trap sight radius -->
    <secondarybuff id="12" amount="-12"/> <!-- sneakiness -->
    <targetHitEffectBuff percentage="25" name="Ignition Bolt"/>
    <targetHitEffectBuff percentage="15" name="Blinding Flash"/>
    <description text="" />
    </item>
     
  2. LionsDen

    LionsDen Member

    I would love to be able to add random stats to an item but the only way that I know to do it is to krong it in the game.
     
  3. Bohandas

    Bohandas Member

    The tag <artifact quality="#" /> is supposed to make an item spawn with random bonuses and it seems to work with vanilla items like the timelord scarf. So why won't it work for me. Does anybody know exactly what the number in the tag represents?
     
  4. Kazeto

    Kazeto Member

    It represents the amount of random bonuses. And I reckon you are trying to test this item by giving it as a loadout item, which might be the cause of the problem.
     
  5. Bohandas

    Bohandas Member

    Actually I'm testing it by opening the game in debug mode and mashing "I" until it appears in my inventory (which takes a surprisingly long time; I generally have to empty my inventory multiple times before one appears); (also, things like timelord scarves are appropriately varied when generated via this method)
     
  6. FaxCelestis

    FaxCelestis Will Mod for Digglebucks

    i-generated items are a crapshoot in terms of artifact or not.

    Try physically spawning it with <loot name="Candle of Inflagration" /> at some location in a test room or the starting room.
     
  7. LionsDen

    LionsDen Member

    I did not know about the artifact quality giving that number of randoms. I just thought it was for when I send it to the museum as to how much xp I get. I'm going to have to rework some of my items. :)
     
  8. Bohandas

    Bohandas Member

    Perhaps you're right. DredMod said that it affects the number of randon bonuses, but since that's apparently not working perhaps you're the one who's right.
     
  9. Kazeto

    Kazeto Member

    No, he isn't "right" there. Artefact quality is the number of random bonus rolls the game performs when spawning an item. The problem is, sometimes, it just doesn't want to start rolling at all for some items, and while it can be solved by simply kronging said item (it'll get the random bonuses in addition to the one from Krong), there still is something weird happening. And I think it is related to the way it is spawned in the game.
     
    OmniNegro likes this.
  10. Null

    Null Will Mod for Digglebucks

    Or instead everyone else is right as well as the wiki rather than the one person who didn't know it and wasn't concluding that it didn't give that. Yes artifact quality is the number of bonuses it gets. Certain methods of spawning don't give the stats until they're forced to generate by kronging etc.
     
    OmniNegro and Kazeto like this.
  11. LionsDen

    LionsDen Member

    I did a quick test once I saw that and it does indeed give the number of random stats. Unless I set it for loadout in a skill which doesn't give me any of the random bonuses to start. Brax's shops also don't give the random bonuses which is why I always thought that it had to do with the amount of experience points from the skill send to the museum. The test I performed placed the item in the start room using the rooms.xml file. That one showed up with the random bonuses.
     
  12. Bohandas

    Bohandas Member

    I just now noticed something that seems very relevant; there seems to be a "randoms" value listed in a lot of armor definitions...

    The Time Lord Scarf, for example, includes the line

    " <armour level="10" type="neck" randoms="1" />"
     
  13. lccorp2

    lccorp2 Member

    That's for rings and necklaces, which have random stats by default.

    Setting that to randoms="0" makes them NOT have any bonuses.
     
  14. LionsDen

    LionsDen Member

    If you leave the randoms="1" out of the line for a neck type armor, it wont work. I think it may even crash the game. I know because I tried to figure out what was wrong with a necklace and was making all sorts of changes and asking for advice. As far as I know, it does nothing.

    EDIT: Dang, I was ninja'd. As well as being wrong. :rolleyes: