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

Add ability to launch level in 1.5 #2

Open
meh2481 opened this issue Dec 11, 2023 · 9 comments
Open

Add ability to launch level in 1.5 #2

meh2481 opened this issue Dec 11, 2023 · 9 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@meh2481
Copy link
Member

meh2481 commented Dec 11, 2023

1.3 allowed for specifying level name e.g. "WorldOfGoo.exe AB3" to launch a level for testing purposes. This does not work in 1.5, unclear if this has changed or if it's simply been removed.

@meh2481 meh2481 added enhancement New feature or request help wanted Extra attention is needed labels Dec 13, 2023
@meh2481
Copy link
Member Author

meh2481 commented Dec 14, 2023

As per the discussion on the linked thread, this requires some game changes, which Edward Rudd has been given the go-ahead to make. Once these are done, functionality can be re-added to the editor.

In the meantime, the Linux version of the game supposedly supports this already, so we can test it there.

@urkle
Copy link

urkle commented Dec 17, 2023

@meh2481 re-looking at the code the "level-loading" code was there for win as well (just not macOS). but was locked behind a DEBUG flag.

So possibly the 1.3 version had debugging enabled?

Anyways, my initial stab at enabling this full time has come up with some issues. Right now around game crashes when exiting the level.

Also, is there a user-level I could try on the game?

@meh2481
Copy link
Member Author

meh2481 commented Dec 17, 2023

@urkle The game crashing when the level is completed is actually how it's always worked lol. At least the game has always immediately closed upon clicking the "continue" lever, which is great for modding since it just kicks you back into the level editor. There's no OCD information at this point anyway so I'm unsure how else it would work.

goomod.zip

This attached custom level should work fine, there are signposts in it so text.xml will have to be manually merged into game/properties/text.xml. I wouldn't attempt completing it though as it's pretty tedious; it's just one I had handy. If it doesn't work, there's a chance just the level itself is broken, so let me know and I'll find a better one to test with.

@urkle
Copy link

urkle commented Dec 19, 2023

@meh2481 thanks. So completing the level there was a hack in there to call exit(0). but doing other menu options (quit level, etc) would crash it. I now have some small tweaks to make that more pleasant.

  • removing non-useful menu items (OCD and skip) so just retry, quit, and resume remain.
  • re-enable the startup level code in release builds

Now I have a few questions about resources.
Currently the game loads "text.xml and then "text.{lang}.xml" to load resources.. Thus I was able to hack (and not modify text.xml) by naming it text.en.xml.. However I want to provide a cleaner approach by supporting a text.custom.xml instead.

Are there any other resource files that have to be modified to support the mods from these tools? e.g what are all the things that can be modded?

@meh2481
Copy link
Member Author

meh2481 commented Dec 19, 2023

@urkle I think that would work really well to have a text.custom.xml for testing individual levels. I don't think we ever were able to test signposts in 1.3 without manually merging changes into text.xml, so that would be a nice addition.

Our modding tools can customize pretty much everything in the game, I think. But we have a pretty robust mod manager tool that can e.g. remove/add custom particles from fx.xml as mods that use them are added or removed. So I don't think anything in particular other than text requires this sort of handling.

While we're on the subject of modifying how the game loads resources, do you know anything about Route99 and the MightyBlimp? The resources and level info for these are packaged into the 1.5 version of the game, but they seem to be disabled. I think this content was originally exclusive to the iOS version, but was eventually patched out there as well.

The other thing that seems to have been removed from 1.5 was the tank on the right side of a level that appears when you reach the pipe and the first Goo Ball enters. The fluid level in this tank fills up as you get closer to the level quota, and Goo Balls appear in it after they've finished traveling through the level's pipe.

Screenshot from 1.3 Humble Bundle Android version:

Screenshot_20231219_084849_World of Goo

@meh2481
Copy link
Member Author

meh2481 commented Dec 19, 2023

@urkle Apparently I had misunderstood the state of custom islands, so I'll bring that up as well. Even if a new button is added to MapWorldView and e.g. res/levels/island6, it still cannot be selected from the main menu. It seems to be hardcoded that "island6" and onwards don't exist, and there's no way to mod anything like that in. Understandably, a lot of modders want to make their own islands, but we've been unable to do so outside of hex-editing WorldOfGoo.exe (which isn't exactly the best solution).

Also re/ Route99 & blimp: It seems the Route99 dialogue isn't in text.xml, but there's a commented-out button for Route99 in island 4 that opens the level, though no dialogue is there. We can mod in most of this content (using a bunch of different signposts in place of dialogue), but would still be neat to have the anniversary edition be a definitive edition with all the Route99 content built-in.

@urkle
Copy link

urkle commented Dec 20, 2023

It does seem that the route99/mightyblimp were ios only as I do see some code-paths that are only for IOS. Odds are they were not intended to be included but neither kyle nor I saw that. I'm unsure if he'd be ok with adding that in there or not. I do see specific scripts (that I somehow missed when I worked on the update) that explicitly excluded those maps on the OLD linux build (not done by me)

Island6, yeah there is code that explicitly prevents island6 from being accessed. (a define turns it on and lots of places look at that).

And the "goo tank".. oh yeah.. we FOUGHT and fought with that stupid tank. The initial goal of the 1.5 project was just to update the engine to run on more modern computers. And part of that was higher resolution. So I started doing work on getting scaling working in the game engine so that things could work at different aspect ratios but that started opening new issues. One of them being that tank. It was either too small, or too big, or off the screen and not visible. In the end Kyle decided to have a default fixed aspect ratio that was letter/title boxed and just to remove completely that goo tank. (so it is completely disabled in code). so unfortunately there is no way to get that back in at the moment.

Back to modding again.

So what I was thinking for a "clean" modding handling would be to build a better mod system that would allow overriding assets more easily by

  1. getting all the core properties/*.xml to be easily override-able with mods (merging or replacing text) without modifying the original assets
  2. introducing a ZIP container for mods
    • that is mods could simply be packaged as a zip put in a specific folder (in user profile dir or in game dir) that would be loaded up and the assets merged in.

I've done the zip mod approach in other ports (democracy 3) and it should be easy enough to do here. I'd need to check the other properties/* files to see how easily I can handle override loading. Hopefully the code is already similar to the text resources.

The more complex part would be seeing how I could allow mod island6 to have that be introduced as a mod-able island (only one mod at a time most likely) and have the playable content work correctly.

Crazydiamonde added a commit that referenced this issue Dec 20, 2023
@meh2481
Copy link
Member Author

meh2481 commented Dec 20, 2023

@urkle so, it's funny that you bring up .zip files, because that's exactly how we currently package mods. I had extracted the key parts of my "Escape from Shuttle Alpha" example addin to upload above, but the whole package is a .goomod file, which is just a renamed .zip:

http://goofans.com/download/697/239/ShuttleEscape.goomod

(This is a spec-version 1.0 addin, and there are some changes in 1.1, more on that in the linked article)

This format is explained in detail here: http://goofans.com/developers/addin-file-format Basically there are "compile", "merge", and "override" folders for XML, XSL, and PNG/OGG/anim files.

The "compile" subfolder used to have to encrypt the level XML for World of Goo version 1.3, now that it's all unencrypted in 1.5 the newer version of our mod manager tool ("GooTool") just renames the XML files to match, e.g. for levels ShuttleEscape.level.xml->ShuttleEscape.level. Any XML for new Goo Ball types, levels, etc. goes here.

The "merge" folder uses XML transforms (XSL) which can add, modify, and remove XML from various game files. GooTool does this transparently behind the scenes for island1, adding level buttons to the top of it and extending it horizontally a bit. spec-version 1.1 also adds a text.xml so you don't have to manually specify signpost text.xml merges like I did in this example level. Generally we try to use XSL merges for XML files that exist in the base game, such as adding particles to fx.xml, island changes, etc.

The "override" folder just copies files to new folders or modifies existing files. So if I have an image I want to add for a level, if I want to make a new theme to give all the Goo Balls Christmas hats, etc. This is also used for overriding animation and movie files, as these formats are binary.

It's entirely up to you if you want to make your own modloader built into World of Goo itself or if we can just keep using GooTool, which we have working for both 1.3 and 1.5 currently. If you want to make it builtin and keep the existing .goomod format (It's a very nice mod format tbh), I can help answer questions and provide example addins that do more complicated things than just this simple level one.

Re: Goo Tank: Understandable, I figured this was why it was removed.

Re: Route99: I have heard that the iOS version no longer contains Route99/blimp at all, though I don't have an iPhone to verify for myself. We already can mod some of this stuff in, and now with 1.5 we have a lot of the files for it, but would be nice to have the iOS version (or just SOME version) have this content again if it was cut at some point.

Re: island6: Some of our more ambitious modders would definitely like to have island6/island7/island8/make their own entire new planets/etc. If it's non-trivial to allow islandN with N[0..100] that's totally understandable lol. We kind of try to keep all mods compatible with each other, but just allowing for adding an island6 would help quench some people's thirst for modding.

@Fancy2209
Copy link

Fancy2209 commented Dec 20, 2023

It does seem that the route99/mightyblimp were ios only as I do see some code-paths that are only for IOS. Odds are they were not intended to be included but neither kyle nor I saw that. I'm unsure if he'd be ok with adding that in there or not. I do see specific scripts (that I somehow missed when I worked on the update) that explicitly excluded those maps on the OLD linux build (not done by me)

Island6, yeah there is code that explicitly prevents island6 from being accessed. (a define turns it on and lots of places look at that).

And the "goo tank".. oh yeah.. we FOUGHT and fought with that stupid tank. The initial goal of the 1.5 project was just to update the engine to run on more modern computers. And part of that was higher resolution. So I started doing work on getting scaling working in the game engine so that things could work at different aspect ratios but that started opening new issues. One of them being that tank. It was either too small, or too big, or off the screen and not visible. In the end Kyle decided to have a default fixed aspect ratio that was letter/title boxed and just to remove completely that goo tank. (so it is completely disabled in code). so unfortunately there is no way to get that back in at the moment.

Back to modding again.

So what I was thinking for a "clean" modding handling would be to build a better mod system that would allow overriding assets more easily by

  1. getting all the core properties/*.xml to be easily override-able with mods (merging or replacing text) without modifying the original assets

  2. introducing a ZIP container for mods

    • that is mods could simply be packaged as a zip put in a specific folder (in user profile dir or in game dir) that would be loaded up and the assets merged in.

I've done the zip mod approach in other ports (democracy 3) and it should be easy enough to do here. I'd need to check the other properties/* files to see how easily I can handle override loading. Hopefully the code is already similar to the text resources.

The more complex part would be seeing how I could allow mod island6 to have that be introduced as a mod-able island (only one mod at a time most likely) and have the playable content work correctly.

Island6 was a scrapped free DLC, maybe it's time to remove it from the default world map view and that define too? The strings for Island6/Chapter6/Chapter0 were removed already in 1.5, maybe removing it for the sake of allowing people to add Island6 and beyond would be a nice trade off? (unless Kyle wants to finally add it of course but that doesn't seem very likely)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants