JakobTischler / MoreRealisticDLCs

A lua/xml project that adds MoreRealistic to the Farming Simulator DLCs
8 stars 0 forks source link

MRizing the Titanium map #39

Closed JakobTischler closed 10 years ago

JakobTischler commented 10 years ago
  1. fixing the wool pallet specifically for the Titanium map isn't necessary, as OverrideWoolPallet.lua is already called from moreRealisticGenuineMap.zip.
  2. I can set the title to "MR Westbridge Hills", but only after a map has been loaded once. In which case it seems too late, anyway.
  3. What values should we set for the balancing parameters?
        RealisticGlobalListener.priceBalancing = 4; 
        RealisticGlobalListener.silagePriceBalancing = 1.3;
        RealisticGlobalListener.hiredWorkerWageBalancing = 0.1; 
        RealisticGlobalListener.seedPriceBalancing
        RealisticGlobalListener.balePriceBalancing
        RealisticGlobalListener.woolPriceBalancing
        RealisticGlobalListener.eggPriceBalancing
        RealisticGlobalListener.milkPriceBalancing
        RealisticGlobalListener.fuelPriceBalancing
        RealisticGlobalListener.fertilizerPriceBalancing
        RealisticGlobalListener.windrowPriceBalancing
        RealisticGlobalListener.startingSilosBaseAmount
        RealisticGlobalListener.startingMoney
        RealisticGlobalListener.realFieldTractionFx
quadural commented 10 years ago
  1. right
  2. best thing would be to create an "independant" mod like I did with the "moreRealisticGenuineMap.zip" (requiring the "mr engine" and the "dlc titanium" and the "AddMoreRealistic"
  3. right. Only override these 3 values. We need to play on this map to determine the "right" values then (especially for the "priceBalancing")
JakobTischler commented 10 years ago

Concerning 2.: It wouldn't make any difference if it's in a separate mod or not. Any script is not going to be loaded until a savegame has been started, anyway.

quadural commented 10 years ago

no need for a script to change the name if this is a "new" map mod. You can define the map name in the moddesc.xml in such case. The main problem is to get or load the "SampleModMap.lua" file

JakobTischler commented 10 years ago

Ah, now I get it. You would basically create a second version of the map, which would be the 'MR' version. I'm not sure if that's really needed:

quadural commented 10 years ago

well, maybe there are some players wanting to play the default "Westbridgehill", even if the "AddMoreRealistic" mod is within their mods folder ? And how it goes regarding the starting vehicles ? we have to start with only "mr" vehicles if we want this map to be 100% "mr"

JakobTischler commented 10 years ago

True, hadn't thought of that. Alright, so I'll create the separate map version. I'll still keep it in the the MoreRealisticDLCs mod though, so we don't need multiple zip files.

quadural commented 10 years ago

in such case, yes, this is better to keep it with the "MoreRealisticDLCs" since the player have to own the DLC (and want to play "mr" obviously)

JakobTischler commented 10 years ago

Actually, adding it as a separate map is gonna be a lot more complicated than I first thought. I'd have to dynamically find the tile and description texts for the current language and set them as the map's ones. I'd have to dynamically set the original map images. The briefing texts. I'd have to find out all the map hotspots usually set in the map lua. The path to the i3d. To the PDA map. And so on...

I'm thinking, maybe "overwriting" the original isn't such a bad idea after all... :)

quadural commented 10 years ago

this is what I meant with "SampleModMap.lua" => for the Hagenstedt map, we have this file provided by Giants. This is not the case for WestbridgeHill as far as I know.

Now : do you think it is "possible" to modify the "startingVehicle" set by script ? (or replace a "given" vehicle by another at loading time ?)

JakobTischler commented 10 years ago

do you think it is "possible" to modify the "startingVehicle" set by script ?

I've just tried that. I created a custom startingVehicles.xml file, and set it as the Titanium map's vehicle file. But at that point it was too late. Our script is executed after all the map loading stuff happens.

The other way would be to create a seperate map as discussed before, and in that map's new() or load() function try to get the original Titanium map's data, like the texts, images, hotspots etc. But I doubt that that would work, as the Titanium map's data (at least the hotspots) hasn't been initialized yet at that point.

quadural commented 10 years ago

would it be possible to call the "map01:loadMap01Finished" from the "WestbridgeHill" instead of creating a new one ?

Example :

function ourMrVersionWestbridgeHill:loadMap01Finished(node, arguments)
     return defaultWestBridgeHill:loadMap01Finished(node, arguments);
end;

but we have to determine what is the "defaultWestBridgeHill" class name then.

JakobTischler commented 10 years ago

Alright, so I tried what you suggested:

function MrTitaniumMap:load()
    print('MrTitaniumMap:load(): call pdlc_titaniumAddon.AmericanMap.load(self)');
    return pdlc_titaniumAddon.AmericanMap.load(self);
end;

function MrTitaniumMap:loadMap01Finished(node, arguments)
    print('MrTitaniumMap:loadMap01Finished(): call pdlc_titaniumAddon.AmericanMap.loadMap01Finished(self)');
    return pdlc_titaniumAddon.AmericanMap.load(self, node, arguments);
end;

The problem is, as so often recently: the AmericanMap class doesn't exist until the default Titanium map has been loaded. So, in our map lua, we can't access it.

I'm starting to think maybe we should give up on the MR start vehicles...

quadural commented 10 years ago

ok. Here is another way if we don't make a separate mod for the map :

  1. add a new "eventListener" class
  2. in the "loadMap" function of this "eventListener", check that the map being loaded is the default "westbridgehill" and then, modify this variable :
g_currentMission.missionInfo.vehiclesXMLLoad = fullPathToOurSpecificMrStartingVehicles.xml;

PS : maybe we have to check that the "g_currentMission.missionInfo.vehiclesXMLLoad" is actually the "defaultVehicles.xml" first.

PPS : we do have to check that. If the current value = vehicles.xml from a savegame folder, we must not modify the path, of course.

value when loading an existing game : C:/Users/Labo01/Documents/My Games/FarmingSimulator2013/savegame2/vehicles.xml

value when loading a new game : C:/Users/Labo01/Documents/My Games/FarmingSimulator2013/pdlc/titaniumAddon/americanMapDefaultVehicles.xml

JakobTischler commented 10 years ago

Holy smokes, Batman! That actually worked. Cleaning up the script, then I'll push it.

quadural commented 10 years ago

ok, here is my report of the map, with a "global balancing factor" = 1 I played in normal difficulty, and so, all the crop prices are x2 (400 for wheat, 800 for rape for example) I also used the "gameplayMod" to be able to invest in new fields

Field ownage = 16, 10 and 17 (total = 13.26Ha)

Stock : 120,000L of wheat = about 40,000€ field of about 6Ha ready to harvest (rape, fertilized) = about 30,000€

Total time played : 36h30min Total fuel used : 1852L Total distance driven : 1067Kms Total threshed Ha = 72.30 Total sown Ha = 77.17

Equipment: 2x Fahr M66 harvester 1x Deutz 5465H harvester

1x Buehrer 6135A 1x Deutz TTV420 frontloader 1x CaseIH puma 160

1x Krone emsland tipper 1x Krampe BigBody 500E (one axle) 1x Amazon Cayena 6001 1x Amazon FT1001 front tank + UF1801 sprayer unit

Loan = 200,000€ (max loan) Current bank account = 0

I didn't buy any useless equipment, and I didn't lose time trying thing and "making fun" => only "hard work"

So, what do you think of the difficulty level => I think setting a x2 multiplier here is the minimum, but I don't know what "normal difficulty" means in a game in which you can't lose and most players "cheat".

JakobTischler commented 10 years ago

Well, from a personal point of view, I always play on "difficult". Anything other than that makes no sense to me. I would also assume that players which use MR are actually interested in a more realistic environment, thus rather like to have a bit of a challenge. As you said, in a game where you can't lose, increasing the difficulty is about the only thing you can do to create a challenge.

Having said that, I would say that the settings and results you provided should be the easiest settings a user should have. Any easier (better prices etc.), and you might as well just add the money in the xml file. So if it was up to me, I would even lower the crop prices even more.

quadural commented 10 years ago

Ok, in such case, we can keep the "x1" global price balancing, so that people wanting to play with IRL price could (playing in hard = 1x difficulty multiplier). Those who think its too hard in "normal" would always be able to cheat anyway. Too bad there are "only" 3 difficulty levels. (we need a "hardcore" mode for the IRL prices => playing for 100h to be able to buy a single "decent" piece of equipment)

JakobTischler commented 10 years ago

I have a slight problem with the default vehicles list: if someone hasn't installed the MR vehicles pack, there's gonna be a bunch of errors thrown.

In the main script I already check if the vehicle pack is installed anyway, so based on that we maybe could have two different default vehicle xml files for the map. Though I'm not sure which vehicles to use as an alternative. Only Titanium ones?

quadural commented 10 years ago

Well, the titanium's tractor selection is pretty "light" for that. We can't give a puma or magnum as a started vehicle, nor a 7130 combine...

So, if you really want to get ride of the "errors" if the vehicle pack i not present, we have to give the player the equivalent money for the vehicles lost, I think. no vehicle pack = no starting vehicles (or just a KL600 and Farmall for the fun) but more starting money. If the player wants to buy exactely the same starting pack, he needs about 190k € But this would be "cheating" to give him back all the money since the starting pack is not the best/more efficient with this amount of money. So, let's give him about 100K € After all, if this "guy" is not using the "vehicle pack", and he is using the "mr DLCs", that obviously means he is using other "mr vehicles" instead of the default ones.

JakobTischler commented 10 years ago

I agree that providing the modern and expensive Titanium vehicles is not an option. So the 100k could work. I'll look into ways how to handle that. In addition we should mention that it is recommended to use the vehicles pack when playing the Titanium map. An alternative would be to force the user to use the vehicle pack.

quadural commented 10 years ago

I don't like the "force" idea, especially for dedicated server where some players are "space limited" and replace the "vehicle pack" with only the needed "mr equipment".

regarding the money : g_currentMission.missionStats.money = 100000;

but it should be done after the "globalRealisticListener" set it. You can look at the "RealisticGlobalListener.setMissionInfosForNewGame" function and then "append" a piece of code to it (I mean : "Utils.appendedFunction")

JakobTischler commented 10 years ago

Ah right, I would have just added the money in the loadMap() function, but of course it makes sense to do it after everything else.

Another thing we could do: use the vehicles of the other DLCs (if they are installed). For example the Krone Emsland could be exchanged with the Ursus trailer. (But that's probably about it, there aren't more matching vehicles IMO).