Jump to content

standard console batch file call via dialouge trigger


Recommended Posts

Posted

can i fucking do it? cant find info about it anywhere. i read skyrim marvelous papyrus engine cant comm directly to console (which is fucking retarded) but perhaps there is plugin for it?

Posted
1 hour ago, skyrimsucks said:

can i fucking do it? cant find info about it anywhere. i read skyrim marvelous papyrus engine cant comm directly to console (which is fucking retarded) but perhaps there is plugin for it?

Why would you want to? If you are writing dialogue you're in the CK. In the CK you can place all the commands that were in your bat file directly into the dialogue (in a script box).

Posted
2 hours ago, Psalam said:

Why would you want to? If you are writing dialogue you're in the CK. In the CK you can place all the commands that were in your bat file directly into the dialogue (in a script box).

 

i want to run mfg console face setup from txt file. 

 

i cant compile anything in there, always get "endfunction mismatch" error, even if i try recompile vanilla script. 

im not scripter, frankly i was hoping to just put commands directly like for console.

 

also it seems i can compile code in edit window but when i try to save it it says it cant compile...

Posted
2 minutes ago, skyrimsucks said:

 

i want to run mfg console face setup from txt file. 

 

i cant compile anything in there, always get "endfunction mismatch" error, even if i try recompile vanilla script. 

im not scripter, frankly i was hoping to just put commands directly like for console.

 

also it seems i can compile code in edit window but when i try to save it it says it cant compile...

Perhaps it would help if you look at the CK-Wiki scripting tutorials (don't worry - it's not that painful):

https://www.creationkit.com/index.php?title=Bethesda_Tutorial_Papyrus_Hello_World

Posted
47 minutes ago, Psalam said:

Perhaps it would help if you look at the CK-Wiki scripting tutorials (don't worry - it's not that painful):

https://www.creationkit.com/index.php?title=Bethesda_Tutorial_Papyrus_Hello_World

i figured that bit after fiddling with it, but that alone shows how bad interface is. im not interested to learning entire new language for couple functions i can call from console (if i was desperate i would rather pay for it). if i there was way to call console run txt file via simple script trigger, that would be useful.  

Posted
1 hour ago, alex77r4 said:

yea, im looking thru consoleutil source code but cant figure out what command to make it work. tried "ExecuteCommand" but either thats not intended for standard console format but im using it wrong. what i need is retard friendly code example.

 

 

here is source code for mfg wrapper 

===

Scriptname MfgConsoleFunc Hidden

; native functions, wrapper base. these have magic number for select some parameter.
bool function SetPhonemeModifier(Actor act, int mode, int id, int value) native global
int function GetPhonemeModifier(Actor act, int mode, int id) native global

; wrapper functions

; set phoneme/modifier, same as console.
bool function SetPhoneme(Actor act, int id, int value) global
    return SetPhonemeModifier(act, 0, id, value)
endfunction
bool function SetModifier(Actor act, int id, int value) global
    return SetPhonemeModifier(act, 1, id, value)
endfunction

===

 

i dont really know what some of those stand for (like what is actor act vs act) but i thought i could just replace it with target npc base id and values i want, but it wont compile. 

 

Posted
1 hour ago, skyrimsucks said:

what i need is retard friendly code example.

 

Seem that you are mixing different things... 

First thing are console commands like "fov 90" or "openactorcontainer 1"

Second thing are Papyrus Commands like "SetPhoneme" or "SetExpressionOverride"

 

The two things must be written in Papyrus but use different syntax.

If you are making a Dialogue in the CK put the necessary command in the Script Window:

 

First thing:

ConsoleUtil.ExecuteCommand("fov 90")

ConsoleUtil.ExecuteCommand("openactorcontainer 1")

 

Second thing:

MfgConsoleFunc.SetPhonemeModifier(PlayerRef, 0, 1, 100)

PlayerRef.SetExpressionOverride(12, 50)

-------------------

 

1 hour ago, skyrimsucks said:

but it wont compile. 

 

If you have compilation errors can be by two motives:

1 - You have write bad code

2 - You not have all the necessary scripts to make the compilation

 

Put yours compilations errors to guide you a bit more.

Posted

I dont rly understand what do u mean by "call via dialogue trigger"

 does that mean that u want to call BATCH file via Script when player select dialogue option or when NPC say topic to player?...

 

You can add script to Dialogue, atm. i dont have CK running but later i will make You SS where and how

 

 

if You want to use MFG Console Functions in Your Script first you need to Import MFG Console to Your script

 1) Create new Script

 2) Give it name etc.

 3) type that line in your code:

s1.png.36cce0c44c15b29d5b690e245b4d2c1d.png

 

now about using function... some functions are called ON something... some functions are just called...

in MFG Console you just type Function Name and fill it arguments 

s1.png.7aa15556048e9d71e1b810c6d79e5c97.png

 

for example SetPhoneme takes 3 arguments its Actor, ID and Value

 every Phoneme and Modifer have its own ID ( between 0 and 15 ) so in place of ID you need to give number of Phoneme / Modifer you want to edit

 in place of Value you type new value for that Modifer / Phoneme ID and ofc. in place of Actor reference on who You want to apply changes

 

example:

s1.png.c3ca69986e13b85eb9cbd560f2a7b6c0.png

 

Here you can see example of use MFG Console and SetExpressionOverride

 ExpressionOverride comes from Papyrus and its called on Actor so here order change a little :P

 

i actualy pref. Papyrus way... it looks nicer for me by doing Object.Function() instead of Function( Object ) :x...

 

 

 

 

but very important question... i thinked about now...

 

Why You want to use MFG Console via Dialogues?...

 You can change expressions in Topic settings... so u dont need scripts...

 

when you make new Topic you can change mood and mood value :x... Skyrim will take care of it and even animate if for you

so u dont have to worry with manualy applying Expressions...

 

and btw. Papyrus is slow AF so if u jsut want to change expression while talking with NPC u should use Topic Mood instead of MFG Console :x...

Posted
12 hours ago, alex77r4 said:

 

ConsoleUtil.ExecuteCommand("standard console command")

 

thx this was exactly what i was looking for and it fucking works. the only thing worse than learning language/syntax is learning 2 of them.

Posted
5 hours ago, -̒̈́̕?̖̪̼?̒̈́̕??̒̈́̕?- said:

 

 

but very important question... i thinked about now...

 

Why You want to use MFG Console via Dialogues?...

 You can change expressions in Topic settings... so u dont need scripts...

 

when you make new Topic you can change mood and mood value :x... Skyrim will take care of it and even animate if for you

so u dont have to worry with manualy applying Expressions...

 

and btw. Papyrus is slow AF so if u jsut want to change expression while talking with NPC u should use Topic Mood instead of MFG Console :x...

 

ofc im using integrated face expression but i found it very lackluster and limited compared to mfg. needless to say i need mfg to make sexy bitch expression: without mfg it ends up like victoria secret model without photographer telling her what to do, complete dick tease fail cause bitch got less grace than domesticated cow. 

Posted

@skyrimsucks

 There is few ways to do it... i think best way would be Activate Function...

 but im not sure if Activate will work inside TIF file...

 

1) create ObjectReference that hold Expression Values ( Lets say that object "Cardinal" )

2) create GlobalVariable which will hold ID of Expression you want to use ( lets say that object "FaceID" )

3) in Dialogue Topic add Script and inside that script use "Activate" and set FaceID to ID you want to play

 so its gonna be looking like this: ( in dialogue Script ) 

s1.png.058ddf36d8b1af71611fac859db1f55c.png

 

inside Cardinal You will need this: ( remember, Cardinal is ObjectReference we place somewhere to have reference and object form created )

s1.png.2db2463ad1d9cdb83e75c40c33d010fa.png

 

Spoiler

	
FaceID.SetValue( 3 ) ; we want to play Face Expression with ID 3
Cardinal.Activate( akSpeaker ) ; akSpeaker is Target which Player is taliking


	
Event OnActivate( ObjectReference qRef ) ; in qRef we should have akSpeaker !...
	If( FaceID == 0 ) 					 ; 0 ID for clear all Expressions
		Int i = 0
		While( i < 16 )
			SetPhoneme( qRef , i , 0 )
			SetModifier( qRef , i , 0 )
			i += 1
		EndWhile
;---------------------------------------------------------;
	Else ; If ID is not 0 then play Face Expression
		Int i = 0
		Int ExID = FaceID.GetValue()
		While( i < 16 )
			SetPhoneme( qRef , i , Phoneme[ ExID ].Array[i] as Int )
			SetModifier( qRef , i , Modifer[ ExID ].Array[i] as Int )
			i += 1
		EndWhile
	EndIf
EndEvent
	
	

 

This way any Actor that will Activate Cardinal ObjectReference will have Face Expression of given FaceID

 ofc. you also have to create Script to clear expression

 

and keep in mind that my Script is pretty slow... it was not designed for Dialogues

 so u should make your own that works faster ( just dont change Expressions u dont use :x... )

Posted

-̒̈́̕?̖̪̼?̒̈́̕??̒̈́̕?-

thx i will stick to tard friendly ConsoleUtil.ExecuteCommand("standard console command") 

 

this way i can even change values without opening ck by just calling bat txt files and also not making any script at all beside pasting bat and reset mfg console commands via this consoleutil call.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...