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

Change default value for dist= in EndMissionTake and AudioChange #759

Open
krzys-h opened this issue Apr 3, 2016 · 8 comments
Open

Change default value for dist= in EndMissionTake and AudioChange #759

krzys-h opened this issue Apr 3, 2016 · 8 comments

Comments

@krzys-h
Copy link
Member

krzys-h commented Apr 3, 2016

_WARNING! This is a backwards incompatible change that WILL break user levels that don't specify the value explicitly_

The default value for dist= has always confused me. By default it's set to value appropariate to cover the whole SpaceShip. If I omit pos= and dist=, I would expect the command to detect anywhere on the level. This is not how it works.

Consider this:

EndMissionTake type=WheeledGrabber min=1

This looks like "the mission ends when one WheeledGrabber is produced anywhere on the map", while actually this is "the mission ends when one WheeledGrabber is placed at max 8 meters from the center of the map"
To get the desired behaviour, you have to type:

EndMissionTake dist=25000.00 type=WheeledGrabber min=1

Which is longer and confusing.


Another common misconception might be assuming that pos= defaults to SpaceShip position. This is not how it works either. pos= defaults to the center of the map. To check for objects on SpaceShip, you still have to do this:

EndMissionTake pos=x;y type=TitaniumOre min=4 // dist= omitted to keep the default value

I believe it would be better to make this more explicit:

EndMissionType pos=x;y dist=8 type=TitaniumOre min=4 // dist= is required to detect around the position

Additionaly, using only pos or only dist should not be allowed to avoid mistakes and the level parser should throw an error.

I would like to know what other people think about changing this, especially (user)level designers.

@tomaszkax86
Copy link
Contributor

This is definitely a better version, less confusing and it makes more sense than current defaults. We might want to implement this, but we'll have to review existing missions.

@ghost
Copy link

ghost commented Apr 4, 2016

BTW why we still care about backward compatibility?

@MrSimbax
Copy link
Contributor

MrSimbax commented Apr 4, 2016

The same reason we're not changing the CBOT design, it's a remake, not Colobot 2.

@ghost
Copy link

ghost commented Apr 4, 2016

Of course, it's a remake but in the plot/design/gameplay aspects, not engine aspects.

@tomangelo2
Copy link
Member

We did already things breaking backward compatibility with original game, so why don't break compatibility with early alpha versions?

@MrSimbax
Copy link
Contributor

MrSimbax commented Apr 4, 2016

You didn't understand, there are already user levels made specifically for GOLD, and this change will break backwards compatibility with them. That's why it's important to discuss it especially that it's a change that is easy to miss.

@ghost
Copy link

ghost commented Apr 4, 2016

That's why I always wanted inform level creators that they should do readme's for their work with info about what version of the GOLD is required. Until the game isn't finished, especially Scene refactoring, they should unfortunately live with that.

@krzys-h
Copy link
Member Author

krzys-h commented Jul 4, 2016

Planned roadmap for this issue:

  • 0.1.8: Trying to load a level with pos= or dist= will generate a user-visible warning to force userlevel authors to update the levels. Old levels will still load correctly.
  • 0.1.9: The defaults will change. Old levels will either throw parser errors or cause strange behaviour in ending conditions.

New (planned) defaults are:

  • dist= - infinity (whole map)
  • pos= - no default value (if dist= is specified then pos= is required, otherwise it is ignored and trying to specify it will cause an error)

If you want to keep your levels compatible with both old and new versions, always specify both pos= and dist=. If you only care about 0.1.9+, you can skip both of them to detect objects on the whole map.

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

4 participants