Jump to content

Fallout New Vegas GECK & Scripting Help 101


Recommended Posts

Posted

@prideslayer: You want to play with assembly code ? Source is included in download. And editing the resources does fuck some of the offset used by PowerUp when modifying menus.

 

Posted

Source is in there? I didn't know that. Didn't know it was modifying menus either, but I don't think just resizing/moving form components should affect that either.

Posted

It changes offsets, that's enough

I haven't actually looked, but it really shouldn't. Are you sure? Changing sizes and positions should just be an in-place edit of some integer values in the resource.

Posted

Well I looked now and.. I'm astounded. I can understand needing the patching bits to be in asm, but the entire plugin?? That's mental! :D

 

The script window patching will abort if InsertMenuItemA returns zero, and I see no checksum stuff anywhere, so it looks like you were right about that -- you peeked, didn't you! This looks like a real pain in the ass.

 

Tomm, for now, I think you'll just need to use your edited one for dialog without powerup, then switch back to the vanilla one when you need PU for stuff.

Guest tomm434
Posted

Well I looked now and.. I'm astounded. I can understand needing the patching bits to be in asm, but the entire plugin?? That's mental! :D

 

The script window patching will abort if InsertMenuItemA returns zero, and I see no checksum stuff anywhere, so it looks like you were right about that -- you peeked, didn't you! This looks like a real pain in the ass.

 

Tomm, for now, I think you'll just need to use your edited one for dialog without powerup, then switch back to the vanilla one when you need PU for stuff.

 

Negative, can't juggle GECKs around.  If it's too much trouble, "I'll just have to accept that and move on" ©.

Posted

Two dialogue-related questions:

 

1)  Added a vendor.  What am I supposed to do to get a "Thanks" or something like that dialogue after exiting the barter menu?

 

2)  Is there a quick list of reserved topics that are used in special circumstances (GREETING, GOODBYE, etc.)?

Guest tomm434
Posted

Two dialogue-related questions:

 

1)  Added a vendor.  What am I supposed to do to get a "Thanks" or something like that dialogue after exiting the barter menu?

 

2)  Is there a quick list of reserved topics that are used in special circumstances (GREETING, GOODBYE, etc.)?

 

This link would be useful http://geck.bethsoft.com/index.php?title=Category:Dialogue

Barter is under service tab.

Guest tomm434
Posted

nyaalich, ehm... Bitte?

 

So, anybody knows any way to return a model path from a reference?

There is a terminal in my crosshair and I want game to know which one is it(standing or desk terminal). Now of course I can sort terminals in GECK and make form list but is there any other way?

http://www.gribbleshnibit.com/projects/NVSEDocs/#GetModelPath -it returns nothing? Why does this command even exist if it returns nothing?

 

Anyway, I tried using strings and got no results.

let ModelName := GetModelPath Terminalref
PrintC "%n" ModelName
PrintC "%v" ModelName
PrintC "%e" ModelName
PrintC "%a" ModelName
PrintC "%k" ModelName
Posted

For passing a string var to the format string needed by printc, dbp, messageex, etc you need the %z format specifier

 

try: printc "%z" modelname

Guest tomm434
Posted

For passing a string var to the format string needed by printc, dbp, messageex, etc you need the %z format specifier

 

try: printc "%z" modelname

 

OMG it works!

Only there is a mistake on NVSE site

 

There is a line telling me how to call this function "(nothing) GetModelPath item:ObjectID"

let ModelName := GetModelPath Terminalref

returns NULL

 

but

let ModelName :=  Terminalref.GetModelPath

returns model.

Posted

Usually both versions should work, but GetModelPath expects a BaseForm not a ref. It should be expanded though like any function where its obvious. And I suppose you refer to the OBSE site ? There isn't any documentation for those functions on the NVSE site.

Posted

It should probably follow the dual calling convention. In this case, because it's a reference, the reference calling convention works - not sure why the object one doesn't. I hope it does with base forms.

 

jaam: he probably means gribbleshnibbit's site

Posted

if ar_HasKey MyArrayOfRaces, (SomeNPC.GetRace)

    SomeNPC.AddItemHealthPercent (ListGetNthForm MyGuns, (Rand 0, (ListGetCount MyGuns))), 1, (Rand 0, 1)

endif

 

if an NPC is of any particular race that I allow, give them some gun from my formlist in a random condition.

 

It would be more awkward with only GetIsRace.

Any idea whethe GetRace will work ok for Custom Races, What I'm wondering is if I add say the Ares Race to a formlist in SCR, like SexoutFLTreatAsCaucasian, can I then use a NX_IsInList to check an actors race for Pregnancy race?

 

Or Would GetRace return a Null or lock up because the Race is unknown?

Posted

GetRace should work fine for custom races, why wouldn't it?

I think I was thinking that it would be needing the mod with the custom race as a master.

 

Though first try I got a CTD when I initated sex with Doc Michel with this :

Set rPartnerRace to GetRace rZPartner

 

Changing to this solved the problem :

Set rPartnerRace to rZPartner.GetRace

Posted

 

What I'm wondering is if I add say the Ares Race to a formlist in SCR, like SexoutFLTreatAsCaucasian, can I then use a NX_IsInList to check an actors race for Pregnancy race?

 

 

A pregnant A.R.E.S... and after nine months a new little ED-E will born... :)

Posted

Splitting up Dialogue:  Wrote a fucking monologue.  Due to additions, some sentences are out of order.  Is there a way to restructure these, or will I have to recreate them?

Guest tomm434
Posted

Splitting up Dialogue:  Wrote a fucking monologue.  Due to additions, some sentences are out of order.  Is there a way to restructure these, or will I have to recreate them?

 

+++++++++++++++++

 

And in addition, can a person move dialogues in topic? I mean in "Greeting" I have many dialogues and I want to move one at the bottom to the very top. Can I do it without creating new one?

 

Posted

Am I correct that:

 

For any 'set X to Y' can be substituted 'let X := Y', and

 

For any 'if X' can be subsituted 'if eval X',

 

But there is an added bonus: if you use 'let' or 'if eval', bad expressions won't fail silently any more, they will print a useful error in the game console.

 

Therefore, it is good practise to always use 'let' and 'if eval' instead, and convert old scripts that don't technically need it.

 

Or is there something I'm not considering?

Posted

But there is an added bonus: if you use 'let' or 'if eval', bad expressions won't fail silently any more, they will print a useful error in the game console.

 

I noticed that, that's definetely useful. Do you remember all these errors in the logs you sent me some days ago?

 

Oh by the way, just yesterday I found a different result in using set and let. Now the function wasn't properly written, but still the result was different, that leads me to think that they are not 100% the same thing

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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