Looking for a mod

Discussion in 'Mod Discussions' started by sierra159, August 11, 2016.

  1. sierra159

    sierra159 Member

    Messages:
    60
    Likes Received:
    40
    Hey PA forums! Long time no see!

    Recently, I got back to playing Planetary Annihilation after a long hiatus, and found that I can't seem to locate a mod that I used before the new update. I don't remember the mod's name, but it changed the queue build for certain structures from lines to squares/circles (like in older versions of PA). If someone could tell me the name of this mod and if it is still available, that would be most appreciated!

    Thanks!
  2. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    Not sure, but that's an easy one to make fortunately. Which buildings did it change?
    sierra159 likes this.
  3. sierra159

    sierra159 Member

    Messages:
    60
    Likes Received:
    40
    I believe it changed power plants (Tier 1/Tier 2), storage (metal/power), and... well, just those two I think.
  4. Clopse

    Clopse Post Master General

    Messages:
    2,535
    Likes Received:
    2,865
    I think you may be mistaken, back when area builds first came out energy and storage where "circle build" , and I believe it was zaphod that made a mod to make these two units "line build". Since then uber changed it to line build so the mod was no longer needed. That's the only one I can think of.
    sierra159 likes this.
  5. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    Yeah, I'm not sure if that mod existed either. But we can play around with it to see if you can get what you want. After that we can publish a proper mod that everybody can download.

    So first, open the file "<PA Install dir>/media/pa/units/land/energy_plant/energy_plant.json" in a plain text editor. It will contain a bunch of text separated by commas. One of them should be:
    Code:
    "area_build_type":"Line"
    You can change that to
    Code:
    "area_build_type":"Sphere","area_build_separation":1.0
    The number 1.0 you can change until you find something you are happy with.

    The full file should now be:
    Code:
    {"base_spec":"/pa/units/land/base_structure/base_structure.json","display_name":"!LOC:Energy Plant","description":"!LOC:Basic manufacturing- Produces energy.","max_health":1000,"build_metal_cost":400,"atrophy_rate":7.5,"atrophy_cool_down":15.0,"spawn_layers":"WL_AnyHorizontalGroundOrWaterSurface","area_build_type":"Sphere","area_build_separation":1.0,"production":{"energy":600},"unit_types":["UNITTYPE_Structure","UNITTYPE_EnergyProduction","UNITTYPE_Basic","UNITTYPE_CmdBuild","UNITTYPE_FabBuild","UNITTYPE_Economy"],"recon":{"observer":{"items":[{"layer":"surface_and_air","channel":"sight","shape":"capsule","radius":100},{"layer":"underwater","channel":"sight","shape":"capsule","radius":100}]}},"model":[{"layer":"WL_LandHorizontal","filename":"/pa/units/land/energy_plant/energy_plant.papa","animations":{"idle":"/pa/units/land/energy_plant/energy_plant_anim_work.papa"},"animtree":"/pa/anim/anim_trees/constant_idle_anim_tree.json","skirt_decal":"/pa/effects/specs/skirt_energy.json"},{"layer":"WL_WaterSurface","filename":"/pa/units/sea/sea_energy_plant/sea_energy_plant.papa","animations":{"idle":"/pa/units/land/energy_plant/energy_plant_anim_work.papa"},"animtree":"/pa/anim/anim_trees/constant_idle_anim_tree.json"}],"events":{"build_complete":{"audio_cue":"/SE/Build_Complete/energy"},"died":{"audio_cue":"/SE/Death/Factory","effect_scale":0.5}},"audio":{"selection_response":{"cue":"/SE/Selection/structure/energy"}},"fx_offsets":[{"type":"idle","filename":"/pa/units/land/energy_plant/energy_plant_idle.pfx","offset":[0,0,5]}],"headlights":[{"gobo":"/pa/effects/textures/gobo/spotlight_gobo.papa","offset":[5.25,0.0,6.75],"orientation":[35.0,0.0,0.0],"near_width":5.5,"near_height":5.5,"near_distance":2.5,"far_distance":15.0,"color":[1.0,1.0,1.0],"intensity":1.0},{"gobo":"/pa/effects/textures/gobo/spotlight_gobo.papa","offset":[-5.25,0.0,6.75],"orientation":[-35.0,0.0,0.0],"near_width":5.5,"near_height":5.5,"near_distance":2.5,"far_distance":15.0,"color":[1.0,1.0,1.0],"intensity":1.0},{"gobo":"/pa/effects/textures/gobo/spotlight_gobo.papa","offset":[0.0,-5.25,6.75],"orientation":[0.0,35.0,0.0],"near_width":5.5,"near_height":5.5,"near_distance":2.5,"far_distance":15.0,"color":[1.0,1.0,1.0],"intensity":1.0}],"lamps":[{"offset":[5.25,0.0,6.75],"radius":2.0,"color":[1.0,1.0,1.0],"intensity":2.0},{"offset":[-5.25,0.0,6.75],"radius":2.0,"color":[1.0,1.0,1.0],"intensity":2.0},{"offset":[0.0,-5.25,6.75],"radius":2.0,"color":[1.0,1.0,1.0],"intensity":2.0},{"offset":[0.0,-2.71,1.1],"radius":3.0,"color":[1.0,1.0,1.0],"intensity":1.0,"bone":"bone_rotor"},{"offset":[-2.44,1.34,1.1],"radius":3.0,"color":[1.0,1.0,1.0],"intensity":1.0,"bone":"bone_rotor"},{"offset":[2.44,1.34,1.1],"radius":3.0,"color":[1.0,1.0,1.0],"intensity":1.0,"bone":"bone_rotor"}],"selection_icon":{"diameter":21.5},"mesh_bounds":[10,10,11.3],"placement_size":[15,15],"TEMP_texelinfo":15.8224}
    Does that do what you want?
    sierra159 likes this.
  6. sierra159

    sierra159 Member

    Messages:
    60
    Likes Received:
    40
    Wow. That seems to be exactly what I'm looking for. Thanks! Also, I found the name of the mod; It was Line to Circle.

    Edit: Hey, how would I go about making the changes to PA titans?

    Edit 2: Nvm. Titans and PA share files.
    Last edited: August 12, 2016
  7. sierra159

    sierra159 Member

    Messages:
    60
    Likes Received:
    40
    Ok, sorry for the double post, but @DeathByDenim, you are a saint! I did the edits you posted and now all of my power plants build in nice compact formations! It's just what I needed! :D Thanks you so much for the assistance!
  8. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    Sure. If you want, we can make it into a mod that people can download through the community mods button in PA.
    elodea and sierra159 like this.
  9. sierra159

    sierra159 Member

    Messages:
    60
    Likes Received:
    40
    I think that would be awesome. I'm sure I'm not the only one who likes building power plants in spheres!
  10. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    Great! Well, the first step is to set up the mod development environment. See here: https://wiki.palobby.com/wiki/Creating_your_first_mod
    After you've done that, you'll need to copy over the files you intend to modify while taking care to keep the path the same. So for example, your T1 power generator can be found in "<PA Install Dir>/media/pa/units/land/energy_plant". Then, in your mod, you should create the directory "pa". In that "pa" directory you should create a new directory "units", and in the directory "units" you should create "land", etc. Finally, you copy the file "<PA Install Dir>/media/pa/units/land/energy_plant/energy_plant.json" into "<Mod Dir>/pa/units/land/energy_plant". You should now have a working mod that changes the build pattern for the T1 energy generator.

    Verify that it works by changing the file "<PA Install Dir>/media/pa/units/land/energy_plant/energy_plant.json" back to line build as it was originally. You can also verify the Steam game cache to revert any changes you made to the files in "<PA Install Dir>". If you disable your mod, you should build in lines, if you enable your mod, you should build in circles.

    If that works, you can do the same thing for the T2 power plant, and maybe metal/energy storage or whatever other buildings you want.
    elodea, killerkiwijuice and sierra159 like this.
  11. sierra159

    sierra159 Member

    Messages:
    60
    Likes Received:
    40
    Thanks for the guide and assistance! I'll see about setting it up sometime this afternoon! :D
  12. bmb

    bmb Well-Known Member

    Messages:
    1,497
    Likes Received:
    219
    I do remember the mod appearing shortly after the change was made. So you're not alone!
  13. mazar83

    mazar83 Active Member

    Messages:
    118
    Likes Received:
    26
    I am also looking for the line-to-circle mod. @DeathByDemin mentioned incorporating it into the community mods. Has that happened? If so, what is it called now? @BmB said it "appeared shortly after the change." Umm, what change? Thanks!
  14. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    The change where Uber themselves changed the build mode of power generators and such to lines instead of circles. I think @sierra159 may have lost interest recreating the mod. Are you interested? :)
    The instructions in my previous post are still valid and I can help you out: https://forums.uberent.com/threads/looking-for-a-mod.71958/#post-1134162
  15. mazar83

    mazar83 Active Member

    Messages:
    118
    Likes Received:
    26
    Hi DeathByDenim. I think I will try to recreate the line-to-circle mod. I would really like to have an in-game switch between line and circle. Do you have any advice about that?
  16. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    I'm afraid the in-game switch isn't possible. The files responsible for the build shape are read on start-up and can't be changed afterwards.
  17. mazar83

    mazar83 Active Member

    Messages:
    118
    Likes Received:
    26
    Hmm, but there are other in-game switches like for movement. For example, roam, maneuver, and hold position. Is that type of thing possible to implement in a mod?
  18. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    Not that I know of, but I could be wrong of course. :)

Share This Page