Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
With existing mods and normal in-game buildings Concrete is the biggest resource I end up with having way to much of at end game and I want something to do with it besides your bottomless supply depot. Advanced resources have a similar problem but their production is sufficiently slower that I can usually manage with just adding storage. Concrete on the other hand is needed to be produced because I usually want the waste rock from the Excavator for other mods which use waste rock for things but that means I need a place for all the Concrete.
https://pastebin.com/2v7M6ry5
Edit: This'll only apply to newly placed buildings, let me know if you want to update existing ones.
Ok, one more question. Well, maybe two.
So looking at your Golden Storage code I see where you add the options to the game:
-- max 40 chars
DefineClass("ModOptions_ChoGGi_GoldenStorage", {
__parents = {
"ModOptionsObject",
},
properties = {
{
default = false,
editor = "bool",
id = "Default10",
name = T(302535920011353, "Default to 10 items"),
},
},
})
If I wanted to let the user specify a number instead of a true/false, how would I do that? I assume 'editor' would need to be set to some other value than bool and 'default' would need to be a number rather than false. Is this possible?
Also, if I wanted this building to shut itself on and off when the player has more or less than a certain amount of a resource how can I do that? I would need to define a function that the game would call once in a while so I could check the resource, I would need to know how to access the value for that resource and then compare it to the setting from above. Obviously the name of the class above would be different and I would also not use the id "Default10".
If you add stuff manually without adding the corresponding entries in items.lua; saving in the mod editor will remove anything not added. I don't use the mod editor, so it doesn't matter to me (if you're wondering about the blank items.lua).
YourBuilding.building_update_time = const.HourDuration (default for the Building class obj).
Check out Lua\ResourceOverview.lua / ResourceOverviewObj if you need the count.
btw fresh blood is always welcome on the modders discord: https://discord.gg/FeWVN3t