HELP WITH FACTION ARMOR SCRIPT!

Post » Tue May 17, 2011 4:02 am

Third time's the charm, or so they say.

Allright, I'm trying to modify the faction armor scripts so they don't override positive reputation with their faction (i.e. Legion armor won't override positive Legion rep, NCR armor won't override positive NCR rep, etc.)

So, after looking at a tutorial on how the game treats faction, I came up with the little gem below that I was sure would work.

if RepNVNCR >= 2 0.0    [Portion of the code that deals with resetting the NCR faction] endif


Unfortuantly, this disabled the scripts ability to reset faction for ALL armor. Further tweaking with the script simply made the script stop working. Any idea what I did wrong?

This is the THIRD TIME I'VE ASKED!
User avatar
Anna Watts
 
Posts: 3476
Joined: Sat Jun 17, 2006 8:31 pm

Post » Tue May 17, 2011 4:20 am

I have never seen a syntax like "if a >= b c". Does the game even allow you to save this? I guess you are trying to do something with the two separate numbers of a reputation. I am not sure how you assigned RepNVNCR and you did not show that part of your code. GetReputation only returns one of the numbers, either the fame or infamy. Depending on what exact test you want, maybe something like: (untested)

short iFameshort iInfamyset iFame to GetReputation  0set iInfamy to GetReputation  1if (iFame < 10) && (iInfamy > 5)  ...do whateverendif


If you don't get an answer after a day or two, it may be better to bump the previous thread, rather than creating a new one. Also, usually SHOUTING WON'T HELP, it makes people less interested in looking at your post.
User avatar
Laura Cartwright
 
Posts: 3483
Joined: Mon Sep 25, 2006 6:12 pm

Post » Tue May 17, 2011 12:18 pm

Only reason I've shouted was that my topic- up for several days with a non-shouty title had 6 views and no replies, yet one that did have a shouty title had about 27 replies and a lot more views in less time. So, I was getting desperate. Clearly, the shouty-title worked since there's been at least one reply on the first day.

At any rate, what I'm trying to do is to get, in this case, the faction armor to only execute the NCR faction changes if it's negative. The tutorial I looked at basically stated that 0 is no rep, 1 is positive, and 2 is negative. And then numbers after those determened what level of rep one had with the faction. So, 2 1 would be a low level of negative rep, while 1 5 would be an extremely high positive rep.

As for the RepNVNCR- that is the actual value that the script checks against. It already is, by default, in the script, and is the same value the game uses to track one's reputation.
User avatar
Tammie Flint
 
Posts: 3336
Joined: Mon Aug 14, 2006 12:12 am

Post » Tue May 17, 2011 8:39 am

Thank you for the background. The syntax "a > b c" is not valid. There is no variable RepNVNCR in the base game, so it is a variable in your mod. You have not shown how your variable is set. I highly doubt that the variable itself is something like "2 0". Please investigate how the variable is set and do the numeric comparison on only one variable.
User avatar
Judy Lynch
 
Posts: 3504
Joined: Fri Oct 20, 2006 8:31 am

Post » Tue May 17, 2011 3:46 pm

RepNVNCR is an object in the Geck, I believe, so

if RepNVNCR >= 2 0.0 


is not a valid statement. Sorry I cant be more helpful - I just don't get how the rep system works yet.
User avatar
JD FROM HELL
 
Posts: 3473
Joined: Thu Aug 24, 2006 1:54 am

Post » Tue May 17, 2011 2:24 pm

If you use "edit->find text" in geck and search for RepNVNCR, you will see it is not a variable, it is an object. It is used in many scripts like this:

if GetReputationThreshold RepNVNCR 1 < 5

As defined at geck.gamesas.com, GetReputationThreshold is a function which takes two arguments, a reputation object, and an int which is either 0 or 1 depending on whether you want fame or infamy. If you follow these examples, you will be able to create correct scripts. The example you gave is not at all legal syntax.
User avatar
Heather Kush
 
Posts: 3456
Joined: Tue Jun 05, 2007 10:05 pm

Post » Tue May 17, 2011 10:15 am

Ah, thanks for the help. Gonna digest this and see if I can't hammer out something, then.

So is 0 positive and 1 negative? Ah, I'll figure it out when I do the tweaking.
User avatar
Thema
 
Posts: 3461
Joined: Thu Sep 21, 2006 2:36 am

Post » Tue May 17, 2011 12:44 am

Allright, gonna need a volunteer to test the script.

For some reason, it'll only enable properly on my system ONCE per machine startup. Further tweaking with the code without restarting my computer renders it going back to it's pre-mod state. Worse, when I reset the script back to the workable state, it no longer works...

And here's the kicker- it does this when all other mods are removed AND if I use a new .esp file to make the change! Clearly, I can't do the testing on my own.

If you're interested, send me a PM. I'll send you several files (each one with a different version of the scripts in question) and you can do the testing for me. And re-test workable versions to make sure you're not getting the same issue as I am. Worst-case, I'll need multiple volunteers, one for each version.
User avatar
Phoenix Draven
 
Posts: 3443
Joined: Thu Jun 29, 2006 3:50 am

Post » Tue May 17, 2011 8:15 am

Ok, I've completed the mod! It's available for upload at

http://www.newvegasnexus.com/downloads/file.php?id=40403

Please download it if you think you may like it.
User avatar
Rachie Stout
 
Posts: 3480
Joined: Sun Jun 25, 2006 2:19 pm


Return to Fallout: New Vegas