JSon/Mob Properties Help Please!

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

1SDAN

New Member
Jul 29, 2019
1,189
-15
0
So, I've been working on tweaking some drops in Mob Properties by Father Toast, but I have come about a problem: On line 12, the online JSon editor says that it expects a ':', but when I change it, it says it expects ','. Can someone correct my mistake, I've been staring at it for half an hour and still can't figure it out.

Code:
{
    "_name": "SpecialMobs.GatlingSkeleton",
    "drops":
    [
      {
          "function": "remove",
          "id": 289
      },
     
      {
          "function": "add",
          "id": 30066:13
      }
    ],
    "stats": []
}
 

portablejim

New Member
Jul 29, 2019
267
0
1
Try
Code:
{
    "_name": "SpecialMobs.GatlingSkeleton",
    "drops":
    [
      {
          "function": "remove",
          "id": 289
      },
    
      {
          "function": "add",
          "id": "30066:13"
      }
    ],
    "stats": []
}
 

1SDAN

New Member
Jul 29, 2019
1,189
-15
0

Crashed. I think I found something in the report that'll help, but I can't make too much sense of it:

toast.mobProperties.MobPropertyException: Invalid integer! (-1) at C:\Users\Daniel\Desktop\FTB\FTBLite2\minecraft\config\MobProperties\SpecialMobs\GatlingSkeleton.json\drops\entry_2(add)\id

It seems that when we put the ID in quotes it turned the integer into -1 from the code standpoint, I'm looking into this as we speak.


EDIT: Fix'd, I completely forgot the damage value comes as a separate entity.


For further reference, here's the completed code:

Code:
{
    "_name": "SpecialMobs.GatlingSkeleton",
    "drops":
    [
      {
          "function": "remove",
          "id": 289
      },
  
      {
          "function": "add",
          "id": 30066,
          "damage": 13
      }
    ],
    "stats": []
}
 

Golrith

Over-Achiever
Trusted User
Nov 11, 2012
3,834
2,137
248
Has FatherToast updated the config system? Last time I used it it was like:

Code:
drops: {
default: true,
recently.hit: {
  all: 0.05: {
   choose: {
    1440 : add : 14276:19:1:{},
    144 : add : 371:0:1:{},
    128 : add : 11461:1:1:{},
    63 : add : 24376:0:1:{},

Which IMO is much easier to deal with. I just don't like the JSON format :p It's going to result in my configs being at least 5x larger for exactly the same content...
 

1SDAN

New Member
Jul 29, 2019
1,189
-15
0
Has FatherToast updated the config system? Last time I used it it was like:

Code:
drops: {
default: true,
recently.hit: {
  all: 0.05: {
   choose: {
    1440 : add : 14276:19:1:{},
    144 : add : 371:0:1:{},
    128 : add : 11461:1:1:{},
    63 : add : 24376:0:1:{},

Which IMO is much easier to deal with. I just don't like the JSON format :p It's going to result in my configs being at least 5x larger for exactly the same content...

No idea, all I know is there now is a .json file and a .mob file for each mob.