Forged Alliance Forever Forged Alliance Forever Forums 2014-06-08T06:34:52+02:00 /feed.php?f=2&t=7569 2014-06-08T06:34:52+02:00 2014-06-08T06:34:52+02:00 /viewtopic.php?t=7569&p=74864#p74864 <![CDATA[Re: Some Basic Mod questions]]>
IN blueprint file UEL0001 under physics I tried setting ACU speed = 1.7 then SpeedMulti to 0. This should have given ACU speed of 0. Then I set Speedmulti = 1 in a new line in the T2 upgrade enhancement section. None of this worked. Just would not work and I do not know why.

So then I tried a test of setting ACU speed = 1.7 in physics and Speedmulti = 2 in the T2 enhancment so that after T2 upgrade it should walk twice as fast. It did not. So it seems the command or function Speedmulti just does not work anywhere for me. Mind you I was testing not in FAF but in ver 1.6.6 started from my desktop FA icon.

Can anyone tell me why my above tests don't work? I can reset the ACU speed by itself. I can make the ACU have 0 speed or some other speed but I can find no way that the Speedmulti command has any effect on speed.

I am getting very frustrated. My modding knowledge is so basic it is almost non-existent. I only know how to play around in the blueprints files a bit. Is there a modder with the patience to help a dope like me learn from scratch? At least help with a few answers. I know it's a big ask.

Statistics: Posted by Crazy Cossack — 08 Jun 2014, 06:34


]]>
2014-06-08T05:18:52+02:00 2014-06-08T05:18:52+02:00 /viewtopic.php?t=7569&p=74860#p74860 <![CDATA[Re: Some Basic Mod questions]]> Statistics: Posted by nine2 — 08 Jun 2014, 05:18


]]>
2014-06-08T00:36:02+02:00 2014-06-08T00:36:02+02:00 /viewtopic.php?t=7569&p=74850#p74850 <![CDATA[Re: Some Basic Mod questions]]>
In the UEF ACU blueprint file, in "physics", I have set MaxSpeed = 0, . This works. The ACU cannot walk but still has all other functions and attributes.

Then in the enhancements section, T2 enhancement, I simply added in the extra command MaxSpeed = 1.7, to the other enhancements for T2 thinking, this might work. It did not work. Then I tried NewMaxSpeed = 1.7, as this is like the commands above like NewHealth = 3000, . Of course, I was hoping a function NewMaxSpeed already existed somewhere else in the game code but it must not exist because this did not work. However, it did not error either which was interesting.

So it seems to me I need to create a new function called NewMaxSpeed so I can call it. However where do I create it? If I could see an example of another like function, like NewHealth = 3000, and where it actually resides, then I could create a function NewMaxSpeed in the same way. Actually it now occurs to me I should have tried syntax NewSpeed but again that won't work if a NewSpeed is not already declared as a function somewhere. So my basic question is, how do I create a NewSpeed function (which when used would add the declared speed to the old speed)? And where do I place the new (presumably LUA) function?

Statistics: Posted by Crazy Cossack — 08 Jun 2014, 00:36


]]>
2014-06-07T10:34:16+02:00 2014-06-07T10:34:16+02:00 /viewtopic.php?t=7569&p=74770#p74770 <![CDATA[Re: Some Basic Mod questions]]>
Crazy Cossack wrote:
However, if I want to make slightly more complicated changes I cannot do them yet. For example, I want to give the ACU a speed of 0 at start of game (can't move) and I think I can do that in the unit.bp by setting speed to 0. However, then I want to tie the (re-)gaining of the ability to walk to certain upgrades. For example, I would want the gun upgrade or the T2 upgrade of the ACU to give back to the ACU the ability to walk at standard speed. How and where would I add the conditional statement that "if T2 upgrade or Gun upgrade is done then set ACU walk speed to speed x "? Actually, I would go further than that and any ACU upgrade except the super cheap one like UEF drone would give the ACU back his normal walking speed.


You'll need to hook into some methods in the unit class, besides setting the walk speed to 0 in the bp.

One way to do it would be to hook the OnWorkEnd function.

It looks like this:

Code:
OnWorkEnd = function(self, work)
        --LOG('CreateEnhancement workEND:'..tostring(work))
        self:SetActiveConsumptionInactive()
        self:PlayUnitSound('EnhanceEnd')
        self:StopUnitAmbientSound('EnhanceLoop')
        self:CleanupEnhancementEffects()
end


You can check if your current unit is a commandunit like so:

Code:
if EntityCategoryContains(categories.COMMAND, self) then
...
end


So you'd have something along the lines of

Code:
OnWorkEnd = function(self, work)
   if EntityCategoryContains(categories.COMMAND, self) and tostring(work) == 'enhancement-you-want' then
     ... update whatever values for the unit
   end
end


I've omitted how to hook the function properly. See Myxirs post for that.

Someone who knows the intricasies of the engine may say that there is a better more moho-like way of doing this, but I haven't coded enough with it to know.

Hope this gets you started.

Perhaps this should be moved to a more appropriate forum.

Statistics: Posted by Sheeo — 07 Jun 2014, 10:34


]]>
2014-06-07T09:23:37+02:00 2014-06-07T09:23:37+02:00 /viewtopic.php?t=7569&p=74766#p74766 <![CDATA[Re: Some Basic Mod questions]]> http://forums.gaspowered.com/viewtopic.php?f=19&t=2318

Statistics: Posted by Myxir — 07 Jun 2014, 09:23


]]>
2014-06-07T06:46:05+02:00 2014-06-07T06:46:05+02:00 /viewtopic.php?t=7569&p=74759#p74759 <![CDATA[Some Basic Mod questions]]>
However, if I want to make slightly more complicated changes I cannot do them yet. For example, I want to give the ACU a speed of 0 at start of game (can't move) and I think I can do that in the unit.bp by setting speed to 0. However, then I want to tie the (re-)gaining of the ability to walk to certain upgrades. For example, I would want the gun upgrade or the T2 upgrade of the ACU to give back to the ACU the ability to walk at standard speed. How and where would I add the conditional statement that "if T2 upgrade or Gun upgrade is done then set ACU walk speed to speed x "? Actually, I would go further than that and any ACU upgrade except the super cheap one like UEF drone would give the ACU back his normal walking speed.

My learning style is that I learn by example. If people can give me an example of how to implement the above then I will make a big leap in my understanding of modding, thanks.

Note: You might question the wisdom of the change to ACU walking ability. I have a vision of a less tactical and more strategic mod. It would be very different from standard FAF Sup Com. Standard FAF is perfect for what it is. I figure on a very different mod that is almost like a new game in gameplay style and economy but still uses all the familiar units and weapons. Stopping early ACU charges or rushes is consistent with this concept. Early expansion will have to occur more by engies and T1 units without ACU assistance or interference. Of course, there are senses in which this will make the game more strategic and also senses in which T1 tactics could be intensified without other changes.

There are various other changes I would make but I don't want to bore people with too long a screed here. Suffice it to say that I want LABs to take a more classic infantry role. LABs would continue to be useful for much of T1 land phase. LABs and tanks would interact more like classic infantry and tanks. How I would achieve that is an open question. The LABs' standard weapon would be less effective on tanks and structures. A new more expensive T1 LAB type would probably be necessary to mix with standar LABs; one with a anti-tank rocket. I might also implement T1 crawling anti-tank mines which when placed still are invisible to tanks but LABs can spot them and shoot them. Thus advancing tanks would need LAB screening troops to spot and kill immobile crawling mines. This is just one example of the concepts I have in mind.

I would try to more consistently theme bots, wheeled/tracked vehicles and hovers. Hovers will be light and fast in a straight line, have little armour but be hard to turn. Bots would be fast and manouverable and have medium armour. Tracked vehicles would have the heaviest armour and be slower but still manouvreable and provide heaviest hitting power. T1 hovers will probably not exist for any faction or else will exist for all factions. Engies will still be amphibious. T3 tracked tanks will become necessary for all factions and will hit heavier even than T3 Bricks, Percies etc but not have Bricks and Percies "walk under water" ability.

I will move the economy from a high exponential growth model to a more linear growth model. There are ways to do that which I won't go into here. The reason for doing it is that high exponential growth exaggerates the outcomes of early tactical victories which cause huge subsequent differences to the eco growth path. A linear growth path means it is more possible to recover from small early tactical setbacks and still play a strategic game. Large early tactical setbacks will still result in a lost game though. I would reduce the reclaim gain from wrecks to a lower percentage. Sorry, I rambled on more than I promised. But that should give some idea of what I envisage.

Statistics: Posted by Crazy Cossack — 07 Jun 2014, 06:46


]]>