Console command additions

Feedback on past, current, and future development.
SlightlyCubed
Posts: 8
Joined: 23 Sep 2016, 19:25

Console command additions

Post by SlightlyCubed »

Hello everyone!
Sorry if I am posting this in the wrong section, but I am curious if it would be possible to make a "moveto player" command that can be used on NPCs? I am playing through a session with OPenMW and a companion mod and having the NPC teleport with me seems impossible at this point. I have tried a mod "Companion Teleporting" but it won't work from what I can see with OpenMW.

Thanks!
User avatar
silentthief
Posts: 456
Joined: 18 Apr 2013, 01:20
Location: Currently traversing the Ascadian Isles

Re: Console command additions

Post by silentthief »

Hello,

This should be doable with the Vanilla MW script, PlaceAtPC:

http://www.uesp.net/morrow/editor/mw_cs ... #placeatpc
Places the object at the player (PlaceAtPC)... in the direction you specify and the distance.
There is an example there which shows how to put NPC located near player.

ST
User avatar
Amenophis
Posts: 320
Joined: 30 Oct 2011, 04:34
Location: Fortaleza - Ceará - Brasil

Re: Console command additions

Post by Amenophis »

@silentthief that command just creates another instance of the NPC, not move the original.
Tested with Eldafire: went to Seyda Neen, them "PlaceAtPC eldafire 1 120 0" and you get 2 Eldafires running around.

@SlightlyCubed Really, it will be a great idea have a command that move an npc or the player around the world. I could create a camping mod where you enter a portable tent and when you would want to exit just activate a script that put you in front of it. (Morrowind commands lacks an option do determine what cell an instance is about, so you could discover the x, y, z positions of everything but not the cell where it is).

OpenMW already has an altered command ORI that provides x, y, z coordinates plus the cell where is. If we could get that information through the script system would be an fantastic addition.
SlightlyCubed
Posts: 8
Joined: 23 Sep 2016, 19:25

Re: Console command additions

Post by SlightlyCubed »

Thanks for all the replies all!
Yeah I just wanted to post it and see if anyone else would find it useful. Mostly because if you try to use any scroll to teleport to a nearby temple/shrine the companions get left behind. Like I said in my first post I found a few mods that say they fix it or add ways around it but none seem to work with OpenMW or require MWSE.
User avatar
allcreater
Posts: 9
Joined: 25 Jan 2017, 14:14
Location: Saint-Petersburg, Russia
Contact:

Re: Console command additions

Post by allcreater »

Hi everybody,
I'm new here, and it seems my first question will be right about implementing new console commands.

A little bit of offtopic :)
My primary area of interests is a computer graphics, so I want to play a bit (at least play, but what I really want to do in a perspective is to implement some advanced graphics features, like HDR, deferred shading, physically-based lighting) with renderer, and I need to dynamically reload a shaders to tune it up without game restart, because full game reloading is not an option, it's more or less long process at debug mode.


So, I was implement new command at my project branch, "reloadshaders". Now it is working, but I'm not sure is it useful for community.
Could somebody tell me, please, is it a good idea to extend the command list?
Where to take own operand ID (I was just find first free ID, more or less same as another IDs, but I'm not sure is it good to take it at my own)
And something about architecture. Shader manager is a more or less internal object, so it seems I should to add special method, "reloadShaders", into the World interface. But maybe it's bad decision?

I will be able to show the code at evening, if it will be interesting for somebody.
Also I want to discuss something about graphics, but I definitely must to do it in another thread :)

Best regards,
Anton Semenov
User avatar
sjek
Posts: 442
Joined: 22 Nov 2014, 10:51

Re: Console command additions

Post by sjek »

Well there's definitely interest. That's for sure. Haven't really went into following scripting lines thoroughtly but would say somewhere in general parts. Vague memory that there was set order for compiler reasons or something. The script data is uncompiled in data files. Otherwise it has went from scripting interpreter of some sort kinda directly to where's the data is so by my knowledge just somewhere where it collides less as possible .p

For mwse side its done for vanilla catching opcodes whitch it doesn't regognize and don't have ability affect frame timing or savegamedata erasing runtime info for now to prevent memory leaks which are kinda most limiting factors leading mostly to frametime / edgecase broplems. Array implementation and random number twister are coded and math function are handled internally. From melzaphor and others dev postings. For those reasons functions are wanted in form or another coded to openmw so adding new console command for master needs good reason first.

Github patch is mostly used for code sharing.

On shader part it's kinda open arena which goes over my head. In mge xe vtastek is inventing new ways as color coded grid over distant terrain files and from that randomised landskape as texture splatting. etc via shader code so would think its question of what runtime info can be given ultimately and underlying methods : )
User avatar
allcreater
Posts: 9
Joined: 25 Jan 2017, 14:14
Location: Saint-Petersburg, Russia
Contact:

Re: Console command additions

Post by allcreater »

@sjek, thank you very much for response!

Hmm, maybe it's possible to implement something like "local" commands, that will not be used at scripts, but will be available from console only? Unfortunately I'm new at project and does not familiar with that code, but guess that console is a frontend for script interpreter so it will be hard to separate :) Anyway, I think that debug commands could be very useful for game development :)

At least I will make special branch with that changes and then try to show my code :) But yesterday I had some troubles with Git (I'm new with this system and separating the useful code from my commits around graphics is more hard than I thought :( ) so was not be able to show the proposed patch =(

The graphics is another theme, I think there is much to talk about. Could you please say, is there good thread to discuss, or it's better to create a new one?
User avatar
sjek
Posts: 442
Joined: 22 Nov 2014, 10:51

Re: Console command additions

Post by sjek »

If the patch won't work then it's kinda up to you.
1. Can make a pull request with do not merge and something like needback needed tags and request to delete it when you are ready. There's majority of code discussion as rebasing and such is possible.
2. Making that patch first after whitch somebody probaply ask for pull request.
3. Do some separate design discussion in here forums
4. Or link to separate or your github account branch like maqifrnswa with linking to python and lua which was probaply copied to multiple accounts. Personally the interface with game data need extending before it's better usable for playing with those. Open source xP

From person who haven't done pull / patch other than followed.

For the graphic part new thread in dev section and pull request to accombany that for code review could be good : )

------------- wall of text
edit:
on console debuggin also asmo was on the topic and there has been also others.
viewtopic.php?f=2&t=3109&p=34849 asmo's point seems to been that tracing callbacks ingame can cause breeze overs. maybe in same way as doing while loops as those doesn't allow moving from single frame while condition is untrue.

this post from archived years ago can help or not as the code is most recent documentation
viewtopic.php?f=13&t=25&p=90

otherwise krugman25 had plans to make console with net library. tes3mp uses some kind c++ printing for server messages.

edits:
restructuring
old one
Spoiler: Show
tested those console commands
http://www.uesp.net/wiki/Tes3Mod:Catego ... st#Console
  1. BC, betacomment
    Content file: Morrowind.esm
    RefNum: 331476
    RefID: tolvise othralen
    Cell: Seyda Neen, Arrille's Tradehouse
    Coordinates: -41.1795 -46.2954 129
    Model: meshes\base_anim.nif
and continues
Spoiler: Show
also tried it and localscript.var works as well as showvars. otherwise i think TCG or TFW are good for showing uvs.
Last edited by sjek on 27 Jan 2017, 14:49, edited 2 times in total.
User avatar
allcreater
Posts: 9
Joined: 25 Jan 2017, 14:14
Location: Saint-Petersburg, Russia
Contact:

Re: Console command additions

Post by allcreater »

@sjek,
thank you again, so many information to think!

Despite of your advices (sorry about that, it was unbearable to keep it locally :) ) I still made a pull request. It seems it will be rejected because as I understand new commands addition is planned only after version 1.0, but maybe we will find another way to add this functionality or that branch will be useful for somebody for debug purposes? At least we could leave reloading code at the ShaderManager level and then wait the possibility to provide a way to call it from the game...

By the way, what about some special "secret" strings from scripts? For example, maybe we could interpret the message box with some very specific(as a protection from collisions with real messages) text as a debug command or made something like that? It's a hack, of course, but it could give special abilities for developers and testers.

Also tomorrow I will open a thread about rendering, because I have many questions :)
Post Reply