Forum Discussion
o0netquik0o
3 years agoSeasoned Rookie
ok. While fixing bugs in CityMoveInfoExtend script i took a look in the code it uses to calculate bases in range and waves. It uses get_MaxAttackDistance() but scan from min max of 10 (like last wavy does). But there is an interestind difference in calculating waves. CityMoveInfoExtend uses this code and add two different chances "n waves" or "max n waves"
While wavy use this code
Now a part from "max" chance the real difference is that if we have 20 bases for example wavy considers 2 waves CityMoveInfoExtend one. (this could be the only problems for waves in wavy)
Another difference between two scripts is that while wavy check against a value that is "<" of the maxdistance CityMoveInfoExtend check for "<=", so wavy accepts bases at exact max distance.
Now i modified both script codes in this way:
they scan from a ceiled value of max distance (11) and check every found base distance against maxdistance (get_MaxAttackDistance() = 10.5 ) to populate bases within range, BUT they also check that distance against floored maxdistance (10) and use this count to generate waves number. Both codes do the same now and give same result apart from tens number of bases (and this should be tested to understand). I modified base count so it show now "number of bases that can be attacked(number of bases that can attack)"
if anyone want to help me test both scripts please tell
I will publish new codes for both tomorrow in testing branch
testing against 0.5.8 wavy code and reverted fix code (0.5.5) should give some hints
// calculate waves
//Bis 20 Basen -- 1 Angriff
//21 - 25 -- max 2 Angriffe
//25 - 30 -- 2 Angriffe
//31 - 35 -- max. 3 Angriffe
//35 - 40 -- 3 Angriffe
//ab 41 Basen in Range bis zu 4 Angriffe ab 45 Basen in Range 4 Angriffe...
var waves = '';
if (countw <= 20) {
waves = ' - 1 wave';
} else if (countw <= 25) {
waves = ' - max 2 waves';
} else if (countw <= 30) {
waves = ' - 2 waves';
} else if (countw <= 35) {
waves = ' - max 3 waves';
} else if (countw <= 40) {
waves = ' - 3 waves';
} else if (countw <= 44) {
waves = ' - max 4 waves';
} else if (countw <= 50) {
waves = ' - 4 waves';
} else {
waves = ' - are u crazy???';
}
While wavy use this code
getNumberOfWaves: function (baseCount) {
return Math.max(1, Math.min(5, Math.floor(baseCount / 10)));
}
Now a part from "max" chance the real difference is that if we have 20 bases for example wavy considers 2 waves CityMoveInfoExtend one. (this could be the only problems for waves in wavy)
Another difference between two scripts is that while wavy check against a value that is "<" of the maxdistance CityMoveInfoExtend check for "<=", so wavy accepts bases at exact max distance.
Now i modified both script codes in this way:
they scan from a ceiled value of max distance (11) and check every found base distance against maxdistance (get_MaxAttackDistance() = 10.5 ) to populate bases within range, BUT they also check that distance against floored maxdistance (10) and use this count to generate waves number. Both codes do the same now and give same result apart from tens number of bases (and this should be tested to understand). I modified base count so it show now "number of bases that can be attacked(number of bases that can attack)"
if anyone want to help me test both scripts please tell
I will publish new codes for both tomorrow in testing branch
testing against 0.5.8 wavy code and reverted fix code (0.5.5) should give some hints
About Tiberium Alliances Technical Issues
Having problems running the game or a script? Get help with Command and Conquer: Tiberium Alliances with the community!
1,433 PostsLatest Activity: 5 hours agoRelated Posts
Recent Discussions
- 5 hours ago
- 18 hours ago
- 4 days ago
- 6 days ago