A noob looking how to change annihilaser color to team color

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

  1. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    I have never made any mods, and i would really like to know how to start with something simple like this. If you would like to take credit and post on PAMM that is fine with me.

    I already know to edit settings in the metal_x_x_x .fbx files in the specs folder, but i am not sure what to add to make them correspond to team colors.

    Any help would be appreciated :D (there's literally no tutorials on this stuff)
  2. zaphodx

    zaphodx Post Master General

    Messages:
    2,350
    Likes Received:
    2,409
  3. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
  4. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
  5. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    Go ahead and try. Make sure to try to put the teamarmycolor as it is in ping.fbx because I tried making teamfabspray color and eventually succeeded, but just got white lathe at first until I looked at bgolus recommend seeing ping.fbx and saw that regular color goes in outer {} while teamarmycolor for some reason is used in the inner {}.

    I am not certain, like nukes, that annihilasers have ownership belonging to an army. They might be activated, destroy a planet, and be neutral in doing so. According to the game, an event destroyed a planet and the team commander was killed, the planet or com death isn't credited to the owner of the metal planet. If it is possible to credit one commander for another's death, I am pretty sure the game considers all of them simple occurances in themself and not credit of another player.
  6. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    My game actually crashed when i tried to fire the laser (i didn't expect it to work :D)

    I edited the metal_fire.fbx (something like that) in the spec folder.

    I obviously did something wrong but i will post the .fbx here if anyone wants to see what i did. (just copy these contents and paste them into .json editoronline or something like that for organization)
    Code:
    {"emitters":[{"spec":{"shader":"particle_clip","facing":"EmitterZ","red":6,"green":23.75,"blue":25,"alpha":0.5,"size":[[0,0],[0.03,1.0],[0.1,1.1],[0.25,1.05],[1,0]],"baseTexture":"/pa/effects/textures/particles/ring.papa"},"offsetZ":[[0,0],[0.25,450]],"sizeX":[[0,280],[0.25,30]],"emissionRate":40,"lifetime":0.25,"emitterLifetime":0.5,"bLoop":false,"killOnDeactivate":true,"endDistance":-1},"useArmyColor":1},{"spec":{"shader":"particle_transparent","facing":"AxialZ","sizeX":[[0,1],[1,0]],"sizeY":1,"red":6,"green":23.75,"blue":25,"baseTexture":"/pa/effects/textures/particles/dot.papa","dataChannelFormat":"PositionColorAndAlignVector"},"type":"CYLINDER_Z","allowNegativeZ":false,"offsetX":60,"offsetY":60,"offsetZ":-45,"velocityZ":-15,"velocity":-10000,"useRadialVelocityDir":true,"sizeX":20,"sizeY":150,"emissionRate":0,"lifetime":0.1,"emitterLifetime":2.0,"bLoop":false,"endDistance":-1},"useArmyColor":1},{"spec":{"shader":"particle_add_soft","red":1.2,"green":4.75,"blue":5.0,"alpha":[[0,10],[0.25,5],[0.5,2.5],[0.501,0.05],[1,0]],"cameraPush":0.5,"baseTexture":"/pa/effects/textures/particles/softdot.papa"},"sizeX":450,"emissionBursts":1,"maxParticles":1,"lifetime":4.0,"emitterLifetime":1.0,"bLoop":false,"sort":"NoSort","endDistance":-1},"useArmyColor":1},{"spec":{"shader":"particle_transparent","facing":"AxialZ","polyAdjustCenter":0.5,"sizeX":1,"sizeY":[[0,0],[0.05,-1],[0.95,-0.75],[1,0]],"red":6,"green":23.75,"blue":25,"baseTexture":"/pa/effects/textures/particles/sharp_flare_half_tinted_blue_green.papa","dataChannelFormat":"PositionColorAndAlignVector"},"offsetZ":-45,"sizeX":180,"sizeY":4000,"emissionBursts":1,"lifetime":2,"emitterLifetime":2.0,"killOnDeactivate":true,"endDistance":-1},"useArmyColor":1},{"spec":{"shader":"meshParticle_transparent","shape":"mesh","facing":"EmitterZ","red":6,"green":23.75,"blue":25,"papa":"/pa/effects/fbx/particles/sphere_24sides.papa","materialProperties":{"Texture":"/pa/effects/textures/particles/flat.papa"}},"offsetZ":-44,"sizeX":175,"sizeRangeX":5,"emissionRate":600,"maxParticles":1,"lifetime":0.05,"emitterLifetime":2,"bLoop":false,"killOnDeactivate":true,"endDistance":-1},"useArmyColor":1},{"spec":{"shape":"pointlight","red":6,"green":23.75,"blue":25,"alpha":10},"offsetZ":200.0,"sizeX":400,"emissionBursts":1,"maxParticles":1,"lifetime":2,"emitterLifetime":1.0,"bLoop":false,"killOnDeactivate":true,"endDistance":-1},"useArmyColor":1},{"spec":{"shape":"pointlight","red":6,"green":23.75,"blue":25,"alpha":10},"offsetZ":10.0,"sizeX":200,"sizeRangeX":10,"emissionBursts":1,"maxParticles":2,"lifetime":2,"emitterLifetime":1.0,"bLoop":false,"killOnDeactivate":true,"endDistance":-1},"useArmyColor":1},{"label":"Spinning haze","spec":{"shader":"particle_add_soft","red":1.2,"green":4.75,"blue":5.0,"alpha":[[0,0],[0.1,1],[1,0]],"cameraPush":1,"baseTexture":"/pa/effects/textures/particles/softdot.papa"},"offsetX":{"keys":[[0.0,0.0],[0.075,66.57],[0.15,41.15],[0.225,-41.15],[0.3,-66.57],[0.375,0.0]],"stepped":true},"offsetY":{"keys":[[0.0,70.0],[0.075,21.63],[0.15,-56.63],[0.225,-56.63],[0.3,21.63],[0.375,70.0]],"stepped":true},"offsetZ":-23,"useArcLengthSpace":true,"sizeX":60,"emissionRate":20,"lifetime":0.35,"emitterLifetime":0.375,"bLoop":true,"killOnDeactivate":true,"t_sort":"NoSort","endDistance":-1},"useArmyColor":1},{"spec":{"shader":"particle_clip","red":[[0,6.0],[1.25,5]],"green":[[0,23.75],[1.25,0.2]],"blue":[[0,25.0],[1.25,0]],"alpha":[[0.0,0.25],[1.0,0.1]],"baseTexture":"/pa/effects/textures/particles/fire_puff.papa","dataChannelFormat":"PositionAndColor"},"offsetZ":-45,"velocityZ":1,"velocity":8000,"sizeX":140,"sizeRangeX":20,"emissionRate":300,"rotationRange":3.15,"rotationRateRange":0.25,"lifetime":0.1,"emitterLifetime":2.0,"killOnDeactivate":true,"useWorldSpace":true,"endDistance":-1},"useArmyColor":1},{"label":"trench glow","spec":{"shader":"meshParticle_ring_wave_add","shape":"mesh","facing":"EmitterZ","sizeX":0.1433,"sizeY":1,"red":6,"green":23.75,"blue":25,"alpha":[[0,1],[0.67,1],[0.671,0.2],[1,0]],"papa":"/pa/effects/fbx/particles/ringWave_highpoly.papa","materialProperties":{"Texture":"/pa/effects/textures/particles/uncompressed/fresnel_ramp.papa"}},"sizeX":780.0,"offsetZ":-10.0,"emissionBursts":1,"maxParticles":1,"lifetime":3,"emitterLifetime":1.0,"bLoop":false,"endDistance":-1},"useArmyColor":1},{"label":"full planet shockwave","spec":{"shader":"meshParticle_ring_wave_add","shape":"mesh","facing":"EmitterZ","sizeX":[[0,0.1433],[1,1]],"sizeY":[[0.9,0.14331],[1,0.5]],"red":1.2,"green":4.75,"blue":5.0,"alpha":[[0,0.25],[0.33,0.125],[0.67,0.01],[1,0]],"papa":"/pa/effects/fbx/particles/ringWave_highpoly.papa","materialProperties":{"Texture":"/pa/effects/textures/particles/explosionRingEdge.papa"}},"sizeX":1400.0,"offsetZ":10.0,"rotationRange":6.28,"emissionBursts":1,"lifetime":3.0,"emitterLifetime":2.0,"bLoop":false,"endDistance":-1},"useArmyColor":1},{"label":"pulse shockwave","spec":{"shader":"meshParticle_ring_wave_add","shape":"mesh","facing":"EmitterZ","sizeX":[[0,0.1433],[1,1]],"sizeY":[[0.9,0.14331],[1,0.5]],"red":1.2,"green":4.75,"blue":5.0,"alpha":[[0,0.25],[0.33,0.125],[0.67,0.01],[1,0]],"papa":"/pa/effects/fbx/particles/ringWave_highpoly.papa","materialProperties":{"Texture":"/pa/effects/textures/particles/explosionRingEdge.papa"}},"alpha":0.1,"sizeX":700.0,"offsetZ":10.0,"rotationRange":6.28,"emissionRate":2,"lifetime":1.5,"emitterLifetime":2.0,"bLoop":false,"endDistance":-1,"useArmyColor":1}]}
    Last edited: September 9, 2014
  7. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    Take a look at my picture below, I am sure it will help you figure it out all your own.

    This was taken from JsonView 0.9 for firefox. Many things exist like it, including a plugin for notepad++.

    Attached Files:

  8. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    I use http://jsonlint.com/.
    Also recommend running this to format the JSON/pfx files before editing for easy viewing: https://forums.uberent.com/threads/reformat-your-json-files.47529/
  9. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    I did some research on arrays, it looks like my format of useArmyColor:1 is wrong, but I'm still not sure what is means by infinite positive integer. Am I supposed to use a value other than 1? or do I specify the array value in some other way?

    Again I have little knowledge of coding :oops:
  10. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Removing the extra closing curly brace before "useArmyColor":1 allows the file to validate. Haven't actually tested it in-game to see if it works though.

    Attached Files:

  11. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    Yes, thus the highlighted part. It is a bracket, gotta count them brackets. The computer doesn't read it like its english, it reads it like instructions.

    When it reads this:
    {Do: [this]}, and also this}

    The "and also this" is as if it was written on another paper you didn't even give them, or written in the spanish section of the instructions which is ignored outright.

    Gotta make sure its {Do:[this], and also this}

    In your case, I believe "and also this" was everything after army color, over half the document. When the game tried putting that into graphics on your screen, it found no further instructions, couldn't continue, said F*** This, and left.

    Also, if it does work, gratz, if it don't then try another section of the bracket, perhaps read where it is placed in ping.fbx and place it next to it's neighboring data or just in a different part of the brackets. If it still doesn't work, perhaps Mr. Annihilaser doesn't have an owner :(
  12. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    The problem is, there is more closing brackets than opening brackets. And the useArmyColor parameter is sitting by itself. Eg, instead of:

    Code:
    {
      "emitters": [
        {
          "bLoop": false,
          "emissionRate": 40,
          "emitterLifetime": 0.5,
          "endDistance": -1,
          "killOnDeactivate": true,
          "lifetime": 0.25,
          "offsetZ": [],
          "sizeX": [],
          "spec": {},
          "useArmyColor": 1
        },
        {
          <emitter 2>
        },
        ...
      ]
    }
    It was

    Code:
    {
      "emitters": [
        {
          "bLoop": false,
          "emissionRate": 40,
          "emitterLifetime": 0.5,
          "endDistance": -1,
          "killOnDeactivate": true,
          "lifetime": 0.25,
          "offsetZ": [],
          "sizeX": [],
          "spec": {}
        },
        "useArmyColor": 1
      }  // error!
        {
          <emitter 2>
        },
        ...
      ]
    }
    Thus, the closing bracket before "useArmyColor" is incorrect, and should be removed :)
  13. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    Basically what I said. That too many brackets effectively stops the information of the code in it's place half way through the code. That the army color might likely go inside of another bracket anyway, in this case a further-in set of brackets.

    Tbh, I am no coder either, I just feel around it, but I do a decent job :p
  14. Fr33Lancer

    Fr33Lancer Well-Known Member

    Messages:
    595
    Likes Received:
    288
    You can't seriously think that was not the first thing I tried to do after they released the annihilaser ? :p
    I have the local mod folder already set up with all effects :D

    Unfortunately, from my tests, it didn't work (first PTE when included, didn't test since). Like Trophy said, seems there's no ownership.

    They did add it for commander explosion, but there was a reason behind it (for a fix). Not sure they will add it in this particular case, although that would be awesome. I don't doubt that if it's technically and easily feasible, they might consider it when they got less pressure, since they are very mod friendly.
  15. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    That's unfortunate to hear..... But technically, at least you did make a mod. At least you made one correctly, if it were in fact possible, it would have worked.
  16. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    lol. at least i did something.
  17. Fr33Lancer

    Fr33Lancer Well-Known Member

    Messages:
    595
    Likes Received:
    288
    Just re-tested, but as expected, it doesn't work.
    Some effects doesn't render at all, when the army color property is added, some seems to turn complete black. Need to investigate more about the latter.

    The only thing we have control over, because it has a team army, is the catalyst effect (in fact there are 2 blinking lights already using the army color by default):
    [​IMG] [​IMG]
  18. tigerwarrior

    tigerwarrior Active Member

    Messages:
    142
    Likes Received:
    49
    So want... Much worth...
  19. Antiglow

    Antiglow Well-Known Member

    Messages:
    342
    Likes Received:
    319
    any new news on this?
  20. Fr33Lancer

    Fr33Lancer Well-Known Member

    Messages:
    595
    Likes Received:
    288
    upload_2014-10-8_20-46-33.png
    Enabling it at every new build to check, so far no luck.
    squawkers13 and stuart98 like this.

Share This Page