Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Zhilkin

Pages: [1] 2 3 ... 6
1
You need to add `"ammo_type": [ "bfeed" ]` to AMMO node with id=`bfeedfuel`in `\data\mods\blazemod\blaze_blob.json` file.

The result node will look like this:

Code: [Select]
[
  {
    "id": "bfeedfuel",
    "type": "AMMO",
    "category": "fuel",
    "name": "liquified blob feed",
    "name_plural": "bfeedfuel",
    "description": "Liquified blob feed, useful for fueling certain blob based vehicle parts",
    "weight": 50,
    "volume": 1,
    "price": 40,
    "price_postapoc": 800,
    "phase": "liquid",
    "container": "jerrycan",
    "material": "hydrocarbons",
    "fuel": { "energy": 35 },
    "symbol": "=",
    "color": "red",
    "ammo_type": [ "bfeed" ],
    "count": 250,
    "stack_size": 250,
    "range": 4,
    "damage": 5,
    "pierce": 5
  }

Please note that it will only remove warning - I don't know what will be changed game wise.

3
The Toolbox - Code Help / Re: The Minor JSON Questions Thread
« on: May 18, 2017, 06:54:07 PM »
Another question: How do you make an item with multiple "use_action" promt the user with a menu to select the action? Currently, I have the following:

Code: [Select]
"use_action": [
      {
        "target": "abm_belt_cloth_shot_unfinished",
        "msg": "You adjust the belt to house shotshells.",
        "menu_text": "Adjust for shotshells",
        "type": "transform"
      },
      {
        "target": "abm_belt_cloth_50_unfinished",
        "msg": "You adjust the belt to house .50 bullets.",
        "menu_text": "Adjust for .50",
        "type": "transform"
      }
    ],

It defaults to the first option when activated. Is it possible to have the user choose?

I believe you need to create several copies of your item with `transform` actions with different `target`, like this:

Code: [Select]
  {
    "id": "candle_smoke",
    "copy-from": "candle",
    "type": "GENERIC",
    "name": "smoking candle",
    "description": "A candle in every respect, but designed to produce a thin stream of smoke.  Often used in ceremonies or to add an air of 'ambient mystery', but could likely be used to reduce scent by windows and doors it is placed next to.",
    "emits": [ "emit_smoke_flare" ],
    "use_action": {
      "target":  "candle_smoke_lit",
      "msg": "You light the smoking candle.",
      "active": true,
      "need_fire": 1,
      "menu_text": "Light",
      "type": "transform"
    }
  },
  {
    "id": "candle_smoke_lit",
    "type": "TOOL",
    "name": "smoking candle (lit)",
    "name_plural": "smoking candles (lit)",
    "copy-from": "candle_lit",
    "description": "This smoking candle is lit, providing both aeromatic smoke and light.",
    "emits": [ "emit_smoke_flare" ],
    "use_action": {
      "target": "candle_smoke",
      "msg": "The candle winks out.",
      "menu_text": "Extinguish",
      "type": "transform"
    },
    "flags": [ "LIGHT_8", "TRADER_AVOID" ]
  }


So it will go like this:

candle_smoke_lit -> candle_smoke -> candle_smoke_lit

4
Hi Chezzo :)

I have a game started alll ready is it possible to add a mod half way through or what ever through an all ready running game.

if so I understand I will need to travel to new map area befor I see new content but I am unsure if its possible and even how to add a mod when a game has all ready been started as i would love to use this mod as well :)
Hi Chezzo :)

I have a game started alll ready is it possible to add a mod half way through or what ever through an all ready running game.

if so I understand I will need to travel to new map area befor I see new content but I am unsure if its possible and even how to add a mod when a game has all ready been started as i would love to use this mod as well :)

Go to `save` folder, open `%WorldName%` folder and find `mods.json` file. Add mod identifer there. Mod identifier can be found in `ident` node in `modinfo.json`. It will be `Ninja` for this mod.

For example, if you had this:
Code: [Select]
[
  "dda",
  "ExtraBuildings"
]

It should become like to this:

Code: [Select]
[
  "dda",
  "ExtraBuildings",
  "Ninja"
]


I'm not sure if that will be enough for new buildings to spawn though.

5
Mod description:

This mod is a compilation of several buildings mods.

Mods used:

Small Town Building Pack by Whaley
Parks and Recreation Building Pack V1.0 by Whaley
Extended Buildings (V1.0) - BAD MOON RISING by Whaley
More Locations by Sunshine
Tall Buildings by Sunshine

Changelog and download links:

2017-05-18 - Initial release - Latest version

  • Combined 5 buildings mods into single mod.

6
Updated version of the mod (no content changes - just linted and fixed json errors): https://www.dropbox.com/s/71vrl8y79i9rqcf/Ninja_2017-05-18_Linted.zip?dl=0

7
C:DDA Extra Professions & Gears was updated (recipes were set to use SEW quality and filament requirement, all files were linted) - https://www.dropbox.com/s/r4ay5uqdnyfp36j/ZSFixed_CDDAXP_2017-05-18.zip?dl=0

8
The Lab - Contributions and Mods / Re: changing traits with lua
« on: May 15, 2017, 05:08:38 PM »
so I would use player.add_trait()? do you know if there's a list of trait ids or something similar I would use for this? sorry for being a bother
I believe all traits are defined in https://github.com/CleverRaven/Cataclysm-DDA/blob/6d1b73231b7b70d53790b2851b90864d86cf7db1/data/json/mutations.json

9
The Lab - Contributions and Mods / Re: changing traits with lua
« on: May 15, 2017, 06:03:23 AM »
oh ok cool! so are all functions exported or is it only the ones listed on the wiki?
Everything available in LUA is gathered in https://github.com/CleverRaven/Cataclysm-DDA/blob/master/lua/class_definitions.lua

10
There's also MagicEye, which you might be able to use for a true isometric perspective.  It doesn't look TOO hard to integrate using the curses bindings.
Did you mean NotEye (http://roguetemple.com/z/noteye/)?

11
My top guess is that English-speaking developers find it easier to add their functionality to the main repository using c++.
I haven't had a chance to look over the japanese mods, but there'd have to be some really elaborate use of LUA to make me change my mind at this point.
I'm planning on replacing LUA-based code with behavior you can configure with JSON wherever possible, so hopefully little to no features will be lost.

-- MOD NINJA.
game.add_item_to_group("museum_misc", "ninja_tengu_mask", 5)


function iuse_ninja_afterimage(item, active)

   local SCREEN_RADIUS = 2
   local CHARGES_PER_USE = 25

   if item.charges < CHARGES_PER_USE then
      game.add_msg("Power is insufficient...")
      return
   end

   local num_of_image = 0
   for x = (-1 * SCREEN_RADIUS), SCREEN_RADIUS do
      for y = (-1 * SCREEN_RADIUS), SCREEN_RADIUS do
         local point = player:pos()
         point.x = point.x + x
         point.y = point.y + y

         if g:is_empty(point) and game.one_in(3) then
            game.create_monster(mtype_id("mon_ninja_afterimage"), point)
            num_of_image = num_of_image + 1
         end

         if num_of_image >= 7 then
            break;
         end
      end
   end

   if num_of_image > 0 then
      game.add_msg("I copied the afterimage on the screen of the fog.")
   else
      game.add_msg("I could not image the afterimage.")
   end

   item.charges = math.max(item.charges - CHARGES_PER_USE, 0)

end

function iuse_ninja_typhoon(item, active)

   local CHARGES_PER_USE = 100
   local TYPHOON_RADIUS = 10
   local VORTEX_SPAWNRATE = 0.05      -- per a tile.
   local THRESHOLD_DESTRUCTION = 600   -- t_wall.bash_str = 210, t_wall_metal.bash_str = 600

   local RUBBLES = {}
   RUBBLES[0] = "A mountain of rubble"
   RUBBLES[1] = "A mountain of rubble (rock)"
   RUBBLES[2] = "Wreck (metal)"
   RUBBLES[3] = "A mountain of ashes"

   if item.charges < CHARGES_PER_USE then
      game.add_msg("Power is insufficient...")
      return
   end

   for x = (-1 * TYPHOON_RADIUS), TYPHOON_RADIUS do
      for y = (-1 * TYPHOON_RADIUS), TYPHOON_RADIUS do
         local point = player:pos()
         point.x = point.x + x
         point.y = point.y + y

         -- *Cleaning* ter & furn.
         local bash_str = map:bash_strength(point,true)

         if  bash_str < THRESHOLD_DESTRUCTION
         and game.one_in( math.floor( bash_str / THRESHOLD_DESTRUCTION * 10 ) )
         then
            map:destroy(point)
         end

         -- try remove rubbles.
         local fname = map:furnname(point)
            -- "furn_at" was removed.
            -- "furn" function returns "furn_id" but cant instanciate,
            -- therefore i have no idea to compare id & id. i want furn& :(

         if (
            fname == RUBBLES[0]
         or fname == RUBBLES[1]
         or fname == RUBBLES[2]
         or fname == RUBBLES[3]
         ) then
            map:furn_set(point, furn_str_id("f_null"))
         end

         -- spwan vortex.
         if g:is_empty(point) and game.one_in( math.floor((TYPHOON_RADIUS * 2)^2 / VORTEX_SPAWNRATE / 100) ) then
            game.create_monster(mtype_id("mon_vortex"), point)
         end
      end
   end

   item.charges = math.max(item.charges - CHARGES_PER_USE, 0)

end

game.register_iuse("IUSE_LUA_NINJA_AFTERIMAGE", iuse_ninja_afterimage)
game.register_iuse("IUSE_LUA_NINJA_TYPHOON"   , iuse_ninja_typhoon)

12
What I mean is - cdda has just a 2d tiled map and it doesn't matter how many voxels are used in each tile.

13
Sooo, is this something you've managed to get hooked into the game, or is this purely for illustrative purposes?

Either way, that survival shelter is looking pretty good :)
For now, I'm just looking how would it look like. Although I use some scripts to generate the picture from an actual game.
cdda supports isometric tiles, so they won't be looking too good as there are will be no shadows.

14
Announcements / Re: New GitHub feature, Project boards
« on: May 13, 2017, 10:18:36 AM »
How can i have permissions? i want add this tileset in cdda github project. once i have registered an github account, i can just edit the project? there are any extra requirements or rules needed?
You need to create a pull request - see https://github.com/CleverRaven/Cataclysm-DDA/blob/master/CONTRIBUTING.md.

15
The Lab - Contributions and Mods / Re: changing traits with lua
« on: May 13, 2017, 09:18:43 AM »
is there any documentation for lua support? i know that the wiki has a list of functions and attributes but many of the entries don't have a description so i'm not sure how they work
LUA functions are simply exported C++ functions, so they should work as their C++ counterparts.

Pages: [1] 2 3 ... 6