An OpenMW mod that lets you play the whole Elder Scrolls III: Morrowind as a top-down isometric game — with full online co-op or MMO modes.
C++
Merge isowind/bugfixes: the view switch and party markers with the camera and controller changes there
Claudee1342171191f
diff --cc isowind/README.txtindex 1a81338,3af17be..ab9a2f6--- a/isowind/README.txt+++ b/isowind/README.txt@@@ -87,8 -90,6 +90,8 @@@ they open, from when they joined, whil/party who is in your party/p MESSAGE talk to your party/party leave leave it; you keep the quests you have- In the top-down view your party members have a green ring under them, and a green arrow at the edge of++In the top-down view your party members have a green ring under them, and an arrow at the edge of+the screen points to any of them who are nearby but off it (on a co-op server, to every other player).Looks-----diff --cc isowind/mod/scripts/isowind/topdown.luaindex 22bc93e,82f48bd..bb7f812--- a/isowind/mod/scripts/isowind/topdown.lua+++ b/isowind/mod/scripts/isowind/topdown.lua@@@ -7,9 -7,11 +7,11 @@@-- left click attack / cast with a weapon or spell ready, otherwise interact with what is under the cursor-- right click power attack with a weapon ready (the weapon's strongest attack type)-- E (Activate) interact with what is under the cursor, or else the nearest thing in reach in front+ -- (a locked door or chest with no key: a go at picking it, with a lockpick carried)--- mouse wheel zoom: all the way out is the top-down view, in a little is Morrowind's third person view,--- all the way in first person (the D-pad on a controller); with an attack held (an arrow drawn)--- the view still switches, and the attack starts again in the new view--- F7 hop between the top-down view and the normal one+-- mouse wheel zoom, within the view (the D-pad on a controller)+-- F7 switch view: top-down, then Morrowind's third person view, then first person (rebindable, and- -- bindable to a controller button, in Options -> Scripts -> Isowind)++-- bindable to a controller button, in Options -> Scripts -> Isowind); with an attack held (an++-- arrow drawn) the view still switches, and the attack starts again in the new view---- With a controller (it takes over as soon as a stick or button is used, the mouse as soon as it moves):-- left stick move right stick aim / pick what X uses@@@ -17,23 -19,27 +19,29 @@@-- X use / talk Y ready magic-- right trigger attack / cast left trigger power attack-- bumpers previous / next quick key- -- D-pad up / down zoom (hold to keep zooming), within the view- -- D-pad left quick keys menu (on a server: the chat, typed with the keyboard on the screen)--- D-pad up / down zoom (hold to keep zooming), through the three views; in menus they move through the options++-- D-pad up / down zoom (hold to keep zooming), within the view; in menus they move through the options+ -- D-pad left not assigned-- Start menu Back inventory (hold: journal)-- left stick in sneak right stick in rest-- There is no cursor then: what the right stick points at (or else what is nearest in front) gets the ring and the- -- label, and with a weapon or spell ready the aim locks onto the nearest hostile creature in front.+ -- label, and X uses it (as E does: a locked door or chest is picked). With a weapon or spell ready the aim locks+ -- onto the nearest hostile creature in front (X still uses what is nearest, not that creature); with no hostile one+ -- there the ring and label stay on what X uses (friendly people, doors, containers and their locks), but the aim+ -- never locks onto those. A lockpick or probe never locks on, and looks for doors and containers first.-- The menus are the engine's controller menus ('controller menus' in the profile's settings.cfg): D-pad and A / B,- -- the triggers switch pages, Y puts an item or spell on a quick key, and a keyboard on the screen types.+ -- the triggers switch pages, Y puts an item or spell on a quick key, and X on a text field (moved onto with the+ -- D-pad) brings up a keyboard on the screen to type with; it never comes up by itself.----- The zoom picks the view: zoomed out to TOPDOWN_FROM or farther it is this top-down view; in closer, Morrowind's--- third person view at that distance; closer than FIRST_PERSON_BELOW, first person. Zooming and the first / third--- person switch are taken from the built-in camera script for good (claimCamera).+-- The zoom distance says the view: TOPDOWN_FROM or farther is this top-down view; in closer, Morrowind's third person+-- view at that distance; closer than FIRST_PERSON_BELOW, first person. Zooming stays within the view's range and the+-- switch view trigger (F7) moves between them, each keeping its own zoom. Zooming and the first / third person switch+-- are taken from the built-in camera script for good (claimCamera).-- The view is a fixed isometric angle: turned 45 degrees, looking down at the classic isometric 35.26 degrees.-- The camera slides in toward the player rather than go underground on slopes, and creatures (and hurt or hostile--- people) get health bars (healthbars.lua).+-- people) get health bars (healthbars.lua). In multiplayer, party members (MMO) get a green ring, and other players+-- off the screen an arrow at its edge pointing their way: party members in MMO mode, everyone in co-op.+ -- Signs can't be read from up here, so within SIGN_RANGE of the player their names show over them: signposts (each+ -- arm), shop and canton signs, and the town banners.local async = require('openmw.async')local camera = require('openmw.camera')@@@ -759,15 -861,19 +921,19 @@@ local function updateControllerHolds(dtelsebackPressedAt, journalOpened = nil, falseend- local zoom = (input.isControllerButtonPressed(B.DPadDown) and 1 or 0)- - (input.isControllerButtonPressed(B.DPadUp) and 1 or 0)- if zoom ~= 0 then+ -- The D-pad zooms only in the game itself: in menus and dialogue it moves through the options, and a hold begun+ -- there doesn't zoom once the menu closes, not until it is let go.+ local up, down = input.isControllerButtonPressed(B.DPadUp), input.isControllerButtonPressed(B.DPadDown)+ local zoom = (down and 1 or 0) - (up and 1 or 0)+ if not (up or down) then+ dpadHeld = 0+ elseif not controlsAllowed() then+ dpadHeld = nil+ elseif dpadHeld and zoom ~= 0 thendpadHeld = dpadHeld + dtif dpadHeld > DPAD_ZOOM_DELAY then- targetDistance = util.clamp(targetDistance * DPAD_ZOOM_RATE ^ (zoom * dt), MIN_DISTANCE, MAX_DISTANCE)+ zoomBy(DPAD_ZOOM_RATE ^ (zoom * dt))end- else- dpadHeld = 0endend@@@ -962,14 -1088,14 +1167,17 @@@ returnonFrame = onFrameSafe,onMouseButtonPress = onMouseButtonPress,onInputAction = onInputAction,- onKeyPress = onKeyPress,onControllerButtonPress = function() gamepad = true end,- onTeleported = function() camera.instantTransition() end,+ onTeleported = function()+ camera.instantTransition()+ signRefreshIn = 0 -- the signs found before are in another cell now+ end,onSave = function()- return { distance = targetDistance, topDownDistance = lastTopDownDistance }+ return {+ distance = targetDistance,+ topDownDistance = lastTopDownDistance,+ thirdDistance = lastThirdDistance,+ }end,onLoad = function(data)if not data then return end