Search found 2008 matches

by Deadlock989
Thu Oct 29, 2020 8:29 pm
Forum: Modding help
Topic: Hiding a character during cutscene?
Replies: 10
Views: 246

Re: Hiding a character during cutscene?

Yep, got it working with a barebones car made of one transparent pixel and happy thoughts. Thanks.
by Deadlock989
Thu Oct 29, 2020 6:47 pm
Forum: Modding help
Topic: De-aggro'ing hostile units for safe teleport
Replies: 13
Views: 417

Re: De-aggro unit commands?

I just tested this and /sudo x = here me.teleport(here,'test') me.teleport(here,'nauvis') This instantly de-aggros all biters. Yep, that works well. Back and forth in the same tick = no visual clue that you just spent a millisecond in a dungeon dimension and all the biters immediately lose interest...
by Deadlock989
Thu Oct 29, 2020 6:37 pm
Forum: Modding help
Topic: Hiding a character during cutscene?
Replies: 10
Views: 246

Re: Hiding a character during cutscene?

Klonan wrote:
Thu Oct 29, 2020 5:50 pm
What reference do you mean?
The Lua reference is held intact when I test it
It might be because I wasn't doing character.driving = false but instead I was doing car.set_driver(nil). That does eject the passenger but my cached reference to the character was lost. Or maybe it was something else.
by Deadlock989
Thu Oct 29, 2020 5:22 pm
Forum: Modding help
Topic: De-aggro'ing hostile units for safe teleport
Replies: 13
Views: 417

Re: De-aggro unit commands?

Does teleporting to another surface de-aggro? In which case it might be feasible to teleport to your "limbo" surface and back (possibly with one tick delay). See the other thread - this is a character, not a player, so it can't be transported cross-surface. Characters are disconnected from / not co...
by Deadlock989
Thu Oct 29, 2020 3:51 pm
Forum: Modding help
Topic: De-aggro'ing hostile units for safe teleport
Replies: 13
Views: 417

Re: De-aggro unit commands?

True that. I never used my teleporters while under fire i guess - at least i never noticed any such thing. Personally i'd prefer if there was a non-hacky way to just force the character LuaEntity out of the biters target list manually - for other usecases too. @Klonan said there's already a mechani...
by Deadlock989
Thu Oct 29, 2020 10:51 am
Forum: Modding help
Topic: De-aggro'ing hostile units for safe teleport
Replies: 13
Views: 417

Re: De-aggro unit commands?

What does utterly confuse them is if i have 0 health: Thanks, that works (given that the character is set to non-destructible). My only small annoyance with it (seems there is always a price for these hacks) is that because the character is detached, you get three small grey health indicator bars d...
by Deadlock989
Wed Oct 28, 2020 11:36 pm
Forum: Modding help
Topic: De-aggro'ing hostile units for safe teleport
Replies: 13
Views: 417

Re: De-aggro unit commands?

So you could spawn a projectile, which does 999999 damage, and target the player. Am i correct in assuming that neither the distance not the speed of the projectile matter for that? If yes that has other interesting applications... I tried it, couldn't get it work. I didn't try very hard tbf.
by Deadlock989
Wed Oct 28, 2020 6:52 pm
Forum: Modding help
Topic: De-aggro'ing hostile units for safe teleport
Replies: 13
Views: 417

Re: De-aggro unit commands?

Should the projectile be riding in an invisible car? :shock: I had some success with this: local biters = player.surface.find_entities_filtered{position = teleporter.position, radius = 50, type = "unit"} for _,biter in pairs(biters) do biter.set_command { type = defines.command.wander, ticks_to_wait...
by Deadlock989
Wed Oct 28, 2020 5:40 pm
Forum: Modding help
Topic: De-aggro'ing hostile units for safe teleport
Replies: 13
Views: 417

De-aggro'ing hostile units for safe teleport

If a player character is teleported a great distance while being attacked by biters, massive lag spikes ensue as a crowd of biters tries to path to their target which may be a million tiles away now. What is the best way of telling nearby biters to "lose" their target and carry on with any other nor...
by Deadlock989
Wed Oct 28, 2020 2:37 pm
Forum: Modding help
Topic: on_gui_opened latency in multiplayer?
Replies: 0
Views: 97

on_gui_opened latency in multiplayer?

I have been using on_gui_opened to override specific machine guis - usually just to cancel them with player.opened = nil but in another case to replace the machine's gui with a custom one. Have been doing some multiplayer testing and found out that for non-hosting clients there is an appreciable del...
by Deadlock989
Wed Oct 28, 2020 12:32 pm
Forum: Modding discussion
Topic: surface.set_tiles() and ungenerated chunks?
Replies: 7
Views: 238

Re: surface.set_tiles() and ungenerated chunks?

What I mean is if you remove all autoplace settings, the map is filled with "grass-1". I'd like to know if there's an easy way to change that to "deepwater" without using OnChunkGenerated(), because the autoplace documentation is really unclear, and I can't undertand how to do something that simple...
by Deadlock989
Wed Oct 28, 2020 1:56 am
Forum: Resolved for the next release
Topic: [Twinsen][1.0.0] [Minor] electric-energy-interface tooltip doesn't give full energy source info
Replies: 2
Views: 218

[Twinsen][1.0.0] [Minor] electric-energy-interface tooltip doesn't give full energy source info

An electric-energy-interface configured as follows to mimic a generic leccy-eating machine doesn't give the same needed info in the tooltip as other electric consumers. This: energy_source = { buffer_capacity = "60MJ", input_flow_limit = "2.125MW", drain = "125kW", type = "electric", usage_priority ...
by Deadlock989
Tue Oct 27, 2020 2:06 pm
Forum: Modding help
Topic: Hiding a character during cutscene?
Replies: 10
Views: 246

Re: Hiding a character during cutscene?

eradicator wrote:
Tue Oct 27, 2020 2:04 pm
You don't need to detach the character - at least not if you're doing it to prevent the cutscene from "returning" to the start at the end.
No, I'm doing it so that the character isn't on the pad when the cutscene transitions there.
by Deadlock989
Tue Oct 27, 2020 2:00 pm
Forum: Modding help
Topic: Hiding a character during cutscene?
Replies: 10
Views: 246

Re: Hiding a character during cutscene?

It sort of works but there are issues. 1. When putting the character in the car, the car makes its engine noises which play the next tick, even though the car is now on the limbo surface. I could set up a vehicle without sounds but then I may as well make an invisible one. 2. The character reference...
by Deadlock989
Tue Oct 27, 2020 12:54 pm
Forum: Modding help
Topic: Hiding a character during cutscene?
Replies: 10
Views: 246

Re: Hiding a character during cutscene?

Klonan wrote:
Tue Oct 27, 2020 12:50 pm
You can make an invisible car, and set the character to be the driver of that car
Wow.

Vehicles can teleport cross surface. Could I use a vanilla car and move them to a limbo surface all in the same tick?
by Deadlock989
Tue Oct 27, 2020 12:45 pm
Forum: Modding help
Topic: Hiding a character during cutscene?
Replies: 10
Views: 246

Hiding a character during cutscene?

I'm making a short teleportation cutscene. The outline of the sequence is: 1. Teleporter pad animates (several cutscene waypoints) 2. Character disappears 3. Transition to destination pad 4. Character appears Because it's a cutscene (the best way to get timed events) the player is already detached f...
by Deadlock989
Mon Oct 26, 2020 1:03 pm
Forum: Modding help
Topic: Rotatable labs?
Replies: 12
Views: 397

Re: Rotatable labs?

Hack: blueprintable must be placeholder with 4 orientations, on build replace with lab with same hardcoded orientation. Eh. How does on_built know that the blueprint was rotated? Hacks = effort + breakable. I think I'm over it now, they can stick with 4-way connections, my solution was to throw mor...
by Deadlock989
Sat Oct 24, 2020 5:21 pm
Forum: Modding help
Topic: Rotatable labs?
Replies: 12
Views: 397

Re: Rotatable labs?

No, no dice. Blueprint / copy-paste rotation doesn't work. You can preserve existing "orientations" (the north-south and east-west versions of the lab) in blueprints and have bots build them all with the same item but if you rotate the blueprint 90 degrees, all the connections are wrong.
by Deadlock989
Sat Oct 24, 2020 4:21 pm
Forum: Modding help
Topic: Rotatable labs?
Replies: 12
Views: 397

Re: Rotatable labs?

Thanks, I will try it. It would still be weird to not be able to rotate it in your hand but it may be a price worth paying.

Go to advanced search