Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New Feature: Tactical recruitment
New Feature: Tactical recruitment[message #341335]
|
Wed, 03 June 2015 23:56
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
Once you've played the game a while, there is no reason anymore to talk to the civilian in Arulco. While they have some lines to say, talking with them is simply a waste of time. While this is sad, our options to fix this are limited - without a dialogue system, with, say, a menu where one can select dialogue choices (not the minimal friendly/direct/threaten/recruit-box), we can't do much.
To still give us a reason to actually talk to the people we liberate, I've coded a bit that rewards us for interaction:
If you talk to civilians with sufficiently skilled mercs, there is a chance that you can recruit them to your cause - they can become volunteers.
- This works for civilian NPCs that are in no civilian faction (like Hick family, Kingpin, rebels, beggars, prisoners...), are not hostile to us (duh) and unharmed.
- In city sectors, at least MIN_LOYALTY_TO_TRAIN_MILITIA loyalty is required. Outside of cities, there is no such check (as there is no loyalty). As a welcomed sideeffect, the player now has another incentive to stop walling in in cities and go out into the country.
- Of course the sector must be ours an uncontested.
- Children and cripples cannot be recruited. This isn't Germany.
- After you've talked to civilians in a sector, civilians created by reloading the sector won't volunteer. This prohibits you from 'farming' volunteers by reloading the sector over and over again. Every morning volunteers are 'unlocked' again.
- Recruitment simply requires you to talk to people with a merc. If he/she is a good recruiter, you might be successful. Several factors determine whether recruitment will be successful:
...
// several factors determine whether we can successfully recruit this guy
FLOAT leadershipfactor = EffectiveLeadership( pRecruiter ) / 100.0;
// bonus for assertive characters
if ( gMercProfiles[pRecruiter->ubProfile].bCharacterTrait == CHAR_TRAIT_ASSERTIVE )
leadershipfactor *= 1.05;
FLOAT recruitmodifier = (100 + pRecruiter->GetBackgroundValue( BG_PERC_APPROACH_RECRUIT )) / 100.0;
FLOAT rating = leadershipfactor * recruitmodifier * gMercProfiles[pRecruiter->ubProfile].usApproachFactor[3];
// hard check. We do not use Chance()-base functions, as then the player would have to repeat this over and over again to be sure that someone is not a volunteer
if ( rating > 70.0 )
{
//success! do stuff!
...
- After being recruited, a civilian becomes a volunteer (their name says so) and has different dialogue.
- Every civilian has a 10% chance to being recruitable. This is rerolled for everyone every time you load a map.
- Without volunteers active, this is a bit pointless, but you can of course still do this for roleplay purposes.
This isn't intended to replace the main method of getting volunteers - it is supposed to be an immersive reward for those players that interact with their surroundings.
It would be possible to expand this to other civilian factions. I've briefly thought about handling interrogation this way, but decided against it - the current interrogation assignment works very fine, no need to make that obsolete.
It is also thinkable to one day recruit militia this way - the rebel NPCs in Omerta basement would be prime candidates - but there are several code problems with that, so let's not do that (for now).
No new ini values required. Huh. I'm sure that will change at some point.
This is fully savegame compatible.
This has been added in r7886 & GameDir r2250.
Edit1: As of r7889 & GameDir r2252, I've moved the new 'volunteer' civ faction, it is now group 24. We have enough empty groups, so no problem there, and this way we don't come into conflict with UC, where this group might already be in use.
[Updated on: Sat, 13 June 2015 20:45]
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Sat Nov 30 00:42:18 GMT+2 2024
Total time taken to generate the page: 0.00843 seconds
|