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

COB wreck levels are broken #1291

Closed
GoogleFrog opened this issue Feb 24, 2016 · 10 comments
Closed

COB wreck levels are broken #1291

GoogleFrog opened this issue Feb 24, 2016 · 10 comments

Comments

@GoogleFrog
Copy link
Contributor

Dev engine breaks wreck levels for COB scripts which do the pass by reference thing instead of returning a sane value. There is a script in this ticket which apparently fixes all the COB but not the BOS. This is ok because the policy here is usually to not to accept any new or changed BOS.

https://springrts.com/mantis/view.php?id=5102

@GoogleFrog
Copy link
Contributor Author

There are only 27 real units which use cob scripts. The other scripts are for chickens or unused units. Chickens always drop the same wreck so this bug does not affect them. Replacing these scripts would be good because we would likely never have to touch cob again.

  • trem
  • shiptorp
  • shipskirm
  • shipcon
  • shiparty
  • shipaa
  • factoryveh
  • factoryhover
  • factorygunship
  • corsh
  • corsent
  • correap
  • corraid
  • corned
  • corlevlr
  • corgrav
  • corgol
  • corgarp
  • corflak
  • corfav
  • coracv
  • armrock
  • armrectr
  • armraven
  • armjeth
  • armham
  • armflea

@ashdnazg
Copy link
Contributor

ashdnazg commented Mar 1, 2016

just run this https://github.com/spring/spring/blob/develop/tools/scripts/cob_fixer.py

problem solved.

editing the bos files will take < 10 minutes

@GoogleFrog
Copy link
Contributor Author

Why is editing the bos files required if your script already solves the problem?

@GoogleFrog
Copy link
Contributor Author

You do it.

Traceback (most recent call last):
File "fier.py", line 79, in
main(sys.argv[1])
File "fier.py", line 72, in main
process_cob(cob_path)
File "fier.py", line 51, in process_cob
script_names.append(unpack_string(content, script_name_offset))
File "fier.py", line 35, in unpack_string
return b[:b.index('\0')]
TypeError: a bytes-like object is required, not 'str'

@GoogleFrog GoogleFrog changed the title COB wreck levels are broken (probably) COB wreck levels are broken Mar 4, 2016
@GoogleFrog
Copy link
Contributor Author

I ran it with Python 2.7 and it did "processing" to all my files and they all have modifications according to git. There is no ingame change though. "just run this" has taken about 20 minutes so far.

@ashdnazg
Copy link
Contributor

ashdnazg commented Mar 6, 2016

"There is no ingame change though"

I've just tested it with /give armflea and it worked great.
How did you test it?

@GoogleFrog
Copy link
Contributor Author

I gave and destroyed a correap. Once with self-D and once with a Skuttle.

@ashdnazg
Copy link
Contributor

ashdnazg commented Mar 7, 2016

spring/spring@e39a154
I've updated cob_fixer to warn about files it couldn't update easily and need manual fixing

@GoogleFrog
Copy link
Contributor Author

Mason, Reaper and Wolverine remain broken.

@GoogleFrog
Copy link
Contributor Author

Fixed 912fd00

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

No branches or pull requests

2 participants