KillahPotatoes / KP-Liberation

The work on GreuhZbugs Liberation Mission for Arma 3 continues...
MIT License
269 stars 304 forks source link

Garden walls acting as buildings #250

Closed Salty-McHaggis closed 6 years ago

Salty-McHaggis commented 6 years ago

Basic Information

0.961 Malden, Altis: CUPS, RHS (USSR), RHS (USA), Advanced {repelling, towing, slingloading}: Dedicated Workshop

Individual Things

Did you edit anything within the mission files? Yes

If yes, what did you edit exactly? Added Unit only vehicles on flight deck, Changed names of some locations.

Short Issue Description

After taking a sector we get a report on how many building the civilians are complaining about us destroying. It seems that walls that get knocked over, even my enemy vehicles are counted as destroyed buildings in the new reputation system.

Expected Behaviour

Only destroyed buildings would count

Steps to Reproduce the Issue

Take a town, knock down one section of wall, watch for the civilian complaint report to say (one building destroyed)

Screenshots, Serverlog or any other helpful Information

Not Applicable.

Wyqer commented 6 years ago

Yeah, I'm still hunting the "false" buildings which are counted. Have a look at: https://github.com/Wyqer/kp_liberation/blob/master/Missionframework/scripts/server/civrep/fnc/f_kp_cr_getBuildings.sqf

It searches for Objects which are in the "House" class. But also some very weird objects are also in the House class. Lamps and Power Poles for example. That's the reason for the KP_liberation_cr_ignored_buildings array in the kp_liberation_config.sqf. So if you find any wrong counted objects I would really appreciate any contribution or information about the classnames, so they can be added there.

And it doesn't matter if a building is destroyed by Blufor or Opfor. As I know there is not "good way" to keep track of what damaged/destroyed a "House" object. And in the end (from the immersive perspective) I guess you could say: If blufor wouldn't showed up in our region and decided to liberate us, there would be no fighting and no destroyed buildings at all.

madpat3 commented 6 years ago

on malden, we had this, too. there were no buildings destroyed (setting was: fully destroyed), but afterwards they were complaining about 9 desproyed buildings. that means -27%. thats a gamebraker. is there a way, to disable that function?

Wyqer commented 6 years ago

Yeah, I'm still hunting the "false" buildings which are counted.

You can just set the penalty for them to 0 in the config and wait until all needed classnames are entered in the KP_liberation_cr_ignored_buildings

madpat3 commented 6 years ago

excellent :)

mindbl4ster commented 6 years ago

how about using BIS_fnc_buildingPositions to determine if the object is a real house or some sort of decorative object?

Wyqer commented 6 years ago

@mindbl4ster Because that would be nearly 3x slower than the method with an ignore list.

Test as reference from Altis:

Current method (slightly changed for testing purpose):

Result:
32.5806 ms
Code:
returncount = 0; 
{
    returncount = returncount + (count (nearestObjects [getMarkerPos _x, ["House"], 1.5 * GRLIB_capture_size] select {(alive _x) && !((typeOf _x) in KP_liberation_cr_ign_buildings)}));
} forEach (sectors_capture + sectors_bigtown);

Method with your suggestion:

Result:
90.25 ms
Code:
returncount = 0;  
{ 
    returncount = returncount + (count (nearestObjects [getMarkerPos _x, ["House"], 1.5 * GRLIB_capture_size] select {(alive _x) && ((count ([_x] call BIS_fnc_buildingPositions)) > 0)})); 
} forEach (sectors_capture + sectors_bigtown);