# Future LUA Removing

**URL:** <https://discourse.cataclysmdda.org/t/future-lua-removing/19122>\
**Category:** The Lab\
**Tags:** mod\
**Created:** [March 8, 2019, 10:23am UTC](https://discourse.cataclysmdda.org/t/future-lua-removing/19122 "2019-03-08T10:23:01Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adevald](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/adevald/32/3424_2.png) [@Adevald](https://discourse.cataclysmdda.org/u/Adevald)\
**Post date:** [March 8, 2019, 10:23am UTC](https://discourse.cataclysmdda.org/t/future-lua-removing/19122/1 "2019-03-08T10:23:01Z")

</div>

On github has some LUA infrastructure remove. And i have some questions. How i can make some “complicated” and nonstandart gameplay mod features? I think json is not enough for everything.

---

<div class="post-metadata">

**Author:** ![mlangsdorf](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mlangsdorf/32/2462_2.png) [@mlangsdorf](https://discourse.cataclysmdda.org/u/mlangsdorf)\
**Post date:** [March 8, 2019, 1:09pm UTC](https://discourse.cataclysmdda.org/t/future-lua-removing/19122/2 "2019-03-08T13:09:27Z")

</div>

Submit the C++ code to support your mod. For instance, the Boats mod requires several hundred lines of code to support boats and amphibious vehicles, but that logic is handled in the main C++ code, not through LUA.

---

<div class="post-metadata">

**Author:** ![Axema](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/axema/32/10822_2.png) [@Axema](https://discourse.cataclysmdda.org/u/Axema)\
**Post date:** [March 8, 2019, 1:23pm UTC](https://discourse.cataclysmdda.org/t/future-lua-removing/19122/3 "2019-03-08T13:23:47Z")

</div>

LUA has limited features to implement in-game, though they are helpful and very efficient for modding :3

---

<div class="post-metadata">

**Author:** ![Adevald](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/adevald/32/3424_2.png) [@Adevald](https://discourse.cataclysmdda.org/u/Adevald)\
**Post date:** [March 8, 2019, 1:33pm UTC](https://discourse.cataclysmdda.org/t/future-lua-removing/19122/4 "2019-03-08T13:33:24Z")

</div>

So, if i want to create a mod with some new func like iuse (mission calling throw item use), or maybe some other extraordinary stuff, first i need to compile it from whole the game, and then send it to the git branch?

---

<div class="post-metadata">

**Author:** ![mlangsdorf](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mlangsdorf/32/2462_2.png) [@mlangsdorf](https://discourse.cataclysmdda.org/u/mlangsdorf)\
**Post date:** [March 8, 2019, 3:10pm UTC](https://discourse.cataclysmdda.org/t/future-lua-removing/19122/5 "2019-03-08T15:10:52Z")

</div>

You would need to get the iuse functions your mod requires into the mainline repo. Your mod could then be independent of the repo.

I could remove Boats from the mainline repo tomorrow and host it on a Dropbox, and the Boats mod would still work because the C++ functions to support Boats are in the mainline repo. They’re completely dead code if you don’t have Boats enabled, but they’re there.

You would need to do the same thing: get your functions in mainline. If only your mod uses them, that’s perfectly fine. You probably would want to explain that your mod depends on those functions so no one cleans them up in a way that breaks your mod, but that’s fine.

---

<div class="post-metadata">

**Author:** ![Adevald](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/adevald/32/3424_2.png) [@Adevald](https://discourse.cataclysmdda.org/u/Adevald)\
**Post date:** [March 8, 2019, 3:37pm UTC](https://discourse.cataclysmdda.org/t/future-lua-removing/19122/6 "2019-03-08T15:37:05Z")

</div>

Thanks for explanation. But i think it’s a further perspective. Now i need to learn C++ instead of LUA. Welp, it’s kinda hard… But i’m still little bit disappointment because that strange system of code integration is uncomfortable for maintaining code, and i’m be afraid to break up something or pollute a code. Because i need to code some bulky and extraordinary array of various code. But thanks again. I hope i can handle it.

---

<div class="post-metadata">

**Author:** ![Litppunk](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/litppunk/32/409_2.png) [@Litppunk](https://discourse.cataclysmdda.org/u/Litppunk)\
**Post date:** [March 8, 2019, 5:00pm UTC](https://discourse.cataclysmdda.org/t/future-lua-removing/19122/7 "2019-03-08T17:00:11Z")

</div>

sounds like an adjacent // comment or the like to explain its function.

---

<div class="post-metadata">

**Author:** ![mlangsdorf](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mlangsdorf/32/2462_2.png) [@mlangsdorf](https://discourse.cataclysmdda.org/u/mlangsdorf)\
**Post date:** [March 8, 2019, 5:05pm UTC](https://discourse.cataclysmdda.org/t/future-lua-removing/19122/8 "2019-03-08T17:05:33Z")

</div>

Unfortunately, the effort to maintain the LUA interface is not justified by the few mods that take advantage of it. Sorry.

---

<div class="post-metadata">

**Author:** ![Saladofstones](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/saladofstones/32/4859_2.png) [@Saladofstones](https://discourse.cataclysmdda.org/u/Saladofstones)\
**Post date:** [March 14, 2019, 8:20am UTC](https://discourse.cataclysmdda.org/t/future-lua-removing/19122/9 "2019-03-14T08:20:10Z")

</div>

With the loss of LUA completely, Its completely bricked most of my worlds and saves. Even if the LUA interface is unmaintained, could something be kept for backwards compatibility?

---

<div class="post-metadata">

**Author:** ![mlangsdorf](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mlangsdorf/32/2462_2.png) [@mlangsdorf](https://discourse.cataclysmdda.org/u/mlangsdorf)\
**Post date:** [March 14, 2019, 11:49am UTC](https://discourse.cataclysmdda.org/t/future-lua-removing/19122/10 "2019-03-14T11:49:31Z")

</div>

Unfortunately, no. That’s not possible.

All the mods in the CleverRaven that used LUA were migrated to JSON and are still supported with backwards compatibility.

Might I suggest sticking with the 0.D release instead of grabbing the latest experimental for a while? 0.D is stable and a great game, while latest experimental, right this moment, is a Wild West of game-breaking bugs and crazy experimentation. The LUA compatibility issue might get resolved in a couple of months, as well as the bugs from the current merge flood.

---

<div class="post-metadata">

**Author:** ![Adevald](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/adevald/32/3424_2.png) [@Adevald](https://discourse.cataclysmdda.org/u/Adevald)\
**Post date:** [March 14, 2019, 2:17pm UTC](https://discourse.cataclysmdda.org/t/future-lua-removing/19122/11 "2019-03-14T14:17:56Z")

</div>

Okay, i understand the state of things. But have some questions. Whats requirements for a mods code? What about it size, or maybe what if i THEORETICALLY want to create some big bunch of code (i admit what i cant handle it now). Of in the other words, whats borders of offer code?

(sry 4 ingland…)

---

<div class="post-metadata">

**Author:** ![mlangsdorf](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mlangsdorf/32/2462_2.png) [@mlangsdorf](https://discourse.cataclysmdda.org/u/mlangsdorf)\
**Post date:** [March 14, 2019, 3:01pm UTC](https://discourse.cataclysmdda.org/t/future-lua-removing/19122/12 "2019-03-14T15:01:42Z")

</div>

The Boats mod leaves its wet, sloppy footprints all over the vehicle code, to the tune of several hundred lines of code with more planned.

There’s no real limit, there’s just a question of how invasive your changes are and how much they’re going to complicated other code efforts.

---

<div class="post-metadata">

**Author:** ![Adevald](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/adevald/32/3424_2.png) [@Adevald](https://discourse.cataclysmdda.org/u/Adevald)\
**Post date:** [March 15, 2019, 7:58am UTC](https://discourse.cataclysmdda.org/t/future-lua-removing/19122/13 "2019-03-15T07:58:33Z")

</div>

Oh, thanks for answers!
