Units fire red lines (instahit)

Moderators: Uveso, burnie222

Re: Units fire red lines (instahit)

Postby CSI » 04 Dec 2017, 21:08

I'm not asking for vocal, but it would be very practical to share screens in a second and discuss about what I am trying to do because it's getting quite technical :D
CSI
Avatar-of-War
 
Posts: 101
Joined: 09 Apr 2017, 18:59
Has liked: 18 times
Been liked: 5 times
FAF User Name: CSI

Re: Units fire red lines (instahit)

Postby Uveso » 05 Dec 2017, 02:54

Ah i see.

Well, i dicided long time ago to write all inside this forum.
This way also other modders can see/learn what we are doing.
And there is maybe help from them, in case we are stuck with our ideas ^^
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Units fire red lines (instahit)

Postby CSI » 05 Dec 2017, 16:44

I think I'm good, is there a way to upload it on the vault ?
CSI
Avatar-of-War
 
Posts: 101
Joined: 09 Apr 2017, 18:59
Has liked: 18 times
Been liked: 5 times
FAF User Name: CSI

Re: Units fire red lines (instahit)

Postby CSI » 06 Dec 2017, 12:48

Actually I'dlike to add something more, some T1 shields from another mod.

The UEF and Cybran ones work perfectly fine, but with the Aeon I get this :
WARNING: Error running lua script: Invalid bone name "Pod".
stack traceback:
[C]: in function `CreateRotator'
...ramdata\faforever\gamedata\lua.nx2\lua\aeonunits.lua(194): in function `OnShieldEnabled'
...nce\mods\litemayhem\units\dad1101\dad1101_script.lua(268): in function `OnShieldEnabled'
...rogramdata\faforever\gamedata\lua.nx2\lua\shield.lua(353): in function <...rogramdata\faforever\gamedata\lua.nx2\lua\shield.lua:341>


I can build the shield but there's only the structure and not the actual shield around.
CSI
Avatar-of-War
 
Posts: 101
Joined: 09 Apr 2017, 18:59
Has liked: 18 times
Been liked: 5 times
FAF User Name: CSI

Re: Units fire red lines (instahit)

Postby Uveso » 06 Dec 2017, 15:55

This is a code line from an Aeon Shield:

Code: Select all
self.OrbManip1 = CreateRotator(self, 'Orb', 'y', nil, 0, 45, -45)

In this case the Bone-Name from the model where the rotator is attached is called/named "Orb".
So you need the name from the bone inside the model where you want to attach the rotator.

If you don't know the Bone-names, try this:

Start the game and build your shield.
Now press [ALT]+[v] to disable textures and only display the vectorgrafic of the model.
Then press [ALT]+[b] tho show all bone-names from the model.

Another way is to open the file "*.scm".
The first clear words inside this binary file are the bone-names of the model.

Greetings Uveso.

PS: If you want to upload something to the vault, use DOWNLORD's client:
https://github.com/faforever/downlords- ... /releases/
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Units fire red lines (instahit)

Postby CSI » 06 Dec 2017, 16:11

Well I get this : http://hpics.li/2910137

I guess the bone name I'm looking for is either G01 or G02, as I can see in te unit script the following lines:
self.Spinners = {
Spinner1 = CreateRotator(self, 'G01', 'y', nil, 0, 60, 360):SetTargetSpeed(0),
Spinner2 = CreateRotator(self, 'G02', 'y', nil, 0, 30, 360):SetTargetSpeed(0),
}

What do I do with this information ?
CSI
Avatar-of-War
 
Posts: 101
Joined: 09 Apr 2017, 18:59
Has liked: 18 times
Been liked: 5 times
FAF User Name: CSI

Re: Units fire red lines (instahit)

Postby Uveso » 06 Dec 2017, 16:25

Just in case you are using the t1 shield from Last_Commander's Extreme T1_Shield mod:

Open the file "DAD1101_script.lua" and change the whole "OnShieldEnabled" function to this:

Code: Select all
    OnShieldEnabled = function(self)
        if not self.Rotator then
            self.Rotator = CreateRotator(self, 'Sphere', 'z', nil, 0, 50, 0)
            self.Trash:Add(self.Rotator)
        end
        self.Rotator:SetSpinDown(false)
        self.Rotator:SetTargetSpeed(self.RotateSpeed)
        ChangeState(self, self.OpeningState)
    end,

now it should work.
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Units fire red lines (instahit)

Postby CSI » 06 Dec 2017, 16:31

It does indeed :D

You're such an encyclopedia my dear dude
CSI
Avatar-of-War
 
Posts: 101
Joined: 09 Apr 2017, 18:59
Has liked: 18 times
Been liked: 5 times
FAF User Name: CSI

Re: Units fire red lines (instahit)

Postby Uveso » 06 Dec 2017, 17:20

That's nice, thank's a lot!

I try my best :mrgreen:
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Units fire red lines (instahit)

Postby CSI » 10 Dec 2017, 16:42

Hey, one last thing (maybe not).

How does it work to make AI build modded units ? It does build some of them but not all.

I see in the folder /lua/CustomUnits that we can put the units that we want the AI to build into, but where is the controller ? The script that defines that it will look into the file GroundDefense 3 for example to see what it is able to build ?
CSI
Avatar-of-War
 
Posts: 101
Joined: 09 Apr 2017, 18:59
Has liked: 18 times
Been liked: 5 times
FAF User Name: CSI

PreviousNext

Return to Total Mayhem

Who is online

Users browsing this forum: No registered users and 1 guest