Jump to content

Dissable damage to specyfic prefab

Not a Bug 1.0.79

Ryrzy
Ryrzy

Posted

hi,
is it possible to disable damage to specyfic prefab? for example i would like to have immortal pumpjack and mining querry.

Ryrzy

Posted

hmmm no answer... no pissible?

RFC1920

Posted (edited)

If you enable the log with the command pvelog, that will create a log file under oxide/logs/NextGenPVE.  Enable it and attack whatever object you want to control.  The name you see in the log file for ____ attacking SOMETHING is what you can then add to a rule.  Type pvelog again to disable the log.  Once my server is up this morning, I'll take a look.

Edited by RFC1920
  • Love 1
RFC1920

Posted

Seems that the type for both is MiningQuarry.

Note that you must hit enter on each and every text entry field in any form for that value to be saved.  Cui is fairly troublesome, and this is one of its weakest spots.

[pro-tip: Pasting can avoid a lot of the typical issues with Cui where entry is interrupted by some other game function.  This way you can enter an entire word without being interrupted.  Type the word you want in a text editor or any other window on your machine.  Copy it.  Go to an entry field and paste. ENTER or RETURN to save. ]

  1. First, make sure "AllowCustomEdit": true, is set in the config.  If necessary, change that and reload the plugin.
  2. In the GUI, click on the Rule/Ent Editor button.
    1. Click on the Unknown Entities button.
    2. Click on MiningQuarry.  If not present, someone has already added it to a collection.  If that is the case, there is an All Entities button where you can search for it.
    3. Click to the right of New Collection where you should see the word new.
    4. Type a name, e.g. quarry and hit enter (see our tip above).
    5. Close the Entity Select window, which should now NOT show the MiningQuarry.
  3. Click on the Rule/Ent Editor button again.
    1. Click on the Custom Rules button.
    2. Click Add.
    3. Enter a valid name such as player_quarry.  It is typically a good idea to make sure that the rule name, e .g. source_target, matches the rule source and target values.  The source and target values are collection names, e.g. player, npc.
    4. Description is optional, and leave damage as True.
    5. For source, type (or paste) the word player.  The word player matches the built-in collection player which includes BasePlayer.
    6. For target, type (or paste) the word quarry.  The word quarry matches the collection name we entered earlier.
  4. Repeat #3 as desired for other damage sources, e.g. helicopter, npc, etc.
  5. Now that MiningQuarry is in a collection (quarry), it should no longer be included in any default action.  So, for the default ruleset it should be excluded already.
  6. You can verify that your rule appears by clicking on any of the Allow rules in the default or any other ruleset.  If desired, you can select that rule (player_quarry, etc.)
  • Like 1
Ryrzy

Posted

will look at this after work, thank you. i did not notice AllowCustomEdit option 🙂

RFC1920

Posted

Yes, it's not super simple to operate mainly because Cui is so horrible.  But, it is possible.

  • Like 1
Ryrzy

Posted

Just now, RFC1920 said:

Yes, it's not super simple to operate mainly because Cui is so horrible.  But, it is possible.

yeah cui is horrible and we can not make custom config because it is a db file not json hehehe 🙂

 

RFC1920

Posted

You do also have the option to learn sql and enter things that way 😉

  • Like 1
RFC1920

Posted

Changed Status from Pending to Not a Bug

  • Like 1
Ryrzy

Posted

2 minutes ago, RFC1920 said:

You do also have the option to learn sql and enter things that way 😉

yes i can 🙂 it's no problem, but json is simpler 😄 but anyway, thank you, i will try to make this later.

Ryrzy

Posted

hi again 😛 i have a little problem... when i enable AllowCustomEdit - reload plugin and go to pverule - rule/ent editor - unknown entitis - i have nothing here, blank page 😐 

RFC1920

Posted

Trying running /pveupdate.  That should populate the list with any/all unassigned entities.  Normally, this would run at wipe to pickup new entities.  Or, select All Entities instead and perhaps they are listed there for searching.

  • Love 1
Ryrzy

Posted

hi @RFC1920
sorry to open this old reqest, i try to make my rules from begining but i can't... please look at this video, after this i get this error in log:



 

Failed to call hook 'CmdNextGenPVEGUI' on plugin 'NextGenPVE v1.4.9' (IndexOutOfRangeException: Index was outside the bounds of the array.)
  at Oxide.Plugins.NextGenPVE.CmdNextGenPVEGUI (Oxide.Core.Libraries.Covalence.IPlayer iplayer, System.String command, System.String[] args) [0x02731] in <b16de1ee3a804777b7294fe625e5c69e>:0 
  at Oxide.Plugins.NextGenPVE.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x01b32] in <b16de1ee3a804777b7294fe625e5c69e>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <23ba99f131254889867c71f0bd137b1d>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <157a94ee66ab4a7991faecd1eb84be3b>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <157a94ee66ab4a7991faecd1eb84be3b>:0 

 

1.6m

Downloads

Total number of downloads.

7.7k

Customers

Total customers served.

115.4k

Files Sold

Total number of files sold.

2.4m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.