EA Forums - Banner

Update/fix for some scripts need testing

Prev1345678
Hi all!
I'm going to release a new version of CnCTA SoO SCRIPT PACK
https://forums.ea.com/en/commandandconquer/discussion/255376/cncta-soo-script-pack-browser-links-updates/p1

with some scripts updates and new fixes

i need some testing before release for these fixes:

MaelstromTools Dev (Modv1.6 for MCV) 0.1.4.7d
- Gain per Hour fix for buildings that have packages <12 level
https://github.com/netquik/CnCTA-SoO-SCRIPT-PACK/issues/6#issuecomment-766294151

TA_Tiberium_Alliances_Battle_Simulator_V2 20.11.28
- Fix for Sim View with Autorepair (sime stats disappear if autorepair runs after minutes)
https://github.com/netquik/CnCTA-SoO-SCRIPT-PACK/issues/7

TA_Wavy 0.5.6
Distance FIX

you can find these testing script fixes in testing branch
https://github.com/netquik/CnCTA-SoO-SCRIPT-PACK/tree/Testing

Thanks all.
@nefrontheone @iguanaworld

Replies

  • iguanaworld
    463 posts Member
    edited February 3
    · MaelstromTools Dev (Modv1.6 for MCV) 0.1.4.7d
    -Chrome & Firefox-
    One thing I've noticed on the test server...
    I don't have any bases that are generating credits, I only get them by destroying camps, bases and outposts.
    The "Next MCV" window seems to indicate that I already have the required credits (0d0m0s) when you can see that this is not the case, wrong. Although it appears in red indicating that I don't have them yet, fine.
    (It does not calculate correctly because it has no base count, no generation of credits in the bases).
    It also shows that RT availability has been far exceeded, good.
    2u8rtt2ew87c.png

    · TA_Tiberium_Alliances_Battle_Simulator_V2 20.11.28
    -Chrome-
    It's strange, when activated Autorepair, all timers go to 00:00 but first column it's OK.
    As soon as you enter:
    7002q0a7gde4.png
    When rotating the units:
    3cd6x9846cg2.png
    Always testing something
  • · MaelstromTools Dev (Modv1.6 for MCV) 0.1.4.7d
    - Chrome

    It shows me correctly the time until the new MCV.
    All other things seem to be fine.
    0962f9uczdim.png

    The other script is left for the night.
    Not a part of EA / Envision teams - My comments are only mine.
  • Hi and thanks guys

    @iguanaworld for TABS i only tried to fix the problem with autorepair (maelstrom) enabled. you can check against previous version. When autorepair unit runs and you have sim stats opened it is closed. with new version should not the case. I can reproduce the problem you see with 0%.
    for maelstrom the bug fixed is related to upgrade priority in the dedicated tool (it was showing wrong gain per hor for buildings with packages less than 12 level). For the next MCV it's difficult to test it i should replicate with not generating credits bases. I can blind check exactly the calculation but difficult to check that.

    @nefrontheone yes i did not touch that function at all.
  • @iguanaworld to understand what's happening in the code with no generating bases Can you run this code in console e give me values of last 3 variables?
    var player = ClientLib.Data.MainData.GetInstance().get_Player();
    var cw = player.get_Faction();
    var cj = ClientLib.Base.Tech.GetTechIdFromTechNameAndFaction(ClientLib.Base.ETechName.Research_BaseFound, cw);
    var cr = player.get_PlayerResearch();
    var cd = cr.GetResearchItemFomMdbId(cj);
    
    var nextLevelInfo = cd.get_NextLevelInfo_Obj();
                                        var resourcesNeeded = [];
                                        for (var i in nextLevelInfo.rr) {
                                            if (nextLevelInfo.rr[i].t > 0) {
                                                resourcesNeeded[nextLevelInfo.rr[i].t] = nextLevelInfo.rr[i].c;
                                            }
                                        }
    
    var creditsNeeded = resourcesNeeded[ClientLib.Base.EResourceType.Gold];
    var creditGrowthPerHour = (creditsResourceData.Delta + creditsResourceData.ExtraBonusDelta) * 3600;
    
    var playerCredits = player.GetCreditsCount();
    

  • iguanaworld
    463 posts Member
    edited February 3
    Ops... first at all, an error: bdylfhb87rxv.png
    console.log(creditsNeeded, creditGrowthPerHour, playerCredits);
    8000000000000 undefined undefined
    

    Note: Remember I'm not creating credits, at no one base
    Always testing something
  • ops sorry forgot..
    var player = ClientLib.Data.MainData.GetInstance().get_Player();
    var cw = player.get_Faction();
    var cj = ClientLib.Base.Tech.GetTechIdFromTechNameAndFaction(ClientLib.Base.ETechName.Research_BaseFound, cw);
    var cr = player.get_PlayerResearch();
    var cd = cr.GetResearchItemFomMdbId(cj);
    
    var nextLevelInfo = cd.get_NextLevelInfo_Obj();
                                        var resourcesNeeded = [];
                                        for (var i in nextLevelInfo.rr) {
                                            if (nextLevelInfo.rr[i].t > 0) {
                                                resourcesNeeded[nextLevelInfo.rr[i].t] = nextLevelInfo.rr[i].c;
                                            }
                                        }
    
    var creditsNeeded = resourcesNeeded[ClientLib.Base.EResourceType.Gold];
    var creditsResourceData = player.get_Credits();
    var creditGrowthPerHour = (creditsResourceData.Delta + creditsResourceData.ExtraBonusDelta) * 3600;
    var playerCredits = player.GetCreditsCount();
    
  • I think we can check for creditGrowthPerHour (0 or null) and disable timer.
    also what does the extended label says?

    y0cpgex538zc.png
  • nefrontheone
    762 posts Member
    edited February 3
    Console.log(variable, variable, variable)
    dqg30d88urmp.png
    Not a part of EA / Envision teams - My comments are only mine.
  • one day i will adjust that orribile way to show minimize the extended labe.. was too lazy years a go when i modded it :D
  • OK!
    This time:
    h1lbt38ik01t.png
    console.log(creditsNeeded, creditGrowthPerHour, playerCredits);
    8000000000000 0 3082123302508.131
    
    Always testing something
  • ok 0 creditGrowthPerHour... the extend label? wait but you are @nefrontheone :D ok anyway
  • iguanaworld
    463 posts Member
    edited February 3
    You should add a check that the generation of credits is greater than zero. If the generation is zero then show a message like "Not calculable" or similar.
    Always testing something
  • "The extended label?"
    What's the extended label. :-?
    Always testing something
  • "The extended label?"
    What's the extended label. :-?

    i posted a screenshot if you click on minimize in NExt MCV window it expands
  • iguanaworld
    463 posts Member
    edited February 3
    Ops, I hadn't tried the minimize button because last time the window was hidden and you had to help me reappear. Ha ha ha ...
    jy2fsyqed6io.png

    The strange thing is that he says the same when you ask him to expande ...
    3a6y8qxodoz8.png

    And like @nefrontheone said, it works fine on worlds where you do have credit production.
    Always testing something
  • meanwhile try also new version in testing!
  • Working.... but minimize tooltip ... egw9ovmo177i.png
    Always testing something
  • · TA_Tiberium_Alliances_Battle_Simulator_V2 20.11.28
    (Chrome)
    Everything I have tried works as usual, I see it well although you already know that I am a user of the other simulator. O:-)
    Not a part of EA / Envision teams - My comments are only mine.
  • · MaelstromTools Dev (Modv1.6 for MCV) 0.1.4.7d
    -Chrome & Firefox-
    OK (except icon minimize tooltip)

    · TA_Tiberium_Alliances_Battle_Simulator_V2 20.11.28
    -Chrome & Firefox-
    OK

    · Tiberium Alliances Wavy V0.5.6
    -Chrome & Firefox-
    OK

    From my point of view, ready for delivery. O:-)
    Always testing something
  • ok there is a new version in testing with no grow credits fix.
    also for minimize tooltip i coded it as it is because only minimize is available a should fix it with a button.
    i will try and release another version
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!