Jump to content

Fallout New Vegas GECK & Scripting Help 101


Recommended Posts

Posted

Were you hoping to have it apply to all types of food with the same rate of decay or just certain types?  I don't know if the idea is to make it spoil in the player's inventory or as an object in the world.

 

There is a MeatFood formlist that you could compare the base to.  There's something like "GetItemUsed" although probably not that exact phrase, and I imagine that what you're trying to do is more sophisticated.  

Posted

With an object script is it possible to get the form of the item it is attached to?

 

I am making a mod to make fresh food rot, I have an object script with a slow menumode block attached to ingestibles, I tried GetSelf, but that returns 0

 

Then I can change Gecko Steak -> Dubious Gecko Steak with chance of campylobacter. I would rather not make a seperate script for every food item

 

Food rots in my game, but I'm not exactly certain which mod does it.  It makes the Robco Froster or whatever it's called stop decay.  Everything that rots turns into 'spoiled food' items.  I think it's IMCNNV, but again I'm not positive that's what's doing it.  If it is you could crack it open and see how they did it.  If not, shout back and I'll do more digging.

Posted

GetSelf returns a reference. Are you sure your object exists in the real world ? It also does not work for PlaceAtMe and dropped items says the wiki. :(

 

EDIT: Looking at the engine, GetSelf will return a value if:

  reference (is in an ESP) or (is permanent) or (is not an inventory object (which food are)).

Posted

Thanks, I guess I'll just use multiple scripts then. I was thinking it could be done by setting an NX rot date on each food item via an OnAdd block, but it isn't possible to scan through each actual reference in an inventory, is it?

Posted

You may get some use out of inventory reference functions (and foreach loops). They should allow you to temporarily perform reference functions on inv objects.

I've been meaning to test those out but have little use for them in spunk so keep postponing it.

Posted

I don't think any kind of consumable (food, medicine, alcohol, caps, ammo) in inventory has a reference, but I could be wrong.

 

If they do, they'll all start with FF and be fairly useless references to save in a variable... since they'll change frame to frame at the whim of the engine.

Posted

If it's just a matter of switching one ingredient with another, there should really be no need for an object script attached to the food or an nx var, just a token script periodically looping through a container's inventory with a foreach, + removeitem/additem.

Posted

With each individual food item, I need to set a float variable (GameDaysPassed + X) for the rotting date, and check periodically current time to remove/add the rotted version. So, I need to remove the correct item from a stack, which needs to be the oldest one, the reason for the object script/NX is if a player stashes the food some place, I need to remember the date. Otherwise I could use a quest array, or something similar

Posted

I'm having some custom companion dialogue problems.  1)  A generic Goodbye prompt appearing and 2) Not everything displays at top-level after a GREETING.  I have to activate one of the other dialogue options (trade, combat tactics) to get the full list to display.

 

Current Setup:

  • Hope is set to using a unique voice (HopeCompUnique)
  • I have a custom topic set with the goodbye tags as that using the actual GOODBYE topic wasn't working (don't remember why now..I think it wasn't appearing?)
  • I realize that I need to tweak some of the priority settings
  • Trade, Combat Tactics, Goodbye, and Fire are all marked as Top-Level

 

This are the topics that display after the greeting.

 

 

ne4uQaO.jpg

 

 

 

Here are the expected topics that display after I've gone through trade or combat tactics.

 

 

bTAwZaf.jpg

 

 

 

I realize that SODRL might not be marked yet as top-level for female NPCs (haven't looked at it in the GECK, T.  Sorry) or linked to a GREETING.  Is that why I'm not seeing it right after the GREETING?

 

The thing that really bothers me is the "Nevermind" goodbye, which I have no idea how it's displaying.  I checked in FNVEdit, and there isn't another Goodbye topic in there.  Does she need to be added to an NVFollowers form list or something?  I thought that having the custom voice would have gotten rid of generic goodbyes.

 

EDIT:  She's also set to her own custom class,

Posted

There are no GREETING topics in SODRL whatsoever, and only two top level.  One is the companion 'relax' dialogue which I'm sure you're familiar with.  And the other is displayed in your SS above.  SODRL does have a nevermind goodbye, but I think it has 3 periods behind it, not just one.

 

The top level of SODRL often does not display on initial greeting, but shows up on the second tier.  I don't know why exactly but it's NPC specific.  Some NPCs refuse to display ANY of SODRL top level dialogue EVER.  For example the beggar ghoul in freeside who hands out info for caps, forget his name.  The result is that I had to put him in the ignore list as unusable.  Then there are some named NPCs from other mods such as AWOP, who also refuse to display any top level dialogue (like Sgt. Akum?, the female NPC in Goodsprings with the red beret).  They will only display top level if you exit their original dialogue real quick to initiate SmallerTalk, then the dialogues are displayed successfully thru SmallerTalk.

 

I hope you figure it out because I gave up after re-writing my mod 4 times just trying to fix all that, which in turn always broke something else.  Therefore I got it to work as close as I could and then said to hell with uncooperative dialogue NPCs, offering them all the entirety of my backside to kiss.

Posted

I remember that the Nevermind... is after you select SODRL Dialogue.  Didn't have problems with dialogue options showing up where I wanted them to in FO3. : P  /complaining

Posted

I originally had GREETING topics, and it worked better with a greeting for the majority of NPCs.  But that was ruined by NPCs like the guy in Sloan who initiate auto greetings on trigger.  With a greeting, he would auto greet me with my greeting dialogue, instead of the Sloan 'Hold up there are deathclaws' greeting.  I also tried blank GREETING topics, which worked the best for, again, the majority of NPCs.  But then the guy in Sloan would 'blank' greet me (dialogue zoom, say nothing, exit dialogue).

 

I think CK and someone else I can't remember have been on the trail of this kind of problem for longer than I have.  They might be able to shed more light on it than I.

Posted

PEBKAC + Mods.  This doesn't address the Top-Level dialogue issue.  Just the extra goodbye issue.

 

I disabled the majority of my mods (sad face) and started a new game with very few enabled.  While I have my suspicions, I haven't narrowed down which mod is causing it.  I have the bad feeling that it's TTW (I've had some comment on player action comments that I shouldn't be getting from Charon that I've been too lazy to fix for various reasons).  However, I don't remember duplicated GOODBYE options for custom companions like Niner and Wendy, and neither of those have a TTW patch.  So let the enabling/disabling begin.

 

FYI, I don't run Small/er Talk.

 

FWIW to anyone in the future, Practice Makes Perfect also seems to add an additional Goodbye if you have "Trainers of the Wastes" enabled (which I ruled out before initially posting).

 

EDIT:  On the plus side, it's NOT TTW.  When I find out who the troublemaker is, I'll post it in the paragraph above.

Posted

T:  Did some searching on my own re: Top-Level dialogue.  Can't experiment with it at the moment, but I found this in another forum:

 

 

Anything you tick 'top level' on will show up after greeting, unless you specify choices in the greeting topic, in which case it will display the choices you specify, and not show 'top level' topics until you exhaust the choices. If all of your choice paths end in a goodbye topic, you will never see top level topics.

 

So perhaps this is why some of the NPCs aren't behaving nicely?  I know that I've currently got all choices set for Hope's greeting, which I'll have to change (sans rehire) since it looks like it isn't even necessary.  If you feel like fiddlin', consider this your rosin.

Posted

@T:  I looked at FNVEdit.  You mentioned Rotface (the ghoul in Freeside).  Some of his original dialogue was cut (which is restored in a mod, but I digress), so the remaining dialogue DOES have choice topics underneath all of the GREETING options that you'd see.  I noticed that Ralph (as in "Mick and") was also on the ignore list.  He too has choices after all of his greetings.  Ralph doesn't.  It looks like that may also be why you added Emily from the Followers (the chick that runs up to you at the Lucky 38 and asks you to bug a computer inside).  All of her greetings are also linked to choices.

 

Granted, I only know some of the logic behind the list (couples and people that never move)...I think.

 

EDIT:  After removing the linked choices from the Greetings for Hope, DRL shows up.  Unfortunately, it doesn't do jack shit for a workaround (which I assume would be to manually add the dialogue choice to all excluded- for-that-reason vanilla NPCs).

Posted

As I said, I knew better than to question it. Looking mental and *being* mental.. well.. different things as often as not in the GECK. I remember a few months or a year back some guy looked at the sexout code and called me a martian. ;)

 

Being an alien I can tell you that you aren't anything close to being a Martian.

 

Marvin.gif
You are more like a Kryptonian. :D
 

 

Posted

I'm creating a new reference with PlaceAtMe. For my redundant way to write things, which allows me to avoid problems, my code is something like this:

scn blablabla
Ref MyReference

begin gamemode
.
.
if MyReference
  Do Something with it

else
  set MyReference to player.placeatme BaseID
endif

... which essentially should mean "if MyReference exists do something with it, if not create it"

 

I already used this kind of script more times in the past and it was working, but now since it will be placed in different situations I would like to hear a confirmation of that code, if it's correct or if it was working because I had luck. Essentially, IF MYREFERENCE goes true if the reference exists ingame? Am I assuming it in a correct way?

Posted

You should be using GetIsReference.

 

That ref could potentially evaluate to true without being a reference, or it could even hold the value of a stale (deleted) reference.

Posted

It doesn't compile... :-(

 

if GetIsReference MyReference

or

if GetIsReference MyReference == 1

or

if (GetIsReference MyReference == 1)

even this dumb

if (MyReference.GetIsReference == 1)

 

Weird... on Beth guide, under GetIsReference, there's quite a similar example :-O

 

Posted

Looking at the Discussion Tab for GetIsReference, someone wrote this "I just noticed that this page currently states "The reference must be persistent". Do we know if that's actually true? I can't say for certain whether I've noticed behavior to indicate this either way."  Perhaps that's the problem?

Posted

If that's the case, then it can't work for me of course, since that reference doesn't exist ingame, it's a variable which turns in a ingame reference with a placeatme. I assume it can't work for many other things then... mmmh I think I should stick with the old if MyReference and test if it will give problems

 

EDIT: more feedbacks are very welcomed of course, after the problem Prideslayer showed me I think that mine is just a temporary solution

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