Community Forum

FS22 LUA sources

Forum Overview >> Scripting

CategoryScripting
Created26.11.2021 21:37


freezz 26.11.2021 21:37
I installed my game from steam and i read that lua sources for scripting are in "Farming Simulator 22\sdk\debugger", but i dont have them there. someone said that you can extract those files from dataS.gar but i have no idea how, here: https://gdn.giants-software.com/thread.php?categoryId=3&threadId=9485

I want to create mod that allows you to rotate placeables in "round" angles (15°, 30°, ...) and also some snapping to grid when placing - Is something like that possible to do? Im very new to this stuff, thanks for any help

(edit) also when you sell placeable i want it to refund all money you paid, not just half of something, or even better would be moving objects to new place for some small cost.

Bilbo Beutlin (BBeutlin) 26.11.2021 23:04
Yes, Steam users apparently didn't get the "gameSource.zip".
Have some patience, Stefan Geiger (Giants CTO) has promised the new FS22 tools will come soon.
With the new debugger you'll also get the "gameSource.zip".

freezz 27.11.2021 11:17
Okay thanks, and do you think the mod ideas that i wrote are possible to make?

Hendrik Elkmann (derelky) 27.11.2021 13:05
i have the files in \My Games\FarmingSimulator2022\debugger

Claus Gade Pedersen (Satis) 27.11.2021 14:40
Hendrik I'm guessing you don't have the steam version then?
The steam version does not include the "gameSource.zip"

Jim Kraken (RealMrKraken) 28.11.2021 13:23
I too am patiently awaiting the new debugger version as I pre-ordered on steam, knew I should have got straight from GIANTS

meda2207 30.11.2021 21:51
Please, any news on "gameSource.zip" for steam users?


Jean-christophe Binet (jcbinet) 01.12.2021 00:40
If you have access to dedicated server files hosted online you can retrieve the gameSource.zip from there.

Sushi Fresser (Sushifresser) 01.12.2021 09:54
Hey folks,
I'm one of the steam users who didn't receive the LUA Source files yet. Would anyone of the people having received it with their copy of the game mind sharing it? I would really like to dig into modding, since I have several days off. But it's hard to understand what's really going on and why the old mods don't work with FS22 anymore. Thanks in advance.

meda2207 01.12.2021 10:54
@Jean-christophe Binet (jcbinet)

Thanks for idea but sadly, I don't have access to any dedicated server online :(

Is it really that big issue include it to steam version too...?

Brice Boi (Boi_B) 01.12.2021 16:36
I found this on a github

I hope this will help you

https://github.com/fredom-farmer/FS22

Bilbo Beutlin (BBeutlin) 01.12.2021 16:50
I think this will be removed soon since it violates copyrights and EULA terms and conditions.

Kurucz Ferenc (Kferi22) 01.12.2021 19:40
Hello everyone could anyone help me with a way to get the i3d of animals? $dataS/character/animals/domesticated/cow That's what I was thinking.

Bilbo Beutlin (BBeutlin) 01.12.2021 19:58
The filetype .i3d is basically XML. So you can get it by the inbuilt XML script functions.
However in most cases useless, since the i3d usually requires the shapes and textures you can't get (on easy, legal way).

Kurucz Ferenc (Kferi22) 02.12.2021 08:23
Hi!
Can you help with two problems?
I know it’s not here, but I can’t create a new one, I mean.
1. All the lands on the map I did the farmland and the fields again.
https://image.giants-software.com/index.php?hash=wzdWZev9&codes=true

2.An error for which the dataS cow should be an example.
Error (C: / Users / kuruc / Documents / My Games / FarmingSimulator2022 / mods / FS22_Cow_Farm / maps / animals.xml): Animal index not defined for 'animals.animal (6) .subType (0) .visuals.visual (0 ) '

Error: Could not create animal husbandry!

I've already tried everything to add visuals.

mast3rd3mon 02.12.2021 12:02
@Jean-christophe Binet (jcbinet)

I have access to a dedicated server, but I can only get the savegames and log files from it. Do you know whereabouts I need to look inside of the server files to find the zip file?

--edit
So I got another server cheap for a couple of days which didn't unnecessarily restrict access to server files so I now have the zip file. Looking at it though, I don't see how it helps with anything. It doesn't seem to be a stand-in documentation, and there's nothing obvious about how to get a list of placed buildings (in my case, I'm trying to find a list of placed greenhouses) so I'm not sure what it's used for?

meda2207 02.12.2021 16:15
@ mast3rd3mon
Please, which server service have you chose to get that files? So I could go for it too. Thanks!

Loki Laufeyson (loki_79) 02.12.2021 19:40
@mast3rd3mon

Try this:

print("Placeables:")
for _, placeable in pairs(g_currentMission.placeableSystem.placeables) do
print(" "..placeable.id.." - "..placeable:getName())
end

mast3rd3mon 02.12.2021 20:46
@Loki Laufeyson (loki_79)

Just tried that and no luck. I tried both your code and the following and both either dont show anything or log out a blank dataset as if placeables is empty.

for key, value in pairs(g_currentMission.placeableSystem.placeables) do
print("Found member: " .. key);
end

mast3rd3mon 02.12.2021 20:59


Loki Laufeyson (loki_79) 02.12.2021 21:18
@mast3rd3mon

How/where are you running this? It works for me in FS22 inside a standard mod update function:

function TestMod:update(dt)
...
end

mast3rd3mon 02.12.2021 21:24
@Loki Laufeyson (loki_79)

I was trying in the loadMap function as I was lead to believe it should have the data available in it. I just tried in a function which is subscribed to the Minute_Changed event and it does indeed seem to have data now

Ed Weatherup (Blue_Painted) 04.12.2021 13:33
I'm another steam users hoping for LUA gameSources.zip -- any news?

mast3rd3mon 04.12.2021 14:15
@Ed Weatherup (Blue_Painted)

I'm a steam user too, I just got mine from my server

Ed Weatherup (Blue_Painted) 04.12.2021 16:57
@mast3rd3mon

I don't have a server, at least not a FS22 server, so that option isn't open to me.

Sagichnicht Nein (djklesk) 05.12.2021 17:40
seems linke they dont care about the customers.... i have 24h left to ask for refund on steam if nothing is released within that im going to do that....

meda2207 16.12.2021 16:40
So sources are available now even for Steam users :) Finally :)

Vladislav Popov (dxs1111) 17.12.2021 15:58
Epic Games Store version has sources too

Darryl Knott (Knottypine) 13.09.2022 02:34
How do Steam users find the sources?

Loki Laufeyson (loki_79) 13.09.2022 13:18
@Darryl Knott

E:\Steam\steamapps\common\Farming Simulator 22\sdk\debugger\gameSource.zip


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