[REL] Logical Changes

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

  1. somdudewillson

    somdudewillson Member

    Messages:
    64
    Likes Received:
    22
    There can be only one response to this mod....

    YES!

    Also, AA turrets should be able to hit missiles. Or at least the T2 ones.
    You should also be able to use every land unit as a VERY tiny Halley.
    bsergent likes this.
  2. bsergent

    bsergent Active Member

    Messages:
    236
    Likes Received:
    73
    Aww, thanks :) I very much appreciate it :)

    AA hitting missiles actually doesn't make sense because an anti missile missile is a totally different design. It has to be much lighter and faster and doesn't need much payload at all, indeed simple collision is usually enough.

    But I believe sniper bots can hit them, and maybe I could make the laser towers shoot them, but that becomes a targeting vs power issue. Though laser point defense systems do exist in real life.

    Either way I don't see me doing work on this any time soon, I want to wait till the official updates settle down a bit before doing any more modding :)

    You have my full permission to clone/fork this mod. Not that anyone needed it :)
    somdudewillson likes this.
  3. somdudewillson

    somdudewillson Member

    Messages:
    64
    Likes Received:
    22
    Glad you're glad!

    I really just meant the T2 AA structure, since it seems to look awfully like some sort of rapid-fire turret platform, which I believe is used today to shoot down missiles.
    bsergent likes this.
  4. bsergent

    bsergent Active Member

    Messages:
    236
    Likes Received:
    73
    I thought maybe that'd be a fairly simple edit. But that it's merely a pain to propagate and test the change. Like I could goto the mod folder and open up the t2 aa folder and edit the tool weapon json...

    Look for something like "target_layers":["WL_Air","WL_LandHorizontal","WL_WaterSurface"] and edit that, but looking at the sniper's current tool/wep it looks like it would be way more complicated:

    Code:
    {
       "base_spec":"/pa/tools/base_shell_turret/base_shell_turret.json",
       "ammo_id":"/pa/units/land/bot_sniper/bot_sniper_beam_ammo.json",
       "rate_of_fire":0.25,
       "idle_aim_delay":0.1,
       "max_range":140,
       "yaw_rate":3600,
       "pitch_rate":3600,
       "yaw_range":180,
       "pitch_range":89,
       "spread_fire":true,
       "auto_attack":true,
       "manual_fire":true,
       "auto_task_type":"anti_entity",
       "anti_entity_targets":[
          "/pa/units/land/bot_tactical_missile/bot_tactical_missile_ammo.json",
          "/pa/units/air/bomber_adv/bomber_adv_ammo.json",
          "/pa/units/land/tactical_missile_launcher/tactical_missile_launcher_ammo.json"
       ],
       "target_layers":[
          "WL_Air",
          "WL_Orbital"
       ]
    }
    And knowing what I learned during the cruise missile creation process. (https://forums.uberent.com/threads/wip-cruise-missile-flying-bomb.67571/) I'm willing to now change my bet that such a change would be EXTREMELY complicated for me.

    It would involved like 5 pages of posts back and forth between me and the same 3 coders on this forum while they give me baby step nanoscale answers for every question and frankly I'd just rather not and I'm sure they'd rather not.

    I'm genuinely sorry. :/

    The pointless complexity of the code, the total lack of substantive documentation (spammy outdated wildly incomplete multiple wikis don't count) and the lack of released actual modding tools, has (probably) successfully driven me out of the modding game entirely. Also the steam community is a cesspool, and that just makes me want to play a different game entirely. :p

    As far as I can tell you're the only person that even likes my mod.
  5. somdudewillson

    somdudewillson Member

    Messages:
    64
    Likes Received:
    22
    No, not really. A layer change is quite easy. That wouldn't do the job though. What you need is in the tool_weapon for the anti-nuke launcher:
    Code:
    {"base_spec":"/pa/tools/base_missile_tactical_turret/base_missile_tactical_turret.json","tool_type":"TOOL_Weapon","ammo_id":"/pa/units/land/anti_nuke_launcher/anti_nuke_launcher_ammo.json","ammo_source":"factory","rate_of_fire":1.5,"max_range":300,"yaw_rate":0,"pitch_rate":0,"yaw_range":180,"pitch_range":180,"spread_fire":true,"firing_arc_yaw":180,"firing_arc_pitch":180,"manual_fire":true,"auto_attack":false,"auto_task_type":"anti_entity","anti_entity_targets":["/pa/units/land/nuke_launcher/nuke_launcher_ammo.json"],"target_layers":["WL_Air","WL_Orbital"]}
    Or, more specifically,
    Code:
    "auto_task_type":"anti_entity","anti_entity_targets":["/pa/units/land/nuke_launcher/nuke_launcher_ammo.json"]
    Then you just change the target to whatever ammo you want it to shoot down. At least, as far as I know.

    (PS: I got that just from looking through the default .json files.)
  6. bsergent

    bsergent Active Member

    Messages:
    236
    Likes Received:
    73
    It's easy enough to copy and paste into the mod to test that theory. If you successfully make the change I'll put it in the mod and add you as an author :)

    Your logic seems sound but as I discovered with the cruise missile project there is often invisible context.

    It's ironic how illogical code can often seem despite being a logic engine :)
  7. somdudewillson

    somdudewillson Member

    Messages:
    64
    Likes Received:
    22
    Yeah, there often is. I'd test it for myself, but for some reason whenever I try to load a local mod my game stops responding and devours all of my computer's memory so that it takes ~15 minutes just to close it.... Yeah.
  8. cybrankrogoth

    cybrankrogoth Active Member

    Messages:
    191
    Likes Received:
    57
    I'm really.... ignorant of lots of things that are happening, so please forgive me if my question has already been answered or is an obvious answer but...

    Are things like missiles coded as their own.. identity? If they were, isn't there a convenient or easy way for aa turrets to simply target [tactical missiles]?
    Maybe it's similar or the same in the same way anti nukes target nukes?
  9. somdudewillson

    somdudewillson Member

    Messages:
    64
    Likes Received:
    22
    Missiles and other projectiles are coded as their own identity. As to your other question... yes and no. No, you can't just tell AA turrets to target tactical missiles. You have to tell the turret to shoot down entities, and then specify what type of entity. Yes, in that you just have to copy over some lines from the anti-nuke launcher and change the target entity.
  10. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    There is more to that. In order for missiles to be valid targets, they need to have that "add to spatial DB" attribute which the nuke itself has.

    Be careful about that one, because it can cause major slow down if used on too many objects. It means that the object is added to a database which allows to query for targets in a certain range, but inserts to that database aren't for free. Having too many possible targets isn't a good thing either, so whatever you do, don't think about allowing a massive rocket barrage to be shot down individually.
  11. somdudewillson

    somdudewillson Member

    Messages:
    64
    Likes Received:
    22
    Dum Dee Dum... *Adds tag to every projectile* *makes T3 laser point defense target all projectiles* Wait, what was that last bit...?
  12. somdudewillson

    somdudewillson Member

    Messages:
    64
    Likes Received:
    22
    ...Huh, whaddya know, tactical missiles are in the spatial DB by default!
  13. bsergent

    bsergent Active Member

    Messages:
    236
    Likes Received:
    73
  14. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    moved to released mods
  15. robintick

    robintick Well-Known Member

    Messages:
    322
    Likes Received:
    290
    Is this inspired by TA where anything could (try) and shoot at everything ? because that would be great !
    I remember a group of 80 engineer planes all clumped together getting blown to smithereens by a single stray Big Bertha shot :D
    bsergent likes this.
  16. bsergent

    bsergent Active Member

    Messages:
    236
    Likes Received:
    73
    That's the general idea. To make it so that there are no obvious arbitrary invisible walls. I'm not sure if arty targets air but I would see no problem with putting it at the end of the target priority chain. Might as well take hail mary shots if there aren't any other viable targets.
    cdrkf likes this.
  17. bsergent

    bsergent Active Member

    Messages:
    236
    Likes Received:
    73
  18. bsergent

    bsergent Active Member

    Messages:
    236
    Likes Received:
    73
    Well unit cannon batching can't happen as far as I can tell. The unit cannon is essentially a unit itself more than it is a type of factory.

    Also, I tried to make the bomber drop a single projectile and make it stealth, but I am not confident of the balance values at all. I want there to be internal consistency, as explained before, and I'm getting to a point where I'm not sure I can do that due to my own limited memory. Also pretty sure the stealth doesn't work at all. I think I'd roll back that change anyway even if it did.

    What I mean by internal consistency is a meaningful relative logical difference between unit effects.

    Like the bomber appears to drop by default 7 projectiles, so I figured if I just drop one projectile that does 7x damage I'm good, but then the splash felt tiny and already we've well exceeded the damage done by a tech one artillery shell. Somehow that doesn't seem right.

    I feel like a lot of the values are off like that. Thinking about trying to fix it is daunting. Firstly it's hard to even fetch the numbers since they are scattered all over the place and secondly, I don't know what 90% of it really means and there is no exhaustive reference. I'm used to having an M to RTFM :) And even when I do sort of understand them it's hard to understand them relative to the unit in question. And it takes so long to make a change and test it. Even with sandbox and cheating tools to speed things up, you still have load times and situation manufacture time.

    And still a lot of it is guess work. What a splash radius of 20 look like in game, well I don't have a circle so I just have to blow stuff up for a while and get a feel for it.

    The various reference posts here aren't good enough because they are incomplete and some are probably wildly out of date now. It seems like there are 4 wikis or more and they are all sparse and out of date.

    Still, I'm hoping I can muddle through enough to get it to feel right. If not, no one will notice if I don't update my mods in a year anyway hehe. I honestly hoped there'd be more interest in a more logical experience. But I guess not. I guess this is the real reason 99% of movies are hilariously unrealistic, because when given a choice, people don't like it actually.

    I thought about making a spread sheet and using the values of a couple of base units and then adjusting other units as multiples of those values. But even that wouldn't be foolproof because it's just as hard to work out multiples to use. Like let's say dox is my baseline, what multiple of dox hit points do I use to arrive at the tech1 tank's hit points?

    Like I think a dox should have less hit points than a tank and more than an aircraft, but how much?

    It would be a lot easier if there were something like a unit editor. But the unit viewer mod is currently broken, at least for me.

    I feel pretty alone. No one else seems super interested in this, and I'm totally not a coder so every time I hit a wall I'm not sure if it's a wall or something totally cured elsewhere and I just can't find it. Like I said, no reference, so it's basically impossible for me to confirm or deny before commenting somewhere or pm-ing someone and feeling like a ditz.

    Also github seems purpose built to run off people not being paid to code 5 hours a day at least, and yet it's apparently the only decent tool for pushing and managing and sharing changes. But I can't personally use it at all. I don't even understand how it's supposed to work because it seems to flatly refuse to use anything like common shared storage parlance, though I'm sure it's all common coder jargon. (But seriously when you need a tutorial and a command line just to setup an account and use the uploader app, wow.)

    So I end up cludging around with notepad++, batch files, and 7zip trying to minimize via automation the time I spend fighting with syntax and folders and garbage, and maximize my time spent testing playing and creating.

    Also it feels like even a tiny tiny change forces me to shadow so much crap. And then they release another patch and it's like now I have to totally do all my changes over again because all the shadows all my edits are based on just changed.

    Right now the new units aren't loading in the version I have on pamm. I've fixed that locally but I just don't feel like uploading an update because it's a sizable pain. Copy the folder, edit the modinfo, rename the old zip, zip the new folder, wait for it to upload, create a copy share link, append the file name to the share link, log into github, give the link to the pamm updater, and finally click publish. Twice. Because bizzaro client/server mod distinction.

    I'm pretty close to just stopping for a long time.

    I think I'm just going to focus on my loadout mod pretty much from now on.

    Or maybe I'm just moody because it's late. Time will tell :)
  19. theawesomedog86

    theawesomedog86 New Member

    Messages:
    19
    Likes Received:
    2
    Please update game to titans!
  20. stuart98

    stuart98 Post Master General

    Messages:
    6,006
    Likes Received:
    3,888
    Not going to happen.

    Bsergent decided that Uber was the devil for trying to make it worth developing PA more and left.

    I'd suggest trying Galactic Annihilation out though.

Share This Page