===============================================================================
                    RDR2 Random World Encounters Mod
                      Installation and User Guide
===============================================================================

A mod for Red Dead Redemption 2 that adds dynamic random encounters to enhance 
immersion and unpredictability in the game world. Experience unexpected NPC 
conflicts, predator attacks, wagon robberies, weather events, and more during 
your adventures in the Wild West - all without losing honor when defending 
yourself!

===============================================================================
TABLE OF CONTENTS
===============================================================================

1. What This Mod Does
2. Installation Requirements
3. Installation Steps
4. Configuration Guide
5. Event Types Explained
6. Weather Events
7. Troubleshooting
8. Frequently Asked Questions
9. Version History
10. Disclaimer

===============================================================================
1. WHAT THIS MOD DOES
===============================================================================

This mod adds the following random events to your RDR2 experience:

- NPCs suddenly fighting each other for no apparent reason
- Random NPCs attacking the player without provocation
- Predatory animals spawning and attacking nearby NPCs or players
- Fully functional wagon robbery encounters with complex AI behaviors
- NPCs mugging other NPCs with realistic reactions and law enforcement response
- Horses bucking and potentially throwing off their riders
- Dynamic weather events including sudden thunderstorms, hurricanes, and fog

HONOR SYSTEM PROTECTION:
NEW in v0.7: You can now defend yourself or attack event aggressors without 
losing honor! The mod has been reworked to ensure your moral standing remains 
intact when dealing with randomly generated threats.

All events occur randomly based on configurable timing intervals, ensuring 
every journey through the frontier feels unique and unpredictable.

===============================================================================
2. INSTALLATION REQUIREMENTS
===============================================================================

Before installing this mod, you need:

1. Red Dead Redemption 2 (any version: Steam, Epic Games, or Rockstar Games)
2. Script Hook RDR2 by Alexander Blade
   - Download from: http://dev-c.com/rdr2/scripthookrdr2/
   - Follow the Script Hook installation instructions carefully

===============================================================================
3. INSTALLATION STEPS
===============================================================================

1. Download the Mod Files:
   - Download the latest release
   - Extract the downloaded archive

2. Install the Mod:
   - Copy "RandomWorldEncounters.asi" to your main RDR2 game directory
     (same folder where RDR2.exe is located)
   - Copy the folder "RandomWorldEncounters" to the same RDR2 game directory
   - Within the "RandomWorldEncounters" folder, you will find the configuration file
     "RandomWorldEncounters.ini" which you can edit to customize the mod
   - Logs can be found in the "RandomWorldEncounters/logs" folder

3. Launch the Game:
   - Start RDR2 normally
   - The mod will automatically start when you load into the game world
   - Check for a "RandomWorldEncounters.log" file in your RDR2 directory
     to confirm the mod is working

===============================================================================
4. CONFIGURATION GUIDE
===============================================================================

The mod can be customized by editing the "RandomWorldEncounters.ini" file 
with any text editor (like Notepad). Changes take effect after restarting 
the game.

Basic Settings:

[Logging]
EnableDebugLogging=false
- Set to "true" for detailed logs (useful for troubleshooting)
- Set to "false" for minimal logging (recommended for normal play)

[Blips]
EnableBlips=true
- Set to "true" to show event locations on your map
- Set to "false" to disable map markers for events

Encounter Detection:

[EncounterRadius]
EncounterRadiusMeters=25
- Controls the radius (in meters) around the player where encounters can occur
- Range: 10-100 meters
- Lower values = events happen closer to you
- Higher values = events can happen further away

NPC Filtering:

[ExcludedPeds]
ExcludeShopkeepers=true
- Prevents shopkeepers from participating in encounters
- Recommended to keep "true" to avoid disrupting shops

ExcludeWomen=false
- Set to "true" to exclude women NPCs from being aggressors
- Set to "false" to include all NPCs regardless of gender

Event Timing:

[Event Timing]
MinEventDelayMinutes=5
MaxEventDelayMinutes=15

- Controls how often random encounters occur
- MinEventDelayMinutes: Shortest time between events
- MaxEventDelayMinutes: Longest time between events
- The actual delay will be random between these two values

Example Configurations:
- For more frequent events: Min=2, Max=5
- For less frequent events: Min=10, Max=20
- For testing purposes: Min=1, Max=2

Individual Event Controls:

[Encounters]
Event1_Aggressor=true              ; NPCs fighting each other
Event2_Aggressor_Player=true       ; NPCs attacking the player
Event3_Animal_Predator=true        ; Predator animal attacks
Event4_Wagon_Robbery=true          ; Wagon robberies (NEW: Now fully functional!)
Event5_Mugging=true                ; NPC mugging incidents
Event6_Horse_Bucking=true          ; Horse bucking events

- Set any event to "false" to disable it completely
- Set to "true" to enable the event

Weather Events:

[Weather Timing]
Weather_MinEventDelayMinutes=20
Weather_MaxEventDelayMinutes=40

[Weather]
Sudden_Thunderstorm=false          ; Intense thunderstorms with lightning
Sudden_Hurricane=false             ; Hurricane-like weather  
Sudden_Fog=false                   ; Dense fog events

- Weather events have their own separate timing system
- Can be enabled/disabled independently from regular encounters
- Default: Disabled for better stability (enable at your own risk)

===============================================================================
5. EVENT TYPES EXPLAINED
===============================================================================

Event 1 - NPC Fight:
Two random NPCs near you will suddenly start fighting each other for no 
apparent reason. Law enforcement may respond if they're nearby. 

Event 2 - Hostile NPC:
A random NPC decides you're their enemy and attacks you without warning. 
You can fight back or flee. 

Event 3 - Predator Attack:
A dangerous animal (bear, cougar, wolf, etc.) spawns near you and attacks 
the closest target, which could be you or a nearby NPC. This can cause 
panic among civilians in the area. 

Event 4 - Wagon Robbery:
NEW: Fully implemented! An NPC will attempt to rob a wagon driver by 
force. The aggressor will try to enter the wagon, potentially throwing 
out the driver. Victims may fight back, and law enforcement will respond. 

Event 5 - Street Mugging:
One NPC will attempt to rob another NPC near you. The victim might fight 
back or flee, nearby citizens will panic, and law enforcement will respond 
if present. 

Event 6 - Horse Problems:
A random horse with a rider will start bucking, potentially throwing off 
the rider.

===============================================================================
6. WEATHER EVENTS
===============================================================================

The mod includes weather changes that can occur independently of 
regular encounters. These are disabled by default due to their experimental 
nature:

Sudden Thunderstorm:
- Creates intense storm conditions with potential lightning strikes near the player
- Can affect NPC behavior and visibility

Sudden Hurricane:
- Generates extreme weather with high winds and heavy rain
- Work in progress - may cause performance issues

Sudden Fog:
- Rolls in thick fog that limits visibility
- Work in progress - atmospheric effects still being refined

RECOMMENDATION: Keep weather events disabled unless you want to experiment 
with them. They may impact game stability.

===============================================================================
7. TROUBLESHOOTING
===============================================================================

Problem: No events are happening
Solutions:
- Check that "RandomWorldEncounters.log" exists in your RDR2 directory
- Make sure at least one event is enabled in the configuration file
- Try reducing the event delay times to 1-2 minutes for testing
- Verify Script Hook RDR2 is installed correctly
- Check that EncounterRadiusMeters is set to a reasonable value (25-50)

Problem: Game crashes when loading
Solutions:
- Ensure you have the latest version of Script Hook RDR2
- Try temporarily removing other mods to isolate conflicts
- Check the log file for specific error messages

Problem: Events happen too often/not often enough
Solutions:
- Adjust the MinEventDelayMinutes and MaxEventDelayMinutes values
- For less frequent events, use higher numbers (like 10-30 minutes)
- For more frequent events, use lower numbers (like 2-8 minutes)
- Adjust EncounterRadiusMeters to change detection range

Problem: Events interfere with missions
Solutions:
- The mod automatically pauses during story missions
- If problems persist, you can temporarily disable the mod by renaming
  the .asi file to something else (like .asi.disabled)

Problem: Losing honor during events
Solutions:
- This should no longer happen in v0.6! If you're still losing honor,
  check that you have the latest version installed

Problem: Too many log files or large log files
Solutions:
- Set EnableDebugLogging=false in the configuration file
- Manually delete old log files from your RDR2 directory

Getting Help:
- Check the "RandomWorldEncounters.log" file for error messages
- Enable debug logging temporarily for more detailed information
- Report issues on the mod's page with log file contents

===============================================================================
8. FREQUENTLY ASKED QUESTIONS
===============================================================================

Q: Will this mod work with other mods?
A: Generally yes, but conflicts can occur with other mods that heavily modify
   NPC behavior or weather systems.

Q: Can I use this mod in Red Dead Online?
A: No, this mod is for single-player Story Mode only. Using mods in Red Dead
   Online can result in account bans.

Q: Do I need to start a new game?
A: No, this mod works with existing save files.

Q: Can I adjust how intense the events are?
A: Yes, you can disable specific events you don't like, adjust the timing
   to make events more or less frequent, and control the detection radius.

Q: Will I lose honor for defending myself?
A: No! Version 0.6 includes a complete rework of the honor system. You can
   defend yourself or attack event aggressors without any honor penalties.
   Rule of thumb: If the aggressor has a red blip and initiates the conflict, you won't lose honor.

Q: Events aren't happening during missions
A: This is intentional. The mod automatically pauses during story missions to
   prevent interference.

Q: Can I see where events are happening?
A: Yes, if you have EnableBlips=true, events will show up as markers on your map.

Q: How do I exclude certain NPCs from events?
A: Use the [ExcludedPeds] section to exclude shopkeepers or women from
   participating as aggressors in encounters.

Q: What's the best encounter radius setting?
A: The default 25 meters works well for most players. Increase to 50+ for
   more distant events, or decrease to 15-20 for closer encounters.

Q: I've encountered a bug. How do I report them?
A: Please report bugs on the mod's official page, including your debug-log files.
   To create a debug log, set EnableDebugLogging=true in the configuration file.

===============================================================================
9. VERSION HISTORY
===============================================================================

Version 0.6:
- Added configurable encounter radius system
- Enhanced configuration validation
- Bug fixes for bird encounters
- Improved performance controls

Version 0.5 (Initial Release):
- Basic encounter system with 6 event types
- Weather events (experimental)
- Configurable timing and event toggles
- Mission detection and auto-pause

===============================================================================
10. DISCLAIMER
===============================================================================

    1. Installation and use of this mod is at your own risk.
    2. Always back up your game files before installing any mods.
    3. This mod is intended for single-player use only. - Do not use in Red Dead Online.
    4. This mod may not be compatible with all game versions or other mods.
    5. The author is not responsible for any damage or data loss resulting from the use of this mod.
    6. Do not download the mod other than from the official source, which is: https://www.nexusmods.com/reddeadredemption2/mods/7301

===============================================================================

Enjoy your enhanced Wild West experience!

===============================================================================