Zero-K icon indicating copy to clipboard operation
Zero-K copied to clipboard

Improve start position shuffle.

Open GoogleFrog opened this issue 11 years ago • 18 comments

Start position shuffle should shuffle start positions before the game starts. People should be placing their command in the start box they will actually start in.

GoogleFrog avatar Jan 28 '15 01:01 GoogleFrog

won't happen, licho said it's perfection not worth the cost

sprunk avatar May 20 '15 07:05 sprunk

If you can do it without breaking other stuff, do it. But any additional cost is up to you (PW, QM, whatever this breaks, because I don't know). Testing environment is your friend

Licho1 avatar May 20 '15 07:05 Licho1

In other words, springie needs some control over boxes and it needs ability to disable shuffle and set them as before.

Licho1 avatar May 20 '15 07:05 Licho1

The infra-side implementation was supposed to just change how startboxes are put into spring start-script (eventually: into modoption instead of the engine startbox fields -- the one i added didn't remove engine boxes because thats not yet ready game-side).

Springie would still have full control over how the boxes are set up and control how the shuffle behaves through another modoption, so nothing is affected.

sprunk avatar May 20 '15 08:05 sprunk

In that case you probably made erorr in format string did you test on local or test springie? Deploying blind changes in key infra is really bad idea.

Licho1 avatar May 20 '15 08:05 Licho1

It compiled so i assumed everything worked

sprunk avatar May 20 '15 08:05 sprunk

that equals to blind test...

2015-05-20 10:10 GMT+02:00 sprunk [email protected]:

It compiled so i assumed everything worked

— Reply to this email directly or view it on GitHub https://github.com/ZeroK-RTS/Zero-K/issues/544#issuecomment-103803835.

Licho1 avatar May 20 '15 08:05 Licho1

@sprunk I discover this can be done without creating or altering gadgets.

We shuffle the startbox during startscript creation, suddenly the startbox ingame will be randomized and won't match the one displayed on ZKL screen. All feature are retained.

New command like "!shuffleBoxAtStart" can be introduced, to be called by player before they !start the game. Also, no worry about confusion because options are by default reset to normal by each new game, and it's (theoretically) backward compatible with old ZK and other game too.

xponen avatar May 21 '15 04:05 xponen

No, that wouldn't do anything. This is effectively the same as the current system. You would still know where everybody starts except you'd know that from Spring.GetAllyTeamStartBox instead of the lobby.

sprunk avatar May 21 '15 09:05 sprunk

@sprunk in that case we tell ZK to override Spring.GetAllyTeamStartBox() with fake value like this: https://github.com/ZeroK-RTS/Zero-K/blob/master/LuaRules/Utilities/weapon_index_compat_91.lua

Such as set it to a neutral position, like in middle.

(but we copy legit info for gadget use first before replacing it)

xponen avatar May 21 '15 11:05 xponen

Perhaps that would work. Feel free to implement it that way

sprunk avatar May 21 '15 11:05 sprunk

Turn out there was much help! the override for Unsynced was separate from Synced, like here: https://github.com/ZeroK-RTS/Zero-K/blob/master/LuaUI/main.lua

First I need to check whether user can override this file to undo the override,

xponen avatar May 21 '15 12:05 xponen

@sprunk yes, I want to try. will get back to you later

xponen avatar May 21 '15 12:05 xponen

Game-side my implementation is used but infra-side xponen's version got merged. Both implementations require the counterpart to also get merged to be useful. Only one version of the shuffer is needed so one of them needs to be chosen and the other reverted.

sprunk avatar May 30 '15 00:05 sprunk

Is this done?

GoogleFrog avatar Jun 08 '15 12:06 GoogleFrog

Done but needs Springie to be deployed.

sprunk avatar Jun 08 '15 17:06 sprunk

What does that mean? Something in springie? In stable?

If something is implemented then the ticket for it should be closed because the change is going to make it in.

GoogleFrog avatar Jun 13 '15 03:06 GoogleFrog

It means it is fully implemented (ie. ticket closable) and awaits infra stable.

sprunk avatar Jun 13 '15 05:06 sprunk