Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: individual backgrounds
() 1 Vote
|
|
|
|
|
|
Re: New feature: individual backgrounds[message #330885]
|
Thu, 27 February 2014 03:15
|
|
dravak |
|
Messages:38
Registered:August 2010 |
|
|
Fluente please don't ad background if you don't know the toon .
Instead increase the traits a bit like Smeagol did .
If you know the background of the mercs , example Buns is a competitive shooter , her traits should be marksman agility teaching (teaching cause it is vanille) .
Magic is a thief , so go trough the mercs you know for sure are 100% canon .
This is a fragile thing , to just ad background to somebody merc , when they are attached to it .
Sure they can change it back , but it is more what happened to spooky .
spooky changed a lot , I love his lets cut meself some charlie ear .
And boom boom speech , somehow spooky lost a bit of it's charm while dimitri cleaned it up .
Spooky was a pyscho not for nothing .
Now love your work , but ask if you are not sure what merc should have what background .
Ask people , it is just upsetting if people find out there favorite merc or one they like to play with .
Suddenly is somebody else , Yeah it might seem bleh to not have everybody background .
but it is beter to have few perfect , leave the ones untouched. Then change everything and break canon .
Report message to a moderator
|
Private 1st Class
|
|
|
|
|
|
|
|
Re: New feature: individual backgrounds[message #330978]
|
Sun, 02 March 2014 19:07
|
|
Gambigobilla |
|
Messages:693
Registered:July 2008 |
|
|
That editor is outdated. Instead edit MercProfiles.xml in Data-1.13\TableData folder manually if you want to change your mercs.
[Updated on: Sun, 02 March 2014 19:08] by Moderator Report message to a moderator
|
First Sergeant
|
|
|
|
|
|
Re: New feature: individual backgrounds[message #339796 is a reply to message #332073]
|
Mon, 02 March 2015 18:37
|
|
silversurfer |
|
Messages:2791
Registered:May 2009 |
|
|
I just stumbled upon an effect that is very annoying. I hired Gasket and he has the "Redneck" background that includes the <druguse> tag. I wouldn't mind Gasket drinking from time to time but every time he buys a bottle of alcohol from my money he puts it in the backpack slot so every time I want to place him on a roof I get the error message "Can't climb with a backpack"...
Can't we just make the merc have a drink at the bar without this bottle of alcohol detour? If the bottle is absolutely necessary for code reasons I propose to give the merc a 25% bottle (of course only charge 25% for it!) and then consume it completely. This way it's gone from inventory afterwards and doesn't cause trouble.
I'm talking about this part in function "HourlyLarryUpdate()" btw.:
Toggle Spoiler
if ( fBar )
{
// take $ from player's account
usCashAmount = Item[ ALCOHOL ].usPrice;
AddTransactionToPlayersBook ( TRANSFER_FUNDS_TO_MERC, pSoldier->ubProfile, GetWorldTotalMin() , -( usCashAmount ) );
// give Larry some booze and set slot etc values appropriately
// CHRISL: Change final parameter to allow dynamic control of inventory slots
bBoozeSlot = FindEmptySlotWithin( pSoldier, HANDPOS, NUM_INV_SLOTS );
if ( bBoozeSlot != NO_SLOT )
{
// give Larry booze here
CreateItem( ALCOHOL, 100, &(pSoldier->inv[bBoozeSlot]) );
}
bSlot = bBoozeSlot;
bLarryItemLoop = 1;
if ( pSoldier->ubProfile == LARRY_DRUNK )
{
SwapLarrysProfiles( pSoldier );
}
if ( bSlot != NO_SLOT )
{
UseKitPoints( &(pSoldier->inv[ bSlot ]), 25/*LarryItems[ bLarryItemLoop ][ 2 ]*/, pSoldier );
}
}
Comments? Objections?
Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MODReport message to a moderator
|
|
|
|
|
|
|
|
|
|
Re: New feature: individual backgrounds[message #341425 is a reply to message #341264]
|
Sun, 14 June 2015 15:46
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
As I like edmortimer's changes to backgrounds, I've merged them into the trunk (well, most of them) in GameDir r2254.
@edmortimer: The seemingly weird sign combo ( ) is used to force a line break in texts - otherwise the background description exceeds the laptop size, which looks glitchy. I've re-added those, you should likely too.
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
|
|
|
|
|
|
|
|
|
Re: New feature: individual backgrounds[message #343962 is a reply to message #343958]
|
Thu, 04 February 2016 21:57
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
On the one hand, you are right.
On the other hand, urgs. So many calls.
I'll do it when I'm in the mood for something tedious.
Which apparently I was when doing r8050. Except for the merc training assignment stuff. Nope nope.
[Updated on: Sat, 06 February 2016 00:15]
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
|
|
|
|
|
|
Re: New feature: individual backgrounds[message #346768 is a reply to message #344488]
|
Thu, 01 September 2016 14:45
|
|
Boojum |
|
Messages:11
Registered:September 2016 |
|
|
Why Miguel's "smoker" value is set to 2 (nonsmoker) in Backgrounds.xml? In UB Miguel dies with the lung cancer because of smoking, so in JA2 he should be a smoker.
Report message to a moderator
|
Private
|
|
|
|
Re: New feature: individual backgrounds[message #346786 is a reply to message #346775]
|
Fri, 02 September 2016 04:49
|
|
Boojum |
|
Messages:11
Registered:September 2016 |
|
|
Thanks.
I meant this message:
Quote:I have talk with doctor. The news be no good. They tell me I have short time to live. I will not get better. I am try very hard to understand what they say to me, but it no be easy. It be strange that a man like me face bullets and bombs, but get sick from cigarettes. There be nothing to be done. God and time will change this. I ask you make Arulco safe soon, so I be sure my country be free from danger. ± ± Miguel Cordona
Report message to a moderator
|
Private
|
|
|
|
Re: New feature: individual backgrounds[message #349024 is a reply to message #349023]
|
Sun, 26 February 2017 21:22
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
Reading in xmls is a bit trickier - you forgot to add the tags to the list of allowed tags in backgroundStartElementHandle(...). Anyway, not sure why SPARSE sectors would be considered 'forest', so I'm removing that, apart from that, committed in r8390 & GameDir r2362.
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
|
|
|
|
Re: New feature: individual backgrounds[message #352584 is a reply to message #349024]
|
Wed, 28 February 2018 22:09
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
I like game mechanics that aren't onesided. As of r8530, if a merc's background has <druguse> set, they occasionally consume beneficial drugs in combat for free.
This means that if a merc has that tag, is in combat and is bleeding, they can take a HP-restoring drug at the start of their turn from their inventory, and this won't cost AP. Note that this very roughly takes the drug size into account, so you won't munch down a regen booster if you've just taken 2 damage (it basically starts if 2 * bleeding damage > drug effect + drug size * useable portion size).
Similar, if breath < 50, they can take breath-restoring drugs (energy booster etc.) for free.
The basic idea is that drug users are, well, easily motivated to take those things. And this can, depending on the situation and the drugs you store, be beneficial.
Note that this effect only happens in turnbased mode or combat, and can only occur every 6 turns. It also does not take the other drug effects into account. If you have a regen booster that gives you CancerAids, the merc will take it, no questions asked (apart from 'why do you have that, and why do you store it in a drug addicts' inventory, you twat?').
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
|
|
|
|
Re: New feature: individual backgrounds[message #358321 is a reply to message #352584]
|
Wed, 23 October 2019 00:44
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
Might as well do post it here.
I'm still alive! And somewhat back. Until I'm gone for most of november most likely. I might get a few tiny additions or bug fixes done until then.
Anyway, probably the most disliked tag of backgrounds is the <scrounging>-tag. The basic idea was that this tag allows shifty characters to engage in light thieving out of the player's control.
<BACKGROUND>
<uiIndex>29</uiIndex>
<szName>Professional Thief</szName>
<szShortName>Thief</szShortName>
<szDescription>When offered to take it or leave it, you always choose 'take'.</szDescription>
...
<scrounging>1</scrounging>
The old behaviour was that a merc with that tag occasionaly steal items from the sector inventory and puts them into their own inventory. However that is both very annoying (especially with EPCs, whose inventory is harder to access) and not very logical (it's more hoarding than stealing).
So as of r8699 & GameDir r2478, I've changed this behaviour: instead of stealing, the merc will occasionally steal small amounts of money from the population and put that into their inventory. That doesn't screw with our items or inventory and earns us cash, so players might even want this behaviour.
The downside is that this angers the population if they are caught, which thus lowers loyalty.
A new tag was added to TableData/Map/SectorNames.xml:
<wealth>
Rating of how rich the population in this sector is.
...
<SECTOR>
<SectorGrid>D13</SectorGrid>
<szUnexploredName>Drassen Mine</szUnexploredName>
...
<wealth>6</wealth>
...
If a merc with the background property is in a sector with wealth > 1, and he is awake, not travelling, not imprisoned, on the surface, not in combat and not currently under the players eyes, there is a 50% chance they'll attempt to steal.
Whether they succed depends on various stats, mostly dexterity.
chance to steal calculation
UINT8 SOLDIERTYPE::GetThiefStealMoneyChance()
{
if ( this->stats.bLife < OKLIFE )
return 0;
UINT32 val = 1 * EffectiveAgility( this, FALSE ) + 8 * EffectiveDexterity( this, FALSE ) + 10 * EffectiveExpLevel( this, FALSE );
// personality/disability modifiers
FLOAT persmodifier = 1.0f;
if ( DoesMercHaveDisability( this, FORGETFUL ) ) persmodifier -= 0.12f;
if ( DoesMercHaveDisability( this, SHORTSIGHTED ) ) persmodifier -= 0.30f;
if ( gGameOptions.fNewTraitSystem )
{
if ( DoesMercHavePersonality( this, CHAR_TRAIT_SOCIABLE ) ) persmodifier += 0.25f;
if ( DoesMercHavePersonality( this, CHAR_TRAIT_LONER ) ) persmodifier -= 0.05f;
if ( DoesMercHavePersonality( this, CHAR_TRAIT_OPTIMIST ) ) persmodifier += 0.05f;
if ( DoesMercHavePersonality( this, CHAR_TRAIT_ASSERTIVE ) ) persmodifier += 0.15f;
if ( DoesMercHavePersonality( this, CHAR_TRAIT_AGGRESSIVE ) ) persmodifier -= 0.15f;
if ( DoesMercHavePersonality( this, CHAR_TRAIT_PHLEGMATIC ) ) persmodifier -= 0.05f;
if ( DoesMercHavePersonality( this, CHAR_TRAIT_DAUNTLESS ) ) persmodifier -= 0.13f;
if ( DoesMercHavePersonality( this, CHAR_TRAIT_SHOWOFF ) ) persmodifier -= 0.08f;
if ( DoesMercHavePersonality( this, CHAR_TRAIT_COWARD ) ) persmodifier -= 0.25f;
}
UINT32 totalvalue = val * persmodifier / 10.0f;
ReducePointsForFatigue( this, &totalvalue );
totalvalue = min( 100, max( 0, totalvalue ) );
return totalvalue;
}
If they succeed, they gain between 1 and 5 times wealth $. In most sectors wealth is obviously 0. In farm sectors and bombed out ruins its 1. In cities it's ranges from ~5, like in Drassen and Chitzena, to 30+ in rich places. The will add the money to their inventory or, if that is full, the sector inventory.
Regardless of success, the locals might detect the merc trying to steal, with the merc having a chance not to be detected:
chance not to be detected
UINT8 SOLDIERTYPE::GetThiefEvadeDetectionChance()
{
if ( this->stats.bLife < OKLIFE )
return 0;
// the theoretical unboosted maximum is 1100, yet we treat it like 1000 - effectively you can boost stealth gear to give you a serious edge
UINT32 val = 250 + 5 * EffectiveExpLevel( this, FALSE ) + 5 * EffectiveAgility( this, FALSE ) + 3 * GetWornStealth( this ); // this includes the STEALTH trait
ReducePointsForFatigue( this, &val );
// personality/disability modifiers
FLOAT persmodifier = 1.0f;
if ( DoesMercHaveDisability( this, NERVOUS ) ) persmodifier -= 0.04f;
if ( DoesMercHaveDisability( this, DEAF ) ) persmodifier -= 0.06f;
UINT32 totalvalue = val * persmodifier / 10.0f;
ReducePointsForFatigue( this, &totalvalue );
totalvalue = min( 100, max( 0, totalvalue ) );
return totalvalue;
}
If you are detected, that has consequences. Since the citizens have been under the yoke of a cruel regime for a decade murdering them for the slightest offence, and you are the new gun-wielding guys murdering said murderers, the civilians smartly decide to not do much... but loyalty will drop. Not a lot in individual cases... but this can become a problem if you mercs behave rampantly. If the sector doesn't have loyalty, like when it is outside city bounds, the penalty is added to the nearest city where the player has a loyalty value, lowered by distance.
An advanced behaviour is that the civilians will logically blame whoever is in charge. Due to the Hide mechanic, it is possible to be in an enemy-occupied sector without being in combat. This means that your spies can essentially rob the population blind under the enemies nose, with enemy forces being blamed for it.
I leave the small excercise of determining the required wealth value for a sector for Magic to finance himself with the expected value of petty thievery to the community
[Updated on: Wed, 23 October 2019 00:47]
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: Fri Dec 06 20:11:06 GMT+2 2024
Total time taken to generate the page: 0.02128 seconds
|