Forged Alliance Forever Forged Alliance Forever Forums 2016-11-07T22:00:31+02:00 /feed.php?f=41&t=13393 2016-11-07T22:00:31+02:00 2016-11-07T22:00:31+02:00 /viewtopic.php?t=13393&p=138535#p138535 <![CDATA[Re: Personal balance mod]]> Statistics: Posted by PerfectWay — 07 Nov 2016, 22:00


]]>
2016-11-04T16:20:10+02:00 2016-11-04T16:20:10+02:00 /viewtopic.php?t=13393&p=138308#p138308 <![CDATA[Re: Personal balance mod]]>
Code:
        AnimationWalk = '/units/url0001/url0001_awalk02.sca',
        AnimationWalkRate = 1.7,

A blueprint still works without it, it just assumes a walk rate of 1 I think.
Things like activation/open animations are controlled from the script generally using something like
Code:
self.TheAnimation:SetRate('n')

Statistics: Posted by Dudekahedron — 04 Nov 2016, 16:20


]]>
2016-11-04T11:31:30+02:00 2016-11-04T11:31:30+02:00 /viewtopic.php?t=13393&p=138299#p138299 <![CDATA[Re: Personal balance mod]]> ). I think for my small mod is not very critical.

Statistics: Posted by PerfectWay — 04 Nov 2016, 11:31


]]>
2016-11-03T09:02:54+02:00 2016-11-03T09:02:54+02:00 /viewtopic.php?t=13393&p=138262#p138262 <![CDATA[Re: Personal balance mod]]> however to prevent skating you might need to adjust it anyway as sprouto pointed out.

Statistics: Posted by Exotic_Retard — 03 Nov 2016, 09:02


]]>
2016-11-03T02:15:09+02:00 2016-11-03T02:15:09+02:00 /viewtopic.php?t=13393&p=138255#p138255 <![CDATA[Re: Personal balance mod]]>
If you alter the movement speed, you will need to change the animation rate in the blueprint or the unit will appear to 'skate' when it walks.

Statistics: Posted by Sprouto — 03 Nov 2016, 02:15


]]>
2016-11-03T01:58:31+02:00 2016-11-03T01:58:31+02:00 /viewtopic.php?t=13393&p=138254#p138254 <![CDATA[Re: Personal balance mod]]>
PerfectWay wrote:
Change movement speed and rate of fire will not break the unit animation of movement / firing? Or it will also use the new parameters?


That's a good question! I have no clue :D

Statistics: Posted by Uveso — 03 Nov 2016, 01:58


]]>
2016-11-01T19:12:40+02:00 2016-11-01T19:12:40+02:00 /viewtopic.php?t=13393&p=138181#p138181 <![CDATA[Re: Personal balance mod]]>
Change movement speed and rate of fire will not break the unit animation of movement / firing? Or it will also use the new parameters?

Statistics: Posted by PerfectWay — 01 Nov 2016, 19:12


]]>
2016-11-01T01:14:11+02:00 2016-11-01T01:14:11+02:00 /viewtopic.php?t=13393&p=138151#p138151 <![CDATA[Re: Personal balance mod]]> You can also use a online GUID generator:
http://www.somacon.com/p113.php

This is needed for a Radar:
Code:
bp.Categories.OVERLAYRADAR -- Set overlay for radar
bp.Intel.RadarRadius -- RadarRadius :D

For attack rate you need to loop over the WEAPON array:
Code:
for i, weapon in weapons do

You can now acces the rate of fire:
Code:
weapon.RateOfFire

To calculate the fire rate for dps etc., use " 1.0 / weapon.RateOfFire"

Statistics: Posted by Uveso — 01 Nov 2016, 01:14


]]>
2016-10-31T18:25:55+02:00 2016-10-31T18:25:55+02:00 /viewtopic.php?t=13393&p=138138#p138138 <![CDATA[Re: Personal balance mod]]> Thank you very much Uveso, your code example really works!
I still have some questions:
How to calculate the uid for mod? I can use random string of numbers?
And how to change attack rate and radar range?

Statistics: Posted by PerfectWay — 31 Oct 2016, 18:25


]]>
2016-10-31T13:07:23+02:00 2016-10-31T13:07:23+02:00 /viewtopic.php?t=13393&p=138127#p138127 <![CDATA[Re: Personal balance mod]]> About the desync, since we play via LAN, and I'm going to put this mod manually on both computers, I think everything should be in order, because the code will be identical

Statistics: Posted by PerfectWay — 31 Oct 2016, 13:07


]]>
2016-10-31T12:50:06+02:00 2016-10-31T12:50:06+02:00 /viewtopic.php?t=13393&p=138125#p138125 <![CDATA[Re: Personal balance mod]]>
But you can modify all units from a faction.

Use this to identify a faction:
Code:
If Categories.UEF then
If Categories.AEON then
If Categories.CYBRAN then
If Categories.SERAPHIM then

(you need to build the Categories array first!)

If you need help to mod units inside the blueprints.lua file (and building the Categories-Array) , take a look here:
viewtopic.php?f=41&t=12970

Statistics: Posted by Uveso — 31 Oct 2016, 12:50


]]>
2016-10-31T02:47:17+02:00 2016-10-31T02:47:17+02:00 /viewtopic.php?t=13393&p=138108#p138108 <![CDATA[Personal balance mod]]> I often play SC with my friends, but since we all have different skills, I decided to write a small mod that gives personal advantages (mass & energy production, build rate, maybe health points) to the player on his name.

I found the code for a simple mod with the multipliers for the economy, but the problem is that I need to apply these effects are not all units in the game, but only the player units with a certain name, for example "PlayerFirst"

Code:
do
    local oldModBlueprints = ModBlueprints

    function ModBlueprints(all_bps)
       oldModBlueprints(all_bps)

        local econScale = 2.0
       
        --loop through the blueprints and adjust as desired.
        for id,bp in all_bps.Unit do
            if bp.Economy.ProductionPerSecondMass then
               bp.Economy.ProductionPerSecondMass = bp.Economy.ProductionPerSecondMass * econScale
            end
            if bp.Economy.ProductionPerSecondEnergy then
               bp.Economy.ProductionPerSecondEnergy = bp.Economy.ProductionPerSecondEnergy * econScale
            end 
        end
    end

end

I feel that it looks something like this,
Code:
if (player.playerName == "PlayerFirst")
    // some code

It is also interesting to use the effects only for a one fraction, only of UEF for example, that the like
Code:
if (player.playerFaction == "UEF")
    // some code

Since this is my first mod, I do not know how should look like this code to Lua.

Statistics: Posted by PerfectWay — 31 Oct 2016, 02:47


]]>