View Single Post
Old 12-21-2009   #37
Registered User
Newbie Member
Join Date: Dec 2009
Posts: 1
trojanuch is an unknown quantity at this point
Hello Ironhide

Firts of all - great thx for this very nice mod

I would like to give you some feedback on it, so here we go:

Most importantly - the newest version is very stable (with carcrews 'false'), very few crashes duruing long gameplay times with my custom settings (more on them below).

But now to the point...

Since you were so kind to provide us with extesinve config file I took a little more creative aproach to your work.
I really didn't like the massive warzone feeling that your mod gave with default settings, I wanted to give those wars more literally 'ambient' meaning - seldom, city-life enhancing fire exchanges that would not intefere with my gameplay too much and could be enabled for long playtimes.

I was able to more or less acheive this by using this code:

// Ambient Wars Beta v1.0.0.17 - Public Releese
// Author: Ironhide
// Controls various settings of
// Changes can be made while game runs as this file is re-read each time AW is activated.
// All settings must be the exact format shown.
// Example:
// Property=Value
// No spaces between property name and the value for that property. A value (though non of that type are applicable at the moment) could have spaces but the value itself must start directly after the = sign.
// Player is You.
// Thugs are randomly generated entities adding ambient violence to the world. Thugs have a LOT of variant / chance logic that make them behave in fun ways and cause serious havok.
// Civ are existing world entities randomly modified adding more ambient violence to the world. Civ logic is currently unimplemented as Thug is current focus but there's a HUGE amount of
// variant logic for Thugs and existing civs in ThugLogic that bring to life a LOT of death in a lot of fun ways around the player.
// The PscyhoLogic module has a very substantial amount of code for a serious amount of variable behaviors, outcomes and ambient effects.
// It also contains an ExtraMayhem section that adds another section of very substantial code related to explosions and failures that strategically look ahead and behind the player for
// objects of opportunity to cause ambient havok.
// Any objects that have to be flagged to allow the game to alow more logic on them than it would normally allow (because it would normally treat them as inconsequential and light weight) are
// explicitly tracked and dispoed as they go out of logic range, which is controlled by settings in this file as are most things.
// Notes:
// For xMin / xMax, they represent lower and upper limits used when generating a number for the value dynamically
// Example:
// x.MaxArmorMin=50
// x.MaxArmorMax=250
// At TickRate, each new (or existing and being affected) entity at TickRate will have an armor amount set between 50 to 250 range
// For MaxChance settings, it is the upper limit of a generated number. So the higher it is, the less likely it is to trigger. 
// Example: 
// x.WantedByPoliceMaxChance=10 means there's a 1 in 10 chance for each new entity to have its wanted level set during TickRate
// All Chance vars are always evaluated looking for a result of 1.
// So a property value of 1 will always result in 1 (100% chance). A value of 2 = 50% chance (1 chance in 2), etc.
// ****************************************************************************************

// ----------------------
// --- General Config ---

// The default hotkey (F9) to toggle AmbientWars on / off.

// Any valid key value from the standard enumeration should work for any key or combination.
// Examples of function keys (could be any keys though):
// Keys.F1 112
// Keys.F2 113
// Keys.F3 114
// Keys.F4 115
// Keys.F5 116
// Keys.F6 117
// Keys.F7 118
// Keys.F8 119
// Keys.F9 120 <- Default
// Keys.F10 121
// Keys.F11 122
// Keys.F12 123

// --- General Config ---
// ----------------------

// ****************************************************************************************************************************************************************
// --- Global Quick Debug
// ****************************************************************************************************************************************************************
// |

// If True, Player logic will be used while AW is active

// If True, internal operations will display in the console. Use the Tilde to show / hide the console while playing.
// This should only be used if things are acting strange as it will necessarily decrease performance since a constant stream of information may be flowing.

// Should only be True when debugging problems or when trying to fine tune settings (to see their average outcomes based on changes) because there will be a huge amount of logic flow constantly logged to disk.

// This controls in milliseconds the new internal code throttling. I believe some slower machines may be experiencing an issue with the script running absolutely wide-open as it was before.
// I've now created internal waits after quite a number of operations that requires the game to use and poll resources that may on a slower box cause it to eventually step on itself and puke.

// The rate in milliseconds the code operates. A slower rate can improve performance at the cost of dynamic behavior.
// For player code the rate can be much slower as it does not have the dynamic aspects of the bulk of the code which is the war code in ThugLogic.

// If True, Thug logic will be used while AW is active.

// Should only be True when debugging problems or when trying to fine tune settings to see their average outcomes in the game based on new changes. There will be a huge amount of logic flow constantly logged to disk when True.
// Note: File log will always be created in the scripts folder where resides. Log files are reset per game run and represent the last game session.

// This controls in milliseconds the new internal code throttling. I believe some slower machines may be experiencing an issue with the script running absolutely wide-open as it was before.
// I've now created internal waits after quite a number of operations that requires the game to use and poll resources that may on a slower box cause it to eventually step on itself and puke.
// UPDATED: Due to the new war code and logic offloads the new throttle default has been reduced to 35ms
// UPDATED: Now back to 50ms

// The rate in milliseconds the code operates. A slower rate will improve performance at the cost of dynamic behavior.
// A rate of 5000ms (5sec) is a decent default rate for good ambient as I've been adding new settings and tweaking previous.
// UPDATED: This is now a resource gather tick only. The only thing that happens in main script ticks is a gather of peds and vehicles for the war code to use.
// UPDATED: This is now obsolete. WarTickRate controls the war code.

// The rate in milliseconds the war code operates. The lowest acceptable value is 250ms. Anything lower will simply default to 250ms.
// UPDATED; Now at 4000ms default.
// UPDATED; Now at 5000ms default.

// If True, code for creating car crews will be used, otherwise it will be skipped.

// If True, code for creating street thugs will be used, otherwise it will be skipped.

// If True, additional mayhem at TickRate intervals at a range of MinDistanceExtraMayhem to MaxDistanceExtraMayhem from player in radius ExtraMayhemPollRadius, with chance 1 in MaxChanceExtraMayhem, will also happen. 
// This includes things like cars being launched into the air by distant explosions, car bombs, gun fire, failures and other things of interest as they come to mind and get implemented.
// Obviously a MinDistanceExtraMayhem / ExtraMayhemPollRadius combination could make it happen very near or right on the players position so keep that in mind.
// In other words, if MinDistanceExtraMayhem = 5, then VERY dangerous things will happen within 5 distance of the player at pollradius causing a devistating explosion or other factor killing you instantly.
// Same thing with pollradius. If the radius is large enough to encompass the player even after extending out to mindistance then you may go BOOM...

// |
// ****************************************************************************************************************************************************************
// --- Global Quick Debug
// ****************************************************************************************************************************************************************

// ****************************************************************************************************************************************************************
// --- Player related settings ---
// ****************************************************************************************************************************************************************
// |
// ----------------------------------------------------------------------------------------------------------------------------------------------------------------
// ***********************************
// ********** Player Options *********
// ***********************************
// ||

// If False, Player will never fly out the windshield regardless of speed when hitting an immovable. If True, setting will not be applied at all and game use default whatever it is for whatever reason.

// Amount to set Player to when AW goes active.
// Note when these are set (including maxarmor and maxhealth internally) the radar armor and hp fill may not go all the way around but these values will in fact be active. Take a shotgun in the face and see... then kill your attacker, have a smoke and go grab a hooker if you can.

// Amount to set Player to when AW goes active.

// If True, Armor # is reapplied at TickRate while AW active

// If True, Health # is reapplied at TickRate while AW active

// At TickRate, the values here will be added to the players current armor and health giving a regeneration effect up to Armor/Health max values specified above.
// Overriden by Refresh-x-OnTick = True, which refreshes to the Armor/Health specified above every TickRate.
// A check for negative numbers will not be coded, so it should be possible to create a health/armor degeneration effect for a personal challenge of some kind.
// UPDATED; Now at 8 default.
// UPDATED: Now at 10 and 15.

// If True, Wanted Level will be cleared at TickRate

// If False, nothing can drag the player from their vehicle. 

// If False, Player won't fly off a bike (assumption. Haven't tested yet.)
// Update: Nope don't think this works.

// If True, any Vehicle the Player is currently in at TickRate will be repaired.

// If AutoRepairVehicle, and the vehicle health falls belows this value then a full repair will be performed.
// This is useful to prevent the vehicle from being constantly repaired to 100% since a broken window is 'damage' so you'd constantly have to rebreak the window to shoot etc.
// A value of 25 is nice to allow the car to get really screwed up and damaged, including a burning motor and even the gas tank and be repaired right before it explodes if the TickRate hits before it goes up.

// If True and the motor health is < 1 then vehicle is repaired regardless of threshold

// If True and the gas tank health is < 1 then vehicle is repaired regardless of threshold

// ||
// ----------------------------------------------------------------------------------------------------------------------------------------------------------------
// ***********************************
// ********** Player Options *********
// ***********************************
// |
// ****************************************************************************************************************************************************************
// --- Player related settings ---
// ****************************************************************************************************************************************************************

// ****************************************************************************************************************************************************************
// --- Thug related settings ---
// ****************************************************************************************************************************************************************
// |
// ----------------------------------------------------------------------------------------------------------------------------------------------------------------
// **********************************
// ********** Thug Options **********
// **********************************
// ||

// Specifies the file used to load random model strings. The file must be in the scripts folder.
// The file MUST have atleast 1 valid entry or model generation will fail and cause all other operations that need it to fail. 
// Each valid line is a single entry of a valid GTA4 model string as defined in pedgrps.dat file.
// Any entry that is NOT a model entry should either be a blank line or a line prefixed with // or #
// The default list file has roughly 180 models I simply chose in bulk from the pedgrps file so there are many, many types of people going nuts for ambient effect.
// The default file has been set to the sample gang models file. Simply swap which ones are commented out to use the other one or make your own (or change existing) and see them in the game.
// Thug.AmbientWarsModelListFile=AmbientWarsModelList.txt
// An example alternate file with gang model entries

// Normal density is 1.0 however this is here in case some have it or want it higher even after toggling the war off.
// When AW is turned Off (after being on) it sets to this value

// When AW turns On, sets to this value.


// If True, x will have a blip attached. Thugs will always be red and enemy to player even though they may or may not be set to also attack the player via settings.

// If >0, sets their sense range. -1 = use game default. Note this affects AI logic and would necessarily have a negative performance hit the higher the number is because it will
// increase the radius at which they detect threats. For AW the default is totally fine. They will be in combat constantly usually.


// These values were chosen as were all values after extensive testing. 65 to 80 is an excellent range for ambient war of 'average pissed off people' that keeps the action going without them
// being so accurate they instakill their targets.

// Max chance (higher is less likely) a Thug will be wanted by the cops. A value of 1 is 100% chance the cops want them.

// Max chance (higher is less likely) a Thug will also attack the player. 5+ can be good if you only occasionally want to be attacked by them and just enjoy the ambient carnage.

// Max amount of Thug that can exist in the world at each TickRate. Be careful here as unreasonable numbers could easily cripple your rig and crash out due to resources or other issues.
// UPDATED: The new default is 20 to help increase the likelyhood of stability on more machines.
// UPDATED: Changed to 35 for more stress testing.
// UPDATED: Changed to 32 for the new and improved car crews.
// UPDATED: Changed to 50 for the new and improved car crews extreme stress testing.

// Max polling radius when snatching peds and vehicles. The higher this value is, the more wide spread around the player the war will be. This will also decrease performance because the underlying native code has to reach out in a larger radius to scoop up entities.
// Note the ExtraMayhem is coded in a way to more fully simulate a wide spread city war while tightly focused on keeping performance at a maximum, so it helps negate the need for higher radius.
// UPDATED: Changed from 300 to 200 default

// At TickRate, Thugs farther than this distance from the player will be removed from the world. Note this is calced using 2d and doesn't account for z (up down)
// Thugs will explicitly have their status reset to NoLongerNeeded and manually Deleted to get the resources back. The game may take stupid-long to clear them itself so
// they will cleaned up by the AW code.
// Should be > MaxPollRadius for proper operation and cleanup of distant entities.
// UPDATED: Changed from 350 to 250 default.

// Max (higher is less likely) chance a Thug will be created as Vehicles and Peds are enumerated for war status at TickRate. 
// This is chance per entity * total enumerated, with 1 to # chance of getting a Thug showing up somewhere near (or in) the entity being evaluated.
// This can be used to directly control the number (and therefore intensity) of the ambient war. Higher numbers mean less chance of creating per enumerated entitiy = less Thugs on the streets.
// Example: A value of 3 means for every entity evaluated that meets coded criteria, there's a 1 in 3 chance of a Thug being created near it / in it.
// The default is 2 (50% chance).

// Minimum distance a vehicle that is on screen must be from the player to have a Thug passenger added at TickRate at MaxChanceWillCreate. The larger the number, the less likley you are to see it pop into the vehicle (suspension of disbelief) but also the more scattered the war may be in front of you.
// Vehicles and Peds that are not on screen are always considered regardless of distance since you usually won't see them appear. It's still possible though since you can whip around with the mouse during a TickRate enumeration and catch a creation. But that's just the way it is.

// Max chance (higher is less likely) a vehicle involved with a Thug catches on fire and becomes a traffic bomb.

// Max chance (higher is less likely) a driver involved with a Thug dies at the wheel. Moving vehicles will of course go out of control (the point).

// Max chance (higher is less likely) a driver that hits MaxChanceDriverHeartattack is set on fire and cooks inside the vehicle like a BBQ.

// Max chance (higher is less likely) 1 or more passengers in a burning ride when MaxChanceVehicleGetsTrashed are in flames before they bail.

// Max chance (higher is less likely) a vehicle in the forward cone will be selected for violent occupants.

// Max number of cars to be used in the pool of violent occupant probabilities.
// UPDATED: Up to 25 for extreme stress testing.

// The forward cone properties define the potential size of the area for which violent occupants may occur in vehicles relative to the players base heading.
// Minimum heading alteration from players base heading.

// Maximum heading alteration from players base heading.

// Max chance (higher is less likely) a driver that suddenly finds themselves driving around a crew of violent criminals gets set on fire by 1 of them.

// Max chance (higher is less likely) a Thug will use the weapon.
// Each chance is tested sequentially as-listed here. As soon as 1 hits, that will be the Thugs weapon.
// So any value of 1 means 100% chance of that weapon and no further choices will be crawled until the next Thug is created and armed. A value of 2 is 50% chance of selection etc.
// Some numbers are set high because they would either be very boring (bats / knives), or extremely dangerous to the player for ambient setting.
// If none are hit the default is an Uzi. In this default config the molotovs have highest chance of being equiped. I like a lot of napalm everywhere, especially at high speeds through town reminds me of EFNY : )

// If True, existing x may immediately target nearby cops and blow them to shit or get their asses kicked trying. Not currently implemented.

// If False, no peds will drop their weapons when they die.

// ||
// **********************************
// ********** Thug Options **********
// **********************************
// ----------------------------------------------------------------------------------------------------------------------------------------------------------------
// |
// ****************************************************************************************************************************************************************
// --- Thug related settings ---
// ****************************************************************************************************************************************************************

// ****************************************************************************************************************************************************************
// --- Mayhem related settings ---
// ****************************************************************************************************************************************************************
// |
// ----------------------------------------------------------------------------------------------------------------------------------------------------------------
// ************************************
// ********** Mayhem Options **********
// ************************************
// ||

// Checked once per TickRate, so high values make it much less likely to happen.
// Mayhem happens in a roughly frontal cone as well as behind for turn arounds. The mayhem code tries to be effecient at creating things of interest while keeping up performance.
// Example: A value of 3 means once every TickRate there's a 1 in 3 chance of extra mayhem off in the distance happening.
// UPDATED: The default is now 3 due to new war tick.
// UPDATED: Back to 2.


// The Min/Max vertical forces applied to vehicles when mayhem triggers. For example, controls how high vehicles may be launched due to car bombs or dynamic gas tank failures due to distant war / distant bullets / distant debris.

// These determine which type of distant mayhem is favored more via chance when MaxChanceExtraMayhem triggers.
// Max chance (higher is less likely) a vehicle chosen for mayhem will have a bomb or tank failure and go ballistic.
// Note: Rides chosen in this branch have a good amount of logic and will usually provide dual explosions because of code. I.e. they will be affected by the failure but be alive and in a critical state so when they
// come back down out of the air they will, via normal game code, explode on impact with the ground, other vehicles or any immovable object because the car itself is in critical health state.
// UPDATED: Changed from 5 to 4 to get a bit more havok and stress testing.

// Max chance (higher is less likely) a vehicle chosen for mayhem will have mechanical failure at the pedals.
// Note: Rides chosen in this branch have a lot of additional logic to cause a variety of outcomes. This includes overall vehicle state, occupants, possible combustion, bailing, fleeing, dieing, burning, hazard lights, driver path finding etc etc.

// Max chance (higher is less likely) a vehicle chosen for mayhem has a crappy driver and floors the gas instead of hitting the breaks.
// Currently disabled because it's not finished logic and I'm focused on stability testing for folks.

// When MaxChanceGasStuck triggers, determines max speed the out of control car will (or try to) reach. Note for cars moving near normal car top speeds this is directly applied, and lesser speeds have a coded block so they move faster than currently but not in a way unrealistic / jerky.
// So for cars that are at a speed where this DOES get applied to boost them, if this is to high the cars will simply look like missles and break suspension of disbelief.
// UPDATED: Changed from 60 to 75.

// Max chance (higher is less likely) a mayhem incident in the distance will have a visual explosion. This is used as sub-logic for big explosions in the distance adding extra variation when MaxChanceCarExplosion triggers.
// In that branch, if MaxChanceVisualExplosion hits then a normal explosion occurs, otherwise a subdued explosion occurs with no visual indicator but all the effects from it.
// New feature disabled while stability testing.

// ||
// ************************************
// ********** Mayhem Options **********
// ************************************
// ----------------------------------------------------------------------------------------------------------------------------------------------------------------
// |
// ****************************************************************************************************************************************************************
// --- Mayhem related settings ---
// ****************************************************************************************************************************************************************

// ****************************************************************************************************************************************************************
// --- Civilian related settings ---
// ****************************************************************************************************************************************************************
// |

// Civ logic isn't implemented yet so behaviors are modified in Thug logic as they're triggered. Eventually a specific Civ logic set will get created independent of Thugs.
// So until then, none of these settings will do anything at all.



// Max amount of existing Civs in the world that can be directly affected by code at TickRate 


// |
// ****************************************************************************************************************************************************************
// --- Civilian related settings ---
// ***************************************************************************************************************************************************************

Now, after 15 or so gameplay hours I think I have established some suggestions that I can share, so here we go :

1. Despite that I've disabled the whole actor logic - I still have health and armor regeneration while the script is active. Also health and armor are replenished when I deactivate the script. Can both those effects be disabled when I disable the actor logic (I want to have absolutely no influence of scirpt on the actor)?

2. To acheive 100% compatibility with the missions (story, side etc,) I have to sometimes manually disable the script for the time of the missions and then reanable it afterwards. Could you add the logic that would automatically disable the script when the mission is triggered and launch it back after it finishes (similar logic could be made fo dates - both optional)?

3. The one thing that I currently lack in my scarse ambient firefights is escalation - I mean yes, its really great to just stand in the corner and look as those guys so realistically shoot at each other (and the police), but it just feels odd that those shootouts do not end up eventually with SWAT intervetion finishing the deal (I often call the police via 911 to just see as it arvies on the scene and gets invovled into the fight0.

I think that - as it is with the player, the shootouts should lure police units and police units being lured shuold get stronger as the shootout continues.

If it turns out hard or impossible - maybe you could at least add a new gang consisted of SWAT member models (or better equiped / armored policemen) that would spawn along with SWAT van? That would at least give player an impresson that polive sometimes is actually doing something serious with those 'thugs' (I think I'll do it for myself anyway - since you've given us tools to).
However - to make the second option absolutley viaable - you should add the functionality to make weapon spawn tables gang-depended rather than global for all gangs as they are now (I think that 'Thug.AlsoAttacksPlayerMaxChance' soukd also be gang-depended rather than global).

That would be it for now. Sorry for the wall of text, I hope you find anything of worth in it.

Thx again for this great and creative mod

EDIT A few more points that crossed my mind:

4. Add more randomness to the script - when the 'massive warfare' (your default settings) is enabled this is not realy an issue, but wiith my 'scarse / ambient' shootouts it gets obvious that each next shootout beggins after fixed amount of time, defined with:
Instead of this single param, I would like to have two:
This woukld allow more randomness when the 'war' occurs while still maintaning user control.

5.Also - I would like to have an option (set propability) how many gang members spawn at single 'war' start. With your default settings new 'thugs' spawn all the time when script is active. However with my settings - there is only a single spawn once in a while.
Most of the time it spawns two 'gangs' consited of 2-3 members each. It's ok and realistic, but I would like the have an option to set propabilty for more massive event taking place - single spawning of let's say 10-20 ppl (3-6 gangs).
It should be disabled for your default settings (there's no pont in it) - but for ppl who significantly lower the 'TickRate' it would be really welcome.

Ok, now it's really it Waiting eagerly for your reply.

No prob man. Great that the post finally found it's place. Thx for your assistance!

Last edited by trojanuch; 12-22-2009 at 01:22 AM..
trojanuch is offline   Reply With Quote