Author Topic: The Minor JSON Questions Thread  (Read 2768 times)

Offline wad67

  • Survivor
  • ***
  • Posts: 354
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #15 on: November 27, 2016, 02:12:17 PM »
I would also be interested in modding engines, now that they have been exported in json.

Primarily steam engines, having difficulties with fuel types though.
I need to flesh out some kind of 'boiler' object, which accepts any type of flammable fuel & water.
I have the object ingame, but I am having a great deal of trouble defining the fuel/ammo type.
This boiler in turn, needs to create steam. Something that might not be able to do with json.

Managed to implement steam fueltype, but it does not behave like steam at all.

I sorta have boilers, that don't work. And I have steam, that does not work either.

Defining the actual steam engines should be relatively simple, even just a clone of a typical gasoline engine with the fueltype set to steam.

The intention of this is to add some simple, low power steam engines that the player may craft, out of various scrap components.
See : Along with boilers, that the player may craft, and a very low tech, inefficient alternator.

I had planned to add steam engines a long time ago, but I couldn't really wrap my head around the C++ side of things.


This is mainly to do with a total conversion mod I had in mind, but it could have some potential within the basegame.



Offline pisskop

  • Survivor
  • ***
  • Posts: 3290
  • Closet Brute
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #16 on: November 27, 2016, 02:23:26 PM »
idk if we can specify water as a fuel -yet.

Offline wad67

  • Survivor
  • ***
  • Posts: 354
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #17 on: November 28, 2016, 05:41:09 AM »
Once a general provision for some simple things come into place, I think it would be quite easy to accomplish.
If there was a way to specify a type of part, that has inputs, outputs and some rate of conversion, you could virtually accomplish any type of mechanical system.
A few ideas:

(click to show/hide)

Offline xironfistx

  • Zombie Food
  • *
  • Posts: 67
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #18 on: December 01, 2016, 01:50:26 AM »
could be something like power armor,but powered by gasoline be a thing?
i dont know how is the jsons of the power armor set up.
it is possible to add stat effects to clothing or armor?
i would love to make a makeshift power armor that burns you at random intervals and does not require you to be naked to use it.

Online Coolthulhu

  • Contributor
  • Survivor
  • ****
  • Posts: 3547
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #19 on: December 01, 2016, 08:15:38 AM »
You could copy the RM13 combat armor and change it to have gasoline ammo instead of plutonium.
Though it doesn't count as power armor.

All power armor is hardcoded to require being naked.

Offline egomassive

  • NPC
  • **
  • Posts: 105
    • View Profile
    • egomassive.com
Re: The Minor JSON Questions Thread
« Reply #20 on: December 01, 2016, 03:36:34 PM »
Is there a document somewhere describing the properties of terrains?

In particular I want to know about the line:
"roof": "t_flat_roof",
Seems to me all indoor terrain should have this as well as windows and doors. It's very hit-or-miss, t_floor gets a roof when looking down on it from above but t_carpet_red doesn't. Is this a matter of no one's taken the time to fully implement it, or it a matter of being an experimental feature that may be dropped?

In a related matter, it rains where I've placed t_open_air_rooved! I guessed this piece was for interior spaces, but it's not flagged INDOORS. Have I misunderstood its purpose or is it broken?

Online Coolthulhu

  • Contributor
  • Survivor
  • ****
  • Posts: 3547
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #21 on: December 01, 2016, 04:43:24 PM »
Roofs aren't fully implemented, but they probably won't be dropped.
Some weird terrains, like carpet, are sometimes badly specified. They should be copies of floor with some extra modifications, but instead are copied manually, meaning that they may have been missed when updating other terrain.

Rain and roofs are currently independent. Roofs creates terrain above current terrain, but rain depends on outdoor/indoor specification, which doesn't depend on terrain above yet.
Some of that is half-implemented because we can't really commit to fully 3D environment until 3D vision is in. Meaning we need to support 2D hacks and maintain compatibility with them.

Offline Dakkan

  • Zombie Food
  • *
  • Posts: 5
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #22 on: December 16, 2016, 12:55:56 AM »
Had a much longer post typed out but the board timed me out, so just the major questions.

First a little question, where are the json files for rams?

I am trying to make an underground bore attachment.

(click to show/hide)

(Didn't include recipe or item data, just vehicle_part.)

Loads fine, recipe works fine, attaches fine. The issue is that no matter what I do, I need to reach a speed of 96 km/h to destroy a tree with the bore. Tried upping "damage_modifier" like I saw on the reaper or ram, didn't help. Added "damage" and "bashing" from an ammo item hoping it would help, but it did not. The reaper and advanced reaper both have a "bonus" field of 7, so I added that with a large number, but no luck. [JACKHAMMER] was a desperate attempt, I was actually surprised at how accepting the game was of me tossing in random snippets.

I guess I really want to know how collision damage is calculated in relation to some of these values. The goal is to get it to eat through rock at very slow speeds. (I'll raise the mass and energy consumption to incredible levels to balance it out.) Are trees a poor test subject?

Thanks for any help!

Offline pisskop

  • Survivor
  • ***
  • Posts: 3290
  • Closet Brute
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #23 on: December 16, 2016, 01:27:17 AM »
rams?

Id look at metal and wooden spikes.  and maybe spiked armor plating.


"ramming" has less to do with any one part but how heavy your car is. afaic.  make it armored and do damage.

Offline Dakkan

  • Zombie Food
  • *
  • Posts: 5
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #24 on: December 16, 2016, 01:30:25 AM »
I meant the actual vehicle part, for instance "steel ram" or "spiked ram" or "superalloy ram" or "superalloy ram?" They have to be installed in a frame-adjacent square on the vehicle?

I will try out messing with the vehicle weight though, thanks.

Edit: "military composite ram" was supposed to be the third one.
« Last Edit: December 16, 2016, 01:45:18 AM by Dakkan »

Offline Greiger

  • NPC
  • **
  • Posts: 165
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #25 on: December 16, 2016, 02:26:00 AM »
Oh I think rams are part of the vehicle additions mod.  So I think you'd look in the data>mods>blazemod folder.
I have a mod!  It has new vehicles! Like 3 wheeled microcars, dune buggies, trailer parks, and tanker trucks!
http://smf.cataclysmdda.com/index.php?topic=13738.0

Offline Dakkan

  • Zombie Food
  • *
  • Posts: 5
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #26 on: December 16, 2016, 03:02:55 AM »
Weird, always thought they were part of the core game. Nothing enlightening in the ram files though unfortunately.

I did try increasing the mass of the bore (and vehicle) by 9000 kg; moderate success, was able to "bore" through a tree at only 64 km/h.

I think the recent changes to engine/motor and the planned gears are going to be an issue however, may have to make special rail "tires" and a massive bore engine for now.

Do structures like trees and rock walls have damage or health associated with them? Seems like no. Even with this test, a continual tile-adjacent ramming doesn't seem to destroy a tree.

Any specific info on how "diameter" and "width" affect wheels in game?

Offline Greiger

  • NPC
  • **
  • Posts: 165
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #27 on: December 16, 2016, 04:40:17 PM »
Most structures like trees and walls just have a chance of being destroyed based on the power of the strike made against them.  A heavier fast vehicle will have a higher chance of breaking something down than a lighter one, because mass and momentum are taken into account.  Some parts also have a multiplier to their damage, like spiked plating, but I don't know if that translates into terrain damage calculations or if it's just monster damage.  When bashing things on foot I understand the 'you don't seem to be damaging the x' message just comes up when you have a 0% chance to break something.

Diameter and width from what I understand affects your offroading capabilities.  Larger wheels are less liable to sink into the ground, giving you better traction offroad, reducing your power loss when driving through grass and dirt.  The size of your wheels is compared to the weight of your vehicle to give you it's offroading capability.  Larger wheels supposedly also reduce your maximum speed slightly, but I've seen little difference with that bit myself.
I have a mod!  It has new vehicles! Like 3 wheeled microcars, dune buggies, trailer parks, and tanker trucks!
http://smf.cataclysmdda.com/index.php?topic=13738.0

Offline Dakkan

  • Zombie Food
  • *
  • Posts: 5
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #28 on: December 17, 2016, 01:09:32 AM »
Thanks for the replies.

I ended up just making an absurdly massive vehicle, engine power, and power stored per battery (the numbers became silly), and still wasn't able to reach a viable speed from rest to push/destroy through a tree obstacle.

The damage modifier definitely does not affect damage against landscape structures, as far as I've seen.

Would be nice to somehow change the "REAPER" flag so that it works against rock walls instead and applied the damage modifier to it or something.

Offline xironfistx

  • Zombie Food
  • *
  • Posts: 67
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #29 on: December 17, 2016, 02:49:10 AM »
Could be some kind of livestock be juryrigged using jsons?
Like for example you feed it wheat or rice or some grain so it follows you around and then it lays bird eggs or something along those lines.
Or some kind of alien animal that is able to be tamed like a dog and then is like an ant queen and you then butcher the animals.
Is such possible using jsons alone or some of what it would need to work is hardcoded?