Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 Modding, Customising, Editing » Make Brenda great again (a probably strange question)
Re: Make Brenda great again[message #362349 is a reply to message #361591]
|
Tue, 09 February 2021 19:50
|
|
grothmag |
|
Messages:11
Registered:February 2021 |
|
|
Kitty, a worthy goal! While I can handle C++, I haven't played around in JA2's code. But I can provide a little advice, months late but maybe you're still curious.
I take it the basics are working, it seems to be going through the "sex" part, but just with no morale/fatigue consequences? That's a very good start. But if you are adding your code to "NPC_ACTION_SEX" in InterfaceDialogue.cpp, that will actually be a problem - because the game will not only run the code when you want it to, but will also run it (a second time) in all the places it already used to run it after sex with one of the hookers. That is, in l_ACTION_ITEM_SEX, when a Merc opens the door to a hooker's room it triggers the sex event, fatigues and dirties the Merc, and has a morale effect. But by putting your code inside the sex event, the fatigue, dirt, and morale will happen twice for those existing actions.
I think it would be easier for you, to minimize what you have to code, to instead have Brenda "invite" the Merc into a room, put Brenda in that room, and then have the Merc opening that room's door trigger everything - then you can simply let the existing code handle everything. In l_ACTION_ITEM_SEX, you see where the three current valid rooms (for Carla, Cindi, and Bambi) are checked? Add one there for Brenda. (I assume the game already has her flagged as a hooker - if not, the if ( HookerInRoom( usRoom ) ) part will fail.
Presumably you need some sort of trigger on the door to call l_ACTION_ITEM_SEX - look at the doors in the brothel to see how that works. I'm guessing you will need it to be conditional on some sort of flag, like:
if (CompletedBrendaQuest) {
//Do your thing
}
else {
//Can't do it yet, maybe remind the Merc what Brenda wants
} //all done.
Also, for what you've tried so far, I suspect your problem isn't "FatigueCharacter", it's only that you need ubID to be the number of the Merc involved. Then the call to FatigueCharacter should work.
Sorry to be a bit vague, but I haven't looked at any of the JA2 code myself.
Report message to a moderator
|
Private
|
|
|
Goto Forum:
Current Time: Tue Dec 03 06:57:10 GMT+2 2024
Total time taken to generate the page: 0.00932 seconds
|