Jump to content

SAC various quality of life utilities 1.0.4

Diversify sandboxing
   (0 reviews)

 

Please note that, by default, all the features of this mod are disabled in the ini file, they need to be enabled in the ini file in order to work. I chose this in order for the user to be very much aware of which of them he/she enables (hopefully after reading the description below).

 

To enable each feature, set it to 1 in the ini, instead of 0

 

population_size = 1024

 

Size of the surrounding population scan, can be reduced for performance, I haven't seen any impact with the features included in this mod

 

enable_3p_melee = 1

 

If enabled, the player camera will switch automatically to 3rd person whenever the player is engaged in melee, then switch back to 1p automatically a few seconds after the melee action is finished; I have implemented this because I like the 3p view when hogtying peds


enable_sandboxing = 1

 

If enabled, surrounding females picked randomly will either

 

(a) start wandering about, or

(b) perform some scenarios from a list (like praying or mopping)

 

enable_pariah = 1

 

If enabled, random NPC will become "pariah", e.g. public enemy.

 

Pariah NPCs will run towards the player while the surrounding population will become aggressive towards them (purpose of running towards the player is for the player to watch the action without too much effort). I do not suggest attempting to protect the pariah, the status is irreversible and all NPCs will continue targeting them until they are dead

 

Frequency of pariah events is set by pariah_min_interval and pariah_chance. The ini is pre-configured for reasonable intervals, but feel free to experiment.


enable_morph_checks= 1

 

If enabled, all females will be morphed into a slim body shape that is pleasant to my personal taste; this might require adjusting the model ymt to allow for "random expressions", I am not sure yet

 
enable_female_autospawn = 1

 

If enabled, it will spawn females regularly near (in front of) the player, picked randomly from a varied pool of models listed in the first post below; this leads to a diverse female population quite quickly


enable_hotkeys = 1

 

Enables the following hotkeys (not configurable at this time):

 

F3 = spawn a random female from the model pool, in front of the player

NUM0 = lobotomize the ped in focus, i.e. make them unresponsive and blocking sandboxing

NUM1 = set the ped in focus as pariah


enable_replenish_player_cores = 1

 

Constantly and automatically fills up the player cores

 

mute_player = 1

 

Mutes the player character, silencing all the "get out of my way" yells. Likely to affect missions, recommend to not enable if still playing the story

 

flee_horse = 1

 

Makes the player's horse to flee away (it was starting to get in my way as I was constantly teleporting around). Most likely not useful for the normal player.

 

verbose_logging = 1

 

Logs some mod actions into sac_util_log.txt; recommend leaving disabled unless there are issues which need tracking. Don't forget to delete the log file if enabled, it will keep appending, there is no automatic deletion

 

 

 

Edited by SAC
added previously undocumented functions

What's New in Version 1.0.4   See changelog

Released

 

; introduced a minimum sandboxing interval per ped, should help improve performance
; fixed auto-spawn chances
; overall logic optimization to minimize inefficient validations and help performance improvement
; slightly updated sandbox scenario list
; reduced frequency for pariah events
; pariah events have their own dedicated ini settings (enable, minimum recurrence interval, chance of occurring)

 

 Share

User Feedback

Recommended Comments

SAC

Posted (edited)

 

Pool of female models


 

Quote

 

    return female_models[(rand() % (female_models.size()-4)) + 4];

 

    female_models[0] = "sac_female";
    female_models[1] = "sac_female";
    female_models[2] = "sac_female";
    female_models[3] = "sac_female";

 

// sac_female is not available in the upload due to potential nudity issues


    female_models[4] = "a_f_m_asbtownfolk_01";
    female_models[5] = "a_f_m_blwtownfolk_02";
    female_models[6] = "a_f_m_btchillbilly_01";
    female_models[7] = "a_f_m_familytravelers_warm_01";
    female_models[8] = "a_f_m_guatownfolk_01";
    female_models[9] = "a_f_m_lagtownfolk_01";
    female_models[10] = "a_f_m_lagtownfolk_01";
    female_models[11] = "a_f_m_lagtownfolk_01";
    female_models[12] = "a_f_m_lowersdtownfolk_01";
    female_models[13] = "a_f_m_lowersdtownfolk_02";
    female_models[14] = "a_f_m_lowersdtownfolk_03";
    female_models[15] = "a_f_m_lowertrainpassengers_01";
    female_models[16] = "a_f_m_nbxslums_01";
    female_models[17] = "a_f_m_nbxwhore_01";
    female_models[18] = "a_f_m_rhdtownfolk_01";
    female_models[19] = "a_f_m_rhdtownfolk_02";
    female_models[20] = "a_f_m_sdchinatown_01";
    female_models[21] = "a_f_m_sdslums_02";
    female_models[22] = "a_f_m_skpprisononline_01";
    female_models[23] = "a_f_m_strtownfolk_01";
    female_models[24] = "a_f_m_tumtownfolk_01";
    female_models[25] = "a_f_m_tumtownfolk_02";
    female_models[26] = "a_f_m_valtownfolk_01";
    female_models[27] = "a_f_m_vhttownfolk_01";
    female_models[28] = "a_f_m_waptownfolk_01";
    female_models[29] = "a_f_o_btchillbilly_01";
    female_models[30] = "a_f_o_guatownfolk_01";
    female_models[31] = "a_f_o_lagtownfolk_01";
    female_models[32] = "a_f_o_waptownfolk_01";

 

 

 

 

 

Pool of random scenarios


 

Quote

 

    pedscenarios[1] = "GENERIC_SIT_GROUND_SCENARIO";
    pedscenarios[2] = "GENERIC_STANDING_SCENARIO";
    pedscenarios[3] = "MP_LOBBY_WORLD_HUMAN_CROUCH_INSPECT";
    pedscenarios[4] = "MP_LOBBY_WORLD_HUMAN_STARE_STOIC";
    pedscenarios[5] = "MP_LOBBY_WORLD_HUMAN_STERNGUY_IDLES";
    pedscenarios[6] = "PROP_HUMAN_CATFISH_COWER_BED";
    pedscenarios[7] = "PROP_HUMAN_SEAT_BENCH_FIDDLE";
    pedscenarios[8] = "PROP_HUMAN_SEAT_CHAIR_CLEAN_SADDLE";
    pedscenarios[9] = "WORLD_CAMP_FIRE_SIT_GROUND";
    pedscenarios[10] = "WORLD_CAMP_JACK_ES_READ_GROUND";
    pedscenarios[11] = "WORLD_HUMAN_BROOM";
    pedscenarios[12] = "WORLD_HUMAN_BROOM_RESTING";
    pedscenarios[13] = "WORLD_HUMAN_BROOM_WORKING";
    pedscenarios[14] = "WORLD_HUMAN_BUCKET_FILL";
    pedscenarios[15] = "WORLD_HUMAN_BUCKET_POUR_LOW";
    pedscenarios[16] = "WORLD_HUMAN_CROUCH_INSPECT";
    pedscenarios[17] = "WORLD_HUMAN_DRINKING";
    pedscenarios[18] = "WORLD_HUMAN_DRINKING_INTERACTION";
    pedscenarios[19] = "WORLD_HUMAN_FEED_CHICKEN";
    pedscenarios[20] = "WORLD_HUMAN_FIRE_STAND";
    pedscenarios[21] = "WORLD_HUMAN_GRAVE_MOURNING";
    pedscenarios[22] = "WORLD_HUMAN_GRAVE_MOURNING_KNEEL";
    pedscenarios[23] = "WORLD_HUMAN_LEAN_BACK_WALL_DRINKING";
    pedscenarios[24] = "WORLD_HUMAN_LEAN_WALL_DRINKING";
    pedscenarios[25] = "WORLD_HUMAN_SIT_BACK_EXHAUSTED";
    pedscenarios[26] = "WORLD_HUMAN_SIT_DRINK";
    pedscenarios[27] = "WORLD_HUMAN_SIT_FALL_ASLEEP";
    pedscenarios[28] = "WORLD_HUMAN_SIT_GROUND";
    pedscenarios[29] = "WORLD_HUMAN_SIT_GROUND_COFFEE_DRINK";
    pedscenarios[30] = "WORLD_HUMAN_SIT_GROUND_DRINKING_DRUNK_PASSED_OUT";
    pedscenarios[31] = "WORLD_HUMAN_SIT_GROUND_READING";
    pedscenarios[32] = "WORLD_HUMAN_SIT_GROUND_READING_BOOK";
    pedscenarios[33] = "WORLD_HUMAN_SIT_GROUND_SKETCHING";
    pedscenarios[34] = "WORLD_HUMAN_SLEEP_GROUND_ARM";
    pedscenarios[35] = "WORLD_HUMAN_SLEEP_GROUND_PILLOW";
    pedscenarios[36] = "WORLD_HUMAN_SLEEP_GROUND_PILLOW_NO_PILLOW";
    pedscenarios[37] = "WORLD_HUMAN_STRAW_BROOM_RESTING";
    pedscenarios[38] = "WORLD_HUMAN_STRAW_BROOM_WORKING";
    pedscenarios[39] = "WORLD_HUMAN_WASH_FACE_BUCKET_GROUND";
    pedscenarios[40] = "WORLD_HUMAN_WRITE_NOTEBOOK";

 

 

 

 

Edited by SAC
Link to comment
Share on other sites

SAC

Posted (edited)

 

What's New in Version 1.0.2   See changelog 

 

 

- (important) fixed a potential crash when calling "lobotomize" on the same ped twice, please make sure to update the mod if you have downloaded the previous version

 

- added ini toggle for previously un-documented "mute player" function

 

- added ini toggle for previously un-documented "flee horse" function

 

 

Edited by SAC
Link to comment
Share on other sites

What's New in Version 1.0.3   See changelog 

 

 

- fixed a coding error causing the scenarios and scenario points to not trigger for NPC sandboxing

 

- more safeguards implemented to prevent possible crashes when (auto-)spawning new peds

 

Can use the ini from 1.0.2 if previously downloaded / configured, no new ini controls have been added in 1.0.3

Link to comment
Share on other sites

 

New in 1.0.4

 

  • introduced a minimum sandboxing interval per ped, should help improve performance
  • fixed auto-spawn chances
  • overall logic optimization to minimize inefficient validations and help performance improvement
  • slightly updated sandbox scenario list, eliminated scenarios which require props such as seats
  • pariah events have their own dedicated ini settings (enable, minimum recurrence interval, chance of occurring)

 

Link to comment
Share on other sites

please add hotkey options to change and disable some of them because i want to use pariah hotkey but not the other hotkeys

Link to comment
Share on other sites

16 minutes ago, undeadbroidk said:

please add hotkey options to change and disable some of them because i want to use pariah hotkey but not the other hotkeys

 

I am away from my computer for about 10 days. I will look into it when I return

Link to comment
Share on other sites

this mod is great, some things that could be nice could be teleporting targeted npc to you. also making any npc killable without making them pariah, i really like the pariah hotkey because i can use it on an npc that is unkillable and then kill them but yeah if it was possible to make another option to do this without making them pariah would be amazing! also it would be pretty fun to teleport onto npcs horses or the other way around, also could it be possible to make an npc hogtied with a hotkey?

Link to comment
Share on other sites

Hi,

 

Been away longer than expected and still have a lot of backlog IRL to catch up with. I will look into the above requests when I can get to them 

 

In the meantime, kindly please report here if you experience any of the following issues while having this mod installed:

 

1. Player character or NPCs around suddenly and randomly unable to move (walking in place)

2. Cart horses suddenly getting stuck in place and panicking 

 

Reason I am asking is that I am running a number of mods and I am not sure which one triggers the above. Selectively disabling mods has been inconclusive so far

 

Thanks

 

 

Link to comment
Share on other sites

hey, could you share some of the natives used to lobotomize npcs? im particularly interested in the ones disabling talking to them, it could be very helpful for something im doing!

Link to comment
Share on other sites

SAC

Posted (edited)

11 hours ago, undeadbroidk said:

hey, could you share some of the natives used to lobotomize npcs? im particularly interested in the ones disabling talking to them, it could be very helpful for something im doing!

 

 

void NUM0_code(Ped aimed_target_ped)
{
	if (aimed_target_ped && aimed_target_ped != NULL) // lobotomize ped
	{
		if (aimed_target_ped == PLAYER::PLAYER_ID() || aimed_target_ped == PLAYER::PLAYER_PED_ID() || !PED::IS_PED_HUMAN(aimed_target_ped))
		{
			SAC_appendLineToFile("sac_utils_log.txt", "*********************** Warning - Lobotomize ped - player or animal, aborting *******************************");
			return;
		}
		else
		{
			DECORATOR::DECOR_SET_INT(aimed_target_ped, "SAC_do_not_sandbox", 1);
			if (verbose_logging) SAC_appendLineToFile("sac_utils_log.txt", "Lobotomize ped - checkpoint 1");
			TASK::CLEAR_PED_TASKS_IMMEDIATELY(aimed_target_ped, false, false);
			if (verbose_logging) SAC_appendLineToFile("sac_utils_log.txt", "Lobotomize ped - checkpoint 2");
			PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(aimed_target_ped, true);
			if (verbose_logging) SAC_appendLineToFile("sac_utils_log.txt", "Lobotomize ped - checkpoint 3");
			TASK::TASK_STAND_STILL(aimed_target_ped, -1);
			if (verbose_logging) SAC_appendLineToFile("sac_utils_log.txt", "Lobotomize ped - checkpoint 4");
			//	EVENT::SET_DECISION_MAKER(aimed_target_ped, MISC::GET_HASH_KEY("EMPTY"));
			if (verbose_logging) SAC_appendLineToFile("sac_utils_log.txt", "Lobotomize ped - checkpoint 5");
			TASK::TASK_TURN_PED_TO_FACE_ENTITY(aimed_target_ped, PLAYER::PLAYER_PED_ID(), 4000, 0, 0, 0);
			if (verbose_logging) SAC_appendLineToFile("sac_utils_log.txt", "HM - Lobotomize ped - end success");
		}
	}
	else if (verbose_logging) SAC_appendLineToFile("sac_utils_log.txt", "HM - Lobotomize ped - failed, no target, or target not human");
}

 

 

If you ignore the fluff, it's basically 

 

TASK::CLEAR_PED_TASKS_IMMEDIATELY(aimed_target_ped, false, false);

PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(aimed_target_ped, true);

TASK::TASK_STAND_STILL(aimed_target_ped, -1);

 

Note that I have commented out EVENT::SET_DECISION_MAKER(aimed_target_ped, MISC::GET_HASH_KEY("EMPTY")); because, at least for me, it generated crashes

 

 

 

Edited by SAC
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...