need a german mod creator
need a german mod creator
as the title say´s, i need a german mod creator because my english is not the best. i have many questions about some lua code syntaxes or lua things.
ich suche einen deutschen mod Ersteller der mir ein Parr Sachen erklären kann was lua angeht und vielleicht den einen oder anderen Fehler mit mir durchgeht (Fehlerkorrektur) macht.
Leider kann ich englische Sätze nicht so gut schreiben, englisch an sich verstehe ich ganz ok.
ich habe auch schon gesucht ob es ähnliche posts gibt aber die gibt es nicht.
mfg unfunf22
ich suche einen deutschen mod Ersteller der mir ein Parr Sachen erklären kann was lua angeht und vielleicht den einen oder anderen Fehler mit mir durchgeht (Fehlerkorrektur) macht.
Leider kann ich englische Sätze nicht so gut schreiben, englisch an sich verstehe ich ganz ok.
ich habe auch schon gesucht ob es ähnliche posts gibt aber die gibt es nicht.
mfg unfunf22
Re: need a german mod creator
Ich kann dir etwas helfen.
Re: need a german mod creator
ah das ist nice.
was müsste ich schreiben damit bei meinem mod wooden walls die walls auch als Brennmaterial zulässig sind? https://mods.factorio.com/mods/unfunf22 ... Walls%20V1
wie kann ich eigne sounds in meinem mod abspielen lassen wenn ich in sagen wir mal als beispiel in einem Panzer (Fahrzeug) sitze, ich möchte aber nicht die base sounds nutzen ich habe eigne sounds. https://mods.factorio.com/mods/unfunf22 ... dings%20V1
weitere fragen kommen noch sofern ich eins nach dem anderen fertig habe.
was müsste ich schreiben damit bei meinem mod wooden walls die walls auch als Brennmaterial zulässig sind? https://mods.factorio.com/mods/unfunf22 ... Walls%20V1
wie kann ich eigne sounds in meinem mod abspielen lassen wenn ich in sagen wir mal als beispiel in einem Panzer (Fahrzeug) sitze, ich möchte aber nicht die base sounds nutzen ich habe eigne sounds. https://mods.factorio.com/mods/unfunf22 ... dings%20V1
weitere fragen kommen noch sofern ich eins nach dem anderen fertig habe.
Re: need a german mod creator
Also, wenn du englisch verstehen kannst, let me speak from my heart in English.unfunf22 wrote:ah das ist nice.
was müsste ich schreiben damit bei meinem mod wooden walls die walls auch als Brennmaterial zulässig sind? https://mods.factorio.com/mods/unfunf22 ... Walls%20V1
In the vanilla only trees can burn (it was hardcoded in C++), all another entities can burn only by scripting of it. You must make the file "control.lua" and write there some code, which will be started on some events. Only the event "on_tick" will be started 60 times at second.
You can catch that your entity was died with this event:
Code: Select all
script.on_event(defines.events.on_entity_died, function(event)
-- some code here
end)
surface.create_entity{name=…, position=…, direction=…, force=…, target=…, source=…, fast_replace=…, player=…, spill=…}
Code: Select all
surface.create_entity{name = "fire-flame", position = position}
Code: Select all
local surface = game.surfaces[1]
Code: Select all
local surface = entity.surface
Code: Select all
local pos = {x=10, y=20}
Re: need a german mod creator
The game has a global table, that names "raw".unfunf22 wrote:wie kann ich eigne sounds in meinem mod abspielen lassen wenn ich in sagen wir mal als beispiel in einem Panzer (Fahrzeug) sitze, ich möchte aber nicht die base sounds nutzen ich habe eigne sounds. https://mods.factorio.com/mods/unfunf22 ... dings%20V1
You can open this file Factorio\data\base\prototypes\entity\entities.lua and find here and find here line #1776 (just use notepad++).
Here example of this code:
tank code
Please don't change it! Yes, if you change it, it will works, but you can forget about updates or multiplayer.What you need, just change this elements with your mod. Just create data.lua and write it like this:
Code: Select all
raw.car.tank.working_sound.sound.filename = "__base__/sound/fight/tank-engine.ogg"
Re: need a german mod creator
ok danke schon mal dafür, ich werde viel testen müssen aber ich verstehe jetzt schon ein wenig mehr als vor her.
wenn ich mal so fragen darf, wo her kommst du darkfrei?
wenn ich mal so fragen darf, wo her kommst du darkfrei?
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: need a german mod creator
shouldn't it be data.raw?darkfrei wrote:Code: Select all
raw.car.tank.working_sound.sound.filename = "__base__/sound/fight/tank-engine.ogg"
Code: Select all
data.raw.car.tank.working_sound.sound.filename = "__base__/sound/fight/tank-engine.ogg"
Re: need a german mod creator
Yes you are right. I think it was wrong copied.bobingabout wrote:shouldn't it be data.raw?darkfrei wrote:Code: Select all
raw.car.tank.working_sound.sound.filename = "__base__/sound/fight/tank-engine.ogg"
Code: Select all
data.raw.car.tank.working_sound.sound.filename = "__base__/sound/fight/tank-engine.ogg"
Re: need a german mod creator
ok gut das ich noch nicht den code versucht habe. danke bobingabout für die Korrektur.
mal so neben bei gefragt, war es schwer bobs mods zu machen weil du hast ja denke ich auch mal klein angefangen oder konntest du lua schon vor her?
mal so neben bei gefragt, war es schwer bobs mods zu machen weil du hast ja denke ich auch mal klein angefangen oder konntest du lua schon vor her?
Re: need a german mod creator
Is it possible to determine by mod that certain items can only be produced in assembly machine 3, but only 2 items are needed?
What would I have to write, because unfortunately it is not available in the lua api documentation or I just can't find it.
What would I have to write, because unfortunately it is not available in the lua api documentation or I just can't find it.
Re: need a german mod creator
See kovarex enrichment process. You are need new special recipe category for it.unfunf22 wrote:Is it possible to determine by mod that certain items can only be produced in assembly machine 3, but only 2 items are needed?
What would I have to write, because unfortunately it is not available in the lua api documentation or I just can't find it.
Example for "assembling-machine-1":
Code: Select all
data.raw["assembling-machine"]["assembling-machine-1"].crafting_categories[2] = "my-recipe-category-one"
data.raw["assembling-machine"]["assembling-machine-1"].crafting_categories[3] = "my-recipe-category-two"
You must define this category:
Code: Select all
data:extend(
{
{
type = "recipe-category",
name = "my-recipe-category-one"
},
{
type = "recipe-category",
name = "my-recipe-category-two"
}
})
- Arch666Angel
- Smart Inserter
- Posts: 1636
- Joined: Sun Oct 18, 2015 11:52 am
- Contact:
Re: need a german mod creator
If you want to add a statement to an existing table and you dont care about it's position it's better and less prone to errors to use the table.insert()darkfrei wrote:See kovarex enrichment process. You are need new special recipe category for it.unfunf22 wrote:Is it possible to determine by mod that certain items can only be produced in assembly machine 3, but only 2 items are needed?
What would I have to write, because unfortunately it is not available in the lua api documentation or I just can't find it.
Example for "assembling-machine-1":You can't do this recipe by "assembling-machine-2", in "assembling-machine-1" only.Code: Select all
data.raw["assembling-machine"]["assembling-machine-1"].crafting_categories[2] = "my-recipe-category-one" data.raw["assembling-machine"]["assembling-machine-1"].crafting_categories[3] = "my-recipe-category-two"
You must define this category:Code: Select all
data:extend( { { type = "recipe-category", name = "my-recipe-category-one" }, { type = "recipe-category", name = "my-recipe-category-two" } })
Angels Mods
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
- eradicator
- Smart Inserter
- Posts: 5207
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: need a german mod creator
(For the sake of readability for other ppl i'll answer in english too.)
Concerning fuel-usage of items you can look at the wooden power pole:
Also i'm not bob so i can't answer for him ofc, but usually it's not "difficult" as such to make a large mod (i.e. there's no super complex math involved or something like that). It just takes very large amounts of time and patience - think: a lot more time than you're going to spend playing the game with those mods.
This couldn't be truer. I'd go even further and say you should _never_ use any kind of numeric index (i.e. [1] [2]) access anywhere unless it's a table that is created and soley used by your own mod. If you think you need a numeric index then in 90% of all cases you're doing something wrong (=buggy).Arch666Angel wrote:If you want to add a statement to an existing table and you dont care about it's position it's better and less prone to errors to use the table.insert()
Concerning fuel-usage of items you can look at the wooden power pole:
Code: Select all
{
type = "item",
name = "small-electric-pole",
icon = "__base__/graphics/icons/small-electric-pole.png",
flags = {"goes-to-quickbar"},
subgroup = "energy-pipe-distribution",
order = "a[energy]-a[small-electric-pole]",
place_result = "small-electric-pole",
fuel_category = "chemical",
fuel_value = "4MJ",
stack_size = 50
},
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.