Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
API User Wishes
Author Message
Chiantii Offline
Member
***

Posts: 121
Joined: Feb 2013
Post: #31
RE: API User Wishes
Okay how about this:

Code:
        "51" : {
            "a" : {
                "0" : {
                    "l" : 16000.0,
                    "r" : 2,
                    "d" : [{
                            "x" : [0.0, 1.0, 1000.0, 15.999, 1400.0, 15.999, 2600.0, 1.0, 3000.0, 1.0, 4000.0, 16.0],
                            "t" : 2,
                            "m" : 8,
                            "p" : 2,
                            "l" : true
                        }, {
                            "x" : [0.0, 1.0, 100.0, 2.0, 900.0, 7.0, 1000.0, 7.99902, 1100.0, 7.0, 1900.0, 1.0, 2000.0, 1.0, 2100.0, 2.0, 3900.0, 17.0, 4000.0, 18.0, 4100.0, 17.0, 4900.0, 13.0, 5000.0, 12.0, 5100.0, 13.0, 6900.0, 29.0, 7000.0, 30.0, 7100.0, 29.0, 7900.0, 23.0, 8000.0, 22.0, 8100.00049, 23.0, 8900.0, 29.0, 9000.0, 30.0, 9100.0, 29.0, 10800.0, 15.0, 10900.0, 14.0, 11000.0, 15.0, 13500.0, 15.0, 13600.0, 14.0, 13700.0, 15.0, 14400.0, 20.0, 14500.0, 21.0, 14600.0, 21.0, 15900.0, 2.0, 16000.0, 1.0],
                            "t" : 3,
                            "m" : 8,
                            "p" : 2,
                            "l" : true
                        }
                    ],
                    "dt" : [{
                            "t" : 4,
                            "m" : 8,
                            "p" : 2,
                            "d" : 1
                        }
                    ]
                }
            },
            "l" : 16000.0,
            "ec" : 5,
            "w" : 141.0,
            "h" : 125.0,
            "e" : [{
                    "x" : 70.0,
                    "y" : 62.0,
                    "w" : 141.0,
                    "h" : 125.0,
                    "s" : "baseview/gdi/buildings/CnstrYrd/CnstrYrd_base.png",
                    "f" : 0,
                    "t" : 1
                }, {
                    "x" : 70.0,
                    "y" : 62.0,
                    "w" : 141.0,
                    "h" : 125.0,
                    "s" : "baseview/gdi/buildings/CnstrYrd/CnstrYrd_base_mo.png",
                    "f" : 0,
                    "t" : 1
                }, {
                    "x" : 77.0,
                    "y" : 40.0,
                    "w" : 56.0,
                    "h" : 38.0,
                    "s" : "baseview/gdi/buildings/CnstrYrd/CnstrYrd_anim.png",
                    "f" : 16,
                    "t" : 1
                }, {
                    "x" : 86.0,
                    "y" : 14.0,
                    "w" : 50.0,
                    "h" : 44.0,
                    "s" : "baseview/gdi/buildings/CnstrYrd/CnstrYrd_radar_anim.png",
                    "f" : 30,
                    "t" : 1
                }, {
                    "x" : 86.0,
                    "y" : 14.0,
                    "w" : 50.0,
                    "h" : 44.0,
                    "s" : "baseview/gdi/buildings/CnstrYrd/CnstrYrd_radar_anim_mo.png",
                    "f" : 30,
                    "t" : 1
                }
            ],
            "s" : null,
            "px" : 133.0,
            "py" : 117.0,
            "he" : [1, 4],
            "lo" : {}

        },

Sticking with the construction yard again, since that's where we started this all.

Would it be possible for you to write a userscript that has the fully animated CY inside a window? Nothing fancy, no resizing, nothing generic so it can more easily be applied to other tech objects, just very specific code (a hack so to speak) ONLY for this constructions yard to appear fully animated on a canvas.

I understand the way you do it in the game with layers and whatnot (Clientlib.Draw...), so the only possible way to do this using conventional qooxdoo api would be to keep adding the images on a canvas, and set different "left: top: bottom: right:" values based on "w" and "h". However, since they are PNG files that should be a problem.

What I'm most interested in seeing is the function you write to animate "baseview/gdi/buildings/CnstrYrd/CnstrYrd_radar_anim.png" using the interpolation values provided in "x" where "t" = 3 - if I understood things right the first time around, "t" means that is the effect information for the third "e", which is CnstrYrd_radar_anim.png since "e" is 0 based.

Do you think you can do that, Topper? If you're able to give me something specific for the construction yard, more specifically an animated imaged based off the "x" values, I'm confident I can create something that the entire community can use which will be much more robust and not require so much of your time Smile
(This post was last modified: 03-07-2013 04:12 AM by Chiantii.)
03-07-2013 04:06 AM
 Search   Quote 
Topper42 Offline
Developer
***

Posts: 248
Joined: Dec 2011
Post: #32
RE: API User Wishes
(03-07-2013 04:06 AM)Chiantii Wrote:  Okay how about this:

Code:
        "51" : {
            "a" : {
                "0" : {
                    "l" : 16000.0,
                    "r" : 2,
                    "d" : [{
                            "x" : [0.0, 1.0, 1000.0, 15.999, 1400.0, 15.999, 2600.0, 1.0, 3000.0, 1.0, 4000.0, 16.0],
                            "t" : 2,
                            "m" : 8,
                            "p" : 2,
                            "l" : true
                        }, {
                            "x" : [0.0, 1.0, 100.0, 2.0, 900.0, 7.0, 1000.0, 7.99902, 1100.0, 7.0, 1900.0, 1.0, 2000.0, 1.0, 2100.0, 2.0, 3900.0, 17.0, 4000.0, 18.0, 4100.0, 17.0, 4900.0, 13.0, 5000.0, 12.0, 5100.0, 13.0, 6900.0, 29.0, 7000.0, 30.0, 7100.0, 29.0, 7900.0, 23.0, 8000.0, 22.0, 8100.00049, 23.0, 8900.0, 29.0, 9000.0, 30.0, 9100.0, 29.0, 10800.0, 15.0, 10900.0, 14.0, 11000.0, 15.0, 13500.0, 15.0, 13600.0, 14.0, 13700.0, 15.0, 14400.0, 20.0, 14500.0, 21.0, 14600.0, 21.0, 15900.0, 2.0, 16000.0, 1.0],
                            "t" : 3,
                            "m" : 8,
                            "p" : 2,
                            "l" : true
                        }
                    ],
                    "dt" : [{
                            "t" : 4,
                            "m" : 8,
                            "p" : 2,
                            "d" : 1
                        }
                    ]
                }
            },
            "l" : 16000.0,
            "ec" : 5,
            "w" : 141.0,
            "h" : 125.0,
            "e" : [{
                    "x" : 70.0,
                    "y" : 62.0,
                    "w" : 141.0,
                    "h" : 125.0,
                    "s" : "baseview/gdi/buildings/CnstrYrd/CnstrYrd_base.png",
                    "f" : 0,
                    "t" : 1
                }, {
                    "x" : 70.0,
                    "y" : 62.0,
                    "w" : 141.0,
                    "h" : 125.0,
                    "s" : "baseview/gdi/buildings/CnstrYrd/CnstrYrd_base_mo.png",
                    "f" : 0,
                    "t" : 1
                }, {
                    "x" : 77.0,
                    "y" : 40.0,
                    "w" : 56.0,
                    "h" : 38.0,
                    "s" : "baseview/gdi/buildings/CnstrYrd/CnstrYrd_anim.png",
                    "f" : 16,
                    "t" : 1
                }, {
                    "x" : 86.0,
                    "y" : 14.0,
                    "w" : 50.0,
                    "h" : 44.0,
                    "s" : "baseview/gdi/buildings/CnstrYrd/CnstrYrd_radar_anim.png",
                    "f" : 30,
                    "t" : 1
                }, {
                    "x" : 86.0,
                    "y" : 14.0,
                    "w" : 50.0,
                    "h" : 44.0,
                    "s" : "baseview/gdi/buildings/CnstrYrd/CnstrYrd_radar_anim_mo.png",
                    "f" : 30,
                    "t" : 1
                }
            ],
            "s" : null,
            "px" : 133.0,
            "py" : 117.0,
            "he" : [1, 4],
            "lo" : {}

        },

Sticking with the construction yard again, since that's where we started this all.

Would it be possible for you to write a userscript that has the fully animated CY inside a window? Nothing fancy, no resizing, nothing generic so it can more easily be applied to other tech objects, just very specific code (a hack so to speak) ONLY for this constructions yard to appear fully animated on a canvas.

I understand the way you do it in the game with layers and whatnot (Clientlib.Draw...), so the only possible way to do this using conventional qooxdoo api would be to keep adding the images on a canvas, and set different "left: top: bottom: right:" values based on "w" and "h". However, since they are PNG files that should be a problem.

What I'm most interested in seeing is the function you write to animate "baseview/gdi/buildings/CnstrYrd/CnstrYrd_radar_anim.png" using the interpolation values provided in "x" where "t" = 3 - if I understood things right the first time around, "t" means that is the effect information for the third "e", which is CnstrYrd_radar_anim.png since "e" is 0 based.

Do you think you can do that, Topper? If you're able to give me something specific for the construction yard, more specifically an animated imaged based off the "x" values, I'm confident I can create something that the entire community can use which will be much more robust and not require so much of your time Smile

The interpolation is quite easy. Just mesure the time the effect is already running. The "x" Array is structured like this [value, time, value, time, value, time, ...]. Therefore just search the closest time in the "x" array to your running time and interpolate between this entry and the one after.
03-07-2013 04:31 PM
 Search   Quote 
Chiantii Offline
Member
***

Posts: 121
Joined: Feb 2013
Post: #33
RE: API User Wishes
(03-07-2013 04:31 PM)Topper42 Wrote:  
(03-07-2013 04:06 AM)Chiantii Wrote:  Okay how about this:

Code:
        "51" : {
            "a" : {
                "0" : {
                    "l" : 16000.0,
                    "r" : 2,
                    "d" : [{
                            "x" : [0.0, 1.0, 1000.0, 15.999, 1400.0, 15.999, 2600.0, 1.0, 3000.0, 1.0, 4000.0, 16.0],
                            "t" : 2,
                            "m" : 8,
                            "p" : 2,
                            "l" : true
                        }, {
                            "x" : [0.0, 1.0, 100.0, 2.0, 900.0, 7.0, 1000.0, 7.99902, 1100.0, 7.0, 1900.0, 1.0, 2000.0, 1.0, 2100.0, 2.0, 3900.0, 17.0, 4000.0, 18.0, 4100.0, 17.0, 4900.0, 13.0, 5000.0, 12.0, 5100.0, 13.0, 6900.0, 29.0, 7000.0, 30.0, 7100.0, 29.0, 7900.0, 23.0, 8000.0, 22.0, 8100.00049, 23.0, 8900.0, 29.0, 9000.0, 30.0, 9100.0, 29.0, 10800.0, 15.0, 10900.0, 14.0, 11000.0, 15.0, 13500.0, 15.0, 13600.0, 14.0, 13700.0, 15.0, 14400.0, 20.0, 14500.0, 21.0, 14600.0, 21.0, 15900.0, 2.0, 16000.0, 1.0],
                            "t" : 3,
                            "m" : 8,
                            "p" : 2,
                            "l" : true
                        }
                    ],
                    "dt" : [{
                            "t" : 4,
                            "m" : 8,
                            "p" : 2,
                            "d" : 1
                        }
                    ]
                }
            },
            "l" : 16000.0,
            "ec" : 5,
            "w" : 141.0,
            "h" : 125.0,
            "e" : [{
                    "x" : 70.0,
                    "y" : 62.0,
                    "w" : 141.0,
                    "h" : 125.0,
                    "s" : "baseview/gdi/buildings/CnstrYrd/CnstrYrd_base.png",
                    "f" : 0,
                    "t" : 1
                }, {
                    "x" : 70.0,
                    "y" : 62.0,
                    "w" : 141.0,
                    "h" : 125.0,
                    "s" : "baseview/gdi/buildings/CnstrYrd/CnstrYrd_base_mo.png",
                    "f" : 0,
                    "t" : 1
                }, {
                    "x" : 77.0,
                    "y" : 40.0,
                    "w" : 56.0,
                    "h" : 38.0,
                    "s" : "baseview/gdi/buildings/CnstrYrd/CnstrYrd_anim.png",
                    "f" : 16,
                    "t" : 1
                }, {
                    "x" : 86.0,
                    "y" : 14.0,
                    "w" : 50.0,
                    "h" : 44.0,
                    "s" : "baseview/gdi/buildings/CnstrYrd/CnstrYrd_radar_anim.png",
                    "f" : 30,
                    "t" : 1
                }, {
                    "x" : 86.0,
                    "y" : 14.0,
                    "w" : 50.0,
                    "h" : 44.0,
                    "s" : "baseview/gdi/buildings/CnstrYrd/CnstrYrd_radar_anim_mo.png",
                    "f" : 30,
                    "t" : 1
                }
            ],
            "s" : null,
            "px" : 133.0,
            "py" : 117.0,
            "he" : [1, 4],
            "lo" : {}

        },

Sticking with the construction yard again, since that's where we started this all.

Would it be possible for you to write a userscript that has the fully animated CY inside a window? Nothing fancy, no resizing, nothing generic so it can more easily be applied to other tech objects, just very specific code (a hack so to speak) ONLY for this constructions yard to appear fully animated on a canvas.

I understand the way you do it in the game with layers and whatnot (Clientlib.Draw...), so the only possible way to do this using conventional qooxdoo api would be to keep adding the images on a canvas, and set different "left: top: bottom: right:" values based on "w" and "h". However, since they are PNG files that should be a problem.

What I'm most interested in seeing is the function you write to animate "baseview/gdi/buildings/CnstrYrd/CnstrYrd_radar_anim.png" using the interpolation values provided in "x" where "t" = 3 - if I understood things right the first time around, "t" means that is the effect information for the third "e", which is CnstrYrd_radar_anim.png since "e" is 0 based.

Do you think you can do that, Topper? If you're able to give me something specific for the construction yard, more specifically an animated imaged based off the "x" values, I'm confident I can create something that the entire community can use which will be much more robust and not require so much of your time Smile

The interpolation is quite easy. Just mesure the time the effect is already running. The "x" Array is structured like this [value, time, value, time, value, time, ...]. Therefore just search the closest time in the "x" array to your running time and interpolate between this entry and the one after.

Oh, I understand the structure of it entirely due to my work with xaml (EasingDoubleKeyFrame, etc.). However, what I do not know is how to animate something using qooxdoo framework, which is why I asked if you could write a userscript for the construction yard. Considering it only has 2 elements to animate, I figured it would be the easiest for you to hack out quickly. Writing a userscript for that would answer literally all my questions.
03-07-2013 06:03 PM
 Search   Quote 
Topper42 Offline
Developer
***

Posts: 248
Joined: Dec 2011
Post: #34
RE: API User Wishes
(03-07-2013 06:03 PM)Chiantii Wrote:  Oh, I understand the structure of it entirely due to my work with xaml (EasingDoubleKeyFrame, etc.). However, what I do not know is how to animate something using qooxdoo framework, which is why I asked if you could write a userscript for the construction yard. Considering it only has 2 elements to animate, I figured it would be the easiest for you to hack out quickly. Writing a userscript for that would answer literally all my questions.

Ok i could imagine two ways:

1. Canvas (i guess best soultion)
Use qx.ui.embed.Canvas and than just draw the images with the canvas.

2. Qooxdoo
Use a qx.ui.container.Composite with qx.ui.layout.Canvas and position your images in there with absolute coordinates.
04-07-2013 08:37 AM
 Search   Quote 
Chiantii Offline
Member
***

Posts: 121
Joined: Feb 2013
Post: #35
RE: API User Wishes
(04-07-2013 08:37 AM)Topper42 Wrote:  
(03-07-2013 06:03 PM)Chiantii Wrote:  Oh, I understand the structure of it entirely due to my work with xaml (EasingDoubleKeyFrame, etc.). However, what I do not know is how to animate something using qooxdoo framework, which is why I asked if you could write a userscript for the construction yard. Considering it only has 2 elements to animate, I figured it would be the easiest for you to hack out quickly. Writing a userscript for that would answer literally all my questions.

Ok i could imagine two ways:

1. Canvas (i guess best soultion)
Use qx.ui.embed.Canvas and than just draw the images with the canvas.

2. Qooxdoo
Use a qx.ui.container.Composite with qx.ui.layout.Canvas and position your images in there with absolute coordinates.

Yeah, stacking the images on top of each other was never going to be an issue (the non animated images). My only question was with regard to the sprite sheets, and I believe you've answered my question?

I guess. Qooxdoo has no API or class to deal with sprite sheets and interpolation values, keyframes, etc.?

Which means, I'm going to have to write my own class to grab each sprite from the image, and continuously foo.setSource(nextFrame) based on the "x" values?

Second, the "l" aka length of the animation is 16000.0.
Code:
        "51" : {
    "a" : {
        "0" : {
            "l" : 16000.0,
                        ...

The second "x" (the one for the radar dish) has interpolation values all the way up to 16000.0:

"x" : [0.0, 1.0, 100.0, 2.0, 900.0, 7.0, 1000.0, 7.99902, 1100.0, 7.0, 1900.0, 1.0, 2000.0, 1.0, 2100.0, 2.0, 3900.0, 17.0, 4000.0, 18.0, 4100.0, 17.0, 4900.0, 13.0, 5000.0, 12.0, 5100.0, 13.0, 6900.0, 29.0, 7000.0, 30.0, 7100.0, 29.0, 7900.0, 23.0, 8000.0, 22.0, 8100.00049, 23.0, 8900.0, 29.0, 9000.0, 30.0, 9100.0, 29.0, 10800.0, 15.0, 10900.0, 14.0, 11000.0, 15.0, 13500.0, 15.0, 13600.0, 14.0, 13700.0, 15.0, 14400.0, 20.0, 14500.0, 21.0, 14600.0, 21.0, 15900.0, 2.0, 16000.0, 1.0],

However, the first "x", the one that has values for those spinning circles, only goes up to 4000.0.

"x" : [0.0, 1.0, 1000.0, 15.999, 1400.0, 15.999, 2600.0, 1.0, 3000.0, 1.0, 4000.0, 16.0],

How do you guys handle this? Do you take the "l" value into account at all? Or since it's a looping animation, do you ignore it and just parse the "x" values individually?
(This post was last modified: 04-07-2013 10:01 PM by Chiantii.)
04-07-2013 09:42 PM
 Search   Quote 
Topper42 Offline
Developer
***

Posts: 248
Joined: Dec 2011
Post: #36
RE: API User Wishes
(04-07-2013 09:42 PM)Chiantii Wrote:  
(04-07-2013 08:37 AM)Topper42 Wrote:  
(03-07-2013 06:03 PM)Chiantii Wrote:  Oh, I understand the structure of it entirely due to my work with xaml (EasingDoubleKeyFrame, etc.). However, what I do not know is how to animate something using qooxdoo framework, which is why I asked if you could write a userscript for the construction yard. Considering it only has 2 elements to animate, I figured it would be the easiest for you to hack out quickly. Writing a userscript for that would answer literally all my questions.

Ok i could imagine two ways:

1. Canvas (i guess best soultion)
Use qx.ui.embed.Canvas and than just draw the images with the canvas.

2. Qooxdoo
Use a qx.ui.container.Composite with qx.ui.layout.Canvas and position your images in there with absolute coordinates.

Yeah, stacking the images on top of each other was never going to be an issue (the non animated images). My only question was with regard to the sprite sheets, and I believe you've answered my question?

I guess. Qooxdoo has no API or class to deal with sprite sheets and interpolation values, keyframes, etc.?

Which means, I'm going to have to write my own class to grab each sprite from the image, and continuously foo.setSource(nextFrame) based on the "x" values?

Second, the "l" aka length of the animation is 16000.0.
Code:
        "51" : {
    "a" : {
        "0" : {
            "l" : 16000.0,
                        ...

The second "x" (the one for the radar dish) has interpolation values all the way up to 16000.0:

"x" : [0.0, 1.0, 100.0, 2.0, 900.0, 7.0, 1000.0, 7.99902, 1100.0, 7.0, 1900.0, 1.0, 2000.0, 1.0, 2100.0, 2.0, 3900.0, 17.0, 4000.0, 18.0, 4100.0, 17.0, 4900.0, 13.0, 5000.0, 12.0, 5100.0, 13.0, 6900.0, 29.0, 7000.0, 30.0, 7100.0, 29.0, 7900.0, 23.0, 8000.0, 22.0, 8100.00049, 23.0, 8900.0, 29.0, 9000.0, 30.0, 9100.0, 29.0, 10800.0, 15.0, 10900.0, 14.0, 11000.0, 15.0, 13500.0, 15.0, 13600.0, 14.0, 13700.0, 15.0, 14400.0, 20.0, 14500.0, 21.0, 14600.0, 21.0, 15900.0, 2.0, 16000.0, 1.0],

However, the first "x", the one that has values for those spinning circles, only goes up to 4000.0.

"x" : [0.0, 1.0, 1000.0, 15.999, 1400.0, 15.999, 2600.0, 1.0, 3000.0, 1.0, 4000.0, 16.0],

How do you guys handle this? Do you take the "l" value into account at all? Or since it's a looping animation, do you ignore it and just parse the "x" values individually?

Yes qooxdoo does not support sprite sheets as far as i know.

The length is used to modulo the running time for looping.
05-07-2013 08:21 AM
 Search   Quote 
mkmorrison04 Offline
Junior Member
**

Posts: 1
Joined: Aug 2014
Post: #37
RE: API User Wishes
Is there a way I can customize the forgotten base unit and/or building colors from yellow to something else?

Looking at the same base color for months gets old. Color customization would be interesting, like my mammoth needs a new paint job..

Thank you.
26-08-2014 06:28 PM
 Search   Quote 
FantomFs Offline
Member
***

Posts: 78
Joined: Sep 2013
Post: #38
RE: API User Wishes
Prevent of sending from server to another player all personal info, like army and may be other. For example, if accumulated resources can be viewed, it also should be blocked.

I hate that now via CnCOpt army of another players can be viewed.
15-07-2015 07:18 AM
 Search   Quote 
member-stats_de Offline
Junior Member
**

Posts: 46
Joined: Feb 2015
Post: #39
RE: API User Wishes
(17-06-2013 02:40 AM)Nando28R Wrote:  High camp/outpost indicator

It can be like a game of where's wally finding high level camps/ outposts
Be good if a script had ability to enter what level and higher wanted and they would glow/flash same as they do when mouse hovers over them.

Will assist visually to spot the camps want to attack

MeSt <- have this function includet
14-04-2016 01:02 PM
 Search   Quote 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)