Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 Modding, Customising, Editing » Make Brenda great again (a probably strange question)
Make Brenda great again[message #361591]
|
Sat, 17 October 2020 06:55
|
|
Kitty |
|
Messages:473
Registered:October 2017 Location: Germany |
|
|
I changed Brendas npc-script. When going to her house after the dialogue at the shop, she's available for another conversation. If approached by female, she'll ask if player could look for the other videos she mentioned in her Hans-dialogue. When the player managed to aquire those and give them to her, as part of the reward a female can have sex with her (just like Madame is telling us for ~20 years). It's planned to get stretched out, so that it may can be used for a quest. If I can pull it of, a new one, if not, implemented in an existing.
So far so good. But I noticed that none of the buffs and debuffs the brothel gives, are happening. No morale boost, no fatigue and no infection with diseases. As it seems, those are restricted to the brothel and is happening due to an Action-Item on the map. The npc-action that is used in the npc-script is part of this, but itself alone doesn't grant anything beside smiley.
As far as I can tell, this is defined at:
LuaInitNPCs.cpp ACTION_ITEM_SEX
Full Action Item Sex
static int l_ACTION_ITEM_SEX (lua_State *L)
{
UINT8 n = lua_gettop(L);
INT32 sGridNo = NOWHERE;
if ( n >= 1)
{
sGridNo = lua_tointeger(L, 1);
if ( ! (gTacticalStatus.uiFlags & INCOMBAT) )
{
UINT8 ubID;
OBJECTTYPE DoorCloser;
INT16 sTeleportSpot;
INT16 sDoorSpot;
UINT8 ubDirection;
//DBrot: More Rooms
//UINT8 ubRoom, ubOldRoom;
UINT16 usRoom, usOldRoom;
// Flugente: check for valid sGridNo
if ( TileIsOutOfBounds(sGridNo) )
return 0;
ubID = WhoIsThere2( sGridNo, 0 );
if ( (ubID != NOBODY) && (MercPtrs[ ubID ]->bTeam == gbPlayerNum) )
{
if ( InARoom( sGridNo, &usRoom ) && InARoom( MercPtrs[ ubID ]->sOldGridNo, &usOldRoom ) && usOldRoom != usRoom )
{
// also require there to be a miniskirt civ in the room
if ( HookerInRoom( usRoom ) )
{
// stop the merc...
MercPtrs[ ubID ]->EVENT_StopMerc( MercPtrs[ ubID ]->sGridNo, MercPtrs[ ubID ]->ubDirection );
if ( sGridNo == gModSettings.iCarlaDoorGridNo +1 )
{
sDoorSpot = gModSettings.iCarlaDoorGridNo;
sTeleportSpot = gModSettings.iCarlaDoorGridNo;
}
else if ( sGridNo == gModSettings.iCindyDoorGridNo +1 )
{
sDoorSpot = gModSettings.iCindyDoorGridNo;
sTeleportSpot = gModSettings.iCindyDoorGridNo;
}
else if ( sGridNo == gModSettings.iBambiDoorGridNo )
{
sDoorSpot = gModSettings.iBambiDoorGridNo;
sTeleportSpot = gModSettings.iBambiDoorGridNo +1;
}
else
{
sDoorSpot = NOWHERE;
sTeleportSpot = NOWHERE;
}
if (!TileIsOutOfBounds(sDoorSpot) && !TileIsOutOfBounds(sTeleportSpot) )
{
// close the door...
DoorCloser[0]->data.misc.bActionValue = ACTION_ITEM_CLOSE_DOOR;
PerformItemAction( sDoorSpot, &DoorCloser );
// Flugente: additional dialogue
AdditionalTacticalCharacterDialogue_CallsLua( MercPtrs[ubID], ADE_SEX );
// have sex
HandleNPCDoAction( 0, NPC_ACTION_SEX, 0 );
// move the merc outside of the room again
sTeleportSpot = FindGridNoFromSweetSpotWithStructData( MercPtrs[ ubID ], STANDING, sTeleportSpot, 2, &ubDirection, FALSE );
MercPtrs[ ubID ]->ChangeSoldierState( STANDING, 0, TRUE );
TeleportSoldier( MercPtrs[ ubID ], sTeleportSpot, FALSE );
HandleMoraleEvent( MercPtrs[ ubID ], MORALE_SEX, gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
FatigueCharacter( MercPtrs[ ubID ] );
FatigueCharacter( MercPtrs[ ubID ] );
FatigueCharacter( MercPtrs[ ubID ] );
FatigueCharacter( MercPtrs[ ubID ] );
DirtyMercPanelInterface( MercPtrs[ ubID ], DIRTYLEVEL1 );
// Flugente: we might get a disease from this...
HandlePossibleInfection( MercPtrs[ubID], NULL, INFECTION_TYPE_SEX );
}
}
}
}
}
}
return 0;
}
and especially this part inside grants the effects:
HandleMoraleEvent( MercPtrs[ ubID ], MORALE_SEX, gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
FatigueCharacter( MercPtrs[ ubID ] );
FatigueCharacter( MercPtrs[ ubID ] );
FatigueCharacter( MercPtrs[ ubID ] );
FatigueCharacter( MercPtrs[ ubID ] );
HandlePossibleInfection( MercPtrs[ubID], NULL, INFECTION_TYPE_SEX );
The npc-action used in the npc-script, lacks this.
InterfaceDialogue.cpp NPC_ACTION_SEX
case NPC_ACTION_SEX:
// Delete menu
//DeleteTalkingMenu( );
//gFadeOutDoneCallback = DoneFadeOutActionSex;
//FadeOutGameScreen( );
SetPendingNewScreen( SEX_SCREEN );
break;
I tried to copy the part from LuaInitNPCs to InterfaceDialogue, but to no surprise, this failed. And since I can't code, I don't even know what went wrong. From what I see, the definition for "ubID" and "FatigueCharacter" are invalid and I couldn't find out how to solve this.
So, here is the question:
Can this be done at all? If yes, is it possible to give me some hints what I may could try?
And if it can't be done in code, is it probaly possible to do something in lua-scripts? Tried setting the npc-action = true in StrateticEventHandler but adding the fatigue and disease failed again.
And yes, I'm aware that this is a strange topic - but Madame is telling my female mercs to go visit Brenda since ages ...
[Updated on: Sat, 17 October 2020 06:55]
How to get: latest 1.13, 7609 and more | 7609 SCI (eng) | Compiling+SVN
I need more details. (Didi Hallervorden) Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Sun Dec 01 14:33:08 GMT+2 2024
Total time taken to generate the page: 0.00723 seconds
|