Search found 13 matches

by Pikachar
Wed Mar 06, 2024 1:22 am
Forum: Modding help
Topic: Space Exploration Ship Launch Event
Replies: 1
Views: 204

Re: Space Exploration Ship Launch Event

For anyone wondering the solution to this exact issue:
on_player_changed_surface is the event that you need to look for.
by Pikachar
Tue Mar 05, 2024 8:56 pm
Forum: Modding help
Topic: Space Exploration Ship Launch Event
Replies: 1
Views: 204

Space Exploration Ship Launch Event

I currently have a mod I'm working on, but it crashes whenever I'm using it and launch a ship in Space Exploration.

Does anyone know which event(s) SE is calling when a ship launches with a player on it? Or at least which files in SE to start my search at?
by Pikachar
Tue Mar 05, 2024 7:25 pm
Forum: Modding help
Topic: Creating Player Only Equipment
Replies: 5
Views: 331

Re: Creating Player Only Equipment

Thanks for the information. That helped a ton!
by Pikachar
Sun Mar 03, 2024 5:55 pm
Forum: Modding help
Topic: Creating Player Only Equipment
Replies: 5
Views: 331

Re: Creating Player Only Equipment

I'd likely need to do this during the prototype stage in order to add that category to all of the equipment_grids in armor. I thought the prototype stage was literally just using the data.lua file to hardcode, well, data. Is there some way, or am I allowed to put logic in that file?
by Pikachar
Sun Mar 03, 2024 2:32 am
Forum: Modding help
Topic: Creating Player Only Equipment
Replies: 5
Views: 331

Creating Player Only Equipment

I'm currently working on an equipment mod that I think would be better off if I just removed the ability for it to be placed in vehicle grids. I was wondering if anyone had any insight as to what I should be looking into or how to accomplish this. I know the jetpack mod does this, and through my cur...
by Pikachar
Wed Apr 26, 2023 11:21 pm
Forum: Modding help
Topic: Help Retrieving List of Vehicles/Trains
Replies: 15
Views: 1698

Re: Help Retrieving List of Vehicles/Trains

Awesome. So far so good.
Yet Another Question (YAQ?): Is it possible to add a toggle button either in the form of the checkbox in the picture or to add some sort of shortcut buttons/bar to vehicles/entities?

Image
by Pikachar
Wed Apr 26, 2023 4:17 am
Forum: Modding help
Topic: Help Retrieving List of Vehicles/Trains
Replies: 15
Views: 1698

Re: Help Retrieving List of Vehicles/Trains

Aight, I've gotten things mostly ironed out at this point for the base logic. What other events should I be paying attention to? I'm thinking: - on_player_mined_entity - on_entity_destroyed - on_entity_died - on_robot_mined_entity since I'm going to have to update some tables when the vehicle is pic...
by Pikachar
Tue Apr 25, 2023 4:55 am
Forum: Modding help
Topic: Help Retrieving List of Vehicles/Trains
Replies: 15
Views: 1698

Re: Help Retrieving List of Vehicles/Trains

All of this has been incredibly helpful. I am wondering though, if it's possible to update an entity after it's created? For example, if I have this entity: { type = 'electric-energy-interface', name = 'personal-transformer-input-entity', icon = '__base__/graphics/icons/power-armor.png', energy_sour...
by Pikachar
Sun Apr 23, 2023 3:47 am
Forum: Modding help
Topic: Help Retrieving List of Vehicles/Trains
Replies: 15
Views: 1698

Re: Help Retrieving List of Vehicles/Trains

I added a migration file that would look for all existing vehicles of the prototypes I need, fetched the unique_id of their equipment grids, and stored them as global.grids[LuaEquipmentGrid.unique_id] = LuaEntity.unit_number Right, but how exactly did you get the list of all existing vehicles? The ...
by Pikachar
Sat Apr 22, 2023 4:32 am
Forum: Modding help
Topic: Help Retrieving List of Vehicles/Trains
Replies: 15
Views: 1698

Re: Help Retrieving List of Vehicles/Trains

For the second question, it looks like there isn't one. I was expecting an equipment grid to reference it's owner - many other things in the games do, like LuaInventory. That's a problem. Which I guess brings me back to the first question, of "What's the best way to get a list of vehicles/trai...
by Pikachar
Sat Apr 22, 2023 12:28 am
Forum: Modding help
Topic: Help Retrieving List of Vehicles/Trains
Replies: 15
Views: 1698

Re: Help Retrieving List of Vehicles/Trains

For the global part, right. That's what I was thinking, I just may have misstated. I do have a question on how the events.... work. I'm a little confused on the syntax of how that works. The API says that on_equipment_inserted has (grid, equipment, name, tick), and the example for using the events i...
by Pikachar
Thu Apr 20, 2023 4:21 pm
Forum: Modding help
Topic: Help Retrieving List of Vehicles/Trains
Replies: 15
Views: 1698

Re: Help Retrieving List of Vehicles/Trains

So, if I'm understanding you correctly: - I should use 'on_equipment_inserted' and 'on_player_placed_equipment' to get each individual train/vehicle that gets equipment inserted. - Probably save that list to global, so that it persists through saves. - 'on_init' (load game) load list into my variabl...
by Pikachar
Wed Apr 19, 2023 10:41 pm
Forum: Modding help
Topic: Help Retrieving List of Vehicles/Trains
Replies: 15
Views: 1698

Help Retrieving List of Vehicles/Trains

Currently working on updating one of the mods I've taken over: https://mods.factorio.com/mod/PersonalTransformer2 And I'm trying to update it so that it works when placed in vehicle/train grids. The problem I'm running into is in finding a good (ideally the right) way to get a list of all of the veh...

Go to advanced search