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

[LUA] Implement !GLOBAL_SET_BOBS equivalent #1689

Open
kubaau opened this issue Jul 28, 2024 · 2 comments
Open

[LUA] Implement !GLOBAL_SET_BOBS equivalent #1689

kubaau opened this issue Jul 28, 2024 · 2 comments

Comments

@kubaau
Copy link
Contributor

kubaau commented Jul 28, 2024

S2 RTX files had the !GLOBAL_SET_BOBS command which enabled some special graphics for specific missions (examples). The correct object to display was not only based on what is in the WLD map but also depends on this setting. As far as I can tell, MapLoader::PlaceObjects does not work this way and there is no possibility to "tell it" to use a special set of graphics (is there?). This is problematic when porting S2 campaign maps which rely on !GLOBAL_SET_BOBS to, for example, place ruins instead of stalagmites or a tent instead of a shipwreck. For single objects this can be an easy fix using LUA's AddStaticObject but for many objects this becomes a massive pain, see this example from FANpaign chapter 3:

S2:
Zrzut ekranu 2024-07-29 000825

RttR:
Zrzut ekranu 2024-07-29 001850

@kubaau kubaau changed the title Implement !GLOBAL_SET_BOBS equivalent in LUA [LUA] Implement !GLOBAL_SET_BOBS equivalent Jul 28, 2024
@Spikeone
Copy link
Member

Spikeone commented Jul 29, 2024

Why is this required? The AddStatic and AddEnvObject functions do have a parameter for the file to tells which bobs to use, which is more reusable since you can use all bobs on one map instead of only one?

@kubaau
Copy link
Contributor Author

kubaau commented Jul 29, 2024

Not required, just nice to have. I don't even know how to implement this yet. But I'm suggesting this from the perspective of porting existing maps. If such a feature was present it would be possible to automatically translate WLD+RTX into WLD+LUA for such maps without manually placing ruins and such. Currently when the WLD is interpreted with the "wrong" bobs the scripter needs to "fix" the map manually.

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

No branches or pull requests

2 participants