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
Are they in the same mod? The same file? If not the same mod then you probalby need to name them with the mod number (sorry don't have the format at hand) I'm not sure about if they are in different files in the same mod.
If I refer to the mod number, how would I add the building name?
When I put
upgrade = fv["1159861622"].megadori_church2,
or only
upgrade = fv["1159861622"]
the saves load, no error message, but church1 still doesn't upgrade to church2 ... it seems the game wants something else
Maybe I am doing something else wrong, could I be using the wrong upgrade page or somthing?
http://gtm.steamproxy.vip/sharedfiles/filedetails/?id=1159861622
The lua includes the code for the upgrade building. If anybody wants to take a look and have a go at the upgrading function :)
upgrade = 'modID.buildingname',
e.g.
upgrade = '1159861622.megadori_church2',
If a mod inherits its functions from an existing building, it will also inherit the config and thus any upgrades, if not defined otherwise.
(example: the church mod inherits from the bathhouse
megadori_church = Class('megadori_church', fv.core.Bathhouse)
megadori_church2 = Class('megadori_church2', fv.core.Bathhouse)
If another mod makes the original vanilla building upgradeable like so:
fv.core.Bathhouse.config.upgrade = '1190912801.megadori_bathhouse'
then that upgrade-data will be taken over by any modded buildings that inherit from the bathhouse and don't have a config line for their upgrade. That way the game takes the data from the mod that upgrades the vanilla building and finds that the building footprints of the two mods don't match, causing a crash
2017-Nov-08 14:05:31 Error: size of building upgrade [1190912801.megadori_bathhouse] is not equal to original building[1159861622.megadori_church2]
It crashes upon comparing with megadori_church2 and not church, because megadori_church has its own upgrade data, whereas megadori_church2 doesn't. Meaning: The crash doesn't have anything to do with the fact that the church is upgradeable, but with the fact that any mod building that doesn't have its own upgrade will be affected.
My conclusion is that any mods that make vanilla buildings upgradeble would be incompatible with any other mods that inherit from that vanilla building.
I don't know if there can be a solution to this other than alerting anybody who adds a mod that inherits from the bathhouse.
There are 3 ways to avoid the problem when making modded buildings:
1.
If the mod building doesn't have a window (like the bathhouse, well, etc) it is enough to add this to the config:
upgrade = "",
2.
If the building does have a window, the game will complain about the lack of upgrade data, so you have to set the building as its own upgrade like this:
fv.core.MODBUILDING.config.upgrade = 'modID#.MODBUILDING'
If the building inherits its window function from the vanilla building, this solution will lead to the mod building being endlessly upgradeable to itself. To fix this, give it its own window function like this:
function MODBUILDING:createWindow()
return fv.core.BuildingWindow(self, {pages})
end
e.g. { ProductionPage, WorkersPage } for a craft building
3.
For buildings that look different and work different than a vanilla building (so they have their own functions anyway), don't inherit from a vanilla building at all but from the parent building class
MODBUILDING = Class('MODBUILDING', fv.core.Building)
or
MODBUILDING = Class('MODBUILDING', fv.core.CraftBuilding)
Also, naturally a mod that makes a vanilla building upgradeable will be incompatible with any mod that changes the footprint of that building, except of course when the footprint of the upgrade is made to match the modded vanilla building footprint, which can be done like this:
fv.core.VANILLABUILDING.config.widthCells = #value
fv.core.VANILLABUILDING.config.lengthCells = #value
MODBUILDING.config.widthCells = fv.core.VANILLABUILDING.config.widthCells
MODBUILDING.config.lengthCells = fv.core.VANILLABUILDING.config.lengthCells
This way, if another mod overwrites the original footprint size, the upgrade should still work