BGforgeNet / Fallout2_Restoration_Project

Fallout 2 Restoration Project, updated
https://forums.bgforge.net/viewforum.php?f=39
543 stars 37 forks source link

Trader's guards and geckos are on the same team #192

Closed Owyn closed 3 months ago

Owyn commented 1 year ago

What happened

Geckos and the trader fought, guards stood still, then fight ended and geckos and guards happily walked together

What you expected to happen

not this

Screenshot

image

Savegame

SLOT15.zip

Lexx2k commented 1 year ago

It's not a team issue. The problem is that combat between the two groups won't reinitialize if it ends for some reason. Fo1 has the same issue. I "fixed" situations like this in ettu with adding a constant enemy check. https://github.com/rotators/Fo1in2/blob/master/Fallout2/Fallout1in2/Mapper/source/scripts/GENERIC/MANTIS.ssl#L60

Owyn commented 1 year ago

The problem is that combat between the two groups won't reinitialize if it ends for some reason.

But it didn't end? Guards were never in a fight with the geckos, only the trader was, it took about 7 turns and guards did nothing to geckos and geckos did nothing to guards

burner1024 commented 1 year ago

I think it's a team issue. Trader is TEAM_RND_TRADER and guards are TEAM_CARAVAN.

$ grep TEAM_RND_TRADER *
ectrader.ssl:   set_self_team(TEAM_RND_TRADER);

$ grep TEAM_CARAVAN * 
eccrtbra.ssl:      if (self_team == TEAM_CARAVAN) then begin
eccrtbra.ssl:         set_self_team(TEAM_CARAVAN);
eccrtbra.ssl:         ndebug("We are on a caravan and team is already TEAM_CARAVAN");
eccvngrd.ssl:   set_self_team(TEAM_CARAVAN);
eccvnmst.ssl:   set_self_team(TEAM_CARAVAN);
ecguard.ssl:   set_self_team(TEAM_CARAVAN);
ecmrchnt.ssl:   set_self_team(TEAM_CARAVAN);

SCRIPT_ECGUARD = Script:259 is used a lot in worldmap.txt, sometimes with slavers, sometimes with merchants/traders (what the hell is the difference?), sometimes with caravans, etc.

Not sure is eccvngrd.ssl is for player-joined caravans, or should be used for all caravans. Can you meet a caravan while traveling with another caravan? What happens and what should happen if things get hairy between caravans?

Looks like this is a yet another nasty can of worms.

And I'm also not sure why do geckos even attack the trader, because I don't see anything related in their scripts.

Owyn commented 1 year ago

image Same thing here I think, "patrol with dogs subduing slavers" - in reality only dogs do something, and the guards are slavers friends and don't care that they killed their dogs :D SLOT18.zip

on the other hand if there are no dogs initially - their fight happens normally: image

Owyn commented 1 year ago

Even Trappers and their mortal enemies Geckos become friends if you enter the cave while they are fighting and exit image SLOT20.zip

burner1024 commented 1 year ago

The last one is actually a separate issue, which @Lexx2k described. Is this UPU or RPU, btw?

Owyn commented 1 year ago

Oh, right. RPU

Owyn commented 1 year ago

Can you meet a caravan while traveling with another caravan? What happens and what should happen if things get hairy between caravans?

Yea you can: image

And fellow caravans are rather understanding, our caravan accidentally burned their leader to a crisp but they were all just like "oh yea that happens, np": image

but if you're not quick enough to holster your weapons near them after the battle - it's a caravan vs caravan battle then: image

enemy caravan cows can surrender at the end btw and it's not necessary to kill them to proceed

burner1024 commented 3 months ago

SCRIPT_ECTRADER = Script:741 is used only once in worldmap.txt, so it shouldn't be a problem switching it to caravan team like his guards I think (similar to SCRIPT_ECMRCHNT = Script:258). Although in general worldmap.txt design is not great, as it doesn't allow to assign teams.

Regarding "patrol with dogs subduing slavers" and similar, I'm not sure if those are supposed to be patrol dogs, or it's a 3-way encounter with every team for itself. Without putting them on the same team, the fights will only proceed sequentially, not simultaneously.

burner1024 commented 3 months ago

Given the lack of interest, I guess it's good enough as it is for now.

burner1024 commented 2 months ago

For the record, turns out that worldmap.txt actually supports assigning teams to groups. It's not ideal, but with some scripting, not as hopeless as I had thought.