Git Product home page Git Product logo

dyson-sphere-program's Introduction

dyson-sphere-program

Utilities for the game Dyson Sphere Program

The main thing here is dyson_wiki.py, a Python program for dumping data from the game files. To use it, you will also need a program like Unity Asset Extractor. It's specifically designed to write the data tables at https://dyson-sphere-program.fandom.com/wiki/Module:Recipe/Data.

dyson-sphere-program's People

Contributors

d0sboots avatar radialene avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

dyson-sphere-program's Issues

Code crash

Hello, I'm pretty much getting the same result as with the previous issue:

Reading data... Traceback (most recent call last):
  File "D:\...\dyson_wiki.py", line 632, in <module>
    main()
  File "D:\...\dyson_wiki.py", line 597, in main
    data = dysonsphere.load_all()
  File "D:\...\dysonsphere.py", line 535, in load_all
    result = dict((x, load_data(x, path.join(root_dir, x + '.dat')))
  File "D:\...\dysonsphere.py", line 535, in <genexpr>
    result = dict((x, load_data(x, path.join(root_dir, x + '.dat')))
  File "D:\...\dysonsphere.py", line 522, in load_data
    return cls(*reader.get_funcs())
  File "<dynamic StringProtoSet code>", line 17, in __init__
  File "<dynamic StringProtoSet code>", line 17, in <listcomp>
  File "<dynamic StringProto code>", line 13, in __init__
ValueError: read length must be non-negative or -1

I'm wondering about a two things though:

  • I extracted ItemProtoSet.dat, RecipeProtoSet.dat, StringProtoSet.dat, TechProtoSet.dat using UABE, but they are only 80 bytes, MonoScript instead of MonoBehavior and do not match the Path IDs you indicated in dysonsphere.py.
    ItemProtoSet
  • I'm using python 3.10, this may be an issue ?

Work & idle consumption

Is it not possible to add these properties from all the buildings into the items objects?

Running into `ValueError: 6 is not a valid EAmmoType`

Hi there, I get a ValueError, tough I have no clue how to fix it myself. Simply adding a new EAmmoType results in nothing being done.

> python .\dyson_wiki.py --wiki
Reading data... Traceback (most recent call last):
  File "~\GitHub\dyson-sphere-program\dyson_wiki.py", line 664, in <module> 
    main()
  File "~\GitHub\dyson-sphere-program\dyson_wiki.py", line 629, in main     
    data = dysonsphere.load_all()
  File "~\GitHub\dyson-sphere-program\dysonsphere.py", line 541, in load_all
    result = dict((x, load_data(x, path.join(root_dir, x + '.dat')))
  File "~\GitHub\dyson-sphere-program\dysonsphere.py", line 541, in <genexpr>
    result = dict((x, load_data(x, path.join(root_dir, x + '.dat')))
  File "~\GitHub\dyson-sphere-program\dysonsphere.py", line 528, in load_data
    return cls(*reader.get_funcs())
  File "<dynamic ItemProtoSet code>", line 17, in __init__
  File "<dynamic ItemProtoSet code>", line 17, in <listcomp>
  File "<dynamic ItemProto code>", line 85, in __init__
  File "C:\Python310\lib\enum.py", line 385, in __call__
    return cls.__new__(cls, value)
  File "C:\Python310\lib\enum.py", line 710, in __new__
    raise ve_exc
ValueError: 6 is not a valid EAmmoType

Requesting an update to the Fandom data

Hi there! As of September 2022, there's now a Logistics Distributor and Logistics Bot that goes with it. I play DSP on GeForce Now, and don't have the Unity tools to do the ripping myself right now.

If you're able to do the update, that would be awesome. If you're not, please say so, and I'll spend the time getting all that tooling set up to do it on my own.

Thanks!

program crashes

Hi! I'm trying to use your code to generate data from the gamefiles that can be parsed and used in a production tracker spreadsheet. Your program currently gives me this:

  File "<dynamic TechProtoSet code>", line 17, in <listcomp>
  File "<dynamic TechProto code>", line 31, in __init__
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 16: invalid continuation byte

[process exited with code 1]

Major game update

Hello! On December 15th, 2023, DSP received the Combat Update, which added a plethora of new items, recipes, and technologies. Unfortunately, it would seem they have also changed the structure of their data files somewhat. When extracting the .dat files, I was unable to locate a StringProtoSet (I didn't look very hard before moving on). While modifying the program to run without it, it would seem the internal structure of the .dat files has also changed; the program errors while working on the ItemProto, and a quick Debug examination reveals that the program becomes misaligned on its data by the second item.

From what I've been able to gather, it would seem there are more attributes for items - which makes sense as some buildings now need to store damage, fire rate, and probably other stuff too. Given that (for Iron Ore, at least) the name, icon path, and mecha material ID still seem to be properly aligned, I would guess these new attributes have been tacked onto the end. I have no idea what these new attributes actually are.

I do not know very much about reading binary files. If DSP and/or this program no longer holds any interest for you, I fully intend to continue messing around with it until I can hack something together. If that is the case, I would appreciate any insight you can provide as to how these attributes can be gleaned. All that being said, thank you for your time and contributions to the community.

Code crash

Hello, there is an issue with dysonsphere.py:

Reading data... Traceback (most recent call last):
  File "dyson_wiki.py", line 632, in <module>
    main()
  File "dyson_wiki.py", line 597, in main
    data = dysonsphere.load_all()
  File "dysonsphere.py", line 531, in load_all
    result = dict((x, load_data(x, path.join(root_dir, x + '.dat')))
  File "dysonsphere.py", line 531, in <genexpr>
    result = dict((x, load_data(x, path.join(root_dir, x + '.dat')))
  File "dysonsphere.py", line 518, in load_data
    return cls(*reader.get_funcs())
  File "<dynamic StringProtoSet code>", line 17, in __init__
  File "<dynamic StringProtoSet code>", line 17, in <listcomp>
  File "<dynamic StringProto code>", line 13, in __init__
ValueError: read length must be non-negative or -1

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.