Cataclysm-DDA-LUA (Updated on 2017-11-29)

Description:

Cataclysm-DDA-LUA is collection of LUA mods for Dark Days Ahead.

Last updated on:

2017-11-29

Contents:

dda-lua

Shared library mod for easier creation of LUA mods.

dda-lua-achievements

Mod that adds following achievements:

  • not implemented yet.

dda-lua-fun

Mod that adds following fun:

dda-lua-items

Mod that adds following items:

  • atomic_entity_scanner - highlights items and creatures around player character;
  • atomic_earthquake_generator - makes rubbles around player character;
  • atomic_flamethrower - bursts fire in selected direction.

dda-lua-mapgen

Mod that adds following mapgen:

  • not implemented yet.

dda-lua-skills

Mod that adds following skills:

  • athletics - gives +2 base speed points per 1 skill level, based on squares_walked (practices by 1 skill point per 10 tiles traversed with at least 1 skill point).

dda-lua-traits

Mod that adds following traits:

  • TOURETTE - shouts bad words when not under medication (xanax);
  • NIGHTMARES - you see bad dreams when not under medication (ambien);
  • NUDIST - +2 to all attributes when naked;
  • DEAFNESS - you are totally deaf and cannot hear anything - suggested on the forums;
  • BLINDNESS - you are totally blind and cannot see anything.

Todo list:

dda-lua

  • enhance capabilities (add mapgen, menu, config);
  • update figlet/ascii intro;
  • implement global configuration menu;
  • optimize figlet data;
  • optimize container handling in function_players data;
  • make profiling and optimize code;
  • make use of lifetime_stats (see https://github.com/CleverRaven/Cataclysm-DDA/pull/21607).

dda-lua-achievements

  • add achievements infrastructure to dda-lua-achievements;
  • add achievements (squares_walked, cash, damage_taken, damage_healed, headshots, skill_level, attribute, recipes_known, get_naked, speed).

dda-lua-fun

  • rewrite code to make use of dda-lua;
  • add more nationalities, review bonus items and quantities;
  • rotting food and corpses create stench clouds that reduce morale. Wearing mouth protection reduces the effect. Perfume and incense can be used for an opposite effect - see http://smf.cataclysmdda.com/index.php?topic=3310.msg300514#msg300514.
  • hygiene (you make filthier each turn and must wash/clean yourself with occassionally. filthy gear matters)

dda-lua-items

  • rewrite code to make use of dda-lua;
  • implement solar powered items;
  • implement ascii photo-gallery for camera.

dda-lua-mapgen

dda-lua-skills

  • change athletics skill to control stamina and/or fatigue;
  • rebalance athletics skill practice amount per squares_walked.

dda-lua-traits

Screenshots:

Links:

Ok I was going to say something else but I see why this needs to be a lua mod since the jsons only allow for skill descriptions and not the addition of new skills at least not in that way. Now on that note I really like the idea of athletic the other traits look good too.

With the achievements, would a highscore list be doable?

We’ll see.

How long should I expect the athletics skill to go up?

Damn Zhilkin this stuff is fun. Specially the athletics and tourette.

athletics should be practiced by 1 point per 10 tiles traversed, but for at least 1 point.

  local squares_per_train = 10 --TODO: make this variable configurable or implement some smarter formula for `trained_amount`
  local trained_amount = squares_walked_delta / squares_per_train

  if (trained_amount > 0 and trained_amount < 1) then

    trained_amount = 1

  end
  MOD.PracticeSkill("athletics", trained_amount)

Love the nightmare mod, I like the idea of showing a visualization of my characters night terrors. I hope you add more additions to the nightmares so I can see cool new horrors to be explored while dreaming!

athletics should be practiced by 1 point per 10 tiles traversed, but for at least 1 point.

[code]
local squares_per_train = 10 --TODO: make this variable configurable or implement some smarter formula for trained_amount
local trained_amount = squares_walked_delta / squares_per_train

if (trained_amount > 0 and trained_amount < 1) then

trained_amount = 1

end
MOD.PracticeSkill(“athletics”, trained_amount)
[/code][/quote]
Actually if say I think the lua failed to load or something like that what would I do to try and re activate the lua. I ask cause since I first used it on a save without it causing an aparantly critical load failure it gave an error but it did not show up any more later. Anyways I ask because I have literally walked miles and athletics did not tick once. Maybe I need to turn them off and back on again.

athletics should be practiced by 1 point per 10 tiles traversed, but for at least 1 point.

[code]
local squares_per_train = 10 --TODO: make this variable configurable or implement some smarter formula for trained_amount
local trained_amount = squares_walked_delta / squares_per_train

if (trained_amount > 0 and trained_amount < 1) then

trained_amount = 1

end
MOD.PracticeSkill(“athletics”, trained_amount)
[/code][/quote]
Actually if say I think the lua failed to load or something like that what would I do to try and re activate the lua. I ask cause since I first used it on a save without it causing an aparantly critical load failure it gave an error but it did not show up any more later. Anyways I ask because I have literally walked miles and athletics did not tick once. Maybe I need to turn them off and back on again.[/quote]
There is some initialization which is done on new player creation - some zero values are being saved withing the player.

PARAM.save(“squares_walked_total”, 0)
PARAM.save(“stats_squares_walked”, 0)
PARAM.save(“speed_bonus”, 0)

If you add mod to existing save you can try to run these statements in debug lua console.

You can also can provide error text/screenshot or provide savegame, so I could check what’s wrong.

data/mods//dda-lua-skills/main.lua:147: attempt to perform arithmetic on a nil value (local ‘squares_walked_prev’)

That is the error I got when I tried those commands you gave.

EDIT:never mind skill is increasing and my current speed is now 102 so huzzah.

Great

Just added atomic flamethrower which bursts fire in selected direction. Works best with realtime progression turned on.

Realtime progression?

Realtime progression?[/quote]

17th row in General tab in Options menu