[REL] Cruise Missile/Flying Bomb

Discussion in 'Released Mods' started by bsergent, January 27, 2015.

  1. bsergent

    bsergent Active Member

    Messages:
    236
    Likes Received:
    73
    Can someone link me to the stuff I need to read to make that happen?

    I plan to remix existing game assets, so I don't need blender etc type info. Just how to get a new unit to show up in with the other t1 air craft. (gw and skirmish)

    Thank you for your time :)

    Update: Download link: https://copy.com/dz8I4yoiF3UBVAIu/com.pa.Innomen.CruiseMissile.zip
    Last edited: February 4, 2015
  2. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    Well if you just want to add a new unit, you just need to edit the unit_list.json and the build.js

    Then you can adjust the tech and how the unit is built in it's own .json and the factory .json.
    bsergent likes this.
  3. bsergent

    bsergent Active Member

    Messages:
    236
    Likes Received:
    73
    Last edited: January 28, 2015
  4. bsergent

    bsergent Active Member

    Messages:
    236
    Likes Received:
    73
    Last edited: February 4, 2015
  5. trialq

    trialq Post Master General

    Messages:
    1,295
    Likes Received:
    917
    I've only briefly looked, one thing I noticed is you can't put comments in json files.
    bsergent likes this.
  6. bsergent

    bsergent Active Member

    Messages:
    236
    Likes Received:
    73
    Derp :(

    Thanks.
  7. bsergent

    bsergent Active Member

    Messages:
    236
    Likes Received:
    73
    Ok! Progress! Removing the comments helped.

    Now I have a broken image "unit" if I attempt to build the unit the server crashes.

    My ultimate goals are as follows. Is cloning the fighter the best way to go about this?

    I assume it needs to be server mod to apply to both GW and skirmish? Or will I need to make two mods like I did with logical changes?

    Concept: A cruise missile/kamikaze aircraft.

    I want it to have the model of the catapult's missile or some other obvious missile shape.
    I'd like it to be somewhat larger.
    I want its blast effect to be the equivalent of a t1 arty hit.
    I want it to make it cost twice as much as a bomber and have the same hit points.
    I want it to prioritize static defense structures when set to area attack.
    I want it buildable by basic air.

    What should I do?

    Thanks once again for your help trialq :)
  8. dom314

    dom314 Post Master General

    Messages:
    896
    Likes Received:
    1,196
    The first time a unit is made, the engine will load the json file for that unit. If the game crashes it usually means that one of the paths where you link to another file is broken. Try checking all the paths in your json file.
  9. bsergent

    bsergent Active Member

    Messages:
    236
    Likes Received:
    73
    I know at least the path to the build icon is broken. But I don't see how. All the paths look right to me, but I have no idea what I'm doing. The only difference between the fighter and the clone is this:

    Original fighter.json
    Code:
       "model":{
          "filename":"/pa/units/air/fighter/fighter.papa",
          "arrows":5
    air_cruise.json
    Code:
       "model":{
          "filename":"/pa/units/air/air_cruise/missile_tactical.papa",
          "arrows":5
    I tried linking to that papa file directly and then I tried putting it in the root folder of the cloned unit.

    I guess it just doesn't like that file/model?
  10. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    Have you checked the crashlog?

    %localappdata%\uber entertainment\planetary annihilation\log
  11. bsergent

    bsergent Active Member

    Messages:
    236
    Likes Received:
    73
    Good idea.

    Ok first I got this...

    Code:
    [20:49:35.251] ERROR /pa/units/air/air_cruise/missile_tactical_diffuse.papa: open failed
    [20:49:35.251] ERROR Failed to load texture resource /pa/units/air/air_cruise/missile_tactical_diffuse.papa
    [20:49:35.251] ERROR /pa/units/air/air_cruise/missile_tactical_material.papa: open failed
    [20:49:35.251] ERROR Failed to load texture resource /pa/units/air/air_cruise/missile_tactical_material.papa
    [20:49:35.251] ERROR /pa/units/air/air_cruise/missile_tactical_mask.papa: open failed
    [20:49:35.251] ERROR Failed to load texture resource /pa/units/air/air_cruise/missile_tactical_mask.papa
    So I copied those files to the cruise root, now I get this:

    I don't know what to do about that.

    Still no build icon.
  12. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    Build icon has to have the exact same name as the model file.
  13. bsergent

    bsergent Active Member

    Messages:
    236
    Likes Received:
    73
    Where is that referenced? What do I change to make that happen?
  14. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    I lied, it's not the model file, I'm being a derp, it's the unit.json file.

    So if your unit.json is called asdfhg.json then your image file has to be called asdfhg.png.
  15. bsergent

    bsergent Active Member

    Messages:
    236
    Likes Received:
    73
  16. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    Literally the only thing that affects the model is the filename inside the .json. If that path is correct and the model is in the mod directory NOT the vanilla directory, it'll work.
  17. bsergent

    bsergent Active Member

    Messages:
    236
    Likes Received:
    73
  18. GoodOak

    GoodOak Active Member

    Messages:
    323
    Likes Received:
    244
    This is kind of a crappy "is it plugged in" suggestion, but have you tried adding your unit in a "clean" install with no other mods? A clean folder, then carefully putting my stuff back in, double checking as I go has worked for me many times.
    bsergent likes this.
  19. bsergent

    bsergent Active Member

    Messages:
    236
    Likes Received:
    73
    It is a very good suggestion. It's easy enough it disable everything and test it. :) I'll edit this post with the result.

    Edit: Nope, exact same behavior.

    [​IMG]
    Last edited: January 28, 2015
  20. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    Wait so you're not crashing anymore?

    If you want to add new icons you'll need to make one in photoshop and place it inside a UI folder in your mod.

    "\ui\main\game\live_game\img\build_bar\units" should be where you place the icon. It needs to be named the exact same thing as the unit. Eg., the inferno's build bar icon name is "tank_armor.png"

Share This Page