Jump to content

Fallout New Vegas GECK & Scripting Help 101


Recommended Posts

Posted

Also, I'm pretty sure the maximum size of a compiled script is 16K.

 

Trying to quantify this.

If I take a script and copy paste on notepad and then I save it, do I obtain the size? I mean is that the size I should check?

Posted

No. The compiled size of any source code is very hard to predict without knowing the internal algorithms of the compiler (and often even then).

 

In GECK, all variables names/forms are probably converted to a 32-bit 'number' (the old text is probably 8-bit per character). It may do all kinds of other things with the other code, for instance in Python (probably all real programming languages):

 

x = 5

y = 5

 

May 'compile' to just 'x = 5' and all 'y' in the code are replaced by 'x', depending if that's equivalent. I doubt the GECK compiler is very complex, but it will include some kind of optimizations, and also add extra things in like garbage collection.

Posted

There is also a maximum uncompiled size too I've hit a few times when trying to copy and past 2 scripts together it just hits a limit and loses half the paste and you can't add a single letter more, taking out comments & shortening variable names does get around it.

Posted

There is also a maximum uncompiled size too I've hit a few times when trying to copy and past 2 scripts together it just hits a limit and loses half the paste and you can't add a single letter more, taking out comments & shortening variable names does get around it.

That limit is 32K.

 

The compiled size limit is 16K.

 

It's possible to exceed either one without exceeding the other. Going past 32k will get you a situation where the stuff at the end gets chopped off the script like you describe. Going past 16K in the compiled size gets you the geck error about script size.

 

As for the compiler itself, I can shed a little insight garnered from NVSE/NX.

 

- All numeric vars (short, int, float) are really 32bit floats.

- Ref vars are just how they appear -- 32bit unsigned integers.

- Strings are standard null-terminated C-style.

- Variable access works like a stack pointer. Compiled scripts access variables by index (32bit local, 64bit remote), not by name.

- "Remote" means a variable in another place, like in a quest. These have the formID (32bit) that holds the variable, as well as the index.

 

If you run into the 32k limit you just need to shrink the size of the uncompiled script. Slim down comments, remove extraneous whitespace (especially at the end of lines and on blank lines), etc. If you must you can even reduce indenting levels or whatever.

 

Running into the 16k limit, you can save some space by replacing repeated accesses of remote vars with a local variable that you get at the start and set at the end. If you're heavily using strings that repeat the same data (like an NX namespace/prefix), you can store that prefix once in a string var, and then concat it with your other string data when needed. Shortening the strings helps too since they are literals and take up their length + 1 in the compiled script. Now though, just breaking the script up into UDFs is a much easier solution.

Posted

Rendering Issue or Working as Designed?:  Was trying to assign a location for an NPC's package up on the floor of the Tops w/ Benny's suite.  Selected a queen bed.  No hotel rooms are being rendered INCLUDING Benny's suite.  :huh:   lolwut?  Are things like this just dynamically rendered in game?

 

I'd prefer giving her a place to sleep without making a surprise appearance in Benny's bed.

 

 

 

hcrhk5m.jpg

 

 

Posted

if vanilla cells have problems rendering in geck for you, I mean they always acted like that, I guess you must set the bUseMultibounds=0 inside the geckcustom.ini

Posted

I haven't had the problem before, but then again, I haven't been working with putting things in the world that often.  Will try that.  Thank you.  ^_^

 

EDIT:  Still isn't rendering, but I'm not too concerned...for now. 

Posted

If you had not that problem in the past, it could be because you didn't open cells with bounds, they're not everywhere, usually only when the cell starts to be quite big or has many objects to render inside. I just switched back that setting in the ini and opened Benny's floor, it appears exactly as in your screenshot, so I'm pretty sure that setting is the cause

Guest tomm434
Posted

How can I change dialogue box size in GECK? In GECK.ini I see no option for that. I would like to see the whole names for dialogues.

post-187071-0-01874300-1401568106_thumb.jpg

Posted

Dragging the column size over is as good as it gets, unfortunately.  : P

 

OOH OOH OOH!  PICK ME!

 

However, there is a dialogue export that you can do.  It takes for motherfucking ever.  However!  I have done it!  Depends on what you need for it, though.  I have one from NV (no DLC), and I had one from FO3, but I don't remember if I changed a bunch of shit when I was looking at possible audio that I could splice (damn sploiceahs!).

 

It does take forever, though.  And if you were going to export from FO3 -> TTW....well, there's no dizzy face emoticon, but there you go.

 

If you decide to do it for yourself (overnight...no seriously,...overnight), make sure you use export dialogue from the dialogue window and not File > Export.  File > Export doesn't give you nearly as much info (speech topic, NPC, voice type, player's related speech, file name, etc.).

Guest tomm434
Posted

So, that is to say, I can upload the NV export, although I doubt that that's what you need/want.

 

Thanks! Sorry I meant I wanted to see the names. It is easier to work with GECK is you see the names and don't have to scroll. I'm sure that this can be changed in GECK.ini but I have no idea what to write there.

 

Posted

I don't understand what you're looking for, so here's a screenshot of the actual dialogue window (speech bubble icon, different from the quest window).  : D

 

 

 

qcJJAT1.jpg

 

 

Guest tomm434
Posted

I mean that I want to expand "editor ID" field it. Now you don't see the full names of the topics. If you drag "Editor ID" thing to the RIGHT, you will be able to see them but I have much more longer Topics ID names and I don't see their full names.

Posted

You want to make that entire window section wider, not just the editorid column? I don't think you can, even in the INI file. You can make the whole column as wide as you want, just use the splitter in the column header, then scroll with the bar at the bottom.

 

That won't help long names fully fit width-wise though, and you can't resize the whole window.

Guest tomm434
Posted

You want to make that entire window section wider, not just the editorid column? I don't think you can, even in the INI file. You can make the whole column as wide as you want, just use the splitter in the column header, then scroll with the bar at the bottom.

 

That won't help long names fully fit width-wise though, and you can't resize the whole window.

 

yes, I meant wider.

That sucks. I can't believe Bethesda worked with GECK like this. I mean look at the Cass Quest - you can't see numbers in her topics without scrolling!

 

Posted

There is no way in hell they developed the game in the geck. They might have used it in post-preduction for minor hacks, but the million little bugs like that, that are easily fixed, are a clue to me that actual developers didn't actually use the tool.

 

If they had, they would have taken 5 minutes to fix things like that.

 

There's a setting for the window height and width in geckprefs.ini, but changing the values manually has no effect and they are reset back to default values after you exit. You could likely hack it in the geck exe with a resource editor though.

Posted

FYI this is what you need.

 

Backup your geck EXE first!

 

The ones you need to modify are under dialogs; 3225 and 151. On 3225 you need to widen the whole form and then the interior tab container, and move the 'OK' button. In 151, resize the window (no bigger than you made the container on 3225), select everything on the right, and move it further right, then resize the dialog thing.

 

viola

 

edit: realized last file was on a quest without dialog, oops.

Guest tomm434
Posted

FYI this is what you need.

 

Backup your geck EXE first!

 

The ones you need to modify are under dialogs; 3225 and 151. On 3225 you need to widen the whole form and then the interior tab container, and move the 'OK' button. In 151, resize the window (no bigger than you made the container on 3225), select everything on the right, and move it further right, then resize the dialog thing.

 

viola

 

edit: realized last file was on a quest without dialog, oops.

 

Thanks a lot!! I managed to align boxes properly. "Filtered dialogue" tab doesn't look very nice now but I don't or very rarely use it(if for some reason I need to move topics from one quest to another). No reason to edit it. But I got the idea, this program is very nice.

post-187071-0-75364500-1401581784_thumb.jpg

post-187071-0-31485700-1401581785_thumb.jpg

Guest tomm434
Posted

WHen I open Script Editor, the window appears "The GECK 1.4 PowerUP edition  - Patching failed. Exiting now" and GECK exits. Could be it be that power up know that I edited GECK and since I did, it won't work? Does your script window work?

 

If I launch GECK through its original exe(not NVSE loader) script editor works.

Posted

I didn't try the script editor, I will check though. It's possible powerup is checking some kind of hash/signature for the geck EXE, or that you changed something you shouldn't have in the resource editor.

Posted

Yep, I get the same problem here. That blows.

 

I've got too much on my plate right now to hack on the powerup source (if it's even available). I suggest you contact purplepigeon and ask him if it's checking for some kind of hash/crc signature on the EXE and if so, if he can add a flag or something to disable the check.

 

Changing resources like that shouldn't affect the stuff that powerup patches, so it's probably just his code being extra safe/paranoid.

Guest tomm434
Posted

Now HLP is mantaining GECK and he was online yesteray. I've already written to him. If he answers, I will report here.

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...