Results 1 to 12 of 12

Thread: Idea for a trait addition: VnV Overview

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Idea for a trait addition: VnV Overview

    Quote Originally Posted by the_foz_4
    Ahh, had not considered doing that. Nice one.

    The triggers are of no concern, as the game doesn't spend any significant amount of time whatsoever dealing with them. I wrote a workaround for the dysfunctional antitrait mechanic, and it involves 17,000 new triggers, several hundred going off every time an event of any sort happens, including begin and end turn... and the game didn't flinch at all. So whatever does take time in the game, it sure isn't the trigger checking.

    As for how to accomplish this per your suggestion Alpaca... any idea if we're allowed to do this?:

    Condition Trait TradeBonus > Attribute Trading

    -1 TradeBonus

    You'd repeat that same trigger a few times to make sure any difference is accounted for, then more triggers for TradeBonus < Trading that would +1 TradeBonus. It's in doubt because I don't think traits are ever directly compared to attributes in the file, but it's certainly possible it's supported even if it's never needed. It'd be really handy here, as a direct comparison allows for a relatively simple trigger setup to change it correctly. That would avoid the mess of trying to reset the trait every turn and run a bunch of triggers to set it again, which makes less sense when you read through it, and probably takes more triggers too.
    Well that depends on the conditions. It's often safe to use events that are triggered often, if you use conditions that are not likely to change too often I think (well deriving from a theory about the event system I made up).
    Anyways, you can only check constants in conditions, so what you'd have to do is using

    Condition Attribute Trade = 0
    Condition Attribute Trade = 1

    etc.

    Could you run a test for me to see if when assigning a trait negative values if it goes to 0 or it actually accepts negative?
    I.e. trying this:

    Affects GoodCommander -99 Chance 100
    Affects GoodCommander 1 Chance 100

    And see if you get the GoodCommander trait? I don't have access to my modding envi for a day or so, so I can't test that myself right now ;)

    If it would only set it to 0 you can do stuff like

    WhenToTest CharacterTurnStart

    Condition Attribute Trade (<-- insert actual name here) = 0

    Affects TradeBonus -99 chance 100


    WhenToTest CharacterTurnStart

    Condition Attribute Trade = 1

    Affects TradeBonus -99 chance 100
    Affects TradeBonus 1 chance 100

    Do this for each attribute level (possibly including second level traits after you reached the maximum number of levels), you could do this.

  2. #2
    Masticator of Oreos Member Foz's Avatar
    Join Date
    Dec 2006
    Posts
    968

    Default Re: Idea for a trait addition: VnV Overview

    Looks like we hijacked Jabberdau's thread. You are no longer in control... resistance is futile!

    As far as what I've encountered so far, traits do not accept negative values. I tested this initially by giving spies -32 GoodSpy upon creation, and shortly thereafter 32 GoodSpy. They all came out as +5 due to GoodSpy, meaning they didn't take any negative value of GoodSpy at all. What I'm hazy on is whether or not the game will actually apply as much minus as possible: i.e. if you have 5 points and try to remove 8, I think the game will remove 5 and ignore the rest, though it's possible it ignores the attempt entirely and leaves it at 5. I'll fiddle with it more if I get the chance, in order to figure this out.

    Outside of that though, what you just suggested is probably the best way to get this particular job done. Maybe it's slightly optimized to zero the trait every turn and then bump it up based on triggers? Like this:

    Affects TradeBonus -99 Chance 100


    WhenToTest CharacterTurnStart

    Condition Attribute Trading >= 1

    Affects TradeBonus 1 Chance 100


    WhenToTest CharacterTurnStart

    Condition Attribute Trading >= 2

    Affects TradeBonus 1 chance 100


    ...and so on until the condition meets the max value of trading. It does almost the same thing as your code, just removes the need to zero the trait in each of the triggers which should presumably save time.


    See my Sig+ below! (Don't see it? Get info here)

  3. #3
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Idea for a trait addition: VnV Overview

    Quote Originally Posted by the_foz_4
    Looks like we hijacked Jabberdau's thread. You are no longer in control... resistance is futile!

    As far as what I've encountered so far, traits do not accept negative values. I tested this initially by giving spies -32 GoodSpy upon creation, and shortly thereafter 32 GoodSpy. They all came out as +5 due to GoodSpy, meaning they didn't take any negative value of GoodSpy at all. What I'm hazy on is whether or not the game will actually apply as much minus as possible: i.e. if you have 5 points and try to remove 8, I think the game will remove 5 and ignore the rest, though it's possible it ignores the attempt entirely and leaves it at 5. I'll fiddle with it more if I get the chance, in order to figure this out.

    Outside of that though, what you just suggested is probably the best way to get this particular job done. Maybe it's slightly optimized to zero the trait every turn and then bump it up based on triggers? Like this:

    Affects TradeBonus -99 Chance 100


    WhenToTest CharacterTurnStart

    Condition Attribute Trading >= 1

    Affects TradeBonus 1 Chance 100


    WhenToTest CharacterTurnStart

    Condition Attribute Trading >= 2

    Affects TradeBonus 1 chance 100


    ...and so on until the condition meets the max value of trading. It does almost the same thing as your code, just removes the need to zero the trait in each of the triggers which should presumably save time.
    No, I don't think that'd save time. Using my system, the game will execute exactly one trigger per attribute, using yours it will execute all.
    Anyways, it probably doesn't really matter, we're talking about microseconds here.

    Anyways, the trait is capped at 9 I think (well in R:TW the max number of levels per trait was 9), does anybody have an idea which values the Trading attribute takes?

  4. #4
    Masticator of Oreos Member Foz's Avatar
    Join Date
    Dec 2006
    Posts
    968

    Default Re: Idea for a trait addition: VnV Overview

    Quote Originally Posted by alpaca
    No, I don't think that'd save time. Using my system, the game will execute exactly one trigger per attribute, using yours it will execute all.
    Anyways, it probably doesn't really matter, we're talking about microseconds here.

    Anyways, the trait is capped at 9 I think (well in R:TW the max number of levels per trait was 9), does anybody have an idea which values the Trading attribute takes?
    True, executing a bunch of triggers is clearly worse, don't know what I was thinking, I'm supposed to know better than that. Maybe that was a bad day.

    Trading attribute takes on the actual percent value of the guy's bonus to trade. If the game says it's a 10% bonus, that trait affects Trading by +10. Usually a guy gets an amount from a trait that's divisible by 5, but I know I just saw some 2s in there, meaning you're probably talking about a range of possible values [-95, 95]. Some may in fact not be possible totals, but I'm not about to go find that out. If I just checked correctly then 95 is the upper bound (i.e. max possible from all traits that can give bonus to Trading).

    Based on those values, the most natural system to me would be to implement 9 levels of TradePenalty and 9 levels of TradeBonus. You'd threshold the levels at 1 point intervals, so the 9 levels are Threshold 1 - 9. Then simply divide the Trading attribute by 10 and truncate to get the right number of trait points to give (just a fancy way of saying we'll just use the tens digit of Trading). Since we can't do math, even simple integer division, it's easiest to partition the Trading range to simulate said math, since we easily know the results:

    I'll notate as [Trading range] -> (TradePenalty, TradeBonus).

    ...
    [-29, -20] -> (2, 0)
    [-19, -10] -> (1, 0)
    [-9, 9] -> (0, 0)
    [10, 19] -> (0, 1)
    [20, 29] -> (0, 2)
    ...

    I'm sure you can easily extrapolate to the needed range. This corresponds to triggers with conditions like "Condition Attribute Trading >= -29 and Attribute Trading <= -20" which would then award TradePenalty 2 points.

    One could of course instead opt to let TradeBonus and TradePenalty take on the actual value of Trading, and then Threshold at 10/20/30/40... in order to achieve the same effect. However since there seems to be no way to directly assign that value to the trait, it would involve ~10 times as many triggers for no good reason I can see (1 trigger per Trading value, instead of 1 per 10 values that I proposed above).

    With an appropriate amount of time to spend, similar logical partitions can be applied to all of the attributes we're interested in.

    As for crunching out code based on this, I have to say I'm not exactly chomping at the bit. Even if you automate all those triggers you still also have to write the corresponding descriptions to make the trait levels have text in-game, and it just doesn't seem worth it to me for the minor benefit it provides. I'm much more captivated by actively shooting down persistent and annoying game bugs at the moment, at least as best we can with our limited tools. So while I'm gonna say I won't champion this particular project, I'll certainly help as much as I can if someone else has a mind to take it on. And even if not, I'll certainly keep talking about it, as I'm enjoying the discussion


    See my Sig+ below! (Don't see it? Get info here)

  5. #5
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Idea for a trait addition: VnV Overview

    Quote Originally Posted by the_foz_4
    As for crunching out code based on this, I have to say I'm not exactly chomping at the bit. Even if you automate all those triggers you still also have to write the corresponding descriptions to make the trait levels have text in-game, and it just doesn't seem worth it to me for the minor benefit it provides. I'm much more captivated by actively shooting down persistent and annoying game bugs at the moment, at least as best we can with our limited tools. So while I'm gonna say I won't champion this particular project, I'll certainly help as much as I can if someone else has a mind to take it on. And even if not, I'll certainly keep talking about it, as I'm enjoying the discussion
    Yup, that's pretty much my own opinion about it.

    By the way, you should probably use four traits for this, with a resolution of 5%, 10% isn't good enough imo.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO