Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: advanced repair/dirt system
Re: New feature: advanced repair/dirt system[message #347370 is a reply to message #341060] Wed, 19 October 2016 18:37 Go to previous messageGo to previous message
silversurfer

 
Messages:2791
Registered:May 2009
With the permission of Flugente I did an overhaul of the dirt system in r8325. I never really liked the way dirt worked in the past for several reasons, for example:
  • Dirt was an artificial extra parameter that was already covered by gun status (at least in my and other players' opinion).
  • Cleaning dirt was an instant action that we did by pressing a button. Anybody that ever had to clean guns knows that this takes time and is not done in the middle of a firefight.
  • Dirt added to an already high chance for gun jams.

So in r8325 I basically threw away the old dirt system and incorporated dirt as part of the gun status. You can't turn this on or off! It's an integral part of the repair system now. This is how it works:
  • Gun status is composed of a dirt value and a repair threshold (if ADVANCED_REPAIR = TRUE in Ja2_Options.ini, default and highly recommended). If advanced repairs are off there is only the dirt value.
  • The dirt value reflects how dirty the gun is. The repair threshold reflects actual damage to the gun. So if your gun shows 100% it means that is has no damage and is perfectly clean.
    If the gun shows for example 87%(98%) it means that its status is composed of 11 points dirt and 2 points damage.
  • Only special NPCs or mercs with Technician trait can repair the repair threshold (if MERCS_CAN_DO_ADVANCED_REPAIRS = TRUE in Skill_Settings.ini). No change.
  • Gun status can go down when you fire a gun. No change.
  • The chance that gun status goes down is affected by the NaturalDirt value of the sector and the current weather. Fighting in the desert in a sandstorm is not advised...
  • Gun jams are more likely to happen when the gun status is low. No change.
  • When gun jams happen there is a chance that the gun gets damaged. The chance for damage is higher the lower the gun status is. So keep your guns in good condition and they will work reliably.
  • Dirt can be removed with the help of cleaning kits. This requires the "Repair Items" assignment from now on. Gun cleaning goes 5 times faster than gun repair but you still have to spend enough time on that assignment to make it count (MINUTES_FOR_ASSIGNMENT_TO_COUNT in Ja2_Options.ini). There is a new option "CLEANING_RATE_DIVISOR" in Ja2_Options.ini that affects the number of cleaning points a merc gets. In order to clean guns the merc needs to have a cleaning kit anywhere in his inventory. You can only clean up to the repair threshold, not beyond. Gun cleaning has priority over general item repair.
  • Cleaning checks all guns of all mercs in the sector. So a single merc could clean all guns on his own. This can come in handy if you don't have many cleaning kits. Of course it's faster if more mercs share the workload.
  • If you do not have a cleaning kit you can still clean your guns with the normal repair routine and the help of a toolkit but this is much slower than using cleaning kits. Consider this the "backwards compatibility" for people who refuse to buy cleaning kits.

I wanted this change to be as user friendly as possible so people don't have to change the way they play (besides removing the option to instantly clean everything cheeky).

At first I wanted to apply dirt value changes over time when an item is in a certain sector for a period if time (feature of the old dirt system) but I decided against it. The reason for that is that we can't lock items away in a locker or crate to protect them from dirt and I didn't want to cause frustration about constant drop in gun status for just lying around. If there is a strong request for such feature it could easily be implemented in the hourly update function.

Some tips:
  • Always have cleaning kits with you. (that's pretty obvious...)
  • Keep an eye on the dirt modifier of guns in the advanced tab of EDB. Some guns have pretty high values there which means they get dirty faster. The M16A1 is a notorious candidate for example.
  • Ammo can also affect the dirt modifier.
  • Looted weapons with a high repair threshold are now worth to quickly be cleaned and used against your enemies in the next battle.
  • Try to keep the gun status above 85%. Below that the guns jam a bit too often for my taste but that has always been this way.
  • Always have at least a sidearm with you so you can switch guns when your primary weapon jams/breaks.

I removed a few options from Ja2_Options.ini as they are not used anymore:
  • DIRT_SYSTEM
  • FULL_REPAIR_CLEANS_GUN
  • SECTOR_DIRT_DIVIDER

While I was at the code I also fixed some bugs in repair assignment handling. It should now properly reflect if a merc can repair/clean something, if he doesn't have the skill/tools or if he's done.

This change is savegame and mod compatible! (at least to the mods compatible with a current dev build...)



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Report message to a moderator

Lieutenant
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: New feature: creature raids
Next Topic: New feature: individual militia
Goto Forum:
  


Current Time: Mon Dec 02 15:30:09 GMT+2 2024

Total time taken to generate the page: 0.02543 seconds