Questions...
Questions...
Hi All
First Question: let's say that i want to make an entity the player puts it diagonally. Can i add a rotation to collision_box or selection_box?
Second Question: When i made a simple-entity it worked fine and everything, but i want to add a line when the player hover their mouse over that entity on the map it tells them what that entity is, but it seems this just for resources only and not for simple-entity?
Third Question: Now this not a new question that i'm asking but since i got no answer i have to ask again here; how to remove the vanilla categories(and yeah Category=nil doesn't work it render that category not there and an error message appears tell me to add it back), it seems the lua pages have no information of how to remove things but add them, so if any tutorial or additional tips regarding the removal would be added to the lua pages that the modder searches for that would be amazing.
Thanks in Advance.
First Question: let's say that i want to make an entity the player puts it diagonally. Can i add a rotation to collision_box or selection_box?
Second Question: When i made a simple-entity it worked fine and everything, but i want to add a line when the player hover their mouse over that entity on the map it tells them what that entity is, but it seems this just for resources only and not for simple-entity?
Third Question: Now this not a new question that i'm asking but since i got no answer i have to ask again here; how to remove the vanilla categories(and yeah Category=nil doesn't work it render that category not there and an error message appears tell me to add it back), it seems the lua pages have no information of how to remove things but add them, so if any tutorial or additional tips regarding the removal would be added to the lua pages that the modder searches for that would be amazing.
Thanks in Advance.
Re: Questions...
1. This entity must be car, rail or cliff. Maybe also tree, I am not sure.
Re: Questions...
Yeah usually used for entity that generates in the map like trees and rocks not sure about the car though,but that wasn't my 2nd question,it was can you make the player know what these entities are from the map by hovering their mouse over them?
Re: Questions...
https://lua-api.factorio.com/latest/eve ... ty_changedSuf wrote: ↑Fri Sep 25, 2020 9:03 amYeah usually used for entity that generates in the map like trees and rocks not sure about the car though,but that wasn't my 2nd question,it was can you make the player know what these entities are from the map by hovering their mouse over them?
I am not sure that it works in pixel map or zoom-to-world map. Probably not, but no other way.
Re: Questions...
Any other answers to my second question or the others ones that had no answers yet?
i would like to know those things it would help me and other modders who may face those things in the future.
Thanks for all the help.
i would like to know those things it would help me and other modders who may face those things in the future.
Thanks for all the help.
Re: Questions...
What category you want to remove?Suf wrote: ↑Fri Sep 25, 2020 5:54 amThird Question: Now this not a new question that i'm asking but since i got no answer i have to ask again here; how to remove the vanilla categories(and yeah Category=nil doesn't work it render that category not there and an error message appears tell me to add it back), it seems the lua pages have no information of how to remove things but add them, so if any tutorial or additional tips regarding the removal would be added to the lua pages that the modder searches for that would be amazing.
If you want to remove the fuel category, then you need to remove it from all defined prototypes:
The "nuclear" is defined in:
Code: Select all
data.raw["fuel-category"].nuclear = {type = "fuel-category", name = "nuclear"}
data.raw.reactor["nuclear-reactor"].energy_source.fuel_category = "nuclear"
data.raw.item["uranium-fuel-cell"].fuel_category = "nuclear"
Code: Select all
data.raw["fuel-category"].nuclear = nil
Code: Select all
data.raw.reactor["nuclear-reactor"].energy_source.fuel_category = "chemical"
data.raw.item["uranium-fuel-cell"].fuel_category = "chemical"
Of coarse another mods can add own prototypes and you are need to check it procedurally.
Code strings are from viewtopic.php?t=45107
Last edited by darkfrei on Fri Oct 02, 2020 4:23 pm, edited 1 time in total.
Re: Questions...
How to remove recipe category:
set the defined
to
We are need to find all "smelting" and replace with (for example) "crafting":
After all changings it must be:
Code strings are from viewtopic.php?t=45107
set the defined
Code: Select all
data.raw["recipe-category"].smelting = {type = "recipe-category", name = "smelting"}
Code: Select all
data.raw["recipe-category"].smelting = nil
Code: Select all
data.raw.furnace["stone-furnace"].crafting_categories = {"smelting"}
data.raw.furnace["electric-furnace"].crafting_categories = {"smelting"}
data.raw.furnace["steel-furnace"].crafting_categories = {"smelting"}
data.raw.recipe["copper-plate"].category = "smelting"
data.raw.recipe["iron-plate"].category = "smelting"
data.raw.recipe["stone-brick"].category = "smelting"
data.raw.recipe["steel-plate"].category = "smelting"
Code: Select all
data.raw.furnace["stone-furnace"].crafting_categories = {"crafting"}
data.raw.furnace["electric-furnace"].crafting_categories = {"crafting"}
data.raw.furnace["steel-furnace"].crafting_categories = {"crafting"}
data.raw.recipe["copper-plate"].category = "crafting"
data.raw.recipe["iron-plate"].category = "crafting"
data.raw.recipe["stone-brick"].category = "crafting"
data.raw.recipe["steel-plate"].category = "crafting"
Re: Questions...
so i guess that why it never worked perfectly with me(usually i just being told to usedarkfrei wrote: ↑Fri Oct 02, 2020 4:14 pmWhat category you want to remove?Suf wrote: ↑Fri Sep 25, 2020 5:54 amThird Question: Now this not a new question that i'm asking but since i got no answer i have to ask again here; how to remove the vanilla categories(and yeah Category=nil doesn't work it render that category not there and an error message appears tell me to add it back), it seems the lua pages have no information of how to remove things but add them, so if any tutorial or additional tips regarding the removal would be added to the lua pages that the modder searches for that would be amazing.
If you want to remove the fuel category, then you need to remove it from all defined prototypes:
The "nuclear" is defined in:If yo delete the first asCode: Select all
data.raw["fuel-category"].nuclear = {type = "fuel-category", name = "nuclear"} data.raw.reactor["nuclear-reactor"].energy_source.fuel_category = "nuclear" data.raw.item["uranium-fuel-cell"].fuel_category = "nuclear"
and set the another two to "chemical"Code: Select all
data.raw["fuel-category"].nuclear = nil
then you get no error.Code: Select all
data.raw.reactor["nuclear-reactor"].energy_source.fuel_category = "chemical" data.raw.item["uranium-fuel-cell"].fuel_category = "chemical"
Of coarse another mods can add own prototypes and you are need to check it procedurally.
Code: Select all
data.raw["fuel-category"].nuclear = nil
Re: Questions...
Thanks for the extra information about removing those categoriesdarkfrei wrote: ↑Fri Oct 02, 2020 4:20 pmHow to remove recipe category:
set the definedtoCode: Select all
data.raw["recipe-category"].smelting = {type = "recipe-category", name = "smelting"}
We are need to find all "smelting" and replace with (for example) "crafting":Code: Select all
data.raw["recipe-category"].smelting = nil
After all changings it must be:Code: Select all
data.raw.furnace["stone-furnace"].crafting_categories = {"smelting"} data.raw.furnace["electric-furnace"].crafting_categories = {"smelting"} data.raw.furnace["steel-furnace"].crafting_categories = {"smelting"} data.raw.recipe["copper-plate"].category = "smelting" data.raw.recipe["iron-plate"].category = "smelting" data.raw.recipe["stone-brick"].category = "smelting" data.raw.recipe["steel-plate"].category = "smelting"
Code strings are from viewtopic.php?t=45107Code: Select all
data.raw.furnace["stone-furnace"].crafting_categories = {"crafting"} data.raw.furnace["electric-furnace"].crafting_categories = {"crafting"} data.raw.furnace["steel-furnace"].crafting_categories = {"crafting"} data.raw.recipe["copper-plate"].category = "crafting" data.raw.recipe["iron-plate"].category = "crafting" data.raw.recipe["stone-brick"].category = "crafting" data.raw.recipe["steel-plate"].category = "crafting"
Re: Questions...
So i've tried something like this
as you may guessed im trying to remove everything related to the item or at least hide it until i decide where would i put it in the mod, but that doesn't work
it gives me this error : Error in assignID: technology with name 'heavy-armor' does not exist. It was removed by my mod.
apparently i have to assign a new technology to the heavy armor in this example, but what if i don't want to put that item in my mod, yeah that is my goal here total removal
thanks for help btw your method worked with items that has no technology like light-armor.
Code: Select all
data.raw.armor["heavy-armor"].type="armor"
data.raw.armor["heavy-armor"].subgroup =nil
data.raw.recipe["heavy-armor"]=nil
data.raw.technology["heavy-armor"]=nil
data.raw.armor["heavy-armor"].order = "b"
it gives me this error : Error in assignID: technology with name 'heavy-armor' does not exist. It was removed by my mod.
apparently i have to assign a new technology to the heavy armor in this example, but what if i don't want to put that item in my mod, yeah that is my goal here total removal
thanks for help btw your method worked with items that has no technology like light-armor.
- ickputzdirwech
- Filter Inserter
- Posts: 768
- Joined: Sun May 07, 2017 10:16 am
- Contact:
Re: Questions...
The problem with just removing the heavy armor technology is that there might be other technologies that are dependent on it. In this case modular armor. The modular armor technology is also dependent on advanced electronics. So one way of dealing with this should be
This will override the existing table and therefore modular armor will only be dependent on advanced electronics.
Code: Select all
data.raw.technology["modular-armor"].prerequisites = {"advanced-electronics"}
Mods: Shortcuts for 1.1, ick's Sea Block, ick's vanilla tweaks
Tools: Atom language pack
Text quickly seems cold and unfriendly. Be careful how you write and interpret what others have written.
- A reminder for me and all who read what I write
Tools: Atom language pack
Text quickly seems cold and unfriendly. Be careful how you write and interpret what others have written.
- A reminder for me and all who read what I write
Re: Questions...
Thanks for help that indeed fixed the error i'll be paying attention next time to anything related to the items technology-wise as well. thanks againickputzdirwech wrote: ↑Sat Oct 03, 2020 7:37 amThe problem with just removing the heavy armor technology is that there might be other technologies that are dependent on it. In this case modular armor. The modular armor technology is also dependent on advanced electronics. So one way of dealing with this should be
This will override the existing table and therefore modular armor will only be dependent on advanced electronics.Code: Select all
data.raw.technology["modular-armor"].prerequisites = {"advanced-electronics"}