DiscoveryGC / FLHook

FLHook for Discovery Freelancer
Other
28 stars 33 forks source link

alley -> rep doesn't work #195

Open brac3r opened 1 year ago

brac3r commented 1 year ago

LI06_01_base is Red Base in conn. rep doesn't work

Result: Reputation is still pf_08_grp. It should be set to li_n_guardian and read Unidentifed to player and be very hostile :)

The code is in alley -> rep.cpp -> void REP::LoadSettings() line 32

It seems to be reading the config file and grabbing the values correctly as it output to console saying as much. Doesn't seem to be setting the rep though, although this code is repeated all over the place as far as I can see so I'm not sure why?

Also as a side note, this pattern: uint obj_rep_group; pub::Reputation::GetReputationGroup(obj_rep_group, newrep); pub::Reputation::SetAffiliation(solarnick, obj_rep_group);

Should probably be it's own function as I found it repeated a lot throughout the project.

zibbizor commented 1 year ago

Yeah this is something that I never managed to get to work properly. The one and only instance where it worked it turned Manhattan into a LR base and propagated the hostility to all nearby bases like a virus. You can guess the mess it created in the entire system.

brac3r commented 1 year ago

The method of making something x affiliation seems to work in other parts of the code. For example, HkResetRep and HkSetRep in flhook/HkFuncPlayers.cpp seems to set the player fine.

I can see only two differences, first being a solar instead of a player and when the code is run. It's silly but have you tried running it on a timer so that it runs 10 seconds are everything else is finished?