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

Offline Dakkan

  • Zombie Food
  • *
  • Posts: 5
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #30 on: December 17, 2016, 05:26:56 PM »
I would think so, a quick check into the dog json files shows "placate_triggers": [ "MEAT" ], so you could probably play with that, adding it to other monsters and using different foods.

As for having them lay harvestables like eggs, could be more tricky, don't see anything immediately useful to pillage in the ant queen files other than the flag "QUEEN," which I kinda think is what causes them to lay ant eggs? I see this tag in other monsters that also create offspring, but nothing that specifies what specific item/creature is spawned. Will poke around a bit more. Could possibly try having a silent mutation that causes them to leave a "slime trail" but instead of slime, egg items, at lower frequency.

But if you just want a tameable ant queen-esque monster, that seems totally possible.

Edit: spoke too soon, forgot about how dog food is the tool used to make dogs friendly towards you, may not be as simple as I thought.
Edit: Though spawning a friendly queen ant with the debug menu seems to cause all subsequent eggs and ants to also be friendly to you, which is fun.
Edit: Ah, the wiki was pretty helpful on this. http://www.wiki.cataclysmdda.com/index.php?title=Creature_AI
« Last Edit: December 17, 2016, 06:05:54 PM by Dakkan »

Offline pisskop

  • Survivor
  • ***
  • Posts: 3418
  • So Noble he farts Helium
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #31 on: December 17, 2016, 08:05:07 PM »
Its all hardcoded.  Make an item that changes the faciton of the target to 'player' in the c++ hardcode and then make an item that uses that action

Offline CK_Kirbi

  • Zombie Food
  • *
  • Posts: 57
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #32 on: December 21, 2016, 06:54:10 AM »
Alright. Here's one for you that deals with mutations. I am looking to create my own mutation branch with several abilities which are essentially renamed versions of abilities that already exist. My concern is that in changing the mutation ID, I lose the actual mutation power since those are hard coded.

For example.. I wish to take this..

        "type" : "mutation",
        "id" : "WINGS_BIRD",
        "name" : "Bird Wings",
        "points" : 2,
        "visibility" : 4,
        "ugliness" : 2,
        "description" : "You have a pair of large, feathered wings.  Your body is too heavy to be able to fly, but you can use them to slow your descent during a fall, and will not take falling damage under any circumstances.",
        "prereqs" : ["WINGS_STUB"],
        "cancels" : ["WINGS_BAT", "WINGS_INSECT", "WINGS_BUTTERFLY"],
        "category" : ["MUTCAT_BIRD"]

and turn it into this

        "type" : "mutation",
        "id" : "WINGS_DRAGON",
        "name" : "Drakota Wings",
        "points" : 2,
        "visibility" : 4,
        "ugliness" : 2,
        "description" : "You have a pair of large, articulate, demi-chiropteran wings.  Your body is too heavy to be able to fly, but you can use them to slow your descent during a fall, and will not take falling damage under any circumstances.",
        "prereqs" : ["WINGS_STUB"],
        "cancels" : ["WINGS_BAT", "WINGS_INSECT", "WINGS_BUTTERFLY", "WINGS_BIRD"],
        "category" : ["MUTCAT_DRAGON"]

My question is this: How do I make the new wings have the same ability as the bird wings? The JSON... "language"... here clearly doesn't contain the code for the removal of fall damage.

Offline Coolthulhu

  • Contributor
  • Survivor
  • ****
  • Posts: 3729
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #33 on: December 21, 2016, 09:50:56 AM »
You need to locate the places where wing id is referenced and add the new wing. Then recompile the game.
Easiest done by just a brute force search for the wing id in the src directory. For example, `grep "WINGS_BIRD" -r src`.

Can't be done with json alone.

Offline CK_Kirbi

  • Zombie Food
  • *
  • Posts: 57
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #34 on: December 21, 2016, 11:05:03 AM »
Crap. That's what I was afraid of. The lua/hardcoded stuff are the limit of my personal skill, but I do have a friend who went to college to learn coding and who is helping me with this project, which I hope to expand greatly in scope.

Alright. That will help a great deal at the end of the day. Thanks for the info.

Offline xironfistx

  • Zombie Food
  • *
  • Posts: 72
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #35 on: January 11, 2017, 01:51:27 AM »
in which item json is that rivtech powered suit?
i cant find it and i want to make some crude powered suits quite similar to the ever charming huge scrap mounts orks wear in 40k

Offline BorkBorkGoesTheCode

  • Survivor
  • ***
  • Posts: 769
  • What could possibly go wrong....
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #36 on: January 11, 2017, 03:17:02 AM »
tool_armor.json. Some of its features are hardcoded in places.
The hollow earth and the Dyson sphere share an origin? Do some research

Offline xironfistx

  • Zombie Food
  • *
  • Posts: 72
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #37 on: January 11, 2017, 04:00:39 AM »
At this moment im away from my place,but could i simply copy it json,change some stuff for balance and make it powered by gasoline?

Offline pisskop

  • Survivor
  • ***
  • Posts: 3418
  • So Noble he farts Helium
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #38 on: January 14, 2017, 04:00:03 AM »
i think it might have to be powered by a ups or bionic.

im not 100℅ sure though.

you could make a gasoline powered suit of armor, but it wouldnt req a helmet to use.
such a machine would be monstrously heavy and inefficient.
such a machine would have the glaring flaw of having combustible fluids as it external power source

but yes, you dont strictly have to balance for realism or ease of power acquisition, in theory you could make an airtight body glove of armor powered by gasoline kept in hammerspace

Offline Greiger

  • NPC
  • **
  • Posts: 167
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #39 on: January 15, 2017, 12:07:51 AM »
Not that I don't find the idea immesely amusing but I would never want to wear a gasoline powered suit of armor.

A ) : Is it supposed to be so loud?    And vibrating so much?
B ) : Yea that's normal.  You'll get used to it once the swelling stops your brain from bouncing around in your cranium. The V6's weren't as bad, but the added power from the V12 definitely makes up for some minor brain trauma.
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
It may be, just slightly outdated :P

Offline mGibson

  • Zombie Food
  • *
  • Posts: 1
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #40 on: January 31, 2017, 04:12:49 AM »
Is it possible to make a fruit jelly that can be sealed in a small jar? It's strange that the only fruit spread available is in a three-liter jar and can only be found, not made.

Seems easy enough but looking at comestibles.json and recipe_food.json in Notepad is overwhelming.

This is what I tried for jelly, jam, and preserves:
(click to show/hide)

And this is my attempt at a recipe for a jar of fruit jelly:

(click to show/hide)

Basically what I want to do is a separate entry for jelly (fruit juice and sugar strained through a rag, no fruit bits) preserves (fruit chunks suspended in jelly) and jam (chopped/crushed fruit and sugar) as well as a way to preserve them in jars. Am I on the right track? If this works, I'd like to try adding more recipes for foods without many recipes like hickory nuts.

Offline pisskop

  • Survivor
  • ***
  • Posts: 3418
  • So Noble he farts Helium
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #41 on: January 31, 2017, 01:27:48 PM »
i think yoy can either look at the sealed/pickles meat recipes or make a seriee of recipes t make jam.

jam should be 100% possible postapoc but im mobile rn

Offline Wyzack

  • NPC
  • **
  • Posts: 104
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #42 on: February 13, 2017, 03:23:51 AM »
How do i make it so that a profession has an item inside a container on game start? And where is the json for lye powder? I am looking to make a tanner profession for a small mod I am making and want him to have a waterskin or bladder full of lye powder for curing hides

Offline pisskop

  • Survivor
  • ***
  • Posts: 3418
  • So Noble he farts Helium
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #43 on: February 13, 2017, 04:13:04 PM »
How do i make it so that a profession has an item inside a container on game start? And where is the json for lye powder? I am looking to make a tanner profession for a small mod I am making and want him to have a waterskin or bladder full of lye powder for curing hides
You have to either use or make an item id that has a default container.  you can also use the relatively new system of inlaying items into items.  examples of ammo/guns/holsters:

(click to show/hide)

It should also work with things like batteries or cardboard boxes, but i havent tested it.  Look here at my git for the source of my example.

Offline Wyzack

  • NPC
  • **
  • Posts: 104
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #44 on: February 13, 2017, 04:43:13 PM »
Thanks a million pisskop. Once upon a time i tried making a doom mod for the game, and gave up once i found out what a chore it would be to modify ranged attacks from the few preexisting defaults. I have to say you did a pretty amazing job