COMMUNITY FORUM

Help with the fish farm mod

Forum Overview >> Farming Simulator 17

CategoryFarming Simulator 17
Created29.12.2019 12:19


Full Name (Unknown) 29.12.2019 12:19
Hi there!
A mod was added via the GIANTS editor

Ich habe alles in modDesc.xml registriert, aber es funktioniert nicht. log.txt - https://www.marhu.net/phpBB3/download/file.php?id=17028

The permanent error is as follows:
Error: Running LUA method 'update'.
C:/Users/Alex/Documents/My Games/FarmingSimulator2017/mods/FS17_karta_map__RusA/maps/scripte/FabrikScript.lua:1024: attempt to compare string with number

Added in the modDesc.xml file:
<fillType name="FischMK" pricePerLiter="1" showOnPriceTable="true" litersPerSecond="0.3244" massPerLiter="800" useForSpray="false" sprayerCategorys="manureSpreader" toCategorys="true" fillTypeCategorys="bulk" hasMaterials="false" hasParticles="false" useHeap="false" isCowBasefeed="false" isCowGrass="false" isCowPower="false" isCowWindrow="false" isSheepGrass="false" isPigBasefeed="false" isPigGrain="false" isPigProtein="false" isPigEarthfruit="false" />

All scripts are connected

Bilbo Beutlin (BBeutlin) 29.12.2019 12:59
If you want to add a non-default fillType, it needs an additional script like eg. 'additionalMapTypes' or similar. There are several scripts of this kind around which might expect a different syntax. Read the associated instructions.

Full Name (Unknown) 29.12.2019 13:12
In modDesc.xml mod it is written like this:
<newFillTypes hudsDirectory="fruitHuds/" groundTipDirectory="tipOnGround/" materialDirectory="materialHolders/" hasHolders="false">
<fillType name="FischMK" pricePerLiter="1" showOnPriceTable="true" litersPerSecond="0.3244" massPerLiter="800" useForSpray="false" sprayerCategorys="manureSpreader" toCategorys="true" fillTypeCategorys="bulk" hasMaterials="false" hasParticles="false" useHeap="false" isCowBasefeed="false" isCowGrass="false" isCowPower="false" isCowWindrow="false" isSheepGrass="false" isPigBasefeed="false" isPigGrain="false" isPigProtein="false" isPigEarthfruit="false" />
</newFillTypes>

inserted into my modDesc.xml:
<fillType name="FischMK" pricePerLiter="1" showOnPriceTable="true" litersPerSecond="0.3244" massPerLiter="800" useForSpray="false" sprayerCategorys="manureSpreader" toCategorys="true" fillTypeCategorys="bulk" hasMaterials="false" hasParticles="false" useHeap="false" isCowBasefeed="false" isCowGrass="false" isCowPower="false" isCowWindrow="false" isSheepGrass="false" isPigBasefeed="false" isPigGrain="false" isPigProtein="false" isPigEarthfruit="false" />

here is a screen with the GIANTS Editor - http://joxi.ru/gmv4YxoHvM0PzA

Bilbo Beutlin (BBeutlin) 29.12.2019 17:40
These infos don't help really.
Pure guessing: in the user attributes you have a wrong type what causes the error "attempt to compare string with number".

Also heed:
I see you're using cyrillic characters for folder names. The Giants Engine (espec. the XML parser) doesn't like non-ASCII chars in filenames or GE labels. You should use always plain ASCII chars only and the underslash "_" instead spaces.

Full Name (Unknown) 29.12.2019 17:50
I do not use cyrillic

Please tell me what to send, so that it would be more understandable to you?



Bilbo Beutlin (BBeutlin) 29.12.2019 22:54
Your screenshot of GE attests usage of cyrillic letters, at least in the GE window title bar and in the console window.

What we need to know:
- which version of "FabrikScript.lua" do you use?
- which script do you use for adding fillTypes?
- what kind (type) are your user attributes?

If you don't know, open the map.i3d with a text editor and search for your object by nodeId. It should have the following xml tags (example):
<UserAttribute nodeId="..">
<Attribute name="Area" type="string" value=".."/>
<Attribute name="PlayerIndex" type="string" value=".."/>
<Attribute name="ProduktPerHour" type="integer" value=".."/>
<Attribute name="factoryName" type="string" value=".."/>
<Attribute name="inputIndex" type="string" value=".."/>
<Attribute name="onCreate" type="scriptCallback" value="modOnCreate.FabrikScript"/>
<Attribute name="outputIndex" type="string" value=".."/>
</UserAttribute>
If you have other type=.. than above you have found the error.

Full Name (Unknown) 30.12.2019 07:20
FabrikScript Version: 2.1.8.1
My modDesc.xml - https://yadi.sk/d/5VB4w-YglkfhEQ

removed the cyrillic alphabet

I have two such records
1
<UserAttribute nodeId="104881">
<Attribute name="Area" type="string" value="4"/>
<Attribute name="PlayerIndex" type="string" value="2"/>
<Attribute name="ProduktPerHour" type="integer" value="20000"/>
<Attribute name="WorkAniIndex" type="string" value="3"/>
<Attribute name="factoryName" type="string" value="KW_fact1"/>
<Attribute name="inputIndex" type="string" value="0"/>
<Attribute name="onCreate" type="scriptCallback" value="modOnCreate.FabrikScript"/>
<Attribute name="outputIndex" type="string" value="1"/>
<Attribute name="tabletIconName" type="string" value="himija"/>
</UserAttribute>

2
<UserAttribute nodeId="105070">
<Attribute name="Area" type="string" value="5"/>
<Attribute name="PlayerIndex" type="string" value="2"/>
<Attribute name="ProduktPerHour" type="float" value="5000"/>
<Attribute name="WorkAniIndex" type="string" value="4"/>
<Attribute name="inputIndex" type="string" value="0"/>
<Attribute name="onCreate" type="scriptCallback" value="modOnCreate.FabrikScript"/>
<Attribute name="outputIndex" type="string" value="1"/>
<Attribute name="tabletIconName" type="string" value="seeds"/>
</UserAttribute>

Full Name (Unknown) 30.12.2019 07:58
FabrikScript Version: 2.1.8.1
My modDesc.xml - https://yadi.sk/d/5VB4w-YglkfhEQ

removed the cyrillic alphabet

I have two such records
1
<UserAttribute nodeId="104881">
<Attribute name="Area" type="string" value="4"/>
<Attribute name="PlayerIndex" type="string" value="2"/>
<Attribute name="ProduktPerHour" type="integer" value="20000"/>
<Attribute name="WorkAniIndex" type="string" value="3"/>
<Attribute name="factoryName" type="string" value="KW_fact1"/>
<Attribute name="inputIndex" type="string" value="0"/>
<Attribute name="onCreate" type="scriptCallback" value="modOnCreate.FabrikScript"/>
<Attribute name="outputIndex" type="string" value="1"/>
<Attribute name="tabletIconName" type="string" value="himija"/>
</UserAttribute>

2
<UserAttribute nodeId="105070">
<Attribute name="Area" type="string" value="5"/>
<Attribute name="PlayerIndex" type="string" value="2"/>
<Attribute name="ProduktPerHour" type="float" value="5000"/>
<Attribute name="WorkAniIndex" type="string" value="4"/>
<Attribute name="inputIndex" type="string" value="0"/>
<Attribute name="onCreate" type="scriptCallback" value="modOnCreate.FabrikScript"/>
<Attribute name="outputIndex" type="string" value="1"/>
<Attribute name="tabletIconName" type="string" value="seeds"/>
</UserAttribute>

Bilbo Beutlin (BBeutlin) 30.12.2019 07:59
OMG - there's such a mass of extra scripts in your map that one can assume some trouble by interfering code.
You should cleanup urgently and restrict to really essential scripts. Each extra script eats performance and the higher the amount of scripts, the higher is the risk of interrelated harmful effects.

In the second set of user attributes you should change the <Attribute name="ProduktPerHour" type="float" .. /> to type="integer" - I'm not sure, but maybe the FabrikScript is irritated by receiving a float value.

Where are the user attributes for the "Fischzucht"? The attribute sets you have posted don't point to it.

Identify the "Fischzucht" by nodeId and check the attribute types, also in the subtransforms "inputTrigger" and "outputTrigger" for right usage of attribute types.
I think there is the error caused by a missing attribute or wrong type of.

Full Name (Unknown) 30.12.2019 12:11
Changed did not help, the plant did not work - http://ipic.su/img/img7/fs/20191230140806_1.1577704256.jpg

The rest of the plants taken from VapaAgro, they are all workers.

Bilbo Beutlin (BBeutlin) 30.12.2019 12:44
You still don't see what's wrong?
In your screenshot above (29.12.2019 13:12) you have the object "Fischzucht" with UAs (user attributes). However your cited UAs cannot refer to it because the ProduktPerHour:1000 doesn't match.
So there must be elsewhere a set of UAs assigned to the "Fischzucht" object.
Search these and check the UAs on right type and completeness, also in the subtransforms.

Full Name (Unknown) 30.12.2019 12:57
Please tell me where and how should I prescribe?
I'm just a beginner in mapping; it's hard for me to understand.

Full Name (Unknown) 30.12.2019 13:01
So you need to register?

<UserAttribute nodeId="182664">
<Attribute name="PlayerIndex" type="string" value="2"/>
<Attribute name="ProduktPerHour" type="integer" value="1000"/>
<Attribute name="WorkAniIndex" type="string" value="3"/>
<Attribute name="inputIndex" type="string" value="0"/>
<Attribute name="onCreate" type="scriptCallback" value="modOnCreate.FabrikScript"/>
<Attribute name="outputIndex" type="string" value="1"/>
<Attribute name="Area" type="string" value="5"/>
</UserAttribute>

Full Name (Unknown) 30.12.2019 13:14
This attribute is in map.i3d

<UserAttribute nodeId="185404">
<Attribute name="Area" type="string" value="5"/>
<Attribute name="PlayerIndex" type="string" value="2"/>
<Attribute name="ProduktPerHour" type="float" value="1000"/>
<Attribute name="WorkAniIndex" type="string" value="5"/>
<Attribute name="inputIndex" type="string" value="0"/>
<Attribute name="onCreate" type="string" value="modOnCreate.FabrikScript"/>
<Attribute name="outputIndex" type="string" value="1"/>
</UserAttribute>

Then I don’t understand where should I prescribe

Bilbo Beutlin (BBeutlin) 30.12.2019 14:00
Ok - you're admitting beeing beginner, but nevertheless you should know some basics, else you can give up immediately.

If you have an object selected in GE, the 'nodeId' is displayed. Just under "Name" the "Id". This "Id" appears in i3d text/xml view as 'nodeId=..'. Once in the <scene> <shape ..> section and case it has UAs, also in the section <UserAttributes>. So it's easy to find the associated UAs.

Now for the "FabrikScript" are beneath the main UAs also expected other references in 'inputIndex' and 'outputIndex'. The UAs point to the subnodes.
The subnodes UAs look like
<UserAttribute nodeId=..>
<Attribute name="capacity" type="integer" value=../>
<Attribute name="factor" type="float" value=../>
<Attribute name="fillTypes" type="string" value=../>
<Attribute name="name" type="string" value=../>
</UserAttribute>
These you must check for proper types and values.

Full Name (Unknown) 30.12.2019 14:37
Please look at my map.i3d should I edit it?
map.i3d - https://yadi.sk/d/WJeO_Tkvj9ew4Q

Bilbo Beutlin (BBeutlin) 30.12.2019 16:18
ahem .. do you really think, I'll read thoroughly your ~300,000 lines of i3d/xml code?

What I've found on a rough overview are some possibly wrong attribute names, maybe by simple typo errors, eg. name="fillType" where name="fillTypes" is expected (or opposite).
Also some other UAs look somehow suspicious.

It's on yours to find and clean up the typo errors. A good exercise for beginners. *g*

Full Name (Unknown) 30.12.2019 16:30
By ID from GE, I have all the entries in map.i3d

Bilbo Beutlin (BBeutlin) 30.12.2019 17:02
If everything was correct, you would not get any error messages.

Look into the "FabrikScript.lua" line 1024 what causes the error (according to your cited error message in first post). I'm quite sure there's something missing or of wrong type.

Full Name (Unknown) 30.12.2019 17:46
I downloaded this mod to a blank card, there are no errors in the log, and the plant does not work.

Then I don’t understand what’s the matter

Full Name (Unknown) 05.01.2020 11:05
Try to put the factory on the map - https://yadi.sk/d/mroj7WMVN3bYug

He does not want to work, and even on a new map.
If you add it through the mod, it works great.

Full Name (Unknown) 13.01.2020 06:18
Please help sort it out


Note: Log in to post. Create a new account here.