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

D2k build and charge times and game speed #18051

Open
2 of 10 tasks
penev92 opened this issue May 8, 2020 · 2 comments
Open
2 of 10 tasks

D2k build and charge times and game speed #18051

penev92 opened this issue May 8, 2020 · 2 comments

Comments

@penev92
Copy link
Member

penev92 commented May 8, 2020

It has recently come up on Discord that our build- and charge-times may not be true to the original game's times.
After some testing with Dune 2000's in-game mission timer (details in that same discussion) we agreed to set a baseline for the game speeds where our Normal speed would match 2x the "normal" speed (as defined by the in-game clock) of the original game - link to Discord.
People who want to play on the original's Normal speed can play on our Slowest speed, which happens to be half the Normal speed, so should match the original perfectly.

With that relation set, we can now tweak our unit/building/upgrade build times, ability/cloak/support power charge times, weapon reload times, projectile and unit movement speeds to exactly match the original.

Important things to note:

  • With some testing in TibEd it was established that the build time formula is
    900/x = build_time_in_seconds, where x can be directly taken from TibEd:
    image
    (Explanation also here - WW games run at 15 ticks per second so that's 900 ticks in a minute).
    So in ORA the build times would be simply need to be transfered from TibEd using 25*900/x.
    Edit: Final formula used is (900*25)/(2*<actor_build_factor_in_TibEd>) = <openRA_ticks>, or 11250/<BuildSpeed> = <openRA_ticks>.
  • All faction variants of all actors have the same build coefficient according to TibEd.
  • The "build speed" for building upgrades is hidden behind the so called Unknown.Long48 property in TibEd. It uses the same formula as actor production.
  • Build time increases x2 when the player is at Low power and x3 when on Critical. Low is 51%-100% and Critical is 0%-50%, as in OpenRA.
  • Build time seems to drop to 2/3 on 2 production structures and 1/2 on 3 production structures. More than 3 production structures apparently don't give further bonuses. Units and buildings benefit from this; Upgrades don't.
  • Support powers are based on actors that can be found in the Units list in TibEd and their charge times follow the same rules as unit production times.

Adding a tracking list of things that need to be fixed here:

  • Adjust unit, building and upgrade build times to match the original. [Adjust D2k actor build times #18120]
  • Adjust multiple production structures speedup coefficients. [Adjust D2k actor build times #18120]
  • Adjust Low and Critical power production slowdown coefficient.
  • Adjust Saboteur cloak charge time. [Added manual Saboteur cloaking #17823]
  • Adjust Support power charge times.
  • Adjust cloaked units' recloak delay.
  • Adjust unit movement speed.
  • Adjust unit rate of fire.
  • Adjust projectile travel speed.
  • Adjust mission timers and timed triggers (?)
@penev92
Copy link
Member Author

penev92 commented May 16, 2020

When I started "fixing" the build speeds I found trace references in the rules and eventually tracked down the PRs responsible for the current values - #9453 and the related #9106.
Since those provided little-to-no explanation of how and why they did things (and people don't seem to remember), this made me hesitant to completely throw away the work that was done 5 years ago and redo it again, but I am fairly confident in the approach this time (as it has been discussed on Discord multiple times).
This is probably a good time to ping @reaperrr since I can't get in touch with him on neither Discord nor IRC.

With that in mind I am creating these "Documentation" issues to try and document as thoroughly as possible the decisions that are being made and how and why changes are happening to D2k, so if anyone needs to check in some years it's all here.

So remembering all the relevant information from the original post, here are the raw values from TibEd for future reference:

Buildings

Actor Build coefficient Build time Ticks in OpenRA Time in OpenRA*
Concrete 180 5s 62.5 (62) 3s
Big concrete 120 7.5s 93.75 (94) 4s
ConYard 0 - 48s
Wind Trap 54 16.67s 208.33 (208) 9s
Barracks 42 21.43s 267.86 (268) 11s
Refinery 18 50s 625 25s
Silo 72 12.5s 156.25 (156) 7s
Light Factory 35 25.7s 321.42 (321) 13s
Heavy Factory 15 60s 750 30s
Outpost 36 25s 312.5 (312) 13s
Star port 18 50s 625 25s
Wall 180 5s 62.5 (62) 3s
Gun Turret 42 21.43s 267.86 (268) 11s
Missile Turret 36 25s 312.5 (312) 13s
Repair pad 30 30s 375 15s
High-tech Factory 24 37.5s 468.75 (468) 19s
Research Center 36 25s 312.5 (312) 13s
Palace 12 75s 937.5 (937) 38s

Upgrades

Actor Build coefficient Build time Ticks in OpenRA Time in OpenRA*
ConYard 18 50s 625 25s
Barracks 54 16.67s 208.33 (208) 9s
Light Factory 42 21.43s 267.86 (268) 11s
Heavy Factory 24 37.5s 468.75 (468) 19s
High-tech Factory 12 75s 937.5 (937) 38s

Units

Actor Build coefficient Build time Ticks in OpenRA Time in OpenRA*
Carryall 15 60s 750 30s
Light infantry 180 5s 62.5 (62) 3s
Trooper 132 6.81s 85.2 (85) 4s
Engineer 90 10s 125 5s
Thumper 90 10s 125 5s
Grenadier 120 7.5s 93.75 (94) 4s
Sardaukar 120 7.5s 93.75 (94) 4s
Sardaukar (MP-only) 70 12.86s 160.71 (160) 7s
MCV 15 60s 750 30s
Harvester 18 50s 625 25s
Trike 50 18s 225 9s
Raider 50 18s 225 9s
Raider (stealth) 50 18s 225 9s
Quad 35 25.7s 321.42 (321) 13s
Combat tank 26 34.6s 432.69 (432) 18s
Siege tank 30 30s 375 15s
Missile tank 22 40.9s 511.36 (512) 21s
Sonic tank 20 45s 562.5 (562) 23s
Deviator 20 45s 562.5 (562) 23s
Devastator 18 50s 625 25s

*On Normal speed.

@penev92
Copy link
Member Author

penev92 commented May 16, 2020

Keeping with the double speed idea and the knowledge from the original post that support powers share the timing pipeline with producible actors and using the Dune 2000 in-game clock for timing, we also get:

Support power "Build" coefficient Charge time Ticks in OpenRA Time in OpenRA*
Ornithopter strike 2 7:30 5625 3:45
Death Hand Missile 2 7:30 5625 3:45
Fremen 5 3:00 2250 1:30
Saboteur 5 3:00 2250 1:30
Misc Charge time Ticks in OpenRA Time in OpenRA*
Saboteur cloak charge 1:40 1250 0:50
Saboteur cloak discharge 0:30 375 0:15
Stealth actor recloak 2s 25 1s

*On Normal speed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant