Need help.....I didn't realize, for whatever reason, locked doors are taking damage on Truepve?
// Check storage containers and doors for locks
if ((entity is StorageContainer && ruleSet.HasFlag(RuleFlags.LockedBoxesImmortal)) ||
(entity is Door && ruleSet.HasFlag(RuleFlags.LockedDoorsImmortal)))
{
// check for lock
object hurt = CheckLock(ruleSet, entity, hitinfo);
if (hurt != null)
return (bool)hurt;
Doesn't this RuleSet prevent damage taken to any door? I'm very confused......Please Help!
Thanks
TruePVE
Better PVE/PVP implementation
Total Downloads: 4,637 - First Release: Mar 25, 2016 - Last Update: Mar 7, 2018
- 5/5, 26 likes
-
-
This code only prevents damage to locked entities if you have one of those flags set. LockedBoxesImmortal must be set for storage boxes, and LockedDoorsImmortal must be set for doors.
Would it be possible to give an example of this? LockedBoxesImmortal/LockedDoorsImmortal "must be set"?
Do you mean, there must be two separate RuleSets for each of these? Because the "LockedBoxesImmortal" has always been a thing
since downloading plugin. Meaning it works...LockedBoxes cannot be destroyed. And I never "Set" anything. It just worked.
But with LockedDoorsImmortal, I just assumed it just worked the same as LockedBoxesImmortal. Just naturally(per code), neither can be
destroyed as per a "locked entity"? Isn't a door an entity?
Very sorry.....I am an extreme lay person. I only just discovered that locked doors could be destroyed when a player had raided pretty much everyone on the server. So there's that. People not to happy with me.
Again, if I might be able to get a example, of again, "must be set".......I would greatly appreciate it.
Thank You for the help -
this plugin and/or settings etc....
Thanks -
-
-
[DOUBLEPOST=1507094169][/DOUBLEPOST]
Some examples, on how a locked box and a locked door are or are not two distinguishable separate entities,
that require two separate....(not sure) code? RuleSets? Exclusions? Would be greatly appreciated.
Deployables plugin was a quick fix to try and remedy a lot of pissed off people. I panicked.
I would appreciate any light that maybe shed on this issue that i am having.
Thank YouAttached Files:
-
-
@draindoc98 - There's nothing in your config that I can see that would allow locked doors to take damage - the flag I had mentioned previously is in your config. I'll verify the config is good by running it on a local server and testing all the door types. Can you paste a list of your other plugins here?
Everything in Rust is an entity. But in order for TruePVE to distinguish between what each entity is, it uses either the entity type - which can refer to multiple entities that have similar behavior - or the entity prefab - which refers to a single specific entity. For example, if I use the type "Door" in a rule, this includes most entities that can be open/shut - so all grades of doors, as well as window shutters. Whereas if I specify the prefab instead, I can narrow it down to a specific type of door - like only sheet metal double door. If you want to know what entity is what type and prefab, you can look at the entity in game and use the chat command /tpve_prod, which will display both the type and the prefab.
In TruePVE, the type or prefab is usually enough to identify any entity you might want to control damage to/from. But there are a few things where this isn't the case, like the heli which is actually made up of multiple entities, and locked doors/boxes, which have a lock entity "attached" to a door entity. In order to handle these more complex cases, there are flags that can be added/removed to your RuleSet(s). And these flags cause TruePVE to fire some specialized code. In the case of doors/boxes, the "Immortal" flags fire code to 1) check if there's a lock on the door/box, and 2) check if that lock is actually locked. -
I've verified that with your config locked doors don't take damage. Even unlocked doors are invulnerable.
-
Because currently, (as I am typing this)....if I were to uninstall the Damage Mod: Deployables,(mentioned earlier)
all doors on my server will take damage.
And most times I do not explain myself very well....but in regards to example of why doors are taking damage,
I meant more along the lines of that there is a specific line of code I need to type in to make doors not take damage.
But you say that my doors are not, so I guess that only leaves cheating? I hope not.
Anyways, thanks for your time on this. I sincerely do appreciate it. And still love TruePvE plugin, no matter the issue.
Thanks! -
-
GUIAnnouncements, HumanNPC, ImageLibrary, MultiCupboard, NightLantern, NoDecay,
NoFuelRequirements, NoGiveNotices, PathFinding, PreventLooting, RadTownAnimals,
RemoverTool, RustNotifications, SecurityLights, Slack, StorageCleaner, ToolGatherManager, Updater.
Also, while I have your attention.....Would there be any reason why Cactus all of the sudden cannot be harvested on my server. Even though I am sure that has nothing to do with TruePvE.
Just thought you might have an idea on it?
ThanksLast edited by a moderator: Oct 4, 2017 -
@draindoc98 - None of those plugins stand out as being likely culprits (to me at least). For the door damage, you should try unloading all plugins, test doors, then load TruePVE, then load the rest of the plugins in one at a time, and check doors after each plugin loads. Same goes for the cactus issue - I recommend unload all plugins, check cactus harvesting, then loading in plugins one at a time until it breaks... It's tedious but at least it should narrow down the issues to a specific plugin (or two). It also goes without saying that you probably want to do this testing when there are no players online. Or even create a local server with all your same config files and test that way...
It also is a good idea to check your oxide logs and see if there are any errors thrown from plugins that might indicate a potential failure point... -
Thanks very much for all your help and time with this matter. It is greatly appreciated!
Thank You.....and again, thanks for TruePvE -
@ignignokt84 - I began experimenting exactly as you prescribed, through local server. Uninstalling all plugins. At this stage, zero plugins are installed.
I can harvest Cactus and
damage/destroy doors/boxes.....locked or other wise. Then proceeded to install first plugin, which happen to be....you guessed it, TruePvE.
With very first(and only Plugin installed - TruePvE) I was able to still harvest Cactus and am still able to damage/destroy doors/boxes locked or other wise.
?.................Please Help! -
-
And all yes to others you mentioned. Rust Server Version, Oxide Version, TruePvE Version all current. -
You should have a few log directories - one for oxide logs, and another for Rust. Oxide is in /<server>/oxide/logs, and Rust logs are in /<server>/server/my_server_identity. Can you upload oxide_2017-10-04.txt and Log.Log.txt from these directories? Also, can you upload both your TruePVE.cs and TruePVE.json files?
-
Attached Files:
Last edited by a moderator: Oct 5, 2017 -
-
The main issue is that the TruePVE.cs code has been altered. I can't provide support for the plugin if it has been altered. I'd recommend updating to the latest version (0.8.0), and then if there are any issues let me know. There's also not any reason to update the code of the plugin to change behavior - that's what the config file is meant for.