Thutmose / Pokecube

Primary Development has moved to: https://github.com/Pokecube-Development
https://github.com/Pokecube-Development
19 stars 7 forks source link

Editing json files in database folder #273

Closed AnonymousXXI closed 6 years ago

AnonymousXXI commented 6 years ago

I've been trying to edit the mods files so that I can fly on my Drifblim , but after I change it's movement type to "flying" it resets back to "floating" upon starting the game. (Not sure if that's how I'd even go about changing that).

What happens:

Edits to the json files in the database folder get removed upon start up.

What you expected to happen:

The changes to be saved and for me to hopefully fly on Drifblim.

Steps to reproduce:

  1. Edit any json file and start the game. ...

Affected Versions (Do not use "latest"):

Thutmose commented 6 years ago

the database files reset themselves whenever minecraft runs.

there are 2 ways to go about edting them:

Way 1 (Not recommended):

Set forceDatabase to false in pokecube.cfg, then edit what you are currently editing. This will make them not reset.

This is not recommended, as it means if the database is updated in a later patch, it will not apply to your game until you manually reset the database (ie delete it)

Way 2:

Make a copy of the database file you want to edit, and say name it mydatabase.json in pokecube.cfg, change configDatabases to:

    S:configDatabases <
        mydatabase

     >

Edit the values in mydatabase.json as you feel, values in it will overwrite values in the default database files. You only need to include the values you want to edit, as well as the initial "header" values, for example, this should work for drifblim:

{
  "pokemon": [
    {
      "name": "Drifblim",
      "number": 426,
      "base": true,
      "stats": {
        "movementType": "flying"
      }
    }
  ]
}
AnonymousXXI commented 6 years ago

Thanks for responding , the changes seem to go in game now but I am still unable to fly on it. I even tried making a new world and spawning a Drifblim in. Is their something else I need to edit?

Thutmose commented 6 years ago

I found the problem, drifblim is slightly too small to sit on by default, so unless yours is larger than average, it won't be flyable.

You can fix this two ways, breed a larger one, or modify the size of the drifblim:

The default width of 1.0 is slightly too low, it needs to be 1.1 or higher or so, 1.2 should definitely be enough (unless your drifblim is too much smaller than normal)

{
  "pokemon": [
    {
      "name": "Drifblim",
      "number": 426,
      "base": true,
      "stats": {
        "movementType": "flying",
        "sizes": {
          "values": {
            "length": "1.2",
            "width": "1.2",
            "height": "1.2"
          }
        }
      }
    }
  ]
}
Thutmose commented 6 years ago

the code for whether something can be ridden or not is directly based on the size of the mob, which is the values in the "sizes" section of the stats in the database, multiplied by the value of the mob's size gene.

You can make a joltik ridable if you manage to breed a sufficiently large one, some pokemobs however, like Drifblim, happen to be right on the border of ridable size, which can cause some frustration when one is ridable, the other is not, and they look almost identical in size (say a 5% difference or so)

AnonymousXXI commented 6 years ago

Alright thanks dude , got it working now.

Thutmose commented 6 years ago

your welcome, I glad you got it working