Search found 152 matches

by yagaodirac
Sat Oct 17, 2020 3:18 am
Forum: Modding help
Topic: Is it possible to call functions in cpp from lua?
Replies: 11
Views: 3703

Re: Is it possible to call functions in cpp from lua?

He already knows it. I told him earlier. 3, You shouldn't talk about this idea here. You know amd and intel? Ask them for the solution. But in fact, I just started knowing that, lua can call functions written in cpp. If you mod a interface in lua, take the advantage of cpp and graphics card, with s...
by yagaodirac
Fri Oct 16, 2020 8:49 am
Forum: Ideas and Suggestions
Topic: Altitude for each tile and liquid flows downward in pipes?
Replies: 1
Views: 452

Altitude for each tile and liquid flows downward in pipes?

I know it slows the game. But I don't know whether people appreciate it.
by yagaodirac
Fri Oct 16, 2020 8:47 am
Forum: Won't implement
Topic: Data container for each chunk of tiles.
Replies: 2
Views: 852

Data container for each chunk of tiles.

Now I have to maintain a table to save all the extra info for each tiles in lua. In the on_chunk_generated, I added the new chunk to the container. Inside the container, I wrote a container like table. In this way, I can easily iterate all the existing tiles of a surface. The code is like container ...
by yagaodirac
Fri Oct 16, 2020 2:49 am
Forum: Modding help
Topic: Is it possible to call functions in cpp from lua?
Replies: 11
Views: 3703

Is it possible to call functions in cpp from lua?

Now we know, game calls the functions in lua, including __base__ and all the mods. Is it possible to build some dll and call the functions from __my_mod__?
If it's possible, what about different os? Sockets? Or is it possible to load some png?
by yagaodirac
Thu Oct 15, 2020 2:14 pm
Forum: Ideas and Suggestions
Topic: Optimization idea: abstraction
Replies: 236
Views: 60691

Re: Optimization idea: abstraction

A solution is there and very simple. For functional areas like smelting, or basic products, you could mod some new, big furnaces and assemblers. Let's say, a long furnace. The recipe to get it is with gradient of 24 stone furnaces. And it can be crafted back to 24 separated furnaces. It not only sa...
by yagaodirac
Thu Oct 15, 2020 1:59 pm
Forum: Ideas and Suggestions
Topic: gravity?
Replies: 4
Views: 1066

gravity?

North and south is not interesting any more. Is it possible to be up and down?
by yagaodirac
Thu Oct 15, 2020 8:53 am
Forum: Ideas and Suggestions
Topic: Optimization idea: abstraction
Replies: 236
Views: 60691

Re: Optimization idea: abstraction

A solution is there and very simple. For functional areas like smelting, or basic products, you could mod some new, big furnaces and assemblers. Let's say, a long furnace. The recipe to get it is with gradient of 24 stone furnaces. And it can be crafted back to 24 separated furnaces. It not only sav...
by yagaodirac
Wed Oct 14, 2020 10:39 am
Forum: Outdated/Not implemented
Topic: New api in a OOP language?
Replies: 38
Views: 9293

Re: New api in a OOP language?

But for now, in factorio api, I can't do this. And this is the critical reason that now a days factorio mods, scenarios are generally lack of entity movement control. Normally people code in ue4 or unity don't rely on stl or boost. But they do rely on the infrastructure provided by the engine. Woul...
by yagaodirac
Wed Oct 14, 2020 10:34 am
Forum: Outdated/Not implemented
Topic: New api in a OOP language?
Replies: 38
Views: 9293

Re: New api in a OOP language?

For all of you talking about the multiple thread thing. The problem is that, if you make something fast enough, you definitely benefit from a multi core cpu. But if you host a game with this thing, people would probably have a hard time linking into your game. So, any mods that are design to be able...
by yagaodirac
Wed Oct 14, 2020 2:51 am
Forum: Outdated/Not implemented
Topic: New api in a OOP language?
Replies: 38
Views: 9293

Re: New api in a OOP language?

https://github.com/TGNThump/AbandonedRuins Hi, emm, I think we misunderstood each other. I saw the lualib_bundle.lua file in that mod, but that lib is something like a std::vector. It's not what I care about. Let's say, I'm gonna code a boss. I need to control the boss to move, shoot some projectil...
by yagaodirac
Wed Oct 14, 2020 2:30 am
Forum: Outdated/Not implemented
Topic: New api in a OOP language?
Replies: 38
Views: 9293

Re: New api in a OOP language?

You could use something like https://github.com/TypeScriptToLua/TypeScriptToLua to write code in non-Lua, there is at least one mod on the mod portal that was written this way. Which mod? https://github.com/TGNThump/AbandonedRuins (Just to be clear, this is a possibility, not a recommendation.) Tha...
by yagaodirac
Wed Oct 14, 2020 2:29 am
Forum: Outdated/Not implemented
Topic: New api in a OOP language?
Replies: 38
Views: 9293

Re: New api in a OOP language?

Days ago, someone asked that does ue4 support python. After searching, I found ue4 supports python through a plugin. So, is it possible to enable factorio to support js or py or anything else through a mod? https://moonscript.org/ has similar syntax to python and compiles to lua. Or maybe there's o...
by yagaodirac
Tue Oct 13, 2020 11:20 am
Forum: Outdated/Not implemented
Topic: New api in a OOP language?
Replies: 38
Views: 9293

Re: New api in a OOP language?

Bilka wrote:
Tue Oct 13, 2020 9:22 am
You could use something like https://github.com/TypeScriptToLua/TypeScriptToLua to write code in non-Lua, there is at least one mod on the mod portal that was written this way.
Which mod?
by yagaodirac
Tue Oct 13, 2020 5:05 am
Forum: Outdated/Not implemented
Topic: New api in a OOP language?
Replies: 38
Views: 9293

Re: New api in a OOP language?

Days ago, someone asked that does ue4 support python. After searching, I found ue4 supports python through a plugin.
So, is it possible to enable factorio to support js or py or anything else through a mod?
by yagaodirac
Tue Oct 13, 2020 2:04 am
Forum: Outdated/Not implemented
Topic: New api in a OOP language?
Replies: 38
Views: 9293

Re: New api in a OOP language?

If there's one thing i can agree with it's that it would've been great if factorio had included a more comprehensive set of "common" functions with the factorio typical great documentation. I've spent much more time on writing a "library" than i have spent on actually modding th...
by yagaodirac
Mon Oct 12, 2020 11:16 am
Forum: Outdated/Not implemented
Topic: New api in a OOP language?
Replies: 38
Views: 9293

Re: New api in a OOP language?

Actually, I'm planning some one-mod-scenario. In that special case, performance is not a problem since there aren't gonna be a lot of entities flying at the same time. I literally miss the feeling when I coded in some game engine. But, I'm not gonna talk about this anymore because another set of api...
by yagaodirac
Mon Oct 12, 2020 1:46 am
Forum: Outdated/Not implemented
Topic: New api in a OOP language?
Replies: 38
Views: 9293

Re: New api in a OOP language?

I've being following the mod portal for days. I found most of the mods are very short. Normally they added some new items, some are recipe, some are entity. But very few mods do heavy computational things. I started a mod named dynamic water. I coded 40k lua only for an algorithm. That was very pain...
by yagaodirac
Sun Oct 11, 2020 8:56 am
Forum: Won't fix.
Topic: [1.0.0] Fails parsing mod zip file.
Replies: 6
Views: 1720

Re: [1.0.0] Fails parsing mod zip file.

But after I zipped it, it doesn't show in mod list. What tool did you use to create the zip file? I used 7-zip to create a test mod with a garbage file named "坤為地は世界测验 [測驗] cèyàn 实验 [實驗].txt" and it loads fine. My guess is that corruption of zip files mostly happens when the creating prog...
by yagaodirac
Sun Oct 11, 2020 8:55 am
Forum: Won't fix.
Topic: [1.0.0] Fails parsing mod zip file.
Replies: 6
Views: 1720

Re: [1.0.0] Fails parsing mod zip file.

kovarex wrote:
Tue Oct 06, 2020 1:48 pm
It is preffered if the file names use the standard asci, there are lot of programs and sytems that don't support special characters, and I prefer to keep it simple.
Yeah, sure, thanks. Will do.
by yagaodirac
Sun Oct 11, 2020 8:54 am
Forum: Outdated/Not implemented
Topic: New api in a OOP language?
Replies: 38
Views: 9293

New api in a OOP language?

I know it's a very giant project to make api. But according my experience of reading all the codes in Factorio api, I don't think lua is good enough. Lua is not oop enough. People have to encapsulate the whole thing to make use of the advantage of oop. I'm already thinking redo my mod in an oop way,...

Go to advanced search