GithubHelp home page GithubHelp logo

spawningtool's People

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

Watchers

 avatar  avatar  avatar

spawningtool's Issues

Switch to use sc2reader

After taking a look through s2protocol and sc2reader, I think this project will ultimately be more sane if we use sc2reader. Both appear to parse all of the same data, but sc2reader is readable and has built structures around a lot of the data, whereas s2protocol is still pretty raw.

I think it makes sense to maintain the s2protocol implementation in a branch for anyone interested in working with that. master, however, will be using sc2reader

Spawning tool freezes. Is there a way to reset spawning tool?

Thanks for making spawning tool. Somehow my spawning tool freezes suddenly like below,

spawningtool-bug

I tried to reinstall spawning tool and overwolf but it doesn't restart spawning tool but shows same screen above.

Is there a place where spawning tool's settings or any environment is placed on Windows? If there are then I want to reset such environments. Or if any tips I would be happy to hear.

AttributeError when trying to load replay

I get this error when I try to load a replay using the CLI.

  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/stefan/Documents/ML/env/src/spawningtool/spawningtool/__main__.py", line 124, in <module>
    main()
  File "/home/stefan/Documents/ML/env/src/spawningtool/spawningtool/__main__.py", line 113, in main
    include_map_details=bool(args.map_details))
  File "/home/stefan/Documents/ML/env/src/spawningtool/spawningtool/parser.py", line 830, in parse_replay
    return parser.get_parsed_data(cutoff_time, cache_dir, include_map_details)
  File "/home/stefan/Documents/ML/env/src/spawningtool/spawningtool/parser.py", line 198, in get_parsed_data
    self.load_replay()
  File "/home/stefan/Documents/ML/env/src/spawningtool/spawningtool/parser.py", line 274, in load_replay
    self.replay = sc2reader.load_replay(self.replay_file)
  File "/home/stefan/Documents/ML/env/lib/python3.6/site-packages/sc2reader/factories/sc2factory.py", line 85, in load_replay
    return self.load(Replay, source, options, **new_options)
  File "/home/stefan/Documents/ML/env/lib/python3.6/site-packages/sc2reader/factories/sc2factory.py", line 137, in load
    return self._load(cls, resource, filename=filename, options=options)
  File "/home/stefan/Documents/ML/env/lib/python3.6/site-packages/sc2reader/factories/sc2factory.py", line 146, in _load
    obj = cls(resource, filename=filename, factory=self, **options)
  File "/home/stefan/Documents/ML/env/lib/python3.6/site-packages/sc2reader/resources.py", line 312, in __init__
    engine.run(self)
  File "/home/stefan/Documents/ML/env/lib/python3.6/site-packages/sc2reader/engine/engine.py", line 177, in run
    for new_event in (event_handler(event, replay) or []):
  File "/home/stefan/Documents/ML/env/lib/python3.6/site-packages/sc2reader/engine/plugins/context.py", line 57, in handleTargetUnitCommandEvent
    self.last_target_ability_event[event.player.pid] = event
AttributeError: 'NoneType' object has no attribute 'pid'

Spawning Tool Timer Desynchronizes When Resuming from Replay

I was trying to practice my build order, so I went back to 0:00 in a replay and resumed only to find that the spawning tool timer is significantly faster than the in-game timer after resuming from replay. Not really sure why, but it seemed fine when I played a regular vs AI right afterward. However, after that game, I tried resuming from replay again and it desynched again.

I saw this other issue and maybe the two are tied together in some way?

#51

Building a Baneling adds a spurious Zergling

See http://spawningtool.com/1068/download/

Note that all Banelings have a Zergling 4 seconds before.

This appears to be happening because the UnitTypeChangeEvent happens when the morphing completes, but it still recognizes it as a Zergling. It comes in 4 seconds before because Zerglings take 24 seconds to make, while Banelings take 20.

A related issue is that there is no instance of a Brood Lord ever being created in any replay that I can find. Whoops.

But Overseers do work. I'll have to test this all more extensively

Consider chronoboost in build times

For units (not including warped units), we get the "born" time in trackerevents, which we subtract the build time from to get the start for the build order. Unfortunately, this doesn't always work because chronoboost speeds up that build time.

In the opposite direction, Contaminate also isn't considered. Supply blocks also aren't considered.

This is a long-standing problem that I haven't addressed.

Grab more things for the parsed data

I would just send everything along, but I kind of like that the output dumps cleanly. I should also add

  1. time the game was played
  2. anything about the leagues if it's matchmaking
  3. more player data
    • colors might be handy
    • player ids
  4. game length

Fix Zeratul's chronoboost

The targetunitcommandevent actions didn't have the name or target properly marked, so it wasn't moving

Incorporate better packaging for spawningtool

Incorporate Better Packing Tools for spawningtool

spawningtool currently has no setup.py module and thus cannot be distributed easily beyond doing a git clone.

We should create an extra directory layer "spawningtool" on top of the main spawningtool dir and a setup.py module within the first directory

spawningtool

MANIFEST.in
README.md
setup.py
spawningtool

spawningtool.py

Improvement: Allow option to cut off all output after a certain time

We should all the user to be able to specify a certain point in the game (by game time) that they do not want any more output to be shown. We can do this from the command line

spawningtool myreplay.SC2Replay --cutoff-time 10:00

Results will look like:

9 0:49 Pylon
12 1:34 Gateway
13 1:56 Assimilator
16 2:22 Pylon
...
52 9:50 Gateway

Any game events that occur after this time will not be shown. Do we care about flag naming? Suggestions?

Annotate HotS and LotV constants

With co-op support, we have a more detailed structure for BUILD_DATA entries

'overlordspeed': {
'build_time': 60,
'built_from': ['Hatchery', 'Lair', 'Hive'],
'display_name': 'Pneumatized Carapace',
'race': 'Zerg',
'type': 'Upgrade',
'is_morph': False,
},

Additionally, we also added building entries, which previously weren't necessary because we didn't need to adjust build times for them

Can't install from Pypi using pip

I receive the error "FileNotFoundError: [Errno 2] No such file or directory: 'README.md'" when installing from pip using pip install spawningtool.

This is because the sdist does not include README.md and CHANGELOG.md, so it can't build when it's pulled from Pypi. This could be fixed in a few ways. You could build a bdist_wheel as well which should be preferred in newer versions of pip. You could also create a MANIFEST.in which includes the two files.

Constants should be based on SC2 version

from StoicLoofah/spawningtool-site#6

"This will allow for an easy transition after the next patch once Burrow starts taking 5 seconds to research at Hatch tech."

From @tthieman

Include the summary stats somewhere

Pretty soon I'll be pulling through the entire sc2reader object. In the meantime, this is tied to a request for measuring some macro and economy metrics alongside the build order

Add more LotV unit types

#56 identified many missing buildings and unit types in lotv_constants.py that ideally should be added for consistency.

Most are properly ignored, but many buildings should appear in the data

Handle GameHeart games

The output should account for GameHeart. Specifically,

  1. Figure out who is a spectator and who's actually playing
  2. Start the time from the actual game start
  3. Remove the initialization units from the build (Workers, 1st base)

For example, http://spawningtool.com/1783/

Add Mengsk co-op data

Since Blizzard announced that they aren't shipping any more commanders, we should get complete coverage rather than leaving just one commander unparseable.

Resolve Tech Lab / Reactor situation

So in build orders, it's really helpful to have things marked as "Barracks Reactor" and "Starport Reactor", but in units lost, it's just "Reactor" or "Tech Lab". There's not a problem with this explicitly at the moment, and the data is all clear, but if the build order and the units lost ever get mashed up, we probably need to drop back to the units in sc2reader instead of labels in spawningtool.

Remove landing Orbital Commands from the build order

http://spawningtool.com/16875/

So both landing Orbital Commands and morphing them count as UnitTypeChangeEvents, which is unfortunate because we get extra entries for landing buildings. With the data given, I actually don't know how to disambiguate those 2 things at the moment, but I'll need to do some digging.

I wonder whether I'm actually handling landing builds properly at all. Ugh, this UnitTypeChangeEvent seems to be more complicated than I had anticipated...

Desync in times (current game and spawning tool overlay)

I am trying to came back to SC2 and now using again the tool.

But I don't know why the time on the game and on the overlay is aways desynchronized. Even if I try to change the parameter of speed on the tool ... I've tried on fast and faster and had the same result.

I think this could be a local machine problem, but I've found this link and using a chronometer, I've notice that the time on the spawning tool is wrong. In faster, 60 seconds run in the same 60 seconds on my chronometer.

I will clone the repo to try fix this bug, but any way, if is already something that you guys have knowledge please let me know.

Update supplies continuously

Currently, I'm using the playerstats to extract supply counts and then interpolating supplies between those data points. This method only has a resolution of 10 seconds, so I should check that continuously.

No tracker data could be found, despite this being the right version (55958). Sorry.

Python 3, Windows 10, SC2 version 5.0.9, likely trying to process an old replay version, but I don't know.

C:\Program Files (x86)\StarCraft II\Replays>python -m spawningtool replay1.SC2Replay

Traceback (most recent call last):
  File "C:\Users\chalu\AppData\Roaming\Python\Python37\site-packages\spawningtool\__main__.py", line 113, in main
    include_map_details=bool(args.map_details))
  File "C:\Users\chalu\AppData\Roaming\Python\Python37\site-packages\spawningtool\parser.py", line 836, in parse_replay
    return parser.get_parsed_data(cutoff_time, cache_dir, include_map_details)
  File "C:\Users\chalu\AppData\Roaming\Python\Python37\site-packages\spawningtool\parser.py", line 218, in get_parsed_data
    self.check_replay_version()
  File "C:\Users\chalu\AppData\Roaming\Python\Python37\site-packages\spawningtool\parser.py", line 286, in check_replay_version
    ), self.parsed_data)
spawningtool.exception.ReplayFormatError: No tracker data could be found, despite this being the right version (55958). Sorry.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\chalu\AppData\Roaming\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\chalu\AppData\Roaming\Python\Python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\chalu\AppData\Roaming\Python\Python37\site-packages\spawningtool\__main__.py", line 124, in <module>
    main()
  File "C:\Users\chalu\AppData\Roaming\Python\Python37\site-packages\spawningtool\__main__.py", line 117, in main
    print(error.message)
AttributeError: 'ReplayFormatError' object has no attribute 'message'

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.