sarbian / ModuleManager

176 stars 96 forks source link

Help with 34 errors found on Module Manager? #151

Open VexyCats opened 4 years ago

VexyCats commented 4 years ago

I'm new to module manager and I'm just trying to do three things:

  1. Increase base cost and cost of all parts to realistic levels
  2. Increase rewards and associated rewards for all contracts

Here is my patch.cfg file in GameData with module manager newest version installed.


@PART[*]
{
    %addedCost = 25.0
    %entCost = 5.0
    @addedCost *= #$cost$ 

    @entCost *= #$entCost$
    @cost = #$addedCost$  
    @entryCost = #$addedCost$  
}
@PART[*]:HAS[#Cost]
{
    %addedCost = 25.0
    %entCost = 5.0
    @addedCost *= #$cost$ 

    @entCost *= #$entCost$
    @cost = #$addedCost$  
    @entryCost = #$addedCost$  
}

@RESOURCE[*]:HAS[#unitCost]
{   %extCost = 5.0
    @unitCost *= #$extCost$
    @unitCost = #$unitCost$
}

// StockNoContracts
// Copyright 2015 Malah
// This is free and unencumbered software released into the public domain.

// Types of stock contracts : ARM, Base, Flag, Grand, ISRU, Recovery, Satellite, Science, Station, Survey, Test, Tour

@Contracts[*]:HAS[@Funds]:FINAL
{
   @Funds:HAS[#BaseReward, #BaseAdvance]
   {
%addedCost = 400
 %upfront = 500

            @addedCost *= #$BaseReward$
            @upfront *= #$upfront$
            @BaseReward = #$addedCost$ 
            @BaseAdvance = #$upfront$
    }

What am I doing wrong? Why are there errors on the landing screen?

Also FYI: even with errors, everything works but I want to remove the errors

VexyCats commented 4 years ago

I've edited the code some more and this is my new code.

It still returns 11 errors All of which are from the code below.

Why is this? A syntax issue? Or some mod not working with my :HAS statements?


@PART[*]
{
    %addedCost = 25.0
    %entCost = 5.0
    @addedCost *= #$cost$ 

    @entCost *= #$entCost$
    @cost = #$addedCost$  
    @entryCost = #$addedCost$  
}
@PART[*]:HAS[#Cost]
{
    %addedCost = 25.0
    %entCost = 5.0
    @addedCost *= #$cost$ 

    @entCost *= #$entCost$
    @cost = #$addedCost$  
    @entryCost = #$addedCost$  
}
@PART[*]:HAS[@MODULE[ModuleScienceExperiment]]:Final
{
    @MODULE[*]
    {
        @hideUIwhenUnavailable = True
        @xmitDataScalar = 1.0
    }
}
@RESOURCE[*]:HAS[#unitCost]
{   %extCost = 5.0
    @unitCost *= #$extCost$
    @unitCost = #$unitCost$
}

// StockNoContracts
// Copyright 2015 Malah
// This is free and unencumbered software released into the public domain.

// Types of stock contracts : ARM, Base, Flag, Grand, ISRU, Recovery, Satellite, Science, Station, Survey, Test, Tour

@Contracts[*]:HAS[@Funds]:FINAL
{
   @Funds:HAS[#BaseReward, #BaseAdvance]
   {
            %addedCost = 250.0
            %upfront = 100.0

            @addedCost *= #$BaseReward$
            @upfront *= #$BaseAdvance$
            @BaseReward = #$addedCost$ 
            @BaseAdvance = #$upfront$
    }

}
 @CONTRACT_TYPE[*]:HAS[#rewardFunds]:FINAL
{
    %upfront = 100.0
    @rewardFunds *= #$upfront$
}
blowfishpro commented 4 years ago

The Log contains the full errors. Could you post that?

VexyCats commented 4 years ago

@blowfishpro Thanks, but everyone says look at the log..... where is the log located? What folder directory? Whats it called? Is it .log?

I will upload it as soon as I can find it

VexyCats commented 4 years ago

Note: The pricing changes works. Everything is a lot more expensive.

I just can't change the rewards on the contracts - how do I do this?

I found the logs, and they change my prices, and they stop at @CONTRACT_TYPE[*]:HAS[#rewardFunds]:FINAL And do not do the

@Contracts[*]:HAS[@Funds]:FINAL
{
   @Funds:HAS[#BaseReward, #BaseAdvance]
   {
            %addedCost = 250.0
            %upfront = 100.0

            @addedCost *= #$BaseReward$
            @upfront *= #$BaseAdvance$
            @BaseReward = #$addedCost$ 
            @BaseAdvance = #$upfront$
    }

}

Here is my new and updated code - it works for updating the price, and the two CONTRACT_TYPES but fails to update @Contracts

@PART[*]:HAS[#cost]:FINAL
{
    @cost *= 80.0
    @entryCost *= 40.0
}
@PART[*]:HAS[#Cost]:FINAL
{

    @Cost *= 80.0
    @entryCost *= 40.0
}
@RESOURCE_DEFINITION[*]:HAS[#unitCost]:FINAL
{  
    @unitCost *= 5.0
}
@CONTRACT_TYPE[*]:HAS[#rewardFunds]:FINAL
{
  @rewardFunds *= 400
}
@Contracts[*]:HAS[@Funds]:FINAL
{
   @Funds
   {
        @BaseReward *= 500
        @BaseAdvance *= 400
    }
}

There are no errors anymore, it just doesn't seem to process the update, is there a reason why? Does it need to be positioned in a different order or something?

I just want to take all the squad contracts, and multiple their rewards by 400-500.

blowfishpro commented 4 years ago

Well I just noticed this: @Funds:HAS[#BaseReward, #BaseAdvance] - the space will break it (not MM's fault, by the time MM gets to it KSP has already parsed this and stripped off everything after the space)

The other stuff I'll look into later