Community Forum

questions about mission system

Forum Overview >> Farming Simulator 19

CategoryFarming Simulator 19
Created02.05.2020 07:49


Unknown 02.05.2020 07:49
Hi,
I'm new here, trying to enhance a map that I love to play as the original modder seems to be no longer modding. I want to add additional grass missions and transport missions. I wonder how I best could test these.

1) I found that there is a gsGenerateFieldMission if g_addTestCommands returns true - but I don't know how I could do so. Is there a startup parameter or xml setting to enable this?
2) is there a limit about how many missions are generated for a map? I wonder that there are only 4-5 missions generated even if there are many more fields. If there is a limit, how could I adjust it?
3) from tutorial videos I learned that field has to have a boolean field fieldGrassMission on it to have grass harvest missions on them. Is there a documentation about what attributes are available for the different elements? I did not find the xsd (http://i3d.giants.ch/schema/i3d-1.6.xsd), the documentation I found (https://gdn.giants-software.com/documentation_i3d.php) does not contain e.g. field values.

Best regards,
Christoph

Bilbo Beutlin (BBeutlin) 02.05.2020 13:23
The mission system is only sparely documented. See for reference
https://gdn.giants-software.com/documentation_scripting_fs19.php?version=script&category=109&class=10133

1) Most console commands are enabled by the game.xml <development> <controls>true, this sets the boolean g_addTestCommands.
Only a few need the additional startup parameter "-cheats", this sets the boolean g_addCheatCommands.

2) The missions are limited by the global "MissionManager.MAX_MISSIONS".

3) For what do you need the xsd scheme? It's only useful for external xml handling. Anyway, the cited xsd scheme "i3d.giants.ch/schema/i3d-1.6.xsd" is broken somehow.
For field user attributes see
https://gdn.giants-software.com/documentation_scripting_fs19.php?version=script&category=109&class=10130#load160603

Unknown 02.05.2020 15:47
Thank you for your fast response.
1) looks like development/controls don't work for me to enable the TestCommands - it gives me a bunch of other commands but not the gsGenerateFieldMission. It's neither included in the commands available with tab in the console nor if I just enter it. Any other idea?
2) Is there a way to a) find out what this constant is set to and b) adjust it? Perhaps it was only bad luck during my play on the map yet, looks like I got a better map state (fields to harvest) to have more missions. So perhaps its not a problem at all.
3) Thank you for the link, it surely helps me. I was hoping that a proper xsd not only notes the values but also a description for it. The types (integer, boolean) may need another guess. A description for e.g. fieldAngel value would be helpful to understand what the parameters do.

Another question added:
4) I found that one of the selling stations in the map has a map position which is way off. I found that there is a placeholder included for that selling station which includes a map position, but changing this won't adjust the visible green highlight once you select it in selling stations.What did I miss? Is there any other file which describes these map positions? defaultItems.xml for the map uses positions similar to map positions of the sell triggers, but does not define the map marker position imo.
Or is the problem that I try to edit the mod directly in mods directory instead of creating a new version? Mod Manager states there is an update for the mod, but as this is a manual download there should be no update?

Unknown 03.05.2020 08:14
I went forward and added some transport mission areas, this worked without any special operation. So I assume I missed something for the moved map position.

Bilbo Beutlin (BBeutlin) 03.05.2020 13:00
The transform group "placeholders" you can simply ignore (if it has the user attribute "onCreate:Placeholders.onCreate").
It's just what the name says: placeholders for objects which are inserted at game start by the defaultItems.xml. In the map these are dummies only meant to help positioning the items and perhaps environment.

Corcerning transport missions: make sure the user attribute 'index' has a unique name for the "transportMissions.xml". The amount of transport missions is limited to 2 missions. New transport missions will only appear if available missions < 'MissionManager.MAX_MISSIONS'. To read out this value use a LUA script or a tool like "EasyDevelopmentControls" (available on Giants ModHub).

Generating field missions will perhaps take a while, depending on growth/status of the NPC field.

Unknown 03.05.2020 17:17
Transport missions and field (grass) missions work as expected now. Fortunately the growth state was already good for this.

The placeholders group does not have onCreate attribute, my test did not make any difference whether it had the user attribute or not. I found that there was a placeable directory with separate xml files, but even there the correct location was added. Looks like it does not show up on map correctly. Perhaps it is because of naming? It is called "Schreinerei Hack" but on Map I see "Sägewerk" which probably is the default translation for l10n_station_sawmill.

By the way: is there a way to override the default translations? For now I sticked to e.g. l10n_station_gasStation, but I would like to have a different translation e.g. for placeholder l10n_station_supermarket or l10n_station_port02 as I don't have such on the map and would give them other names. I did not find documentation about where such should be edited.

I think I don't mind the MAX_MISSIONS for now as I have enough missions now. The screenshots of EasyDevelopmentControls don't show mission related stuff, did I miss something?

Bilbo Beutlin (BBeutlin) 03.05.2020 17:45
hmm .. I thought with EasyDevelopmentControls one can also read out FS variables.
Else search for the FS utility "ConsoleHelper", a useful extension for the command console.

Overwriting the translations is possible, but not recommanded!
The 'l10n_' texts are localizations depending on language setup. The individual texts are copied into the 'g_i18n.texts' table.
For your personal use you can overwrite with eg. "g_i18n.texts.station_port02 = "my text" (on your own risk) *g*

Unknown 03.05.2020 18:19
Thank you (once again). ConsoleHelper looks fine for me, I'll keep it in mind.
Regarding translations: I will try whether it works with setting my own placeholders instead of using predefined ones. Found that I10n goes into modDesc.xml.

I found another "issue" with my new "grass" fields - the NPC wants to plant something else now. Is there a way to restrict it so grass will grow again on that field?

Bilbo Beutlin (BBeutlin) 04.05.2020 09:16
Like in real, the field owner decides what to cultivate. *g*
There's no easy way provided to force a certain fruitType.
Only thing you can do is setting the field to a defined status by script or console commands.


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