Making a Multiple Mark Mod

General discussion regarding the OpenMW project.
For technical support, please use the Support subforum.
Post Reply
Zeofig
Posts: 10
Joined: 14 Oct 2015, 15:01

Making a Multiple Mark Mod

Post by Zeofig » 27 Oct 2015, 05:39

I remember reading a post here where someone mentioned that it should be possible to make a multiple mark/recall mod in openmw's current state. I can't figure out how this is possible, though. Can anyone point me in the right direction? I don't think they meant to "old-fashioned" method of huge scripts with checks for every cell, but I could be wrong.

User avatar
sjek
Posts: 410
Joined: 22 Nov 2014, 10:51

Re: Making a Multiple Mark Mod

Post by sjek » 27 Oct 2015, 06:53

have looked into time to time and closest what have gotten is with position and other function taking variables so you could save getpos x, getpos y, getpos z to variables and teleporting with those.
setpos or position depending how to handle the angle.
then getspellefects or cast inside if (not sure if vanilla put could be in openmw) to get recall or mark

getting region automatically for messagebox could still need to look it up and for given names don't remember/know if mwse functions are used. nothing seems likely on command list but choise showing more than five have it's own code (somewhere on bug tracker) and for getting player input the code is somewhat when jiub ask your name but would need to be ported to getinput function showing only one line for starters. possibly after 1.0

did it use getPCcell to find the name ? (what happens if used without specific cellid)
"life is crazy"
"craziness has beauty which only crazies understand" some movie clip in the head.
https://wiki.openmw.org/index.php?title=Testing

User avatar
asmo
Posts: 229
Joined: 18 Sep 2014, 21:20

Re: Making a Multiple Mark Mod

Post by asmo » 27 Oct 2015, 16:03

sjek wrote:did it use getPCcell to find the name ? (what happens if used without specific cellid)

Code: Select all

> GetPCCell
column 0 (<newline>):
error: Unexpected special token
OpenMW version 0.36.1
Revision: 6c65081643
gentoo Linux - rolling release

User avatar
Zini
Posts: 5390
Joined: 06 Aug 2011, 15:16

Re: Making a Multiple Mark Mod

Post by Zini » 28 Oct 2015, 08:32

That is not how getPcCell works. See UESP wiki or any other MW scripting reference of your choice.

User avatar
sjek
Posts: 410
Joined: 22 Nov 2014, 10:51

Re: Making a Multiple Mark Mod

Post by sjek » 28 Oct 2015, 09:00

was thinking about long list to check all the possible cells and giving the specefic cell for name.
that would in vanilla system possibly run out of variables to store the info and get the messagebox give region and cell names.
Returns 1 if the player is in the given cell. Can also check for partial matches, i.e., GetPCCell, "Vivec" will return 1 if the player is in a cell named Vivec or Vivec, Fred’s House.
http://www.uesp.net/wiki/Tes3Mod:GetPCCell

about extending getPCcell to return cell name directly without variable is arguably safe route it giving error as correct one.
thanks fot the test

the scripting plan states viewtopic.php?f=6&t=617
Spoiler: Show
and that cellof function with maybe local state pinned to player if possible with dehardcoding state checks would make this mod an easy one possible in one script or separating the names finding script on it's own.

looking trought mwse functions
ifx and setx are in mwse to allow functions like ifx health <= (gethealth -> eldafire) althought can't take functions in place of health

can look to actual mod somewhat in the evening
"life is crazy"
"craziness has beauty which only crazies understand" some movie clip in the head.
https://wiki.openmw.org/index.php?title=Testing

User avatar
asmo
Posts: 229
Joined: 18 Sep 2014, 21:20

Re: Making a Multiple Mark Mod

Post by asmo » 28 Oct 2015, 11:23

sjek wrote:was thinking about long list to check all the possible cells and giving the specefic cell for name.
that would in vanilla system possibly run out of variables to store the info and get the messagebox give region and cell names.
I think something like that is done in the "Multiple Teleport Marking Mod v2.2 by Marcel Hesselbarth".
The problem is that it only works for cells that are known to that plugin. As soon as a mod adds another cell (house or landmass or cave ...) those are not found/covered.

Cell x would be perfect since the game knows cells added by a mod.
sjek wrote:
Returns 1 if the player is in the given cell. Can also check for partial matches, i.e., GetPCCell, "Vivec" will return 1 if the player is in a cell named Vivec or Vivec, Fred’s House.
http://www.uesp.net/wiki/Tes3Mod:GetPCCell
Hm... good to know!
gentoo Linux - rolling release

User avatar
sjek
Posts: 410
Joined: 22 Nov 2014, 10:51

Re: Making a Multiple Mark Mod

Post by sjek » 28 Oct 2015, 21:19

I think something like that is done in the "Multiple Teleport Marking Mod v2.2 by Marcel Hesselbarth".
some parts figured out there's perl script in Teleport_Generate_Scriptcode for making if/elseif scripts for getcell, getgrid, setcell, setgrid. these are in multiple parts for nested if limit in vanilla and could be combined and written from cell lists generated with TesCS

the main script is teleport_menu2
  1. disables teleporting for catching recall and mark leading also to incombapility with new areas and the need to catch and recast almsivi and divine (can be solved)
  2. crolls with scriptstate variable to take into account bloodmoon script patch and different situations (could be possibly optimised separating to two scripts and playing with script variable reading instead of open one)
  3. with scriptstate starts teleport_setposition and teleport_getposition and teleport_infoposition which run trought perl generated position scripts (as first one could be bypassed with openmw allowing position function take variables, saving them to global/gmst value or which will survive saving/reloading?)
what looked the position is stored to global "cell" and that is used to get the proper name showing with teleport_infoposition going trought teleport_infocell / grid scripts. don't know if there's a way to bypass that yet

teleport_setposition go trought exterior grid by position coordinated and starts the corresponded perl generated which seems to pick the closest matching..... z is in zero. position where fixes if remember correctly (for NPC) to level to ground if teleporting underground but in this case can be bypassed with position variables.

i think over half can be taken out as compatibility and rewriting teleport_menu2 to better handle different situation at least on readable level. totally doable should be

for some reason teleport_menu2 places dummy item under characters feet when mark or is this to save the variables?
"life is crazy"
"craziness has beauty which only crazies understand" some movie clip in the head.
https://wiki.openmw.org/index.php?title=Testing

User avatar
asmo
Posts: 229
Joined: 18 Sep 2014, 21:20

Re: Making a Multiple Mark Mod

Post by asmo » 28 Oct 2015, 21:43

sjek wrote:could be bypassed with openmw allowing position function take variables
This

Code: Select all

player->SetPos x Day    ; or take a variable from your script, it 
already works. ;)

And other things like

Code: Select all

SetDelete 1
that can be called by an object to terminate itself or executed in a global script to terminate an instance…
Spoiler: Show
--- posts merged ---
Cell x
[...]
The following functions needs to be added (c being a variable of type cell):

(i) isinterior c - returns 1, if c is an interior cell, and 0 if c is not an interior cell
(ii) isexterior c - returns 1, if c is an exterior cell, and 0 if c is not an exterior cell
Maybe part of the code of GetWindSpeed can be used to achieve this. AFAIK that's how to script it with Bethesdas engine.
(iv) interior name - returns the interior cell specified by the given name
What is ment here? Returns a reference? What would "interior Balmora" return? What would "Balmora, Eight Plates" return? Or is that a mistake and it shall be possible to determine which (exterior) cell the given interior is in? That would be a string then?!
Last edited by asmo on 28 Oct 2015, 22:18, edited 1 time in total.
gentoo Linux - rolling release

User avatar
Zini
Posts: 5390
Joined: 06 Aug 2011, 15:16

Re: Making a Multiple Mark Mod

Post by Zini » 29 Oct 2015, 11:03

I could try digging into the documentation and come up with an explanation, but its unlikely that the feature will be implemented exactly as described in that thread, so this would be a waste of time. The thread this statement was taken from is old and since then there have been some considerable changes to the plan; at least the inclusion of worldspaces, but we probably also need to have another look at the concept of interior and exterior cells in general.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests