Coder Social home page Coder Social logo

bigfood2307 / fs22_dynamicfieldprices Goto Github PK

View Code? Open in Web Editor NEW
17.0 8.0 2.0 315 KB

Mod for changing field prices in Farming Simulator 22

Home Page: https://www.farming-simulator.com/mods/not_yet_released

Lua 100.00%
lua farming-simulator farming-simulator-22 fs22

fs22_dynamicfieldprices's Introduction

FS22_DynamicFieldPrices

Makes Field prices more interesting. It might make sense to look out for good deals instead of always buying the closest land. Some NPCs are more greedy than others and their economic situation changes over time influencing the prices as well. An extra 10% is added when buying or selling a field. This will strongly limit field flipping. Prices change once per day.

Price calculation

NPCs

The game gives each field to one NPC. This mod gives each of them a permanent greediness factor and a changing factor for their economic situation. These factors are different for each savegame but stored inbetween sessions. Since the game never changes the connection between field and NPC, you will always buy/sell a certain field from/to the same person. There is a game settings options to regenerate all npcs at midnight. To completely regenerate the NPCs, you can also open dynamicFieldPrices.xml in your savegame and delete all <npc ... /> entries.
You can also delete single entries here to only regenerate those NPCs.

Greediness

The greediness factor is a number between 0.8 and 1.2 for each NPC. It will never change, unless the NPCs are reset. Min and Max can be changed per save in the dynamicFieldPrices.xml file in your savegame or via the game settings menu. In the xml the value per NPC is mapped to 0..1.

Economic situation

Each economic situation factor is a number between 0.6 and 1.6 for each NPC. It is randomly initiated once and will change daily by a small random amount. Min and Max can be changed per save in the dynamicFieldPrices.xml file in your savegame or via the game settings menu. In the xml the value per NPC is mapped to 0..1.

Buy/Sell discouragement

To stop you from field flipping, a 10% extra is added when buying and substracted when selling a field.
-> The factor is 1.1 for buying and 0.9 for selling.
This value can also be changed in the dynamicFieldPrices.xml in your savegame or via the game settings menu.

Formula for the Price:

The Base Price of land is calculated according to the map baselines: baseprice = size x price_per_hectar x field_factor
This will produce the same price as in the base game.
It is then altered:
actual_price = baseprice x greediness x economic x discouragement

Difficulty

On average fields are now 21% more expensive to buy. However with some luck you can also find certain fields at almost half the original price.

Compatibility

Compatible with FS22_BetterContracts. The displayed value is the combined discount from both mods (if BCs discounted fields option is enabled). Price factors from both mods are multiplicative (-10% DFP, -10% BC -> -19%).

Possible future ideas

  • Making a field more expensive, if it is ready to harvest

Not doing

  • Changing greediness by fulfilling/canceling contracts (or adding a extra factor for it). This is already implemented well enough by FS22_BetterContracts.

fs22_dynamicfieldprices's People

Contributors

bigfood2307 avatar hoveringgoat avatar kitt3000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fs22_dynamicfieldprices's Issues

Selling Player Fields

I have run into a problem caused by this mod, where it starts an auction on a field that i already own, and then sells it off to the highest bidder at the end of the auction, even though I don't want to sell it.

Being able to auction off our own fields would be a great addition, but only if it can only be triggered by the player. I don't want to have to buy my own field off myself just to avoid losing it to the AI!

Any way to stop this happening? at the moment all i can do is buy the field back and cheat for the money back, which is a bit annoying.

Zero "Difference"

I am having an issue with a certain map I am playing. The map is Spring Creek ND, a 32x map. The majority of my fields have a difference of 0% and it never changes. Have done something wrong? Is there a way to make the rest of the fields fluctuate in price?

Translation Br

Dear friend,

Good Morning.

In a next update, would there be a possibility to include the BR translation?

A translation is attached to the message.

Until.
locale_br.txt

unrealistic prices

Hello Bigfoot,

some prices are very unrealistic, I am currently player on NF Marsch.
dynamicfieldprices001
dynamicfieldprices002

Here are two screenshots of these cases. 100% Discount is a little bit two much. And the other way ist 1090% Overprized?

I am not sure if I have understood your description correctly.
You write something about an economic factor of between 0.6-1.6, and greediness of 0.8-1.2.
From this I calculate that the maximum
... markup is 1.2x1.6 = 192% of the original price.
... discount is 0.8x0.6 = 48% before original price, so I can not explain these values as seen above.

Mfg
Senoyches

Cant uninstall mod

Ive tried to uncheck this mod, ive tried deleting it from the mod screen, and ive manually deleted it from the mods folder. In every situation it keeps the fields switched i.e. field 30 is field 22 on the sale. Doesnt seem to be a way to undo this mod.

Option to hide percent modifier

Please add an option to hide how much the field is discounted or marked up. For role play it would be much more fun to go "hmmm this seems like a really good deal" rather than "oh see its 30% off buy buy buy"

Better contracts compatibility

This mod looks like it's a great idea. However I use the better contracts mod that reduces the price of fields based on the number of contracts you do. e.g. I can set it to reduce the price 5% for each contract up to X times, so say 15% off.

I was wondering do you know if your mod is compatible with Better Contracts % discount? It would be great on the expensive greedy fields if I do contracts for the NPC I can get into their "good books" so to speak :)

I have Both mods installed at the moment, and as an example, I see a difference of +8.2 from your mod, and a -10% from the better contracts mod.

image

New feature: Field price adjust up with crop and work done

Great work implementing the mod, really appreciate the fine tuning to deconflict the HUD info with basegame and other mods.

Perhaps similar to / combined with the existing future idea for harvestable crop, apply an increase to field price for work done and discount for poor conditions. So:

seeded and for each stage of growth +1% (so is that 5 stages of growth?)
plowed, cultivated, fertilised, 2nd fertilized +1% each
weeds -1/-2/-3% by state
stones -1/-2/-3% by state
needs lime -1%
needs rolling -1%
withered -1%

The above could generate up to -8% and +10%, so overall between 0.92 and 1.10. Which seems consistent with your greediness and economic factors.

Not sure if an additional baseline factor is necessary depending on crop type, but I feel this is already accounted for in the basegame crop price fluctuations and yield.

With PF, perhaps you could simply apply the yield predictor. But that is up to 125%, so maybe half the yield modifier would work as a simpler factor. This might work well to set a fairer market price in MP, although would require selling back to the NPC before another player could buy it. At the least it would provide the open market valuation to a player before setting their own price for selling to another player.

Overlapping Text/Percentage

fsScreen_2022_03_18_19_36_14

The percentage overlaps with the text and is sometimes hard to read, mostly on positive values.
Is there a chance for a fix?

And thank you for this gread mod :-)

Error after saving modmap

Hello there,

I have an issue, where after saving my modmap, leaving to menu and starting the map back again, all overlays in the ESC menu are bugged - I cant get out of the menu anymore or close the game via "leave game" button.

-> the mod works fine with the original maps

I narrowed the problem down to your mod. While it isnt active, everything works fine.
I get following error message which spams in the console:

Error: Running LUA method 'update'.
dataS/scripts/gui/InGameMenuMapFrame.lua(493) : attempt to index field 'mapOverlayGenerator' (a nil value)

Maybe you have an idea how to fix it. Because it works with the original maps but not with my map, maybe there is something that "collides" with each other.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.