Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Asym building type for future blacklisting #45

Closed
HeroesandvillainsOS opened this issue Jul 5, 2016 · 27 comments
Closed

Request: Asym building type for future blacklisting #45

HeroesandvillainsOS opened this issue Jul 5, 2016 · 27 comments
Assignees
Labels

Comments

@HeroesandvillainsOS
Copy link

HeroesandvillainsOS commented Jul 5, 2016

This building on Takistan gets used as an Asymmetric HQ but however, it cannot be destroyed:

https://www.dropbox.com/s/97ui8826u45ozyf/20160703221237_1.jpg?dl=0

The building type is:

["fortified_nest_big_ep1.p3d","ca\misc_e\fortified_nest_big_ep1.p3d",false]

@HeroesandvillainsOS
Copy link
Author

Oops. I guess the code tag doesn't work on Github. Sorry about that.

@HeroesandvillainsOS
Copy link
Author

Here's another one on Takistan that can become an insurgent installation but can't be destroyed:

["house_k_1_ep1.p3d","ca\structures_e\housek\house_k_1_ep1.p3d",true]

And a reference photo: http://imgur.com/oBgdfck

@HeroesandvillainsOS
Copy link
Author

HeroesandvillainsOS commented Jan 1, 2017

The irrigation canal on Diyala is considered a C2ISTAR "Sabatoge" location. That thing is impenetrable and runs the entire length of the map. This definitely needs to be blacklisted.

Maybe someday it would be possible to have a whitelist of known destroyable buildings and only ever let ALiVE use those? Aren't most buildings in the game derived from vanilla/CUP/JBad? It's just so many buildings show up either in Assymetric missions or C2ISTAR sabotage tasks that can't be destroyed, I just feel like it might make more sense to only allow specific buildings from a master list of known destructible objects rather than continuing to allow ALiVE missions to constantly fail because of this.

@highhead
Copy link
Contributor

highhead commented Jan 9, 2017

hmmmm, I have looked at that.

I use a check per A3 config guide: https://community.bistudio.com/wiki/CfgVehicles_Config_Reference#destrType

if !((getText(configfile >> "CfgVehicles" >> (typeOf _x) >> "destrType")) == "DestructNo") then {...

...which indicates that a building is "invincible" (nothing happens on destruction). If this config entry is not existing (as it may be in older buildings), then it also selects the building, which obviously leads to issues. I can change that to allow all other types but not use it if config entry is missing but it will very likely have other issues like A2 and modded buildings not being selected at all due to potentially this "destrType" entry missing. Could you please check what the mentioned buildings CfgVehicles/destrType configs look like in editors configViewer.

Also mind, that esp. on Tanoa many buildings do not have damage models but get destroyed in the "background". If you call "damage cursortarget" on the building after setting charges there it will have a damage value of 1 but there is no damage model for it. As building damage is basically a big hack in RV engine (buildings are set underground once killed and a damage model is put in place, no joke) this is nothing I can do about. There is no error ALiVE-wise, the building is counted as destroyed and removed from insurgency.

@HeroesandvillainsOS
Copy link
Author

Thanks @highhead. That's all I care about is that the object is considered destroyed. It doesn't bother me in the slightest if it doesn't actually fall down, I just want to make sure in Assymetric missions, the HQ is cleared, and in Sabatoge C2ISTAR missions, I get a "mission complete."

Here's a total unicorn of a suggestion from a guy that knows ZERO about modding. Would it be possible to add an "invisible" destructible object to all Insurgent HQ's/Sabatoge locations as a failsafe? That way if the building doesn't technically get destroyed, this invisible object would and it could count?

No worries either way. 1.2.7 seems to have helped a bit. Though I guess seeing how this is a place where 'good enough' doesn't generally cut it for guys (which is why you all are awesome), finding a 100% failsafe would be amazing.

@HeroesandvillainsOS
Copy link
Author

"Could you please check what the mentioned buildings CfgVehicles/destrType configs look like in editors configViewer."

Sorry, I missed this part. Was that a question for me or another dev? I certainly don't mind helping in any way I can, but fair warning I'd need some hand-holding. For instance, I know how to open the config viewer for basic editor objects, but are A2 buildings even placeable in the normal editor like that? I've honestly never looked. :(

@DavisBrown723
Copy link
Contributor

DavisBrown723 commented Jan 9, 2017

Paste this in the debug console and hit local exec (when looking at the building in question -- with nothing else in the way)

if ((getText(configfile >> "CfgVehicles" >> (typeOf _cursorObject) >> "destrType")) == "DestructNo") then {
    hint "This building can NOT be destroyed";
} else {
    hint "This building can be destroyed";
};

@HeroesandvillainsOS
Copy link
Author

Will do! Thanks Spyder.

@highhead
Copy link
Contributor

highhead commented Jan 9, 2017

if (isText(configfile >> "CfgVehicles" >> (typeOf cursorTarget) >> "destrType")) then {
    
    ["There is a config entry (%1) for destrType on that building (%2)",
    	getText(configfile >> "CfgVehicles" >> typeOf cursorTarget >> "destrType"),
        typeOf cursorTarget
    ] call ALiVE_fnc_DumpR;
    
    if ((getText(configfile >> "CfgVehicles" >> typeOf cursorTarget >> "destrType")) == "DestructNo") then {
        ["This building %1 should have been not used as objective", typeOf cursorTarget] call ALiVE_fnc_DumpR;
    };
} else {
    ["This building %1 doesn't have a config entry for destrType at all!", typeOf cursorTarget] call ALiVE_fnc_DumpR;
};

@highhead
Copy link
Contributor

highhead commented Jan 9, 2017

no clue why this is formatted that way but meh - use this, it is clearer and works :)

PS: it also adds that lines to RPT, so you can copypaste then

@HeroesandvillainsOS
Copy link
Author

Highhead, you want me to add that (atrociously formatted :) ) code to the debug console, while looking at the building and clicking local exec, and pasting the clipboard text here for you to take a look at? Just so we're clear?

@HeroesandvillainsOS
Copy link
Author

HeroesandvillainsOS commented Jan 9, 2017

Assuming I have that right, you mentioned RPT. Will you be wanting that too?

@highhead
Copy link
Contributor

highhead commented Jan 9, 2017

yah, reformatted it here

@highhead
Copy link
Contributor

highhead commented Jan 9, 2017

just aim at the building (in SP) -> open debug console via admin actions -> paste in there -> click "local" -> see sidechat (and rpt in case you wanna copypaste something)

@HeroesandvillainsOS
Copy link
Author

No problem. I'll try to get this done in a few hours and I'll link the results here later. Thanks guys.

@HeroesandvillainsOS
Copy link
Author

@HigHead here you go man. Here are two photos with the radio chat messages and the rpt from the SP session:

http://imgur.com/j5akLrj
http://imgur.com/zjWkpeT
https://www.dropbox.com/s/1xn955mpqtyrvz7/Building_debug.rpt?dl=0

@highhead
Copy link
Contributor

highhead commented Jan 12, 2017

yo those should defo be destroyable, can you check "damage cursortarget" after you put in 20 satchel charges and made em detonate? :)

@HeroesandvillainsOS
Copy link
Author

Sure thing. If the code isn't damage cursortarget exactly as it's written, if you know it offhand, that would be sweet.

@highhead
Copy link
Contributor

oh sorry, my bad. should have told ya. You can put "damage cursortarget" in the variable checker fields below the main box in the debug console. Or you can just execute this locally in the main box: "hint str(damage cursortarget)".

@HeroesandvillainsOS
Copy link
Author

HeroesandvillainsOS commented Jan 29, 2017

@highhead sorry for the delay on this. Ok, so for this object here which you say should be destroyable: http://imgur.com/zjWkpeT

I just had it come up as an IED factory. My backpack can only hold 7 explosive charges. I placed all 7 inside it and it didn't damage (I know you said this can be normal), but most importantly, after detonating the 7 explosives, it's still considered an IED factory.

I'm about to try hitting it with a launcher lol.

EDIT: A launcher doesn't put a dent in it. :(

No biggie man. It's probably moot seeing as how JBAD will be replacing a lot of CUP buildings in the next CUP Terrains update. It's just frustrating. I appreciate all the help man.

@highhead
Copy link
Contributor

highhead commented Feb 1, 2017

hrm.... could it be, that explosives are too "soft" for those a2 buildings or that the explosives do not do any damage? maybe only a2 explosives do damage to those...?

I know I am picky, but does "cursortarget setdamage 1" on the building make it complete and remove the IED factory marker (give it some time, it will remove only after next analysis which happens after 1-2 mins)

@highhead
Copy link
Contributor

highhead commented Feb 1, 2017

PS: I can remember that we needed about 5-7 satchel charges to bring down a fuel station building on takistan. it was just crazy

@HeroesandvillainsOS
Copy link
Author

Ha yeah I've had some interesting stories trying to take buildings down too, but this bastard laughs at me while looking me directly in the eyes. :)

I'm honestly not much of a military gear buff, so I really don't know what else I could carry. Satchels are pretty great for long patrols because my backpack can store quite a few and I can take down several installations without having to call in additional supplies.

I'll see what happens when putting in the code you just posted, but if it's only really viable after the building is selected to be an HQ, it may take me some time for me to duplicate unless you know of a fast way to make a building of my choosing an Assymetric installation.

Plus with the new CUP update incorporating JBAD, who knows if it's even there anymore (hopefully not). :)

@highhead
Copy link
Contributor

highhead commented Feb 1, 2017

hmm yeah i see your point... fawrk. maybe really a destroyable dummy object would help that situation, will dig deeper

@HeroesandvillainsOS
Copy link
Author

Yeah that's what I was thinking. If a dummy object was viable (and I have no clue if it would be, for various reasons...performance, building space, etc) it could allow insurgencies to play on any map, regardless of the buildings used.

As always, I appreciate everything Highhead. You've improved ALiVE in so many ways both before and after your hiatus I can't thank you enough.

@HeroesandvillainsOS
Copy link
Author

I was thinking of closing this. Have bunkers (such as the one in the first post) and indestructible objects such as this been blacklisted yet @highhead ?

You're refined it a lot since I opened this. How are you feeling about the status of insurgent HQ's?

@HeroesandvillainsOS
Copy link
Author

Highhead has done well refining this. Although some objects may still need some blacklisting, the current function is good and I feel satisfied closing this ticket. I'll reopen in the event I discover new indestructible assets not being cleared of HQ's.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants