Git Product home page Git Product logo

wotlk's Introduction

Welcome to the WoW WOTLK Classic simulator! If you have questions or are thinking about contributing, join our discord to chat!

The primary goal of this project is to provide a framework that makes it easy to build a DPS sim for any class/spec, with a polished UI and accurate results. Each community will have ownership / responsibility over their portion of the sim, to ensure accuracy and that their community is represented. By having all the individual sims on the same engine, we can also have a combined 'raid sim' for testing raid compositions.

This project is licensed with MIT license. We request that anyone using this software in their own project to make sure there is a user visible link back to the original project.

Live sims can be found here.

Support our devs via Patreon.

Downloading Sim

Links for latest Sim build:

Then unzip the downloaded file, then open the unzipped file to open the sim in your browser!

Alternatively, you can choose from a specific relase on the Releases page and click the suitable link under "Assets"

Local Dev Installation

This project has dependencies on Go >=1.21, protobuf-compiler and the corresponding Go plugins, and node >= 14.0.

Ubuntu

Do not use apt to install any dependencies, the versions they install are all too old. Script below will curl latest versions and install them.

# Standard Go installation script
curl -O https://dl.google.com/go/go1.21.1.linux-amd64.tar.gz
sudo rm -rf /usr/local/go 
sudo tar -C /usr/local -xzf go1.21.1.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' >> $HOME/.bashrc
echo 'export GOPATH=$HOME/go' >> $HOME/.bashrc
echo 'export PATH=$PATH:$GOPATH/bin' >> $HOME/.bashrc
source $HOME/.bashrc

cd wotlk

# Install protobuf compiler and Go plugins
sudo apt update && sudo apt upgrade
sudo apt install protobuf-compiler
go get -u -v google.golang.org/protobuf
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest

# Install node
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
nvm install 19.8.0

# Install the npm package dependencies using node
npm install

Docker

Alternatively, install Docker and your workflow will look something like this:

git clone https://github.com/wowsims/wotlk.git
cd wotlk

# Build the docker image and install npm dependencies (only need to run these once).
docker build --tag wowsims-wotlk .
docker run --rm -v $(pwd):/wotlk wowsims-wotlk npm install

# Now you can run the commands as shown in the Commands sections, preceding everything with, "docker run --rm -it -p 8080:8080 -v $(pwd):/wotlk wowsims-wotlk".
# For convenience, set this as an environment variable:
WOTLK_CMD="docker run --rm -it -p 8080:8080 -v $(pwd):/wotlk wowsims-wotlk"

# ... do some coding on the sim ...

# Run tests
$(echo $WOTLK_CMD) make test

# ... do some coding on the UI ...

# Host a local site
$(echo $WOTLK_CMD) make host

Windows

If you want to develop on Windows, we recommend setting up a Ubuntu virtual machine (VM) or running Docker using this guide and then following the Ubuntu or Docker instructions, respectively.

Mac OS

  • Docker is available in OS X as well, so in theory similar instructions should work for the Docker method
  • You can also use the Ubuntu setup instructions as above to run natively, with a few modifications:
    • You may need a different Go installer if go1.18.3.linux-amd64.tar.gz is not compatible with your system's architecture; you can do the Go install manually from https://go.dev/doc/install.
    • OS X uses Homebrew instead of apt, so in order to install protobuf-compiler you’ll instead need to run brew install protobuf-c (note the package name is also a little different than in apt). You might need to first update or upgrade brew.
    • The provided install script for Node will not included a precompiled binary for OS X, but it’s smart enough to compile one. Be ready for your CPU to melt on running curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash.

Commands

We use a makefile for our build system. These commands will usually be all you need while developing for this project:

# Installs a pre-commit git hook so that your go code is automatically formatted (if you don't use an IDE that supports that).  If you want to manually format go code you can run make fmt.
# Also installs `air` to reload the dev servers automatically
make setup

# Run all the tests. Currently only the backend sim has tests.
make test

# Update the expected test results. This will need to be run after adding/removing any tests, and also if test results change due to code changes.
make update-tests

# Host a local version of the UI at http://localhost:8080. Visit it by pointing a browser to
# http://localhost:8080/wotlk/YOUR_SPEC_HERE, where YOUR_SPEC_HERE is the directory under ui/ with your custom code.
# Recompiles the entire client before launching using `make dist/wotlk`
make host

# With file-watching so the server auto-restarts and recompiles on Go or TS changes:
WATCH=1 make host

# Delete all generated files (.pb.go and .ts proto files, and dist/)
make clean

# Recompiles the ts only for the given spec (e.g. make host_elemental_shaman)
make host_$spec

# Recompiles the `wowsimwotlk` server binary and runs it, hosting /dist directory at http://localhost:3333/wotlk. 
# This is the fastest way to iterate on core go simulator code so you don't have to wait for client rebuilds.
# To rebuild client for a spec just do 'make $spec' and refresh browser.
make rundevserver

# With file-watching so the server auto-restarts and recompiles on Go or TS changes:
WATCH=1 make rundevserver

# Creates the 'wowsimwotlk' binary that can host the UI and run simulations natively (instead of with wasm).
# Builds the UI and the compiles it into the binary so that you can host the sim as a server instead of wasm on the client.
# It does this by first doing make dist/wotlk and then copying all those files to binary_dist/wotlk and loading all the files in that directory into its binary on compile.
make wowsimwotlk

# Using the --usefs flag will instead of hosting the client built into the binary, it will host whatever code is found in the /dist directory. 
# Use --wasm to host the client with the wasm simulator.
# The server also disables all caching so that refreshes should pickup any changed files in dist/. The client will still call to the server to run simulations so you can iterate more quickly on client changes.
# make dist/wotlk && ./wowsimwotlk --usefs would rebuild the whole client and host it. (you would have had to run `make devserver` to build the wowsimwotlk binary first.)
./wowsimwotlk --usefs

# Generate code for items. Only necessary if you changed the items generator.
make items

Adding a Sim

So you want to make a new sim for your class/spec! The basic steps are as follows:

Create the proto interface between Sim and UI

This project uses Google Protocol Buffers to pass data between the sim and the UI. TLDR; Describe data structures in .proto files, and the tool can generate code in any programming language. It lets us avoid repeating the same code in our Go and Typescript worlds without losing type safety.

For a new sim, make the following changes:

  • Add a new value to the Spec enum in proto/common.proto. NOTE: The name you give to this enum value is not just a name, it is used in our templating system. This guide will refer to this name as $SPEC elsewhere.
  • Add a 'proto/YOUR_CLASS.proto' file if it doesn't already exist and add data messages containing all the class/spec-specific information needed to run your sim.
  • Update the PlayerOptions.spec field in proto/api.proto to include your shiny new message as an option.

That's it! Now when you run make there will be generated .go and .ts code in sim/core/proto and ui/core/proto respectively. If you aren't familiar with protos, take a quick look at them to see what's happening.

Implement the UI

The UI and sim can be done in either order, but it is generally recommended to build the UI first because it can help with debugging. The UI is very generalized and it doesn't take much work to build an entire sim UI using our templating system. To use it:

  • Modify ui/core/proto_utils/utils.ts to include boilerplate for your $SPEC name if it isn't already there.
  • Create a directory ui/$SPEC. So if your Spec enum value was named, elemental_shaman, create a directory, ui/elemental_shaman.
  • Copy+paste from another spec's UI code.
  • Modify all the files for your spec; most of the settings are fairly obvious, if you need anything complex just ask and we can help!
  • Finally, add a rule to the makefile for the new sim site. Just copy from the other site rules already there and change the $SPEC names.

No .html is needed, it will be generated based on ui/index_template.html and the $SPEC name.

When you're ready to try out the site, run make host and navigate to http://localhost:8080/wotlk/$SPEC.

Implement the Sim

This step is where most of the magic happens. A few highlights to start understanding the sim code:

  • sim/wasm/main.go This file is the actual main function, for the .wasm binary used by the UI. You shouldn't ever need to touch this, but just know its here.
  • sim/core/api.go This is where the action starts. This file implements the request/response messages defined in proto/api.proto.
  • sim/core/sim.go Orchestrates everything. Main event loop is in Simulation.RunOnce.
  • sim/core/agent.go An Agent can be thought of as the 'Player', i.e. the person controlling the game. This is the interface you'll be implementing.
  • sim/core/character.go A Character holds all the stats/cooldowns/gear/etc common to any WoW character. Each Agent has a Character that it controls.

Read through the core code and some examples from other classes/specs to get a feel for what's needed. Hopefully sim/core already includes what you need, but most classes have at least 1 unique mechanic so you may need to touch core as well.

Finally, add your new sim to RegisterAll() in sim/register_all.go.

Don't forget to write unit tests! Again, look at existing tests for examples. Run them with make test when you're ready.

Launch the site

When everything is ready for release, modify ui/core/launched_sims.ts and ui/index.html to include the new spec value. This will add the sim to the dropdown menu so anyone can find it from the existing sims. This will also remove the UI warning that the sim is under development. Now tell everyone about your new sim!

Add your spec to the raid sim

Don't touch the raid sim until the individual sim is ready for launch; anything in the raid sim is publicly accessible. To add your new spec to the raid sim, do the following:

  • Add a reference to the individual sim in ui/raid/tsconfig.json. DO NOT FORGET THIS STEP or Typescipt will silently do very bad things.
  • Import the individual sim's css file from ui/raid/index.scss.
  • Update ui/raid/presets.ts to include a constructor factory in the specSimFactories variable and add configurations for new Players in the playerPresets variable.

Deployment

Thanks to the workflow defined in .github/workflows/deploy.yml, pushes to master automatically build and deploy a new site so there's nothing to do here. Sit back and appreciate your new sim!

wotlk's People

Contributors

alexandre-m-silva avatar b-r-a-n avatar catszeid avatar cyberquackgames avatar dbyena avatar enhancedgore avatar gashiraa avatar glandaaalf avatar horatio27 avatar jarveson avatar jimmyt857 avatar kayla-glick avatar kruhlmann avatar lime-green avatar lologarithm avatar merijn avatar mormigil avatar ncberman avatar nerdegghead avatar psiven avatar rosenrusinov avatar tharre avatar thegroxempire avatar thesorm avatar ugurkc avatar vigo2 avatar watcher7 avatar where-fore avatar wumblesnarf avatar zku avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wotlk's Issues

Surplus Limb adds about 200SP to base spell power for ele shaman

Describe the bug
Adding Surplus Limb adds Surplus spell power

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Ele Shaman sim
  2. Scroll over Spell DMG magnifying glass
  3. See base spell power
  4. Click on 'off hand'
  5. Select Surplus Limb
  6. Look again at Spell DMG magnifying glass.
  7. Enjoy 210 extra Spellpower!

Expected behavior
A clear and concise description of what you expected to happen.

Sim Links and Screenshots
If applicable, add links to your sim settings or screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Crash Report 1204729735

Aura with 0 duration
Stack Trace:
goroutine 9 [running]:
runtime/debug.Stack()
/opt/hostedtoolcache/go/1.18.4/x64/src/runtime/debug/stack.go:24 +0x6
github.com/wowsims/wotlk/sim/core.runSim.func1()
/home/runner/work/wotlk/wotlk/sim/core/sim.go:54 +0x10
panic({0x99ca0, 0x2a8ad8})
/opt/hostedtoolcache/go/1.18.4/x64/src/runtime/panic.go:838 +0x29
github.com/wowsims/wotlk/sim/core.(*Aura).Activate(0xb7d8480, 0x24a7880)
/home/runner/work/wotlk/wotlk/sim/core/aura.go:455 +0xe8
github.com/wowsims/wotlk/sim/rogue.(*Rogue).registerDeadlyPoisonSpell.func2(0xb7a1560, 0x24a7880)
/home/runner/work/wotlk/wotlk/sim/rogue/poisons.go:72 +0xc
github.com/wowsims/wotlk/sim/core.NewDot.func1(0xb7a1560, 0x24a7880)
/home/runner/work/wotlk/wotlk/sim/core/dot.go:147 +0x1f
github.com/wowsims/wotlk/sim/core.(*Aura).Activate(0xb7a1560, 0x24a7880)
/home/runner/work/wotlk/wotlk/sim/core/aura.go:518 +0xd6
github.com/wowsims/wotlk/sim/core.(*Dot).Apply(0xb773ab0, 0x24a7880)
/home/runner/work/wotlk/wotlk/sim/core/dot.go:70 +0x23
github.com/wowsims/wotlk/sim/rogue.(*Rogue).registerDeadlyPoisonSpell.func1(0x24a7880, 0xb7a1440, 0xb7f5550)
/home/runner/work/wotlk/wotlk/sim/rogue/poisons.go:52 +0x6a
github.com/wowsims/wotlk/sim/core.(*SpellEffect).finalize(0xb7f5550, 0x24a7880, 0xb7a1440)
/home/runner/work/wotlk/wotlk/sim/core/spell_effect.go:250 +0xa8
github.com/wowsims/wotlk/sim/core.ApplyEffectFuncDirectDamage.func1(0x24a7880, 0xb790600, 0xb7a1440)
/home/runner/work/wotlk/wotlk/sim/core/spell.go:312 +0x1e
github.com/wowsims/wotlk/sim/core.(*Spell).applyEffects(0xb7a1440, 0x24a7880, 0xb790600)
/home/runner/work/wotlk/wotlk/sim/core/spell.go:288 +0x1b
github.com/wowsims/wotlk/sim/core.(*Spell).makeCastFuncWait.func1(0x24a7880, 0xb790600)
/home/runner/work/wotlk/wotlk/sim/core/cast.go:263 +0x12
github.com/wowsims/wotlk/sim/core.(*Spell).makeCastFuncWait.func3(0x24a7880, 0xb790600)
/home/runner/work/wotlk/wotlk/sim/core/cast.go:294 +0x49
github.com/wowsims/wotlk/sim/core.(*Spell).wrapCastFuncResources.func1(0x24a7880, 0xb790600)
/home/runner/work/wotlk/wotlk/sim/core/cast.go:118 +0x4
github.com/wowsims/wotlk/sim/core.(*Spell).Cast(...)
/home/runner/work/wotlk/wotlk/sim/core/spell.go:267
github.com/wowsims/wotlk/sim/rogue.(*Rogue).applyDeadlyPoison.func2(0xb7d5d40, 0x24a7880, 0xb7d8240, 0xb7d6a50)
/home/runner/work/wotlk/wotlk/sim/rogue/poisons.go:130 +0x1b
github.com/wowsims/wotlk/sim/core.(*auraTracker).OnSpellHitDealt(...)
/home/runner/work/wotlk/wotlk/sim/core/aura.go:669
github.com/wowsims/wotlk/sim/core.(*SpellEffect).finalize(0xb7d6a50, 0x24a7880, 0xb7d8240)
/home/runner/work/wotlk/wotlk/sim/core/spell_effect.go:252 +0xf2
github.com/wowsims/wotlk/sim/core.ApplyEffectFuncDirectDamage.func2(0x24a7880, 0xb790600, 0xb7d8240)
/home/runner/work/wotlk/wotlk/sim/core/spell.go:323 +0x26
github.com/wowsims/wotlk/sim/core.(*Spell).applyEffects(0xb7d8240, 0x24a7880, 0xb790600)
/home/runner/work/wotlk/wotlk/sim/core/spell.go:288 +0x1b
github.com/wowsims/wotlk/sim/core.(*Spell).makeCastFuncWait.func1(0x24a7880, 0xb790600)
/home/runner/work/wotlk/wotlk/sim/core/cast.go:263 +0x12
github.com/wowsims/wotlk/sim/core.(*Spell).makeCastFuncWait.func3(0x24a7880, 0xb790600)
/home/runner/work/wotlk/wotlk/sim/core/cast.go:294 +0x49
github.com/wowsims/wotlk/sim/core.(*Spell).wrapCastFuncResources.func1(0x24a7880, 0xb790600)
/home/runner/work/wotlk/wotlk/sim/core/cast.go:118 +0x4
github.com/wowsims/wotlk/sim/core.(*Spell).Cast(...)
/home/runner/work/wotlk/wotlk/sim/core/spell.go:267
github.com/wowsims/wotlk/sim/core.(*AutoAttacks).TrySwingOH(0xb7cadd8, 0x24a7880, 0xb790600)
/home/runner/work/wotlk/wotlk/sim/core/attack.go:496 +0x2b
github.com/wowsims/wotlk/sim/core.(*AutoAttacks).SwingMelee(0xb7cadd8, 0x24a7880, 0xb790600)
/home/runner/work/wotlk/wotlk/sim/core/attack.go:444 +0x3
github.com/wowsims/wotlk/sim/core.(*AutoAttacks).resetAutoSwing.func1(0x24a7880)
/home/runner/work/wotlk/wotlk/sim/core/attack.go:352 +0x6
github.com/wowsims/wotlk/sim/core.(*Simulation).runOnce(0x24a7880)
/home/runner/work/wotlk/wotlk/sim/core/sim.go:292 +0x14
github.com/wowsims/wotlk/sim/core.(*Simulation).run(0x24a7880)
/home/runner/work/wotlk/wotlk/sim/core/sim.go:230 +0x19
github.com/wowsims/wotlk/sim/core.runSim({{{}, {}, {}, 0x0}, 0x0, {0x0, 0x0, 0x0}, 0xb7738f0, 0xb773a40, ...}, ...)
/home/runner/work/wotlk/wotlk/sim/core/sim.go:108 +0x35
github.com/wowsims/wotlk/sim/core.(*Simulation).runPresims(0x24a77a0, {{{}, {}, {}, 0x24810a8}, 0x0, {0x0, 0x0, 0x0}, 0xb773340, ...})
/home/runner/work/wotlk/wotlk/sim/core/presim.go:93 +0x2f
github.com/wowsims/wotlk/sim/core.runSim({{{}, {}, {}, 0x24810a8}, 0x0, {0x0, 0x0, 0x0}, 0xb773340, 0xb773490, ...}, ...)
/home/runner/work/wotlk/wotlk/sim/core/sim.go:79 +0xb
github.com/wowsims/wotlk/sim/core.RunSim({{{}, {}, {}, 0x24810a8}, 0x0, {0x0, 0x0, 0x0}, 0xb773340, 0xb773490, ...}, ...)
/home/runner/work/wotlk/wotlk/sim/core/sim.go:40 +0x2
created by github.com/wowsims/wotlk/sim/core.RunRaidSimAsync
/home/runner/work/wotlk/wotlk/sim/core/api.go:74 +0xa

Link:
https://wowsims.github.io/wotlk/rogue/#eJztUjFIQlEUfff+h/6eJa9oeDn9/iRB8PzyhyZ/rS1CW5MNOTVEtNQkTSZRQ0u1VCYaidEURTQZqA1FBIEiEUnhGDS0FPT+t73FoaEzXM65nHvO8B4L6igxjvOYAmgDTDABBqYBDgEGSKhFV8AXn5tZml3QgftCR8A4Lx2guH1E03daxq1zZJS/FJD18c0sioraa18XwHR+v4eiUdIU22iogyayAC/WUVTrmglEif0cis+OYPw6iya9OUOi/Gt5FK9FVGxVXX40gfn5+x26RsozebdxPefO46xrulT23RO38qnQYZRXVFwv14xAmEmI0wQdqSL5R1ewTHUQOB1kugAOYTA09VNIBsJS2lFLenNUWrYl7YhSMmrLiG1ZUSUUs+zIM5A20Dfw7wBpADEzWo8XnEo6/Z2KQWdoZ9tFLTac9PAQs1poTAn8sw+56HQjJVW7+iVnsis9Lsa8mS474z8LJwHfsjVfSA==

RNG Seed: 99362016

Metagems

Implement new metagem effects.

Survivalist Stamina bonus works wrong and Hunter vs Wild doesnt work properly because of it.

Describe the bug
If u put points into Survivalist u get 2 % stamina per point while the max is 10%. You can see in the stat showcase on the left side that your Health increases indeed but not your stamina. The talent increases your stamina not your health. Because of that Hunter vs Wild doesnt count the bonus stamina from Survivalist.

To Reproduce
Steps to reproduce the behavior:

  1. Put 1 point in Survivalist.
  2. Check your Stamina.
  3. Put 1 point in Hunter vs Wild
  4. Compare the Rap u get to your stamina.

Expected behavior
How it should work is that you get 10% more Stamina from Survivalist and Hunter vs Wild gives you 10% Rap and also you and your pet 10% Ap per point, based on the Stamina u have.

Sim Links and Screenshots
0 Points in Survivalist : https://gyazo.com/6572a6f77f80cbc4014dfc89de369f63
5 Points in Survivalist : https://gyazo.com/5254b778959874eef5b12addb44cfb3d
0 Points in Hunter vs Wild : https://gyazo.com/c998f5876b52ba9f585328b4b165a910
1 Point in Hunter vs Wild : https://gyazo.com/d4198a0d1f89d6d17014bec5701831a4

Desktop:

  • Windows 11 64 bit
  • Chrome

Buffs

Buff stacking is different (only 1 buff / category) and the buffs themselves are different of course.

Item tooltips mouse hover area too large

Describe the bug
When you hover your mouse over an item it should show a tooltip, however if you hover your mouse nowhere near a item it still shows a tooltip.

To Reproduce
Steps to reproduce the behavior:
Go to website https://wowsims.github.io/wotlk/shadow_priest/
Hover mouse in the middle of the screen
Mouse should have item tooltip show up

Expected behavior
Mouse should only open a tooltip when hovered over an item and not when anywhere else on the screen

Desktop (please complete the following information):
Windows
Chrome

Add core feature for dot rollover

Several classes have mechanics that 'Refresh' the duration of a dot.

This keeps the snapshotted crit / personal % dmg increases, but recalculates the sp/haste on each refresh.

Also need a feature to "Reapply" a dot that will recalculate all snapshotted values. For now this can be accomplished with a disable and apply fresh.

Dynamic percent stat changes

Several effects give bonus % to a stat and needs to stay updated with current stats.

We should probably just redesign stat dependencies to just always be dynamic instead.

All stat dependencies seem to be a fraction/percent bonus based (based on date of this ticket I have checked all AddStatDep call to verify this) on an input stat applied to output stat. What if we exposed just an input, output, and fractional value to multiply by for all stat dependencies. Allow them to be added/removed dynamically (since we know the formula to apply and un-apply them).

Evaluate performance of this.

We could theoretically separate 'bonus' from 'dep' in that str->str doesn't actually require any dependency checks but str->ap does.

var bonuses = [Len]StatBonuses{}

type StatBonuses struct {
    Bonus float64 // multiplier added to all stat gains from this stat.
    Deps map[Stat]float64 // ratio added to Stat when this stat is changed.
}

Then any time you find a dep for the given stat, you just multiply new / old ratio, then descend to that stat's StatBonuses to check for more deps.

Black background and numbers on Talents are to large

Is your feature request related to a problem? Please describe.
Basically people told me that its hard to see which talent is below this big black background and numbers.

Describe the solution you'd like
I guess just make it smaller

OUT_DIR relying on PHONY targets

The $(OUT_DIR) target in the project makefile relies on several .PHONY targets. This results in large parts of the application being rebuilt when not necessary.

Example: I make a change to ui/detailed_results/timeline.ts and run make host

Make host relies on $(OUT_DIR), which in turn relies on all the class targets (balance_druid, feral_druid etc), all of which are .PHONY targets even though they are not marked as such. This causes make to rebuild every single class component every time i run make host, even when not necessary.

The fix to this is to rely on real targets in $(OUT_DIR) and not .PHONY targets. The easiest way to achieve this might be to make each class target into a directory target, which will not have to be .PHONY.

Ideally these targets could be made generic using the % wildcard in make.

image

Item Effects

Implement special effects for all equippable items.

Consumes

Which consumes do we need to include in the sim? Which TBC consumes stay?

Missing items: [ITEMS]

Initialisation issues

The dps-meter is always going up when launching a sim
If things were perfectly randomized, we could see it sometimes go up, go down, be stable...

This is a hint that there are probably some initialization issues in the sim.

Cleanup assets folder

The assets folder is getting pretty crowded. I propose we move all images; png/svg/jpg to assets/img/ and all fonts to assets/fonts/. I will make a PR for this.

image

The following files will need updates to their references. (output of grep -e 'assets\/.*\.png' -e 'assets\/.*\.svg' -e 'assets\/.*\.jpg' -e 'assets\/.*\.woff2' . -R | grep -v node_modules | grep -v tags | grep -v dist). A total of 62 replacements needs to be made.

./ui/elemental_shaman/_sim.scss:	--theme-background-image: url('/wotlk/assets/elemental_shaman_background.jpg');
./ui/feral_druid/_sim.scss:	--theme-background-image: url('/wotlk/assets/feral_druid_background.jpg');
./ui/retribution_paladin/_sim.scss:	--theme-background-image: url('/wotlk/assets/retribution_paladin.jpg');
./ui/protection_warrior/_sim.scss:	--theme-background-image: url('/wotlk/assets/protection_warrior_background.jpg');
./ui/hunter/_sim.scss:	--theme-background-image: url('/wotlk/assets/hunter_background.jpg');
./ui/smite_priest/_sim.scss:	--theme-background-image: url('/wotlk/assets/smite_priest_background.jpg');
./ui/index.html:            src: url(/wotlk/assets/PlusJakartaSans-Regular.woff2);
./ui/index.html:            src: url(/wotlk/assets/PlusJakartaSans-Bold.woff2);
./ui/index.html:            background-image: url("assets/wotlk.jpg");
./ui/index.html:        <img src="/wotlk/assets/WoW-Simulator-Icon.png" style="height: 75px;">
./ui/index.html:                    <img src="/wotlk/assets/raid_icon.png" class="sim-title-icon">
./ui/index.html:                    <img src="/wotlk/assets/balance_druid_icon.png" class="sim-title-icon">
./ui/index.html:                    <img src="/wotlk/assets/feral_druid_icon.png" class="sim-title-icon">
./ui/index.html:                    <img src="/wotlk/assets/feral_druid_tank_icon.png" class="sim-title-icon">
./ui/index.html:                    <img src="/wotlk/assets/hunter_icon.png" class="sim-title-icon">
./ui/index.html:                    <img src="/wotlk/assets/mage_icon.png" class="sim-title-icon">
./ui/index.html:                    <img src="/wotlk/assets/retribution_icon.png" class="sim-title-icon">
./ui/index.html:                    <img src="/wotlk/assets/protection_paladin_icon.png" class="sim-title-icon">
./ui/index.html:                    <img src="/wotlk/assets/shadow_priest_icon.png" class="sim-title-icon">
./ui/index.html:                    <img src="/wotlk/assets/smite_priest_icon.png" class="sim-title-icon">
./ui/index.html:                    <img src="/wotlk/assets/rogue_icon.png" class="sim-title-icon">
./ui/index.html:                    <img src="/wotlk/assets/elemental_shaman_icon.png" class="sim-title-icon">
./ui/index.html:                    <img src="/wotlk/assets/enhancement_shaman_icon.png" class="sim-title-icon">
./ui/index.html:                    <img src="/wotlk/assets/warlock_icon.png" class="sim-title-icon">
./ui/index.html:                    <img src="/wotlk/assets/warrior_icon.png" class="sim-title-icon">
./ui/index.html:                    <img src="/wotlk/assets/protection_warrior_icon.png" class="sim-title-icon">
./ui/index.html:                    <img src="/wotlk/assets/death_knight_icon.jpg" class="sim-title-icon">
./ui/warlock/_sim.scss:	--theme-background-image: url('/wotlk/assets/warlock_background.jpg');
./ui/enhancement_shaman/_sim.scss:	--theme-background-image: url('/wotlk/assets/enhancement_shaman_background.jpg');
./ui/core/proto_utils/action_id.ts:	[ResourceType.ResourceTypeBloodRune]: '/wotlk/assets/blood_rune.png',
./ui/core/proto_utils/action_id.ts:	[ResourceType.ResourceTypeFrostRune]: '/wotlk/assets/frost_rune.png',
./ui/core/proto_utils/action_id.ts:	[ResourceType.ResourceTypeUnholyRune]: '/wotlk/assets/unholy_rune.png',
./ui/core/proto_utils/action_id.ts:	[ResourceType.ResourceTypeDeathRune]: '/wotlk/assets/death_rune.png',
./ui/core/proto_utils/utils.ts:	[Spec.SpecBalanceDruid]: '/wotlk/assets/balance_druid_icon.png',
./ui/core/proto_utils/utils.ts:	[Spec.SpecElementalShaman]: '/wotlk/assets/elemental_shaman_icon.png',
./ui/core/proto_utils/utils.ts:	[Spec.SpecEnhancementShaman]: '/wotlk/assets/enhancement_shaman_icon.png',
./ui/core/proto_utils/utils.ts:	[Spec.SpecFeralDruid]: '/wotlk/assets/feral_druid_icon.png',
./ui/core/proto_utils/utils.ts:	[Spec.SpecFeralTankDruid]: '/wotlk/assets/feral_druid_tank_icon.png',
./ui/core/proto_utils/utils.ts:	[Spec.SpecHunter]: '/wotlk/assets/hunter_icon.png',
./ui/core/proto_utils/utils.ts:	[Spec.SpecMage]: '/wotlk/assets/mage_icon.png',
./ui/core/proto_utils/utils.ts:	[Spec.SpecRogue]: '/wotlk/assets/rogue_icon.png',
./ui/core/proto_utils/utils.ts:	[Spec.SpecRetributionPaladin]: '/wotlk/assets/retribution_icon.png',
./ui/core/proto_utils/utils.ts:	[Spec.SpecProtectionPaladin]: '/wotlk/assets/protection_paladin_icon.png',
./ui/core/proto_utils/utils.ts:	[Spec.SpecShadowPriest]: '/wotlk/assets/shadow_priest_icon.png',
./ui/core/proto_utils/utils.ts:	[Spec.SpecWarlock]: '/wotlk/assets/warlock_icon.png',
./ui/core/proto_utils/utils.ts:	[Spec.SpecWarrior]: '/wotlk/assets/warrior_icon.png',
./ui/core/proto_utils/utils.ts:	[Spec.SpecProtectionWarrior]: '/wotlk/assets/protection_warrior_icon.png',
./ui/core/proto_utils/utils.ts:	[Spec.SpecSmitePriest]: '/wotlk/assets/smite_priest_icon.png',
./ui/core/proto_utils/utils.ts:export const raidSimIcon: string = '/wotlk/assets/raid_icon.png';
./ui/core/_sim_ui.scss:	mask: url(/wotlk/assets/gauge.svg);
./ui/core/_sim_ui.scss:	-webkit-mask: url(/wotlk/assets/gauge.svg);
./ui/core/_shared.scss:	src: url(/wotlk/assets/PlusJakartaSans-Regular.woff2);
./ui/core/_shared.scss:	src: url(/wotlk/assets/PlusJakartaSans-Bold.woff2);
./ui/core/sim_ui.ts:		// downloadBinary.src = "/wotlk/assets/gauge.svg"
./ui/protection_paladin/_sim.scss:	--theme-background-image: url('/wotlk/assets/prot_paladin.png');
./ui/warrior/_sim.scss:	--theme-background-image: url('/wotlk/assets/warrior_background.jpg');
./ui/shadow_priest/_sim.scss:	--theme-background-image: url('/wotlk/assets/shadow_priest_background.jpg');
./ui/balance_druid/_sim.scss:	--theme-background-image: url('/wotlk/assets/balance_druid_background.jpg');
./ui/rogue/_sim.scss:	--theme-background-image: url('/wotlk/assets/rogue_background.jpg');
./ui/feral_tank_druid/_sim.scss:	--theme-background-image: url('/wotlk/assets/feral_druid_tank_background.jpg');
./ui/mage/_sim.scss:	--theme-background-image: url('/wotlk/assets/mage_background.jpg');
./ui/deathknight/_sim.scss:	--theme-background-image: url('/wotlk/assets/death_knight_background.jpg');

Glyphs

Need to add all the glyphs. In the UI, this will probably go in the Talents tab.

On the proto, we can add a field to Player for each major glyph and each minor glyph, i.e. 6 new fields. They could all have type int32 and hold the item ID for the selected glpyh. Then each class can define a proto enum with all the glyph IDs.

Avg hit and avg cast are the same, this problem is the same for hits and casts.

Describe the bug
Basically you can not see in the detailed results how much ticks something had. It seems like it doesnt count the damage per tick but rather the damage per cast.

To Reproduce
Steps to reproduce the behavior:

  1. Just sim hunter
  2. Check the detailed results
  3. Watch on things like avg cast and Hits

Expected behavior
It should count the ticks properly and show the real damage per avg cast for each dot spell.

Sim Links and Screenshots
https://gyazo.com/c4c5e75ae7f4478dc964c5077d64e329
As u can see its almost like copy paste, it doesnt work properly.

Desktop (please complete the following information):
Windows 11
Chrome

Crash Report 1969809499

runtime error: invalid memory address or nil pointer dereference
Stack Trace:
goroutine 11 [running]:
runtime/debug.Stack()
/opt/hostedtoolcache/go/1.18.3/x64/src/runtime/debug/stack.go:24 +0x6
github.com/wowsims/wotlk/sim/core.runSim.func1()
/home/runner/work/wotlk/wotlk/sim/core/sim.go:53 +0x10
panic({0x97260, 0xae1750})
/opt/hostedtoolcache/go/1.18.3/x64/src/runtime/panic.go:838 +0x29
github.com/wowsims/wotlk/sim/core.(*Aura).IsActive(...)
/home/runner/work/wotlk/wotlk/sim/core/aura.go:129
github.com/wowsims/wotlk/sim/priest.(*Priest).registerSmiteSpell.func1(0x1c9f7a0, 0x797f2b0, 0x796bf40, 0x79e6c60)
/home/runner/work/wotlk/wotlk/sim/priest/smite.go:44 +0x5
github.com/wowsims/wotlk/sim/core.(*SpellEffect).calcDamageSingle(0x796bf40, 0x1c9f7a0, 0x797f2b0, 0x79e6c60)
/home/runner/work/wotlk/wotlk/sim/core/spell_effect.go:183 +0xd
github.com/wowsims/wotlk/sim/core.ApplyEffectFuncDirectDamage.func2(0x1c9f7a0, 0x1c9b600, 0x797f2b0)
/home/runner/work/wotlk/wotlk/sim/core/spell.go:243 +0x25
github.com/wowsims/wotlk/sim/core.(*Spell).applyEffects(0x797f2b0, 0x1c9f7a0, 0x1c9b600)
/home/runner/work/wotlk/wotlk/sim/core/spell.go:209 +0x1a
github.com/wowsims/wotlk/sim/core.(*Spell).makeCastFuncWait.func1(0x1c9f7a0, 0x1c9b600)
/home/runner/work/wotlk/wotlk/sim/core/cast.go:253 +0x12
github.com/wowsims/wotlk/sim/core.(*Spell).makeCastFuncWait.func2(0x1c9f7a0, 0x1c9b600)
/home/runner/work/wotlk/wotlk/sim/core/cast.go:267 +0xd
github.com/wowsims/wotlk/sim/core.(*Spell).makeCastFuncWait.func4(0x1c9f7a0, 0x1c9b600)
/home/runner/work/wotlk/wotlk/sim/core/cast.go:297 +0x2a
github.com/wowsims/wotlk/sim/core.(*Hardcast).OnExpire(...)
/home/runner/work/wotlk/wotlk/sim/core/cast.go:24
github.com/wowsims/wotlk/sim/core.(*Unit).advance(0x7980000, 0x1c9f7a0, 0x61c6cd4a)
/home/runner/work/wotlk/wotlk/sim/core/unit.go:382 +0x10
github.com/wowsims/wotlk/sim/core.(*Character).advance(0x7980000, 0x1c9f7a0, 0x61c6cd4a)
/home/runner/work/wotlk/wotlk/sim/core/character.go:362 +0x4
github.com/wowsims/wotlk/sim/core.(*Simulation).advance(0x1c9f7a0, 0x61c6cd4a)
/home/runner/work/wotlk/wotlk/sim/core/sim.go:330 +0x2f
github.com/wowsims/wotlk/sim/core.(*Simulation).runOnce(0x1c9f7a0)
/home/runner/work/wotlk/wotlk/sim/core/sim.go:279 +0x10
github.com/wowsims/wotlk/sim/core.(*Simulation).run(0x1c9f7a0)
/home/runner/work/wotlk/wotlk/sim/core/sim.go:220 +0x19
github.com/wowsims/wotlk/sim/core.runSim({{{}, {}, {}, 0x1c810a8}, 0x0, {0x0, 0x0, 0x0}, 0x1c61490, 0x78c7aa0, ...}, ...)
/home/runner/work/wotlk/wotlk/sim/core/sim.go:99 +0x25
github.com/wowsims/wotlk/sim/core.RunSim({{{}, {}, {}, 0x1c810a8}, 0x0, {0x0, 0x0, 0x0}, 0x1c61490, 0x78c7aa0, ...}, ...)
/home/runner/work/wotlk/wotlk/sim/core/sim.go:39 +0x2
created by github.com/wowsims/wotlk/sim/core.RunRaidSimAsync
/home/runner/work/wotlk/wotlk/sim/core/api.go:74 +0xa

Request:
eJztUr0vQ1EUf+f0tX299XE9Ek+nehZpIrmvzRtMnlEs/oQamAwiBkxVUaWtNDGI+og0JI0YahPBgEitIiSC+BrEootJiNOPMDJ0MDjn5pdzfuee3znDYa92lrGzpD0Mjp6B3tG+IQW43XMDjPO1OGpTj6A7NmMYfQEm86UYEp+OoXZ+R/z1G2zNI6vmB8R8hFG3ZSmt57vUeDyNuovS0mM1PJxALZIFXaYuidXxDH3KX4HuJIkixfhtAnWZUok0JknydA90F9W+5kzMonY3R3Mu3oApfIckotlCdJIsRTJ/jyPhenGPCGks0kgXdZcek6i48gy6O4vOEMo5rBlx+nIo/VtFbMyhgAUc08AYKqBKHsIZaDGF4Q8IYQSEKUzDT2i0CWGapiGEn1yY/nuQnkDOgzMF0iWdQ9lVtwKrgK0QhEFgVey7IP0+U2ktL7aiT6HrBg28oI7bXMWNQ/1Wc2n3BqsptVCwkw71Ab1dGv7Zwxi2KiJj2/9Bp7syc8jaixg9tDrLhBUEj1vZbuQby0dntQI+AXbAcxA=

Stat Changes

Several stats are fundamentally changed from TBC --> Wrath.

Channeled Spells

In WOTLK there are several cases where channeled spells would want to be broken early (usually to take advantage of a random proc). We should provide a framework way of doing this instead of making people work around it.

Killshot glyphe bugged or Survival APL wrong

Describe the bug
Basically if i change one of my glyphs to killshot it doesnt effect the amount of killshot casted at all. This means that either glyphe is not working or the APL is super scuffed for survival.

To Reproduce
Steps to reproduce the behavior:

  1. Sim without killshot
  2. Check amount casted
  3. Sim with kill
  4. Check amount casted

Expected behavior
The amount of kill shots casted should go up and effect the dps.

Sim Links and Screenshots
Bad to see but this is with Kill shot glyphe : https://gyazo.com/00eb9d882b54614b5774086274d74851
This is without : https://gyazo.com/4698c6b16383384dced914fac926de59

Desktop (please complete the following information):
Windows 11
Chrome

Question:
Is it possible to see the APL somewhere for survival?

Crash Report 934797975

Aura Rune of Razorice already registered!
Stack Trace:
goroutine 7 [running]:
runtime/debug.Stack()
/opt/hostedtoolcache/go/1.18.3/x64/src/runtime/debug/stack.go:24 +0x6
main.computeStats.func1()
/home/runner/work/wotlk/wotlk/sim/wasm/main.go:45 +0x10
panic({0x8ba40, 0x8262270})
/opt/hostedtoolcache/go/1.18.3/x64/src/runtime/panic.go:838 +0x29
github.com/wowsims/wotlk/sim/core.(*auraTracker).registerAura(0x825a400, 0x825a000, {{0x17a100, 0x10}, {0x0, 0x0}, {0xd05f, 0x0, 0x0, 0x0}, ...})
/home/runner/work/wotlk/wotlk/sim/core/aura.go:276 +0x3d
github.com/wowsims/wotlk/sim/core.(*Unit).RegisterAura(...)
/home/runner/work/wotlk/wotlk/sim/core/aura.go:301
github.com/wowsims/wotlk/sim/common/wotlk.init.2.func15({0x27aee0, 0x825a000})
/home/runner/work/wotlk/wotlk/sim/common/wotlk/enchant_effects.go:396 +0x27
github.com/wowsims/wotlk/sim/core.(*Character).applyItemEffects(0x825a000, {0x27aee0, 0x825a000})
/home/runner/work/wotlk/wotlk/sim/core/character.go:199 +0x12
github.com/wowsims/wotlk/sim/core.(*Character).applyAllEffects(0x825a000, {0x27aee0, 0x825a000}, {{{}, {}, {}, 0x0}, 0x0, {0x0, 0x0, ...}, ...}, ...)
/home/runner/work/wotlk/wotlk/sim/core/character.go:163 +0x24
github.com/wowsims/wotlk/sim/core.(*Raid).applyCharacterEffects(0x2119e60, {{{}, {}, {}, 0x0}, 0x0, {0x0, 0x0, 0x0}, {0x822a100, ...}, ...})
/home/runner/work/wotlk/wotlk/sim/core/raid.go:220 +0x48
github.com/wowsims/wotlk/sim/core.(*Environment).initialize(0x823b5f0, {{{}, {}, {}, 0x0}, 0x0, {0x0, 0x0, 0x0}, {0x822a100, ...}, ...}, ...)
/home/runner/work/wotlk/wotlk/sim/core/environment.go:101 +0x14
github.com/wowsims/wotlk/sim/core.NewEnvironment({{{}, {}, {}, 0x0}, 0x0, {0x0, 0x0, 0x0}, {0x822a100, 0x5, ...}, ...}, ...)
/home/runner/work/wotlk/wotlk/sim/core/environment.go:40 +0x4
github.com/wowsims/wotlk/sim/core.ComputeStats(...)
/home/runner/work/wotlk/wotlk/sim/core/api.go:38
main.computeStats({{}, 0x0, 0x0}, {0x200e020, 0x1, 0x1})
/home/runner/work/wotlk/wotlk/sim/wasm/main.go:64 +0x13
syscall/js.handleEvent()
/opt/hostedtoolcache/go/1.18.3/x64/src/syscall/js/func.go:94 +0x26

Request:
eJztkr9rFEEcxfe97+5mM3jHeIgMqY4r5AgIc7sspNMif4CdtYVgYSFW0SrYqBHMgYWnATm7gxA4EMIlJnBi4Vmd4MVgEBXBY0MSuDIIUWfzA6zF0u/Am3l83vdVo36GaiFUD8M7CC9dv3Lr6s1oTKuJV1BaDzdp+p9ZCZdf80OHalzvf2JFnr2lKui9NZo3DsqaI5F+/5Jma0nyLQf6Lhe6XB4t6jnHeh+l4ruo53zmEptLJ35cH6we12i969Bw0S07u31YPL9Ok7liX2+/oNMHK7nurue6088TBys0X5ryx8vX866y2CZ7LLTIGX8W/mSP3v/5J3Pbj2D4A5eVV5qOqKUcXAwyyAi8x6BOaTBoUdoMOmSXfEf5SmTkiFIXaYg0BW1BR6QrQU8wUTh91Dy6YFDFHM7FiU2tten5JHaapDZJ49gmtuaAtUlSs7UkrX2DiRYG1I8HNHvfWW4MWG1s0D7ZYAZ/hLGniFWo/Oj5XR7ew0X3RVUxun+2/OtkkBP9aPUosb/DLXjq+JQ8dUr9lSudqXIKNziDJtACukAGTGqDMiymcA2zQB34DbIgjRE=

Professions

Need to add all the new profession bonuses, as well as 2 profession selectors in the UI.

We can have warnings when profession bonuses are used but the relevant profession is not selected.

Enchants

Need to implement all the new enchants.

Change the APL of Survival

Is your feature request related to a problem? Please describe.
I checked the timeline of survival to see what he is doing and realised that the prio is kinda weird, so i checked your code and found out that the Prio is wrong for Survival.

Describe the solution you'd like
The prio should be Kill Shot>Explosive Shot>Explosive Trap/Black arrow > Aimed shot > Serpent Sting > Steady Shot.

Additional context
Also i am still not sure how your steady is 1.58 casttime, if the spell has only 1.5 casttime ? or is there something wrong? did i miss something?
Here u can see it yourself: https://gyazo.com/c3feab2b94a188026664f20e864fcc91

Set sim to level 70 for prepatch

Is your feature request related to a problem? Please describe.
Have an option simply to set the max level to 70 instead of 80 to allow prepatch simulations

Describe the solution you'd like
Basically just a spot in settings that would allow us to change the max level between 70 and 80. This would also require us to update talents & run only 2 greater glyphs.

Additional context
This is simply to enable the ability to do prepatch sims.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.