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

Allows jp8 fuel to be found at military helipads #1641

Merged
merged 7 commits into from
Jul 6, 2022
Merged

Allows jp8 fuel to be found at military helipads #1641

merged 7 commits into from
Jul 6, 2022

Conversation

thelonestander
Copy link
Contributor

@thelonestander thelonestander commented Jun 22, 2022

Summary

Allowed jp8 to spawn at military helipads

SUMMARY: Balance "Allows jp8 fuel to be found at military helipads"

Purpose of change

I noticed while playing that jp8 fuel is nowhere to be found besides on crashed helicopters or in some helicopters by default. Using any other fuel for helicopters is not efficient, so I added fuel spawns to allow more usage of helicopters!

Describe the solution

Just added a line of code to allow them to spawn!

Describe alternatives you've considered

Making Jp8 pumps, and adding them to airports, private runways, and military locations. Learning how to code better.

Testing

Tested in game, loaded up vanilla world with no mods, spawned in a military helipad, and jp8 fuel spawned.

Additional context

image

@thelonestander
Copy link
Contributor Author

thelonestander commented Jun 22, 2022

Also @chaosvolt helped me with all this stuff. Thanks man.

@Firestorm01X2
Copy link
Collaborator

Firestorm01X2 commented Jun 23, 2022

It seems that airport fuel pumps lack of JP8 as well.
Upd: It was solved. I see. Thank you!

Co-authored-by: Chaosvolt <chaosvolt@users.noreply.github.com>
@thelonestander
Copy link
Contributor Author

Fixed!

@Coolthulhu Coolthulhu changed the title Update supplies.json Allows jp8 fuel to be found at military helipads Jun 28, 2022
@Coolthulhu Coolthulhu self-assigned this Jun 28, 2022
@Coolthulhu
Copy link
Member

Math:

  • 12 barrel spawns
  • 75% chance per spawn, so effectively 9 spawns
  • 20/65=31% chance of spawn to be jp8, so ~2.8 spawns
  • 2.8 * (50000 / 2) = ~70000 units of jp8 on average

Using any other fuel for helicopters is not efficient, so I added fuel spawns to allow more usage of helicopters!

Why?

@chaosvolt
Copy link
Member

They might need the quantity spawned in barrels will be a windfall when it does spawn, otherwise alternatives might include adjusting the weights or other tweaks.

Side note, the fuel value of JP8 is actually slightly lower than diesel if I recall, so it's not actually more useful as fuel than diesel. I assume the idea is that it's supposed to be a "infrequent spawn but spawns in bulk when it does spawn, making it a nice windfall" sort of situation.

@AngelicosPhosphoros
Copy link
Contributor

This helipads have gas pumps and diesel pumps. Can we add jp8 pumps on military objects as well?

@thelonestander
Copy link
Contributor Author

As to the why, I figured since its a military location and has helicopters, it would make sense it would spawn some fuel barrels of Jp8.

As for the math, I figured the military would probably have taken Almost all of their fuel with them, and any fuel left behind would be for the player. For the in-game reason, I didn't want there to be too much fuel spawned as to not rely solely on helicopters to get around.

@thelonestander
Copy link
Contributor Author

This helipads have gas pumps and diesel pumps. Can we add jp8 pumps on military objects as well?

I tried to add them, but I could only get them to spawn fuel next to the fuel pump. I'm afraid its past my level of skill to add.

@DrPariah
Copy link
Contributor

Don't have to worry about people relying on copters too much. Turrets are still exceptionally dangerous in BN, and tussling with the military dead at the site itself after dealing with the turrets means risk/reward is pretty fair.

@Krwak
Copy link
Contributor

Krwak commented Jun 29, 2022

Sorry to nitpick but would it be possible to make a new itemgroup for aircraft fuel? Since they mostly use jp8 and either edit the current fuel_barrel or add air_fuel_barrel.
Something like this:

    {
    "id": "air_fuel_barrel",
    "type": "item_group",
    "//": "barrel with jp8, gasoline, or diesel like you would find at airport depot",
    "subtype": "distribution",
    "entries": [
      { "item": "gasoline", "charges": [ 0, 50000 ], "container-item": "30gal_drum", "prob": 10 },
      { "item": "diesel", "charges": [ 0, 50000 ], "container-item": "30gal_drum", "prob": 10 },
      { "item": "jp8", "charges": [0, 50000 ], "container-item": "30gal_drum", "prob": 40 }
    ]
  },

Or this:

  {
    "id": "fuel_barrel",
    "type": "item_group",
    "//": "barrel with **jp8**, gasoline, diesel or motor oil like you would find at fuel depot",
    "subtype": "distribution",
    "entries": [
      { "item": "gasoline", "charges": [ 0, 50000 ], "container-item": "30gal_drum", "prob": **20** },
      { "item": "diesel", "charges": [ 0, 50000 ], "container-item": "30gal_drum", "prob": 10 },
      { "item": "motor_oil", "charges": [ 0, 10000 ], "container-item": "jerrycan", "prob": 5 }
      { "item": "motor_oil", "charges": [ 0, 10000 ], "container-item": "jerrycan", "prob": 5 },
      { "item": "jp8", "charges": [ 0, 50000 ], "container-item": "30gal_drum", "prob": **30** }
    ]
  },

Edited description and maybe swap the probability of gasoline with jp8.

@Coolthulhu
Copy link
Member

@Krwak protip: you can use triple backtick, followed by language (or nothing), for a multiline code block.

For example:

```JSON
{
  "key": "value"
}
```

Will become:

{
  "key": "value"
}

Edited your comment to show how it looks.

@thelonestander
Copy link
Contributor Author

Math:

  • 12 barrel spawns
  • 75% chance per spawn, so effectively 9 spawns
  • 20/65=31% chance of spawn to be jp8, so ~2.8 spawns
  • 2.8 * (50000 / 2) = ~70000 units of jp8 on average

Using any other fuel for helicopters is not efficient, so I added fuel spawns to allow more usage of helicopters!

Why?

Would you like me to increase the amount of Jp8?

@Coolthulhu
Copy link
Member

It would be better to have fewer barrels of the "good stuff", but with higher chance of being full or near full.
It's weird that there are multiple barrels, but most of them are halfway drained.

Added a new group for full 30 gallon drums. Three types should spawn. Full, partial, and empty.
@Coolthulhu Coolthulhu merged commit 5e5e24f into cataclysmbnteam:upload Jul 6, 2022
@thelonestander thelonestander deleted the Fuel_for_helicopters branch July 8, 2022 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants