Jump to content

Fallout New Vegas GECK & Scripting Help 101


Recommended Posts

Guest tomm434
Posted

Specificly for comparing coordinates?

Posted

Specific to compare misplaced IDs, but I guess she can compare what she wants. I leave you to her for more infos because I don't know these things, all I do is dumping files and pass them to her, she does all the job :P

Guest tomm434
Posted

Ok. I think I'm intellegent enough to write a script to compare coordinates and not to bother Odessa with such a small fry.

Posted

Changing coordinates would require changing meshes and other world building data, so no it is extremely unlikely that they changed from one language to another.

 

 

The class hierarchy for REFERENCE is:

  Reference                                    

    Actor                                            

      Creature                                   

      Character

         PlayerCharacter

    Projectile1

    Projectile2

    ...

 

200 will return any reference whose baseForm is either a kFormTpe_NPC = 42 or kFormType_Creature = 43 EXCLUDING the Player form (id =7)

As Leveled Character and Leveled Creature are resolved to a specific base Form before becoming references, you cannot find those base Form type while scanning the cells.

 

EDIT: pressed return too soon.

 

Posted

200 will return any reference whose baseForm is either a kFormTpe_NPC = 42 or kFormType_Creature = 43 EXCLUDING the Player form (id =7)

As Leveled Character and Leveled Creature are resolved to a specific base Form before becoming references, you cannot find those base Form type while scanning the cells.

 

Thank you, very useful.

Does this make the types 44 and 45 (leveled creatures and actors) basically unuseful? I mean not for scan but generally speaking

Posted

Yes, they are only referenced as "ExtraData" on the memory actor in game, what NVSE references as the result of GetBaseForm by opposition to GetBaseObject.

 

Guest tomm434
Posted

jaam, better safe than sorry :)

 

I would be very grateful if people installed this small esp and launched the game with it. The test will take just a couple of seconds. After that you can upload COORDINATES_TEST from the main game folder to the thread and we will compare the results. (Also ARRAYS inside)

 

Mine is

CoordinatesTest.esp

Posted

I introduced RAND to you a page ago :)

 

Quest only works in gamemode (gamemode block) -------------> Timer does too. Timer doesn't even goes if player waits(Wait menu != gamemode)

Also about waiting - didn't think about that. Can you check if sound will still play if player waits?

 

Yeah and I totally missed the RAND thing the first time! Silly me! :angel:

 

If you go into menu mode (wait menu, probably pipboy too) the timer doesn't keep going. The worst result is that there is more silence in between songs.

 

Unfortunately I was getting crashes. It works fine the first time the player shows up but if the player comes back again things get crashy. (Likely this was because I wasn't resetting variables properly. Though when one STOPS a quest you'd expect variables to be clear. But whatever.)

 

However, I did come up with a scriptless way to -almost- get it working.  :lol:  :lol:  Make a sound object, set the location of the sound to the folder with the music, then put loop on it. It won't cycle through songs while the player is there but every time the player shows up in the cell a random song will be chosen.

 

I could maybe make a new script with a simple timer and just tell it to play the sound object. (Fortunately the songs are all about the same time.) Is it true that a timer will run faster or slower on different machines?

 

Guest tomm434
Posted

I heard once that it can happen is game laggs(too many scripts running at once) but I think you shoudn't worry about that, Nessa.(unless you've got timer quest running at 0.000001 quest delay :) )

Guest tomm434
Posted

Anyone know how to use GetArmorAR?

ref armorRef
int Rating
int Rating2
int Rating3

begin gamemode

set ArmorRef to ActorRef.GetEquippedObject 2
Print $ArmorRef

set Rating to ArmorRef.GetArmorArmorRating
set Rating2 to ActorRef.GetArmorArmorRating ArmorRef
set Rating3 to GetArmorArmorRating ArmorPowerT45d

Print $Rating + " is rating1"
Print $Rating2 + " is rating2"
Print $Rating3 + " is rating3"
end

So, armorRef is set to NPC armor because the name of the armor is returned correctly but Rating 1-3 are always eval to "0" no matter what armor Actor has(Light\medium).

Posted

Why are you converting your ints to strings ? $Rating expect Rating to be a string_var !

 

Otherwise all three way of calling are valid.

 

Posted

Anyone know how to use GetArmorAR?

ref armorRef
int Rating
int Rating2
int Rating3

begin gamemode

set ArmorRef to ActorRef.GetEquippedObject 2
Print $ArmorRef

set Rating to ArmorRef.GetArmorArmorRating
set Rating2 to ActorRef.GetArmorArmorRating ArmorRef
set Rating3 to GetArmorArmorRating ArmorPowerT45d

Print $Rating + " is rating1"
Print $Rating2 + " is rating2"
Print $Rating3 + " is rating3"
end
So, armorRef is set to NPC armor because the name of the armor is returned correctly but Rating 1-3 are always eval to "0" no matter what armor Actor has(Light\medium).

 

Should you be looking at GetDamageThreshold instead of GetArmorRatiing as most outfits in NV have AR of 0 and use DT instead?

Guest tomm434
Posted

I thought that Armor rating returns me what kind of armor is it  - light\medium\heavy. I don't want my NPC to wear heavy armor and comment if she is wearing medium armor.

Posted

According to the wiki, getarmorrating is called on an actor (no param) and returns AR of currently worn item.

refActor.GetArmorRating
It returns a percentage, so it might need a float, not an int.
Guest tomm434
Posted

:( it seems like AR is not what I need. Now I'll have to go with formlists but that won't work for non-vanilla armor. At least I can forbid her to wear Power armor.

Posted

I believe AR is called Damage Resistance in game. The armor category (light/medium/heavy) is a different field if you open an armor in the GECK, and AR is 0 for heavy. I can't see any function in NVSE/vanilla to check this field.

 

There is a heavy armor form list, but I don't think you can rely on it for mod-added armor. A lateral approach could be to try using GetWalkSpeed. It may not always be accurate (sprint mod, crippled limbs) but you could combine it with form lists, and add unknown equipment to the lists when you get a reliable reading.

Guest tomm434
Posted

Thanks. GetWalkSpeed might be unreliable indeed. Crippled limbs should be easy to track, just need test.

But I'd better not to introduce this at all because I would be a bad person. if actor will be wearing light armor and my script will drop it every time. At least I will make a check for vanilla form lists!

Guest luthienanarion
Posted

There are currently no functions that return Light/Medium/Heavy armor class, but it's stored as some undefined bits in TESBipedModelForm::bipedFlags if you want to write a function of your own.

Guest tomm434
Posted

I'm afraid that's beyond my skills. I don't even know how to open existing NVSE pluings

Guest luthienanarion
Posted

I found them a while back when I was looking around for some other data:

 

0x4 is the "has backback" flag

0x8 is the "medium armor" flag

0x20 is the "power armor" flag

0x40 is the "unplayable" flag

0x80 is the "heavy armor" flag

 

There are bits in-between that I don't know the purpose of.

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