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 ... 15
1
is this meant for tilesets?
It should work both in tiles and curses veriosn.

2
Currently no good way, but it might be possible to do it with a lua script. The script would need to create a tinymap (not sure if lua can do it), place it where it is needed, try to load a location, change position, load new segment and so on until entire area is covered.

Jumping overmap to generate it, then saving - something like this:

Code: [Select]
for x=0,200,1 do

y = 0
z = 0
player:setpos(tripoint(x,y,z))

end

g:save()

4
`StatsThroughSkills III` and `StatsThroughSkills IV` mods downloaded through CDDA launcher have exactly same formulas. There is only slight diifference in the lua code - version IV uses `efftype_id` type and will probably work in more recent experimental versions of CDDA. Bonus stats are applied through effects and are recalculated once a day using `on_day_passed` callback.

`StatsThroughSkills`mod shipped with experimental CDDA have different formulas. Bonus stats are added directly to base stats and recalculated once a day using `on_day_passed`callback, on new game start using `on_new_player_created` callback and after any skill is increased using `on_skill_increased` callback. There is also migration code from some older original version of the same mod. This version supports having any initial stats (either 8 8 8 8 or other combinations).

5
Data is loaded to memory on new game start/savegame load.

6
what is "const std::string & path, const std::string &src" ?
You can look for function calls:

Code: [Select]
load_data_from_dir( mod.path, mod.ident, ui );

first parameter is mod folder, second is mod identifier

7
Following function loads mod data (see https://github.com/CleverRaven/Cataclysm-DDA/blob/master/src/game.cpp#L384):

Code: [Select]
void game::load_data_from_dir( const std::string &path, const std::string &src, loading_ui &ui )

8
Lua can be called from several places:

* in-game lua console (called from debug menu, useful for debug and testing purposes);
* mapgen (`lua` mapgen method);
* mapgen finishing (`lua` finishing script, called after mapgen is done);
* on game loaded (called from `preload.lua` in mod folder);
* in various callbacks (called from `main.lua` in mod folder).

You can use `dofile('./folder/subfolder/filename.lua')` function for convenience in any of the above.

There are currently four callbacks functions:

* on_new_player_created;
* on_skill_increased;
* on_minute_passed;
* on_day_passed.

I want to add more callback functions - https://github.com/CleverRaven/Cataclysm-DDA/pull/21744/.

Some useful links on LUA in Cataclysm:

* on lua support - https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/LUA_SUPPORT.md
* on lua mapgen - https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/MAPGEN.md
* functions exported from cpp to lua - https://github.com/CleverRaven/Cataclysm-DDA/blob/master/lua/class_definitions.lua
* sample mods bundled with the game- https://github.com/CleverRaven/Cataclysm-DDA/tree/master/doc/sample_mods
* StatsThroughSkills mod bundled with game - https://github.com/CleverRaven/Cataclysm-DDA/blob/master/data/mods/StatsThroughSkills/main.lua
* Cataclysm-DDA-LUA mod collection for CDDA - https://github.com/ZhilkinSerg/Cataclysm-DDA-LUA or http://smf.cataclysmdda.com/index.php?topic=14861.0
* DegradeBuildings mod for CDDA - http://smf.cataclysmdda.com/index.php?topic=14825.0
* ForestGrowth mod for CDDA - http://smf.cataclysmdda.com/index.php?topic=15051.msg307590#msg307590
* links to some lua code/mods for CDDA - https://www.reddit.com/r/cataclysmdda/comments/6rb4wk/lua_mods/

9
Braziers are now furniture, not traps - https://github.com/CleverRaven/Cataclysm-DDA/pull/21321

You can revert game to previous version to play your savegame or replace all occurences of

Code: [Select]
"traps": "tr_brazier"

to:

Code: [Select]
"furniture": "f_brazier"

in these files:

Code: [Select]
\ExtraContent-Buildings\mapgen\More_Locations\military_outpost\mil_outpost_1blc_01.json
\ExtraContent-Buildings\mapgen\More_Locations\military_outpost\mil_outpost_1trc_01.json
\ExtraContent-Buildings\mapgen\More_Locations\military_outpost\mil_outpost_2trc_01.json
\ExtraContent-Buildings\mapgen\More_Locations\military_outpost\mil_outpost_ublc_03.json
\ExtraContent-Buildings\mapgen\More_Locations\military_outpost\mil_outpost_ybe_gate_00.json
\ExtraContent-Buildings\mapgen\More_Locations\military_outpost\mil_outpost_ybe_gate_01.json
\ExtraContent-Buildings\mapgen\More_Locations\military_outpost\mil_outpost_ybe_gate_02.json


10
Are other mods(Small Town Building Pack,Extended Buildings) of Whaley included in the game, too?
Yes, for ExtBui.

Not yet for STBP.

11
With Build 6875 I'm hitting an error when loading this mod

DEBUG: Error: data/mods//ZSFixed_Cataclysm Parks and Rec Building Pack//regional_map_settings.json: line 108:30: city: "houses": { ... } required for default

I've truncated out the rest of the text in the error message.  Anybody seeing this, and if so, do you have an idea on how to correct it?
Locations from this mod were already included to the game, so you don't need this mod if you are using latest experimental version of cdda.

12
Example from DinoMod:

Code: [Select]
[
   {
      "type": "region_overlay",
      "id": "dinomod_overlay",              "//": "unique identifier for this overlay",
      "regions": [ "all" ],                 "//": "A list of regions to which this overlay should be applied",
      "city": {
          "parks": {                        "//": "weighted list for park overmap terrains",
              "fieldoffice": 1
          }
      }
   }
]

13
Just uploaded V3 (includes mansion and other new overmap tiles).

14
You can already use multiple mapgens for the same OM tile, so C could map to lab_corner, and lab_corner could have 3 separate mapgens associated with it.
True, but they aren't getting rotated automatically.

15
Also can we define junction directions for overmap tile, so we could place random tiles from the list (automatically rotating if necessary)?

Code: [Select]
[
  "overmap_blueprint": {
    "overmap_blueprint_rows": {
      " S ",
      "CXC",
      "TTC",
      "TSC",
      "S S",
      "CSC"
    },
    "overmap_blueprint_tiles": {
      " ": [ "empty_rock" ],
      "C": [ "lab_room1_corner", "lab_room2_corner", "lab_room3_corner" ],
      "X": [ "lab_room_main_center" ],
      "T": [ "lab_room1_t" ],
      "S": [ "lab_room1_s" ]
    }
  }
]

T for random overmap with t-junction
X for random overmap with center tile/4-way-junction
C for random overmap with corner tile
S for random overmap with single direction connection

Code: [Select]
" ║ "
"╔╬╗"
"╠╩╝"
"╠═╗"
"║ ║"
"╚═╝"

Pages: [1] 2 3 ... 15