安装 Steam
登录
|
语言
繁體中文(繁体中文)
日本語(日语)
한국어(韩语)
ไทย(泰语)
български(保加利亚语)
Čeština(捷克语)
Dansk(丹麦语)
Deutsch(德语)
English(英语)
Español-España(西班牙语 - 西班牙)
Español - Latinoamérica(西班牙语 - 拉丁美洲)
Ελληνικά(希腊语)
Français(法语)
Italiano(意大利语)
Bahasa Indonesia(印度尼西亚语)
Magyar(匈牙利语)
Nederlands(荷兰语)
Norsk(挪威语)
Polski(波兰语)
Português(葡萄牙语 - 葡萄牙)
Português-Brasil(葡萄牙语 - 巴西)
Română(罗马尼亚语)
Русский(俄语)
Suomi(芬兰语)
Svenska(瑞典语)
Türkçe(土耳其语)
Tiếng Việt(越南语)
Українська(乌克兰语)
报告翻译问题




contact directly eien no shikaku but from the time I looked through game code this thing you want wasn't possible to make
So you tried to do this too? =D
Half of the fun is working your brain for workarounds ;)
Well let's hope somebody who understands what I need, comes up with a solution =D
I posted this here so may be another fellow modder who's into coding could spare time..
\scripts\gui\Pages\ResidentsPage.lua
function ResidentsPage:update(dt)
look for this line ---
itemWindow:setProperty("Age", w and tostring(w.age) or "")
change to
itemWindow:setProperty("Age", w and tostring(w.age/3) or "")
I haven't tried this myself but it looks like it will take a person's age and divide by three before displaying it. Because of the window classes I don't believe you can separate between working and non-working or by age group - child, teen, adult. If it does work it will change everyone's.
Hello thank you SO much for your reply.
I have made the change you suggested. But isn't that for the houses window?
I also found this line inside WorkerWindow.lua;
self.nameLabel:setText(worker.name.." ("..worker.age..")")
which I believe the exact place where I'm looking to edit... But how would I go about dividing that?
Would it be like this;
self.nameLabel:setText(worker.name.." ("..worker.age/3..")")
or like this?
self.nameLabel:setText(worker.name.." ("..worker.age..")/3")
EDIT:
Also;
When I create a custom .lua for the ResidentsPage.lua I get an "loading failed" error.
I copied this whole section into the file;
The best way to learn this is to learn how to read log.log.
DL my Armed and Dangerous mod. It's a good example for getting a basic 'Function' based mod to work.
Start out by getting a mod made with a copy of a function (unchanged) to load.
When you understand how that works then you can start altering lines in the function.
For instance, you'll find you have to do this.
function ResidentsPage:update(dt)
change to
function fv.core.ResidentsPage:update(dt)
You need to understand how tables work and how data is stored in them. Based on what I've read about lua thus far, I've only scratched the surface.
To get a handle on log.log, take a known good mod and save the file some where then alter it so it crashes. The way you know what you did and you should be able to find a reference to it in the log.
If you are using NP++ you'll find mods loading in the 500 -600 line range with some info about why it didn't load. Sometimes you find additional info near the bottom. Just go all of the way down then scroll up until you see failed or crash or something that looks bad.
https://forestvillage.gamepedia.com/Modding
https://forestvillage.gamepedia.com/Mod