faction relation functions

Need help testing contributed art or code or having trouble getting your newest additions into game compatible format? Confused by changes to data formats? Reading through source and wondering what the developers were thinking when they wrote something? Need "how-to" style guidance for messing with VS internals? This is probably the right forum.
Post Reply
frankie
Trader
Trader
Posts: 16
Joined: Thu Mar 23, 2006 5:42 pm

faction relation functions

Post by frankie »

I'm trying to understand GetRelation and AdjustRelation. A few questions:

1: Which file holds them in the source code? (I could probably answer most of the other questions myself if I knew this one)
2: I'm guessing that GetRelation(A, B) tells how B treats A, or is it the other way around?
3: Relationships are not necessarily identical in each direction, correct? What happens if one is positive and the other negative?
4: I'm guessing the player is the privateer faction. Is anyone else in it? If not, are the values GetRelation(anyone, "privateer") used for anything?
5: What exactly do factor and rank mean in AdjustRelation?

Which leads to my specific situation: given factions A and B, with R = GetRelation(A, B), what would I use for factor and rank to make the result zero? (aka reset relation to neutral)

Thanks much for any info.
dandandaman
Artisan
Artisan
Posts: 1270
Joined: Fri Jan 03, 2003 3:27 am
Location: Perth, Western Australia
Contact:

Post by dandandaman »

I partial list of documented bindings at home, where I think these are covered ... I'll try to remember to upload tonight (or send me an email and I *will* remember)...

Dan
"Computers are useless. They can only give you answers."
-- Pablo Picasso
dandandaman
Artisan
Artisan
Posts: 1270
Joined: Fri Jan 03, 2003 3:27 am
Location: Perth, Western Australia
Contact:

Post by dandandaman »

Well, I didn't have it at home ... but thankfully our wiki has a high cruft retention rate! :-)

http://vegastrike.sourceforge.net/manua ... .html#ii30

Search for the functions in question and it'll take you to the python bindings section :-)

Dan
"Computers are useless. They can only give you answers."
-- Pablo Picasso
frankie
Trader
Trader
Posts: 16
Joined: Thu Mar 23, 2006 5:42 pm

Post by frankie »

Thanks, I already found the binding page, however, here is the entirety of what it has to say about adjustment factor and rank:
//this changes the relaationship based on the rank and how mad or happy they are (the relationship
//is between 0 and 1... so a adjustment of .01 with a rank of 1 is QUITE significant.
Which still doesn't explain what rank means, and definitely is not quantitative enough to specify what happens if I set factor X and rank Y.
dandandaman
Artisan
Artisan
Posts: 1270
Joined: Fri Jan 03, 2003 3:27 am
Location: Perth, Western Australia
Contact:

Post by dandandaman »

Okay, as far as I can tell, ignore rank completely. Set it to 1.0 whenever you call teh function.

As for factor, just set it to how much you want to change (ie the range of relations is from -1 to 1, so having a factor of 0.1 changes the rank from say, 0 to 0.1, or 0.5 to 0.6)

Hope that helps!

Dan
"Computers are useless. They can only give you answers."
-- Pablo Picasso
Post Reply