From: jim <ji...@ma...> - 2002-06-10 16:13:13
|
firefreak wrote: > Wire Puzzles: > Their state IS stored within the switch info (I forgot to > copy my savegame to the datadir shack uses ;) :) > Both the IS and SHOULD states are stored within a 32 bit > field each. (should: offset 0x0014, is: offset 0x0018) > Each bitfield is made up by 2 three bit combos describing one > connection (wire). Giving a maximum of 5 wires and 8 connectors each side, I make it. > This makes only two int16 fields remaining to be hacked. > I tried to associate them with the wire colors, together with > the class type (Wire puzzles appear to have 9 3 1, 9 3 2, 9 3 3) - > but failed (always one exception turned up...). > Perhaps the amount of wires is another parameter for the colors... How many different wire colours are there? I can't remember off hand. Are there any wire puzzles on higher Puzzle settings that have all wires the same colour? AIUI the various puzzle settings for wires are: level 0 instant solution; level 1 all wires same colours (presumably the OR of the different wire fields is checked); level 2 threshold as given; level 3 full power always needed. Is this right? > Another info I'm missing is the power level one wire gives. > a) The power level is hardcoded associated with the color > b) (more likely) the power output is calculated on how 'near' > the wire is to it's target connection... Likely B I'd have said ... try subtracting target from actual for all the 3-bit fields. > Power Puzzles: > The second Map Object reference adresses a trigger object > being an action 0x00 trigger without condition. > The 'private' bytes of the trigger object appear to describe > the state of the puzzle. A-ha! Another helper null trigger. > Unfortunately, the state is coded in a weird way. Plus =E7a change, eh? >=20 > The most simplest puzzle for example (lvl7, last antenna, > first puzzle to get in) has only three nodes (init: X X X). > The initial trigger state has three identical entries > (using proper bit alignment so that the nodes are described > with 3 bits each) -- but changing the puzzle to "X + +" made > unrelated changes to the trigger state... >=20 > Could it be compressed? Could be but I'm inclined to doubt it. There aren't any more cross-references anywhere, are there? > I've updated the code (also added trigger.c which loads the > raw data; plus another scratchpad ;) plus the ss-specs doc > with the info we figured out already. Great work, thanks. We can say that all triggers and switches have the same basic format (switches and panels have an extra 16-bit field which we don't know what it is yet). This is index, prev, next (as always), action (0 for default, which tends to be the case for switches), condition (4 bytes), then links and special. A trigger link field is 4 bytes; the first 16-bit word is the object index of the target trigger, I think the second is a delay. (A propagate trigger action 6 just has 4 link fields). Here's another little tidbit for you: the X-22 panel on level R has condition code 00 07 08 00. Isotope X-22 is object 8/7/0. Sometimes condition is the C/S/T of the object to stick into it. Is there a flag for condition type, or does it depend on panel type? jim --=20 http://madeira.physiol.ucl.ac.uk/people/jim/ "... I naturally gravitated to London, that great cesspool into which all t= he loungers and idlers of the Empire are irresistibly drained." - Sir Arthur Conan Doyle, "A Study in Scarl= et" |