Search found 31 matches

by Rafiz
Sun Aug 01, 2021 12:24 pm
Forum: Modding help
Topic: How to know if locomotive is trying to accelerate in manual control?
Replies: 2
Views: 773

Re: How to know if locomotive is trying to accelerate in manual control?

Edit : I found this one : https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.riding_state it's even better. Oh, it works very well! so I can now know if automatic triain tries to accelerate with (train.state == defines.train_state.on_the_path) and I can know if player train tries to accelera...
by Rafiz
Sun Aug 01, 2021 11:34 am
Forum: Modding help
Topic: How to know if locomotive is trying to accelerate in manual control?
Replies: 2
Views: 773

How to know if locomotive is trying to accelerate in manual control?

I mean, there is "unreliable" method to check if train was moving and if it is moving now. But the problem is with for example 40 wagons this method won't work. It will think train is not trying to accelerate, because game will change train speed from 0 to 0. How do I reliably know if trai...
by Rafiz
Sun Aug 01, 2021 10:27 am
Forum: Modding help
Topic: How to access Vehicle acceleration power?
Replies: 2
Views: 837

Re: How to access Vehicle acceleration power?

max_energy usage will work exactly same as my [code]local LuaEntity = surface.get_trains()[...x...].locomotives["..."][1]; LuaEntity.max_energy_usage [/code]. I already tried it, and it didn't worked really. It returned 10'000 for every locomotive type. Doesn't matter what it's power was,...
by Rafiz
Sun Aug 01, 2021 2:50 am
Forum: Modding help
Topic: How to access Vehicle acceleration power?
Replies: 2
Views: 837

How to access Vehicle acceleration power?

I cannot get this anywhere. Lua entity, lua entity prototype, burner, burner prototype, nothing gives me ability to get information about what's vehicle acceleration power. I'm already looking for it for 4 hours, is it even possible? I'm losing my mind on how hard is to find such information, so I d...
by Rafiz
Mon Feb 22, 2021 5:38 am
Forum: Multiplayer
Topic: Earth Economy Multiplayer Map HELP
Replies: 8
Views: 4481

Re: Earth Economy Multiplayer Map HELP

For machine hosting I cannot advice you in few words, as it's quite complicated, but you could find some simple to use ready factorio servers (I don't know if it exist, but maybe it does) and if that doens't exist you can buy(or find free?) some remote virtual machine and use SSH client to access co...
by Rafiz
Sun Feb 07, 2021 10:47 pm
Forum: Modding help
Topic: When you assign player force upon creation, it works only form second player on
Replies: 3
Views: 1116

Re: When you assign player force upon creation, it works only form second player on

I think what I will do is I will leave first player in 'player' force and start creating forces only from second player. It should have no downsides, and I should've anyway preserve "forces" as there are only 64 available, but still I think it might be considered bug / unwanted behavior.
by Rafiz
Sun Feb 07, 2021 10:29 pm
Forum: Modding help
Topic: When you assign player force upon creation, it works only form second player on
Replies: 3
Views: 1116

Re: When you assign player force upon creation, it works only form second player on

Here is whole script : https://pastebin.com/22Uj4xYz * I wrote set_gloal / not set_global, but thakns to copy-pasting everything I can, this doesn't affect anything, function reference is same everywhere.. Output during game start is 1 player 2 rafiz force 3 rafiz force 4 rafiz force , when I added ...
by Rafiz
Sun Feb 07, 2021 10:26 pm
Forum: Modding help
Topic: When you assign player force upon creation, it works only form second player on
Replies: 3
Views: 1116

When you assign player force upon creation, it works only form second player on

In short - upon creating new multiplayer game (non-headless) this script : function on_player_created(event) local player = game.players[event.player_index] local newForce = createPlayerForce(player) game.print('1' .. player.force.name) game.print('2' .. newForce.name) player.force = newForce game.p...
by Rafiz
Sun Feb 07, 2021 4:35 am
Forum: Modding help
Topic: Enemies stronger further from spawn ( how to undo that )
Replies: 1
Views: 696

Re: Enemies stronger further from spawn ( how to undo that )

Ok - I did my own lua to fix it.

https://pastebin.com/kuN0M9rF

I might even turn it into mod that will scale down enemies on far palces..
by Rafiz
Sat Feb 06, 2021 11:07 pm
Forum: Modding help
Topic: Enemies stronger further from spawn ( how to undo that )
Replies: 1
Views: 696

Enemies stronger further from spawn ( how to undo that )

I have problem : my idea for scenario allows players to choose their spawn location, whole map is rather big and if you choose spawn far from center of map it is extremally hard to stay alive. What would be best solution to "flatify" map spawning ratios - so that instead of "than furt...
by Rafiz
Sun Jan 17, 2021 10:04 am
Forum: Modding help
Topic: Some error in recipe? Conflict of two mods, that shouldn't interfere that much.
Replies: 0
Views: 629

Some error in recipe? Conflict of two mods, that shouldn't interfere that much.

I have problem with 2 mods (both aren't mine) : one is "xander-mod" and other is "Transport_Drones_Fuel" (TDF, later, coz it's too many words) Problem lays in that TDF simplifies requirements to create transport drones (from "Transport Drones" mod) and xander-mod is cha...

Go to advanced search