Author Topic: Devs please reveal ship owner relation loss formula that you use on C++ side  (Read 355 times)

Rinart73

  • Sr. Member
  • ****
  • Status:
    Offline
    Posts:
    323
  • Discord: Rinart73#7304
    • View Profile
Currently when you destroy a civilian NPC ship, game on C++ side calculates relation loss for the owner NPC faction.
And "sector/relationchanges.lua" uses completely different formula for calculating relations change for witnesses.

Because of that if we have 2 100% allied NPC factions and we'll destroy Faction 1 civilian ship this happens:
  • Faction 1 (owner) - 21k-36k rep loss in the starting sector - seems completely random
  • Faction 2 (witness) - stable 32k rep loss in starting sector. Because it follows formula from "sector/relationchanges.lua"

Please reveal C++ side formula for modders, some of us really need it.
« Last Edit: April 28, 2019, 01:49:00 AM by Rinart73 »



Hammelpilaw

  • Hero Member
  • *****
  • Status:
    Offline
    Posts:
    543
    • View Profile
    • Scrap Yard - Avofactory
Giving an npc ship even one shot inside the barrier with endgame weaps does -200k or more. And regain relations by selling asteroids is not possible once all asteroids are sold.

Sorry offtopic, thats just what I think when talking about relations... maybe we could sum up some relation issues and then report it.
Scrap Yard Galaxy
My mods and tools
My Workshop

If you find a bug in my mods please contact me.



Laserzwei

  • Sr. Member
  • ****
  • Status:
    Offline
    Posts:
    397
    • View Profile
I remember (back in 0.15/0.16), when I tried to reduce the impact of relationloss due to inflicted damage, that the damage applied to shields was in 1:1 ratio with the loss of relation. When the hull was hit the relationloss was higher, but I never figured out by what coeffcient (maybe AOE by cannons/rockets. Piercing railgun ... had an effect as well).
That's just about all I know in that regard
My Mod Collection
My Discord     screw google captcha
My Github
Questions?
> PM me here on the forums!



Rinart73

  • Sr. Member
  • ****
  • Status:
    Offline
    Posts:
    323
  • Discord: Rinart73#7304
    • View Profile
Sorry offtopic, thats just what I think when talking about relations... maybe we could sum up some relation issues and then report it.
I agree. And I somehow got -120k by killing one big NPC defender ship in the starting sector! Maybe formula on C++ side needs to be removed or changed in favor of the Lua formula?
« Last Edit: April 28, 2019, 06:11:03 PM by Rinart73 »



Hammelpilaw

  • Hero Member
  • *****
  • Status:
    Offline
    Posts:
    543
    • View Profile
    • Scrap Yard - Avofactory
I agree. And I somehow got -120k by killing one big NPC defender ship in the starting sector! Maybe formula on C++ side needs to be removed or changed in favor of the Lua formula?

The 2 formulas do 2 different things. relationschanges.lua only handles killing traders, the C one handles damage on npc entities. Im not sure if the C one should be move into scripts... thinking of performance when every shot takes a lot more calculations via scripts instead of compiled C code. Wouldnt it be enaugh to improve the C code? Wich leads back to the bug report.
Scrap Yard Galaxy
My mods and tools
My Workshop

If you find a bug in my mods please contact me.



Rinart73

  • Sr. Member
  • ****
  • Status:
    Offline
    Posts:
    323
  • Discord: Rinart73#7304
    • View Profile
relationschanges.lua only handles killing traders
Actually it handles destruction of any ship/station, just only witnesses.

Wouldnt it be enaugh to improve the C code
Ok, this would work too. But modders still need to know the formula.



Stavinsky

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    15
    • View Profile
Actually we would perhaps not need the whole formula, but we should at least have some moddable constants
so servers owner could set how much impact a grazing shot on a shield has, or the fact that a weapon that is
unable to damage a shield do 'graze' it for crazy reputation loss when no damage was done (salvager beams).

Actually I would also like to see something added that if there is a fight and you help a faction did not end up
with a reputation loss for having a few round of anti torpedo guns spraying a massive cruiser when you destroyed
10+ ships in the system (and saved the cruiser at the same time by pouring Repair hull beams into it).

Another thing that would be good too, is to add a brain to the AI gunners (we pay them enough for that).

Right now it's even more frustrating to see an AI auto gunner trying to hit some hidden target when there
is another closer and fully exposed to his/her weapons.  We really need a way to tell our gunners to be cautious and not try
to hit something they can't.  Having a rudimentary sight check up linked with an additional "Cautious Autofire"
option in the weapon groups would go pretty far in avoiding some of the most frustrating moment in game.

« Last Edit: May 04, 2019, 04:56:59 PM by Stavinsky »