ZeroK-RTS / Zero-K

Open source RTS game running on the Spring/Recoil engine
https://zero-k.info
GNU General Public License v2.0
673 stars 204 forks source link

COB wreck levels are broken #1291

Closed GoogleFrog closed 8 years ago

GoogleFrog commented 8 years ago

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 commented 8 years ago

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.

ashdnazg commented 8 years ago

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 commented 8 years ago

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

GoogleFrog commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

"There is no ingame change though"

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

GoogleFrog commented 8 years ago

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

ashdnazg commented 8 years ago

https://github.com/spring/spring/commit/e39a15479ad30ddcb3f1cf6ab74157471f6590c3 I've updated cob_fixer to warn about files it couldn't update easily and need manual fixing

GoogleFrog commented 8 years ago

Mason, Reaper and Wolverine remain broken.

GoogleFrog commented 8 years ago

Fixed https://github.com/ZeroK-RTS/Zero-K/commit/912fd00987eb7459248454e781276b7518f6c08d