"Doxstroyer" nuke causes a weird bug

Discussion in 'Mod Discussions' started by killerkiwijuice, November 9, 2014.

  1. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    Yeah I'm making too many threads :oops:

    My modded nuke creates a planet wide effect of destroying all dox. There seems to be a problem, though.

    When the nuke detonates, it will deal 45 damage to anything on the planet since it has a 15000 splash radius. But, when the shockwave hits the enemy factories, they get bugged, and the unit that's being produced inside the factory is destroyed and tries to rebuild, but then gets destroyed again. This happens for around 20-25 seconds, like a continuous cycle of units being cancelled/destroyed instantly.

    I have no idea what's causing this, like every other thing I find :rolleyes:

    maybe it's just a native bug? Or maybe Dox4Lyf is Illuminati?
  2. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    Just use the armor system to make it only damage dox.

    Look in base_structure and in the uber cannon ammo file for examples.
    killerkiwijuice likes this.
  3. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    so the "armor_damage_map"? I didn't think I could assign AT_BasicAssaultBot to that.
  4. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    I'm not sure if custom armortypes are possible. @raevn Spill your knowledge.
  5. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    Code:
      "armor_damage_map":{
        "AT_Structure":0.5,
        "AT_Commander":0.5
    What do the ".5" values represent before we go into custom armor types? (this was from the uber cannon)
  6. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    0.5 is 50% damage (1.0 is 100%, or normal damage - this is default, so it's doesn't need to be specifically specified).
    I've never tried making custom armour types; I imagine the AT_ in front means it maps to a constant on the back-end like unit types do, so I would guess custom ones aren't possible, but you never know - try assigning a new one to a unit, then give it a different damage value in another weapon.
  7. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
  8. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    But , if I understand the armor system correctly, does this mean I would have to specify every unit in the game except the dox to be 0% damage?

    Like, if i assign the nuke to deal 45 damage and put "AT_BasicAssaultBot: 1.0" in the map (assuming it works) then wouldn't it still damage every other unit?
  9. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    You could set the damage to 1 and make the armor system scale damage to dox by 45. ;)
  10. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    It still damages the other things though, right? Just, barely at all.

    EDIT: there should be an "include" and "exclude" part of the armor system :)

    wow, speculating on something that may or may not even exist
    Last edited: November 9, 2014
  11. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    If you can pull of custom types, you can always do AT_NotDox: 0

    The String AT_ exists in the binary. All the examples use something that looks like a UNITTYPE for the remainder, so you'll have to try your own, and then e.g. Custom1 if that fails.

    But maybe not. There is an AT_Vehicle whereas the UNITTYPE uses Tank, and Vehicle appears near AT_; on the upside there is also a None (AT_None?) you could use for the zero trick.

    It looks there will be an appropriate error message:

    Code:
    armorTypeFromString encountered unknown value [ 

Share This Page