Search found 33 matches
- Sun Apr 05, 2020 5:50 pm
- Forum: Mods
- Topic: [MOD 0.18] KRASTORIO^2
- Replies: 198
- Views: 143740
Re: [MOD 0.18] KRASTORIO^2
Playing K2 with AAI Industry and Space Exploration, I can't find a way to produce sand/glass in space. Crusher cannot work in space and it is the only way to produce sand. Is it intend? In Original SE, I can handcraft sand or craft by space assembler.
- Sat Mar 14, 2020 1:37 pm
- Forum: Mods
- Topic: [MOD 0.18] KRASTORIO^2
- Replies: 198
- Views: 143740
Re: [MOD 0.18] KRASTORIO^2
If I want to play with space exploration, should I add AAI Industry? Is it compatible and well balanced?
- Sat Feb 01, 2020 7:48 am
- Forum: Modding help
- Topic: default pathfinding cannot bypass cliff
- Replies: 1
- Views: 717
Re: default pathfinding cannot bypass cliff
I figure out the problem. I should pass the entity.prototype.collision_box instead of entity.bounding_box.
But another problem still exists, the api failed frequently.
To solve the problem, i implements a custom pathfinding algorithm . It works but slow
But another problem still exists, the api failed frequently.
To solve the problem, i implements a custom pathfinding algorithm . It works but slow
- Fri Jan 31, 2020 9:09 am
- Forum: This Forum
- Topic: Is the forum support compressing image attachments?
- Replies: 1
- Views: 1232
Is the forum support compressing image attachments?
Some screenshots are larger than 4. It would be fine to compress before uploading.
- Fri Jan 31, 2020 2:47 am
- Forum: Modding help
- Topic: default pathfinding cannot bypass cliff
- Replies: 1
- Views: 717
default pathfinding cannot bypass cliff
I try to control my man by scripts. I invoke surface.request_path and find a path. But It can't bypass the cliff and the forest. Follow is the piece of my code: self.path_id = entity.surface.request_path({ bounding_box = entity.bounding_box, collision_mask = {"player-layer"}, start = entit...
- Tue Mar 05, 2019 9:48 am
- Forum: Modding discussion
- Topic: How to draw line/arrow on surface/map?
- Replies: 2
- Views: 1250
Re: How to draw line/arrow on surface/map?
Thank you very muchdarkfrei wrote: βTue Mar 05, 2019 8:24 amhttps://lua-api.factorio.com/latest/LuaRendering.html
Code: Select all
rendering.draw_line(table)
- Tue Mar 05, 2019 6:32 am
- Forum: Modding discussion
- Topic: How to draw line/arrow on surface/map?
- Replies: 2
- Views: 1250
How to draw line/arrow on surface/map?
from data.raw, I found 'fake-selection-box-2x2' and 'orange-arrow-with-circle'. Is that right?
em... I want to visual vehicle speed and its movement path using line and arrow.
em... I want to visual vehicle speed and its movement path using line and arrow.
- Fri Feb 22, 2019 2:53 am
- Forum: Modding help
- Topic: how to get current timestamp?
- Replies: 3
- Views: 956
how to get current timestamp?
os.time() is not work since missing the os table.
on_tick event may help, but is there any other ways?
on_tick event may help, but is there any other ways?
- Sun Jan 27, 2019 4:42 am
- Forum: Modding help
- Topic: Is there any high-level gui library?
- Replies: 0
- Views: 639
Is there any high-level gui library?
I'm going to build some simple menu, like chrome, click a menu to show its children, click one of it to trigger some function. I try to find some code in factorio-stdlib, ComfyFactorio. But these library is hard code to build menu. I want to find a library with high level API, helps to register even...
- Sat Jan 26, 2019 7:37 am
- Forum: Resolved Problems and Bugs
- Topic: game crashed while loading saves
- Replies: 7
- Views: 2045
Re: game crashed while loading saves
In order to reconstruct objects on loading, I need to check if a table is a native object. Can I check with the following code? type(object) == 'table' and type(object.__self) == 'userdata' I change the implement of function is_native_class in kcontainer.lua and fix the issue. It works for LuaPlayer...
- Sat Jan 26, 2019 4:13 am
- Forum: Resolved Problems and Bugs
- Topic: game crashed while loading saves
- Replies: 7
- Views: 2045
Re: game crashed while loading saves
Thanks for the report. Don't use the inspect library. It's known to be buggy and cause crashes. Aside from that, when I test it in 0.17 it's saying you're giving "nil" in place of direction when calling: entity.walking_state = {walking=boolean, direction=defines.direction} meaning you did...
- Sat Jan 26, 2019 3:45 am
- Forum: Resolved Problems and Bugs
- Topic: game crashed while loading saves
- Replies: 7
- Views: 2045
game crashed while loading saves
I'm developing a mod for AI player. Currently finish the IOC container and some simple steering behavior. How to reproduce: 1. start new game with mod 2. spawn some solders by clicking button 'S' 3. command it to follow by clicking button 'C' 4. save the game 5. quit 5. load the save 6. repeat 2~5 a...
- Tue Jan 08, 2019 4:11 pm
- Forum: Modding help
- Topic: How to use item for character by script?
- Replies: 2
- Views: 1089
How to use item for character by script?
I want to make a feature that auto using raw-fish if character's health is low.
for raw-fish, i can use LuaItemStack::count to decrease the raw-fish in inventory, and heal the character by LuaEntity::damage.
But If i want to use grenade by script, it can't implement in the same way.
for raw-fish, i can use LuaItemStack::count to decrease the raw-fish in inventory, and heal the character by LuaEntity::damage.
But If i want to use grenade by script, it can't implement in the same way.