Author Topic: Improving relations between alliance and ai-factions is too slow  (Read 670 times)

unbekannt1984

  • Full Member
  • ***
  • Status:
    Offline
    Posts:
    164
    • View Profile
Hi,

I tried to improve my alliances' relations to an ai-faction by doing some missions and defeating pirate-attacks. Well, at least for pirate-attacks it seems that an alliance doesn't get that bonus at the end of the event...

I think, I found the cause for this in Avorion/data/scripts/events/pirateattack.lua line 199:
Code: [Select]
            Galaxy():changeFactionRelations(player, faction, reputation)Shouldn't that be something like in other scripts:
Code: [Select]
local shipFaction, ship = getInteractingFactionByShip(shipIndex, callingPlayer)
...
Galaxy():changeFactionRelations(shipFaction, stationFaction, relationsChange)



Qui_Sum

  • Developer
  • *
  • Status:
    Offline
    Posts:
    53
    • View Profile
on: January 10, 2019, 07:46:49 PM
Thank you for reporting, will be fixed in the next update!



unbekannt1984

  • Full Member
  • ***
  • Status:
    Offline
    Posts:
    164
    • View Profile
on: January 11, 2019, 02:05:27 PM
Hi Qui_Sum,

Thank you for reporting, will be fixed in the next update!
maybe a little suggestion... How about splitting that Bonus into 2 parts, one part for the player and one for the ship-faction (in my case the alliance)?
It wouldn't change anything, if you pilot your own ship. But if you are using an alliance-ship, you could improve the relations for both (alliance and player) at the same time.

EDIT:
I think I found more of those bugs... In Avorion/data/scripts/lib/entitydbg.lua, lines 2560 to 2579:
Code: [Select]
function onLikePressed()
    if onClient() then
        invokeServerFunction("onLikePressed")
        return
    end

    local faction, ship, player = getInteractingFaction(callingPlayer)
    Galaxy():changeFactionRelations(faction, Faction(), 5000)
end

function onDislikePressed()
    if onClient() then
        invokeServerFunction("onDislikePressed")
        return
    end

    local faction, ship, player = getInteractingFaction(callingPlayer)
    Galaxy():changeFactionRelations(faction, Faction(), -5000)

end
doesn't work for alliance-ships either.

I think there are more of these bugs around...
« Last Edit: January 11, 2019, 02:40:26 PM by unbekannt1984 »



Qui_Sum

  • Developer
  • *
  • Status:
    Offline
    Posts:
    53
    • View Profile
on: January 17, 2019, 09:46:06 AM
[onLikePressed]
doesn't work for alliance-ships either.

It does work. What did you expect it to do and what happened?



unbekannt1984

  • Full Member
  • ***
  • Status:
    Offline
    Posts:
    164
    • View Profile
on: January 31, 2019, 02:01:29 PM
[onLikePressed]
doesn't work for alliance-ships either.

It does work. What did you expect it to do and what happened?
I just tried it. When you are in an alliance-ship and use those like/dislike buttons of the debug-menu, nothing happens.