• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/
  • Weve updated the Tripwire Privacy Notice under our Policies to be clearer about our use of customer information to come in line with the EU General Data Protection Regulation (GDPR) rules that come into force today (25th May 2018). The following are highlights of our changes:


    We've incorporated the relevant concepts from the GDPR including joining the EU and Swiss Privacy Shield framework. We've added explanations for why and how Tripwire processes customer data and the types of data that we process, as well as information about your data protection rights.



    For more information about our privacy practices, please review the new Privacy Policy found here: https://tripwireinteractive.com/#/privacy-notice

Question about converting custom gamemode to a mutator

Bardyss

FNG / Fresh Meat
Dec 29, 2018
13
7
3
25
I wanted to slow down all heals a bit. For example 'Q' self heal off-perk would still heal 20 but take longer to apply fully. I want to specifically counter-fight Medic spam heal. Currently unless Survivor is obscured from healing darts he can be most of the time kept alive with 25lvl med's help.
 

simplecat

Active member
Apr 27, 2015
901
144
43
Russian Federation
docs.google.com
if you want to slow down regen rate from 10 hp / s to whatever

Code:
function ModifyPlayer(Pawn Other)
{
    local KFPawn_Human H;
if (Other.IsA('KFPawn_Human'))
    {
    H = KFPawn_Human(Other);
    H.HealthRegenRate = 0.25; // 0.1 is default = 10 / hp per sec
    }
}
 
  • Like
Reactions: Bardyss

Bardyss

FNG / Fresh Meat
Dec 29, 2018
13
7
3
25
To modify "FireInterval(ALTFIRE_FIREMODE)" and "AmmoCost(ALTFIRE_FIREMODE)" in KFWeap_Beam_Microwave.uc should I again do it via CheckReplacement similarly to multipliers because it also inherits from Actor? Like this:

Code:
function bool CheckReplacement(Actor Other)
{
        if(KFWeap_Beam_Microwave(Other) != None)  
    {
            KFWeap_Beam_Microwave(Other).FireInterval(ALTFIRE_FIREMODE)=+3.0;
            KFWeap_Beam_Microwave(Other).AmmoCost(ALTFIRE_FIREMODE)=20;        
    }
        return Super.CheckReplacement(Other);
}
If yes i get "Error, '(': Expression has no effect"

edit: When I think about it now, plenty of stuff inherits from Actor so it wouldn't all make use of CheckReplacement. Maybe through OverridePickupQuery?
 
Last edited:

simplecat

Active member
Apr 27, 2015
901
144
43
Russian Federation
docs.google.com
Right, both FireInterval and AmmoCost are arrays and you access their members via square brackets. And ALTFIRE_FIREMODE is unknown (for your mutator class) constant, if you check KFWeapon where it declared you'll see that it means "1" so either refer to its location or replace it with 1.

Code:
KFWeap_Beam_Microwave(Other).FireInterval[KFWeap_Beam_Microwave(Other).const.ALTFIRE_FIREMODE]=10;
or

Code:
KFWeap_Beam_Microwave(Other).FireInterval[1]=+3.0;
Parentheses are only used to fill arrays within defaultproperties.

Also, AmmoCost is protected variable, you'll only get access to it from the weapon class.
 
Last edited:
  • Like
Reactions: Bardyss

Bardyss

FNG / Fresh Meat
Dec 29, 2018
13
7
3
25
Just to be sure: if .FireInterval is "+ and equals" not just "equals" then it will not add 1 second AND THEN 2 seconds? Meaning if I were to add this line to my mut(vanilla value):
Code:
KFWeap_Beam_Microwave(Other).FireInterval[1]=+1.0;
It wouldn't change anything right? Or it would add another second on top of vanilla delay?

edit: NVM, just tested it out. The former.
 
Last edited:

Bardyss

FNG / Fresh Meat
Dec 29, 2018
13
7
3
25
Can "KFPlayerControllerVersus" be accesed? Only "KFPlayerController" is in "KFGameInfo" classes listing and I would like to overwrite 1 function from the Versus derived class.
 

simplecat

Active member
Apr 27, 2015
901
144
43
Russian Federation
docs.google.com
Can you access variables and methods of certain class and what do you need for that? A reference to an instance of class that contains them, right?

Can you overwrite one class' function from another? Can you, probably, attempt to overwrite the variable itself?

Can you try to figure out what kind of fruit tree this fruit is belongs to? Type casting?

Hint: you've done this before in InitMutator.
 
  • Like
Reactions: Bardyss

Bardyss

FNG / Fresh Meat
Dec 29, 2018
13
7
3
25
Ok I'm close to finishing it, thanks again. Last thing: Can .upk files be included in a mutator?