Commit Graph

407 Commits (master)

Author SHA1 Message Date
Emmanuel Anne dace7ab706 scripts: recognize '+' also as a unary operator
it fixes the armor sorter in "Blades safe house.esp"
9 years ago
scrawl a47617c21f Fix tab indentations in apps/ and components/ 9 years ago
Marc Zinnschlag 4d94f38f4b replaced context-sensitive implementation of allowing digits at the beginning of names with a more general implementation (Fixes #1730) 9 years ago
scrawl 67bd6cd708 Remove empty line at the beginning of files
git ls-files -z | xargs -0 sed -i '1{/^$/d}'
10 years ago
Marc Zinnschlag cbf9f83b85 allow use of IDs as function arguments, even if the ID matches a keyword (Fixes #2830) 10 years ago
Marc Zinnschlag 20106bb90f allow keywords in quotes (Fixes #2794) 10 years ago
scrawl b3f5ac5dbb Include cleanup 10 years ago
scrawl 1d76607005 Add ORI (ObjectReferenceInfo) alias for BetaComment (Fixes #2723) 10 years ago
scrawl ea0339d471 Make the string argument to BetaComment optional 10 years ago
Marc Zinnschlag ee2763f2d4 Allow 5th parameter for PlaceAtMe (numeric value, ignored) (Fixes #2591) 10 years ago
Rohit Nirmal 396fba7fa9 Silence -Wreorder warnings, and remove -Wno-reorder. 10 years ago
dteviot 1d7f3474fa Fixed more MSVC 2013 warnings. 10 years ago
Scott Howard e2ef8c4022 fix -Wnewline-eof warnings 10 years ago
scrawl 3ccf4642b4 Implement ToggleScripts 10 years ago
scrawl a619cff615 Implement EnableLevelupMenu to trigger level-up 10 years ago
Marc Zinnschlag cd62dbc5b7 Merge remote-tracking branch 'scrawl/essimporter' 10 years ago
scrawl 5104a5a023 Add missing setFactionReaction instruction, use absolute storage instead of difference
Seems to be closer to how MW is storing it (it has the complete FACT record in the savegame, actually).

This (somewhat) breaks OMW savegame compatibility in that old changes are discarded, but I don't think the faction reactions are quest relevant anywhere.
10 years ago
Marc Zinnschlag 375d426dd0 check for premature end of scripts more consistently 10 years ago
Marc Zinnschlag 4b88ef5891 fixed QuickFileParser handling of begin line (skip it instead of trying to make sense of it) 10 years ago
scrawl d919a0186e Comment out unused opSkipOnZero 10 years ago
Marc Zinnschlag ac7c2a1473 some cleanup 10 years ago
Marc Zinnschlag bbbf431ae3 double bug in script name handling workaround (Fixes #1730) 10 years ago
Marc Zinnschlag 120873a66d another workaround for script translation messup 10 years ago
Marc Zinnschlag 057d0913d6 Merge branch 'scriptfixes' 10 years ago
Marc Zinnschlag fc1d42a7d2 fixed exclusion for certain characters at the start of names 10 years ago
Marc Zinnschlag b951251572 handle junk in argument lists (Fixes #2206) 10 years ago
Marc Zinnschlag 5cb94da9c5 compensate for incorrect minus character in translated dialogue script (Fixes #2207) 10 years ago
scrawl 31d28e727f Implement leveled list script functions (Fixes #1546) 10 years ago
Marc Zinnschlag ed5387fb8c replaced stay [ ignoring implementation with one that does not interfere with other workarounds (Fixes #2205) 10 years ago
Marc Zinnschlag e4f75267d0 in case of arguments not separated with comma the fist token of the next argument was put back incorrectly 10 years ago
scrawl 0ca11eab1c Ignore extra argument for removeItem (Fixes #2208) 10 years ago
scrawl 2601b26217 Merge branch 'master' of https://github.com/OpenMW/openmw 10 years ago
scrawl 886903d70e Implement HitAttemptOnMe function (Bug #2078) 10 years ago
scrawl be16f1d0a5 Implement PcForce1stPerson, PcForce3rdPerson, PcGet3rdPerson (Bug #2078) 10 years ago
Marc Zinnschlag cda0363f29 allow a space in the middle of multi-character comparison operators (Fixes #2185) 10 years ago
Marc Zinnschlag 109fbab546 changed column/row numbering in script compiler error messages from being starting at 0 to starting at 1 10 years ago
Marc Zinnschlag 86037149cd add optional string argument for activate instruction (ignored) 10 years ago
Marc Zinnschlag 95dfb07816 make [ a whitespace character in scripts (Fixes #2126) 10 years ago
scrawl bf0669e18c Ignore some extra string arguments to ShowMap (Fixes #2029)
Required for a dialogue result script in Morrowind.esm ("ShowMap Dren Plantation").
This must do the same as "ShowMap Dren", which actually does work properly, since ShowMap supports partial string matching.
10 years ago
Marc Zinnschlag a0dbb40c8e Allow script names starting with digits (Fixes #1730) 10 years ago
scrawl c010c28337 Implement ToggleWorld instruction 10 years ago
scrawl 7252cb63a6 Fix cppcheck issues 10 years ago
slothlife 35ced14e45 Fix for MSVC warnings 10 years ago
Marc Zinnschlag 9ae9104a45 Merge branch 'openmw-32' 10 years ago
Marc Zinnschlag 14f32563e7 fixed script compiler code ordering issue 10 years ago
scrawl 267cf4e140 Implement ResetActors script instruction (Fixes #1859) 10 years ago
scrawl 174153b2da Revert "Fix member variable case problem"
This reverts commit f0354ea04c.

Fixes #759 (again)

Conflicts:
	components/compiler/lineparser.cpp
10 years ago
Marc Zinnschlag 52f6a2ec7b remote local variable access was always using variable with index 1 instead of the index specified by the access request (Fixes #1739) 10 years ago
Marc Zinnschlag 736ab76f68 limit argument error workaround to PositionCell instruction (Fixes #1732) 10 years ago
scrawl 2db50da8dd Implement magic effect script instructions (Feature #1489) 11 years ago
Marc Zinnschlag 33c36bf0df Merge remote-tracking branch 'scrawl/master' 11 years ago
Digmaster a32ab842ae Added ForceJump/ForceMoveJump commands 11 years ago
scrawl 0c1c468f70 Accept a useless extra integer argument for addItem (Fixes #1726) 11 years ago
scrawl 45af34d189 Merge branch 'master' of https://github.com/OpenMW/openmw 11 years ago
scrawl 543bb22e8f Implement collision script instructions (Fixes #1111) 11 years ago
Marc Zinnschlag ad50b926f5 reducing some stray arguments again 11 years ago
Marc Zinnschlag 17bd094afd allow a few more stray arguments 11 years ago
Marc Zinnschlag 2abc4e42c8 end parsing of line after parsing a declaration 11 years ago
Marc Zinnschlag 6a745c014f workaround for incorrect argument order for PositionCell instruction 11 years ago
Marc Zinnschlag 2e355df8b3 removed function ScriptManager::getLocalIndex (was redundant and was also depending on precompiled scripts) 11 years ago
Marc Zinnschlag 19f4c46fe4 alllow (and ignore) explicit references for StopScript and ScriptRunning 11 years ago
Marc Zinnschlag aa8c0bccb4 added new argument type: z (optional, any) 11 years ago
Marc Zinnschlag 11a2c767cc some argument parsing cleanup 11 years ago
Marc Zinnschlag e33ee52b91 make stray names in the begin line a warning instead of an error 11 years ago
Marc Zinnschlag 35b27ea8cb ignore stray string argument after GetDisabled 11 years ago
Marc Zinnschlag e8322da663 added support for targeted scripts to script compiler 11 years ago
Marc Zinnschlag 563c2e5730 be a bit more relaxed about allowing - in names (Fixes #1593) 11 years ago
scrawl 2506c16bf5 Add a dummy GetStat function returning 0 (Fixes #1589) 11 years ago
scrawl b259c5def2 Make GetFactionReaction garbage argument optional 11 years ago
scrawl b52977e44c Add dummy Face implementation for now (Bug #1541) 11 years ago
scrawl 750d8b5589 Allow garbage integer argument for addSpell (Fixes #1539) 11 years ago
scrawl 9a26cf22e6 Implement toggleMenus 11 years ago
scrawl 1dc9e151cb Count werewolf kills (Fixes #1525) 11 years ago
scrawl 2477456f99 Implement Murder crimes and OnMurder instruction (Fixes #1315) 11 years ago
scrawl ec66484472 Fix forceGreeting with explicit references (Fixes #1518) 11 years ago
scrawl fd59a4a79e Fix some doxygen typos 11 years ago
scrawl 77388fe2ce Implement BetaComment instruction (dumps reference info) 11 years ago
scrawl 3788fb042e Implement MenuTest script instruction (Fixes #1454) 11 years ago
scrawl 2dd54dbcfc Implement ClearInfoActor script instruction (Fixes #1422) 11 years ago
Marc Zinnschlag f112c78858 Merge remote-tracking branch 'scrawl/master' 11 years ago
scrawl e68600eda2 Make Activate instruction work properly even when onActivate was not called in the same frame.
There are two major differences to the old implementation:
 - Activate can now be called on its own, e.g. in the console. In Vanilla this appears to be a no-op, so it is unlikely to be used and the potential for breakage is low.
 - The Action to execute is now determined when Activate is called, not when OnActivate is called. This however makes sense, since there may be a time difference between the two, and the object (or the player) could have changed in the meantime, requiring a different Action.

Fixes #1166 and #1346.
11 years ago
cc9cii bbe77d656a Minor fixes from static analysis. 11 years ago
Marc Zinnschlag be39395ce7 Merge remote-tracking branch 'scrawl/master' 11 years ago
Marc Zinnschlag 12fc0aaecb removed an unused parser settings (implicitly fixing a case were this setting was not applied correctly) 11 years ago
scrawl 3e2eed9269 Implement getFactionReaction function
Strange bug when using value != 0 for the garbage argument?
11 years ago
scrawl e266c39c5d Implement modFactionReaction instruction (Closes #1347) 11 years ago
Thomas 085fb2c5a2 Simplified documentation a bit 11 years ago
Thomas a61d804de6 now that I've found the documentation, fixed some stuff for extensions 11 years ago
Thomas 8f90dd43ec Changed things to use typedef ScriptARgs/ScriptReturn, which makes finding out what those weird strings meant much much easier 11 years ago
Thomas c2127845af Added onKnockdown command 11 years ago
scrawl f921f2e7db Make PcRaiseRank, PcLowerRank and PcJoinFaction properly accept references instead of using the actor that the player talked to last.
This also solves a potential crash when no actor has been talked to yet, e.g. immediately after loading a savegame.
11 years ago
scrawl 452b522bc3 Fix typos 11 years ago
scrawl c8c0e5de38 Fixed code issues found with unity build. Missing include guards, duplicated functions, ... 11 years ago
Marc Zinnschlag 0d84adb2c6 allow x->(y) instead of (x->y) 11 years ago
Marc Zinnschlag fd665a1994 ignore conditions after an else (only works if condition is put in parentheses) 11 years ago
Marc Zinnschlag d213c6c36a fixed a constness-issue 11 years ago
Marc Zinnschlag 451e1f413b instead of using pre-compiled variable lists for remote member access get the variable list from the remote script on the fly 11 years ago
Marc Zinnschlag e76ef92669 also allow the use of keywords as remote local variables in set statements 11 years ago
Marc Zinnschlag 2086ebe410 fix for inappropriate disable (2nd attempt) 11 years ago
Marc Zinnschlag b01c6dad37 Revert "allow disable as an alias for getDisabled (in most cases)"
This reverts commit f7ff4fbd51.
11 years ago
Marc Zinnschlag f7ff4fbd51 allow disable as an alias for getDisabled (in most cases) 11 years ago
Marc Zinnschlag d6e212a02b Merge branch 'master' into script 11 years ago
Marc Zinnschlag 309573a3ac allow the use of the keyword end as a variable name in an expression 11 years ago
Marc Zinnschlag ac8290c4d3 fixed problem with line endings in case of a local variable redeclaration 11 years ago
Marc Zinnschlag dde4fbd818 allow one more integer argument in RemoveSoulGem and up to 6 more in AiFollow and then throw them all away 11 years ago
Marc Zinnschlag 87b51e47a9 fixed another case issue in remote member access 11 years ago
Marc Zinnschlag c03bd8ebb6 allow [] as aliases for () 11 years ago
Marc Zinnschlag 0313876d88 allow leaving out if in a top-level if-statement 11 years ago
Marc Zinnschlag 2eeb0eb4f3 allow lines to continue with other instructions after an legit else 11 years ago
Marc Zinnschlag 749136bf33 ignore attempts to set non-existing variables 11 years ago
Marc Zinnschlag a85d3c7dcb ignore unused explicit references for functions 11 years ago
Marc Zinnschlag 6e2e4d1adf ignore stray begin 11 years ago
Marc Zinnschlag 93d4743012 interpret instruction keywords as names within expressions 11 years ago
Marc Zinnschlag c0a6acfe6c allow the use of keywords as variable names in more places 11 years ago
Marc Zinnschlag b1b0877122 allow additional numeric argument for AiFollow and ignore it 11 years ago
Marc Zinnschlag bfb0e62c4a ignore additional string argument after enable/disable 11 years ago
Marc Zinnschlag 61626e90da allow additional string argument for stopcombat and addspell (ignored) 11 years ago
Marc Zinnschlag 6a5d88b640 ignore stray else and endif in scripts 11 years ago
Marc Zinnschlag 697bda6371 allow (and discard) explicit reference on instructions that do not accept explicit references 11 years ago
Marc Zinnschlag f26aa4f645 fixed while loop implementation 11 years ago
Emanuel Guevel 8c8f4cd420 Fix typo 11 years ago
Marc Zinnschlag 5c0071f320 fixed spelling of an error message 11 years ago
Marc Zinnschlag 3b990795c4 added access to remote access of local variables of global scripts 11 years ago
Marc Zinnschlag 3147aebf75 factored out declaration parser 11 years ago
Marc Zinnschlag 2b2ac6f62b allow declaration of local variables with keywords as names 11 years ago
Marc Zinnschlag 32860a05e3 added dummy implementations for getPcInJail and getPcTraveling 11 years ago
Marc Zinnschlag 914ab1b8ab allow 'x' instead of 'getjournalindex x' 11 years ago
Marc Zinnschlag cd9b137129 allow elseif without matching if (grrrrr) 11 years ago
Marc Zinnschlag 8bcdf54570 added warning mode to script compiler error handler 11 years ago
scrawl 03cf383be7 Merge branch 'master' of https://github.com/zinnschlag/openmw into savedgame
Conflicts:
	apps/openmw/mwgui/referenceinterface.cpp
	apps/openmw/mwmechanics/actors.cpp
	apps/openmw/mwmechanics/mechanicsmanagerimp.cpp
	apps/openmw/mwmechanics/mechanicsmanagerimp.hpp
	apps/openmw/mwscript/cellextensions.cpp
	apps/openmw/mwworld/cells.cpp
	apps/openmw/mwworld/cells.hpp
	apps/openmw/mwworld/cellstore.cpp
	apps/openmw/mwworld/store.cpp
	apps/openmw/mwworld/worldimp.cpp
11 years ago
Marc Zinnschlag 3e58eb34e4 Merge remote-tracking branch 'sergeyshambir/startcombat'
Conflicts:
	apps/openmw/mwscript/docs/vmformat.txt
11 years ago
scrawl 6f9113fe88 Add preliminary implementation of PayFine, PayFineThief and GoToJail instructions 11 years ago
scrawl 7b33f6f2ac Detect crime of sleeping in other NPC's beds. ShowRestMenu needs to support an explicit/implicit reference for this. 11 years ago
Sergey Shambir d5a0ff17fd MWScript: updated vmformat.txt, changed opcodes to fix sequence.
Opcodes for StartCombat, StopCombat, GetTarget now follow the last
previous opcode.
11 years ago
Sergey Shambir 5c7e39a92f Implemented script commands StartCombat, StopCombat, GetTarget.
Also renamed one field of AIWander class because it's not longer
unknown.
11 years ago
scrawl 62774fcc4a Merge branch 'master' into HEAD
Conflicts:
	apps/openmw/mwbase/world.hpp
	apps/openmw/mwinput/inputmanagerimp.cpp
	apps/openmw/mwmechanics/actors.cpp
	apps/openmw/mwworld/worldimp.cpp
	apps/openmw/mwworld/worldimp.hpp
	components/esm/loadtes3.cpp
11 years ago
scrawl b3764c504a Implement GetPcJumping instruction 11 years ago
scrawl 2a7d610f87 Implement GetSpellReadied instruction 11 years ago
scrawl 55c5d7cee4 Implement Resurrect instruction 11 years ago
scrawl b4230f716e Implement RemoveEffects instruction 11 years ago
scrawl 7d8ca91286 Implement RemoveSpellEffects instruction 11 years ago
scrawl 366801f3d5 Implement explodeSpell instruction (like Cast, with caster = target) 11 years ago
scrawl 93e1a2df73 Implement Cast script instruction (shrines work now) 11 years ago
Lukasz Gromanowski 1ce4663065 Updated compiler opcodes for COE, and setHello.
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
11 years ago
Lukasz Gromanowski 50b6e828cc Added asserts in Interpreter::installSegmentX methods.
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
11 years ago
Marc Zinnschlag 3590fa40bd store global script state in saved game files 11 years ago
scrawl 9f5ff033d7 Handle the "GetLOS" alias for GetLineOfSight 11 years ago
scrawl 58dce88c7d Handle the "tai" alias for ToggleAI 11 years ago
gus dff3cf162d ToggleAI script instruction 11 years ago
gus d587f3c946 Merge branch 'master' of https://github.com/zinnschlag/openmw.git into AICombat
Conflicts:
	apps/openmw/mwmechanics/actors.cpp
	apps/openmw/mwscript/docs/vmformat.txt
11 years ago
Emanuel Guevel 496f786c2a Implement Disable/EnableLevitation script functions
Totally copied on Disable/EnableTeleporting implementation.
Thanks KittyCat!
11 years ago
gus 46a734852b adding script instruction getLOS + some test about AI 11 years ago
mckibbenta 8998b90e8b initial do-nothing implementation; registered opcode 12 years ago
Chris Robinson 73437dfdca GetEffect can accept an effect ID string as well 12 years ago
Chris Robinson 30973352e8 Implement ShowVars (SV) console function 12 years ago
Chris Robinson db1036e5e5 Handle SetWerewolfAcrobatics 12 years ago
Chris Robinson 2bac4566c0 Merge remote-tracking branch 'PotatoesMaster/werewolf' into werewolf
Conflicts:
	apps/openmw/mwmechanics/actors.cpp
	apps/openmw/mwscript/statsextensions.cpp
12 years ago
Alex b9579e085f cleanup 12 years ago
Alex c3ca5b7c32 mild cleanup 12 years ago
Alex de1f423bd7 initial move of script opcodes and registerExtensions functions to components/compiler 12 years ago
scrawl 7dc30a01cd Some changes suggested by cppcheck 12 years ago
Marc Zinnschlag 4a75c7dcc0 allow backticks in names 12 years ago
Marc Zinnschlag a2aa3aaa0e workaround for - in names 12 years ago
Miroslav Puda 7149439ace Replacement of empty() method by assertion. 12 years ago
Miroslav Puda d5689730eb Removal of unnecessary variable.
empty variable duplicates empty() method of std::string. Check for empty value should be replaced by assert since it does not makes much sense to call scanInt with null character.
12 years ago
Marc Zinnschlag e2620a1edf Issue #694: allow float literals starting with . 12 years ago
scrawl f0354ea04c Fix member variable case problem 12 years ago
Marc Zinnschlag fe038cef03 turned redeclartion of local variables from an error into a warning 12 years ago
Marc Zinnschlag 63407a662c allow <== and >== as alternative for <= and >= in scripts 12 years ago
Marc Zinnschlag 90b38cbfbe fixed parsing of end statements in scripts with IDs matching keywords 12 years ago
Marc Zinnschlag 6d3a2cd5a0 added comment token (for use in syntax colouring) 12 years ago
Marc Zinnschlag 74145410f2 basic syntax highlighting in script subview 12 years ago
Marc Zinnschlag fd0aa1a4b8 Issue #685: Treat : as a whitespace 12 years ago
Marc Zinnschlag 4711135e7f workaround for faulty endif in Morrowind scripts 12 years ago
Marc Zinnschlag 46bde604f9 Issue #601: unary minus was interpreted as binary minus when used in an argument list without comma 12 years ago
Marc Zinnschlag 151ecaad04 workaround for garbage after an end statement 12 years ago
eduard 2dc0064cc2 more string lowercase 12 years ago
guidoj 0549e949ba Mostly removal of unnecessary #include's and a little clean up 13 years ago
Marc Zinnschlag 50d81e99fb possible fix for script execution bug 13 years ago
Marc Zinnschlag fe85de5ea7 Issue #181: assignment to member variables 13 years ago
Marc Zinnschlag 10b27e582b Issue #181: various fixed to member variable access 13 years ago
Marc Zinnschlag 8b19de17b6 Iisue #181: enable member variable access from expressions in console 13 years ago
Marc Zinnschlag 6c5b21fa42 Issue #181: Member variable access in expressions; error reporting fix for the previous commit 13 years ago
Marc Zinnschlag d1441d79e7 Issue #181: added code generation for member variable access 13 years ago
Marc Zinnschlag 050559d2e2 Issue #181: added member variable access token 13 years ago
Marc Zinnschlag 6ec2a2091c Issue #305: Allow the use of = as a synonym for == 13 years ago
scrawl c85c794c86 fixed some cppcheck issues 13 years ago
Marc Zinnschlag 01500e979a another fix for optional arguments 13 years ago
Marc Zinnschlag d9677cb33e fixed problem with parsing optional string arguments 13 years ago
Marc Zinnschlag 187b8e58d6 fixed handling of optional instruction/function arguments; removed choice workaround 13 years ago
Marc Zinnschlag 5b378e820d warning level adjustments and some related fixes 13 years ago
Marc Zinnschlag 861dc6a16e redirecting output of expression evalutation to new report channel 14 years ago
Marc Zinnschlag 6848115c18 backend for tab completion: keywords 14 years ago
Pieter van der Kloet dd4d022301 Converted all tabs to four spaces 14 years ago
Marc Zinnschlag 044bf0ab48 fixed parsing explicit references in the body of control structures 15 years ago
Marc Zinnschlag c18e83d7c0 extended scripting extensions to code segment 3 (instructions and functions with optional arguments) 15 years ago
Marc Zinnschlag b3cc3073a3 changed encoding of segment 3 opcodes (increasing the number of opcodes, while reducing the width of the argument) 15 years ago
Marc Zinnschlag f4e79a48f0 implemented optional arguments 15 years ago
Marc Zinnschlag 276a9db6f7 added missing button implementation for MessageBox 15 years ago
Marc Zinnschlag 0d4f2ab3ef disabled escape sequences in script strings (doesn't work with Windows paths) 15 years ago