Upgraded Hydrophobia

Discussion in 'Mechanics' started by Mackinz, Mar 13, 2014.

  1. Mackinz

    Mackinz The Waste of Time

    As is, there is a defined quality for certain objects (light Torches and Stone Furnaces) that allows liquid(s) to uproot that object when contact is made with liquid. In its current form, it is a simple "yes" or "no" definition that is generally ignored by content producers and even misapplied in vanilla (at least one kind of lamp post object gets washed away when placed in storm rain). I suggest it be built upon and expanded so that it can be utilized in new and varied ways.

    First, I suggest that it be expanded to include a couple "reverse" options to allow an object to be uprooted when not in contact with liquid. The potential applications of this allow for certain developments, like Farmable objects that only grow when placed in water (imagine a necessitated rice paddy for rice, as well as water requirements for Coralcreep and Reefpod), as well as other objects (likely related to Hylotls) which can only exist when (at least partially) submerged (like a "School of Fishes").

    Second, I suggest that this quality also be defined such that it is possible to have the game differentiate between when an object is partially, mostly, or fully engulfed in liquid. In addition, this setting would also allow for objects that are only partially hydrophilic. This would expand upon farmables even more (like having Reefpod require being fully covered, while not being necessarily required Coralcreep. Rice would only allow for liquid up to a certain level, with liquid of a higher level destroying the crop) and would allow for objects like a Waterwheel (which would only be placeable when the water is at a specific level).

    Finally, I suggest that quality also be defined such that an object could be submerged in one liquid type but break when in another. Building off of farmables (again), this would allow for lava-resistant plants that break in water (for example, Crystal Plant), water-resistant plants which break in lava (which would be virtually all of them), and etcetera, etcetera. For other objects, this would allow (for mods at least) to develop liquid-specific pipes which are not placeable in the wrong liquid type.

    With the suggestions above, the hydrophobia quality would be expanded upon and allow for greater variation and possibilities which only can be imagined at this point.

    What I am most interested in, in regards to the above suggestion, is its potential applications for farming and the expansion of Hylotl lore by allowing for crops which only grow underwater (if you could not tell from the post). A seaweed-inspired crop would function perfectly with the above suggestion but would not work with the current system as it would grow on land as well. Combined with a way to move around liquids, this would be a fantastic addition for vanilla and mods alike.
     
  2. Mackinz

    Mackinz The Waste of Time

    So I've decided to create some possible sample coding for the more technically minded.

    Here are my sample terms:

    "contactDestroy" :
    true or false. If true, will destroy object on contact. If false, the opposite.
    "destroyAbove" :
    Any percentage between 0.01 and 1.00. Will allow for liquid tolerance.
    "liquidRequirement" :
    Any percentage between 0.01 and 1.00. Will allow for liquid requirement.
    "liquidAllow" :
    List of liquids that can touch the object without breaking it, by liquid ID.

    First, this is how a Torch is handled in the old coding:

    Code:
    {
      "objectName" : "torch",
      "printable" : false,
      "rarity" : "Common",
      "category" : "light",
      "price" : 50,
    
      "description" : "This torch flickers softly.",
      "shortdescription" : "Torch",
      "race" : "generic",
    
      "hydrophobic" : true,
      ...
    With new coding, it might be handled like this:

    Code:
    {
      "objectName" : "torch",
      "printable" : false,
      "rarity" : "Common",
      "category" : "light",
      "price" : 50,
    
      "description" : "This torch flickers softly.",
      "shortdescription" : "Torch",
      "race" : "generic",
    
      "hydrophobic" : [
        {
         "contactDestroy" : false,
         "destroyAbove" : 0.5,
         "liquidAllow" : [1, 2 , 4, 6, 7 ]
        } ],
       ...
    This would prevent a Torch from being destroyed immediately on contact, but, instead, hold out until at least 50% of the Torch is engulfed.

    This is how Rice (does not have "hydrophobic" at base) might be handled:

    Code:
    {
      "objectName" : "riceseed",
      "rarity" : "Common",
      "category" : "farmable",
      "description" : "Boil it, fry it, throw it at a bride. Rice! For all your culinary needs.",
      "shortdescription" : "Rice Seed",
      "objectType" : "farmable",
      "printable" : false,
    
      "hydrophobic" : [
        {
         "contactDestroy" : false,
         "liquidRequirement" : 0.2,
         "destroyAbove" : 0.5
        } ],
        ...
    This translates to the Rice plant requiring being submerged by at least 20%, but being unable to tolerate liquid levels above 49%.

    I have to run right now, so I may have forgotten to do some other sample coding, but you should probably get the general idea. Looking forward to some FEEDBACK.
     
    Relten likes this.
  3. Omicron445

    Omicron445 Pangalactic Porcupine

    * But nobody came
     
  4. Mackinz

    Mackinz The Waste of Time

    Objects can now have min and max immersion levels defined, so it's all good.
     
    Shadow Wolf TJC and Relten like this.
  5. Mango art

    Mango art Starship Captain

    I'd like to point out hydrophobia is the scientific name for rabies. But it's all cool. I'd just like to point that out, :rofl:
     
  6. Pedro Falcão

    Pedro Falcão Pangalactic Porcupine

    It's also used in chemistry and biology to refer to the property opposite to hydrophilia.
     
  7. Mackinz

    Mackinz The Waste of Time

    In other words, lacking polarity which would prevents if from being dissolved when immersed in water, like most, if not all, fats.

    But this thread was made using the term 'hydrophobia' because that is what the game uses in json files.

    And this thread is well outdated and unnecessary now, as I said back in February.
     
  8. Sharp(JQ)

    Sharp(JQ) Ketchup Robot

    It is phobia to drink water. :)
     
  9. Mackinz

    Mackinz The Waste of Time

Share This Page