Search found 152 matches
- Thu Feb 02, 2023 4:16 am
- Forum: Mechanical Throughput Magic (circuit-free)
- Topic: Rational Spitter Combination based on the conveyor system.
- Replies: 1
- Views: 1915
Rational Spitter Combination based on the conveyor system.
https://github.com/YagaoDirac/Internal-Reference-of-Dirac-Instutite-of-Game/tree/main/2023/Rational%20Spitter%20Combination%20based%20on%20the%20conveyor%20system%20in%20Factorio My English gets better over time. It allows me to translate my tutorials into English. I also have a car-conveyor system,...
- Mon Jun 28, 2021 1:34 am
- Forum: Modding help
- Topic: How to change force for entity in editor or script?
- Replies: 4
- Views: 1807
- Mon Jun 28, 2021 1:33 am
- Forum: Modding help
- Topic: How to change force for entity in editor or script?
- Replies: 4
- Views: 1807
- Sun Jun 27, 2021 1:42 pm
- Forum: Modding help
- Topic: How to change force for entity in editor or script?
- Replies: 4
- Views: 1807
How to change force for entity in editor or script?
I tried to make a scenario. I messed up the force. Now I need to find all the worm turrets and set then to enemy. Any idea?
I searched in the docs but found nothing. Entity doesn't contain a field to set force, neither force is without any function to receive entity.
Editor doesn't do this neither.
I searched in the docs but found nothing. Entity doesn't contain a field to set force, neither force is without any function to receive entity.
Editor doesn't do this neither.
- Sat Jun 19, 2021 12:04 pm
- Forum: News
- Topic: Friday Facts #366 - The only way to go fast, is to go well!
- Replies: 100
- Views: 74480
Re: Friday Facts #366 - The only way to go fast, is to go well!
You should separate the LuaEntity.html by the types.
- Tue Jun 01, 2021 8:26 am
- Forum: Technical Help
- Topic: Fail getting response from pingpong server.
- Replies: 0
- Views: 670
Fail getting response from pingpong server.
I stops my game from being visible in the game list. How can I solve it?
- Mon May 31, 2021 7:53 am
- Forum: Not a bug
- Topic: surface.get_tile function returns wrong result.
- Replies: 8
- Views: 3039
- Mon May 31, 2021 7:18 am
- Forum: Technical Help
- Topic: Fail to startup headless server.
- Replies: 0
- Views: 711
Fail to startup headless server.
Everything works properly until I tried to restart the server with a new save file. 9.224 Info CommandLineMultiplayer.cpp:278: Maximum segment size = 100; minimum segment size = 25; maximum-segment-size peer count = 10; minimum-segment-size peer count = 20 9.449 Info ServerRouter.cpp:525: Own addres...
- Thu May 27, 2021 10:23 am
- Forum: Not a bug
- Topic: surface.get_tile function returns wrong result.
- Replies: 8
- Views: 3039
Re: surface.get_tile function returns wrong result.
I'm very sorry to tell you that your suggestion doesn't help. If it's supposed to work and you are very sure, plz provide more detail or experience, or code directly. My solution is a container to store the generated chunks. It works properly. But I guess you should provide the api in your cpp code.
- Thu May 27, 2021 10:20 am
- Forum: Not a bug
- Topic: surface.get_tile function returns wrong result.
- Replies: 8
- Views: 3039
- Thu May 27, 2021 1:17 am
- Forum: Not a bug
- Topic: surface.get_tile function returns wrong result.
- Replies: 8
- Views: 3039
Re: surface.get_tile function returns wrong result.
Fitst of all, Thank you for helping. But I really need some more help. I added global.surface.set_chunk_generated_status(event.position, defines.chunk_generated_status.custom_tiles) global.surface.set_chunk_generated_status(event.position, defines.chunk_generated_status.basic_tiles) global.surface....
- Wed May 26, 2021 8:06 am
- Forum: Not a bug
- Topic: surface.get_tile function returns wrong result.
- Replies: 8
- Views: 3039
surface.get_tile function returns wrong result.
In on_chunk_generated, I turned all the tiles out side (-200,-200),(200,200) into "water". script.on_event(defines.events.on_chunk_generated, function(event) --Some trivial code removed. local tiles = {} local index = 1 for x=event.area.left_top.x,event.area.right_bottom.x-1 do for y=event...
- Sun May 09, 2021 6:44 am
- Forum: Modding help
- Topic: A short question. Where is the flag to check if the code runs on server or client?
- Replies: 4
- Views: 1708
- Fri Apr 23, 2021 5:09 am
- Forum: Modding help
- Topic: A short question. Where is the flag to check if the code runs on server or client?
- Replies: 4
- Views: 1708
Re: A short question. Where is the flag to check if the code runs on server or client?
Thanks for replying.
The purpose is that, I need to display something for players. They are trivial and not worthy any memory on server.
But if there is not such a mechanism, it's the same for me to do it in a unified script and cost some extra memory on server.
- Fri Apr 23, 2021 3:03 am
- Forum: Modding help
- Topic: A short question. Where is the flag to check if the code runs on server or client?
- Replies: 4
- Views: 1708
- Fri Apr 23, 2021 3:02 am
- Forum: Modding help
- Topic: A very normal assignment fails in lua.
- Replies: 6
- Views: 2276
Re: A very normal assignment fails in lua.
OK, thanks. I plan to assemble all the parts in that project again to see what goes wrong. By the way, I found that it's not practical to set the metatable in on_load when the data structure and relationship scale and get complex. Would you consider doing it in your cpp code?
- Thu Apr 22, 2021 11:48 am
- Forum: Modding help
- Topic: A very normal assignment fails in lua.
- Replies: 6
- Views: 2276
Re: A very normal assignment fails in lua.
If you have looked at the log just lines above the final error info, you would find that, a table with a field named "amount_per_minute" is gone after a line like. cont[index] = this table. The container should be very correct. Then what is the problem? I don't believe it's possible to do...
- Thu Apr 22, 2021 9:34 am
- Forum: Modding help
- Topic: A very normal assignment fails in lua.
- Replies: 6
- Views: 2276
A very normal assignment fails in lua.
https://github.com/YagaoDirac/Bug-report-Do-not-download Directly run the scenario. The bug occurs within a second. In log, it's very clear. A very strange behavior happens. Inside the add function of array_simple, a field of the added element is removed. The array_simple is a container. It works pr...
- Wed Apr 21, 2021 6:48 am
- Forum: Not a bug
- Topic: [1.1.32]Metatable doesn't work in multiplayer.
- Replies: 3
- Views: 1501
Re: [1.1.32]Metatable doesn't work in multiplayer.
- Wed Apr 21, 2021 6:27 am
- Forum: Modding help
- Topic: [1.1.32]Reference counting in lua memory managing doesn't function properly.
- Replies: 7
- Views: 2393
Re: [1.1.32]Reference counting in lua memory managing doesn't function properly.
First of all, thank you for such a long reply. It's very helpful. I do recommend you to add some concrete example into your docs. According to my test, all the functions, and metatable under global is gone after loading. All the variables outside the global( I guess this is what you call "the ...