PDA

View Full Version : for lasersight desynch bug: /version79 and wkLaserFix


pisto
20 Aug 2010, 18:09
cleaning up this thread (http://forum.team17.co.uk/showthread.php?t=41828) for the crowd.

The issue
In the latest update (3.6.29.0) there's an oversight in the code that leads to desynchronization (in online games and replays), if you use laser sight while shooting. It applies only to game logic >=3.6.28.22, so if you have enabled teststuff or other special versions you can safely use aim with it.
This bug is particularly annoying because it's easy to trigger lasersight by mistake.

So, with some researches, I found that there are two solutions.

Force a slightly older version with RubberWorm (by Deadcode)
The most recent version which doesn't have this bug is 3.6.28.20-21, which in Rubberworm is numbered as 79. So you just need to either type /version79 in the host lobby, or edit in the scheme the crate probability of Select Worm to 79 (it's 0x4F in hexdecimal notation).

Pro: easy to enable, and RubberWorm is quite widespread. Also, Deadcode is willing to create a new module which uses this workaround, and only the host would need it.
Con: version 3.6.28.20-21 lacks an important feature against cheating, that is undefined content crates. It's possible to code an hack that shows crate contents, mine fuses, and possibly reveal invisible worms and activate lasersight locally.

wkLaserFix
Like wkJetFix (http://worms2d.info/JetFix), this module silently corrects the bug. It means that if you play an online game and all the players run version 3.6.29.0, and someone uses lasersight and shoots, the players who have this module will go on, those who don't will desynch.
Pro: game engine version is 3.6.29.0, so you have that nice anti-cheat system explained above. You can safely forget this module in your w:a directory, because it does nothing if you are emulating versions <=3.6.28.20-21.
Con: you can't disable lasersight within the turn, unless while jumping (:eek:).
I decided to release the module despite of this bug, because I think it's very minor. In the case of future updates, if you can't remember which version you have, just right click on the dll, click on properties, and then details. This is version 0.0.0.0.

You can use both of these (put the dll in the w:a directory and type /version79 whnever you want).

EDIT:
current version is 0.0.1.1, which has some features more. See next post for a description, and then download from here (http://forum.team17.co.uk/showpost.php?p=730425&postcount=7)

pisto
22 Aug 2010, 18:05
Version 0.0.1.0 (www.webalice.it/micioptah/wkLaserFix.dll)

(EDIT: see http://forum.team17.co.uk/showpost.php?p=730425)



Changes:
Improved lasersight bugfix. Now it is perfect.
You can permanently set on or off any utility (except double time and crateshower) for all the game.
You can raise the maximum number of flamelets that can stay at the same time on the map. The native limit (200) is too low, and for this reason petrol flames can disappear after using napalm strike.

Chat commands
The features can be activated modifying some unused settings in the scheme, very like RubberWorm. Although, I suggest you to use these commands: just append 'on' or 'off' (/like lgon) to force the corresponding utility to on or off state, and do not append nothing to disable any overriding.
/lg (low gravity)
/fastwalk
/laser (lasersight)
/invisibility
/damageX2
/cratespy

/flames[number] (like /flames1000) sets [number] as the flames limit (rounded to the upper hundred). /flames without arguments reverts back to native limit.

There are also a couple of convenience commands:
/tellv : announce what wormkit modules you are running, and their version. You can use this command also if you are not the host. It can recognize RubberWorm and Jetfix.
/help : prints a quick help on commands
/clear : deactivates any feature
/show : announce what settings you (host) are going to apply
/showme : reminds what settings are on



P.S. (for developers)
if you want your module to appear in the list printed by /tellv, wkLaserFix.dll exports one function: void __stdcall add_to_tellv(const char* modulename). Call it in your DllMain with a null terminated string describing your module.

Muzer
22 Aug 2010, 18:39
Wouldn't it have been better to put these new features in RubberWorm?

franpa
22 Aug 2010, 18:41
Do these features and unused scheme settings conflict with Rubberworm?

pisto
22 Aug 2010, 19:21
of course they don't.

I don't want to release any new Rubberworm version until the next update.

pisto
23 Aug 2010, 09:32
Version 0.0.1.1 (http://www.webalice.it/micioptah/wkLaserFix.dll)

EDIT: OLD! see next post.

just a bugfix in the flame limit feature, fixed a potential crash.
Replays of games played with 0.0.1.0 can be viewed with this version without desynchronization.

EDIT:
I have silently substituted the dll on that link with a new one, but the changes are so small, and they don't affect gameplay, that it doesn't deserve a new version number. Changes are:

/show command uncorrectly displayed "The host is going to apply these wkLaserFix (0.0.1.0) features:"
/show now works also when you join a game, and has the same effect as /showme
added version check on wa.exe, and if it detects that it is not 3.6.29.0, it shows an error and prevents the game from loading.

pisto
13 Sep 2010, 18:35
Version 0.0.2.0 (http://www.webalice.it/micioptah)

New stuff!

You can now set the state of the last two utilities, crate shower and double turn time. The commands are /doubleturn and /wwpshower (to distinguish from RubberWorm /crateshower, which nature is completely different).

Plus, there are a couple of features which affect instant utilities (crate shower, double turn, cratespy, double damage), which are stocking and multiplication of effect.
With stocking (append 'stock' to command, like /wwpshowerstock) any crate of an utility which is already fired will go in your armory, ready for the next turn or possibly round.
NOTE: with this mode, it's finally possible to make use of the "turns of double damage" option in SchemeEddy. Just set a value and then use /damageX2stock.

Multiplication (append 'multi' to command; doesn't apply to cratespy) leave the instantaneous nature of those utilities, but raises somehow the strength of an utility if you collect multiple crates of the same during a turn. This is the best that I could think of:
/doubleturnmulti -> each time you grab a double turn the time is increased of itself divided by the number of doubletimes you grabbed in the turn. This simply speaking means that the effect of double turn is x2, then x3/2, x4/3, x5/4...
/doubledamagemulti -> each time the damage multiplier is increased by one. So, one crate gives double damage, two crates triple damage, etc.
/wwpshowermulti -> since the crateshower drops a certain number of crates and then stops, getting anther crate shower crate just adds again another time this same number to the limit.
NOTE: the limit is the same which controls how many crates between turns can spawn. So, you can adjust it with the /cratelimit command of RubberWorm.


EDIT:

Version 0.0.2.1 (redownload from same link in this post)
This version removes utilities that have been overridden as active or inactive won't appear in crates (except during a crate shower).
For this reason, this version is not longer compatible with older ones.

EDIT: version 0.0.2.1 is BROKEN. wait for 0.0.2.2. Just a few minutes please

EDIT: ok, version 0.0.2.2 is out. Just redownload.