Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Technology start tweak. Need review #720

Merged
merged 2 commits into from Apr 5, 2020
Merged

Conversation

vaut
Copy link
Contributor

@vaut vaut commented Mar 23, 2020

reopening #682 I apologize for the inconvenience, I mistakenly made the last pull from the master, which caused problems.

The essence of the problem:
When starting in different modes, research are strongly shifted relative to each other. This makes it impossible to create balance in principle. That is good in one mode, it will be broken in another.

My decision:
Determine the minimum opening time for all research and issue all technologies open until a certain time.

timeBaseTech = 4.5*60;	
timeAdvancedBaseTech = 7.9*60;
timeT2= 17*60;
timeT3= 25*60;

The disadvantages of this approach:

  • minimum time hardcoding
  • Incomplete research are losing progress.

For improvement, I do not have enough API to change the time of research. Also, I did not find a way to determine the total time needed to complete the research.

Bot that calculates research time: https://gist.github.com/vaut/4b1747db286b2574f8e4b0d7bfa56a20
Research table https://docs.google.com/spreadsheets/d/1lQ_SqX8dqTsJVD0t61y--klIsKf0zUbP2N5jniu-BIs/edit?usp=sharing add start time and full name resarch

@vaut vaut force-pushed the start_tech branch 2 times, most recently from b8358db to 0d7154f Compare March 23, 2020 14:04
@KJeff01 KJeff01 added this to the 3.3.1 milestone Mar 27, 2020
@KJeff01
Copy link
Member

KJeff01 commented Mar 27, 2020

Remember to squash smaller changes into one commit again.

I'm ok with trying this out for the next release.

Using the bot, I determined the minimum time to complete the research and put it in allRes
The number of start-up technologies issued has replaced the time by which these technologies are available.

timeBaseTech = 4.5 * 60;
timeAdvancedBaseTech = 7.9 * 60;
timeT2 = 17 * 60;
timeT3 = 25 * 60;
completeResearch(tech[i], c);
}
}
for ( var tech in allRes)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove extra space before var

{
if (allRes[tech] <= time)
{
completeResearch (tech, playnum);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra space before left parenthesis.

enableResearch(tech[i], c);
}
}
var allRes= {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a space before the equals sign.

"R-Defense-Rail3": 4058,
"R-Defense-WallTower-Rail3": 4124,
"R-Defense-MassDriver": 4664,
"R-Vehicle-Body14": 4734
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a semicolon after right curly brace.

else if (techLevel == 3)
{
completeResearchOnTime(timeT3, playnum);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this empty line.

@KJeff01
Copy link
Member

KJeff01 commented Apr 4, 2020

Will merge after you fix the small formatting issues.

@KJeff01 KJeff01 merged commit f7f33be into Warzone2100:master Apr 5, 2020
maxsupermanhd added a commit to maxsupermanhd/warzone2100 that referenced this pull request Apr 5, 2020
@vaut vaut mentioned this pull request Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants