Results 1 to 20 of 20

Thread: New Traits Help Needed

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default New Traits Help Needed

    Hi

    I've added in some new traits and triggers into the export_descr_character_traits.txt file and added descriptions for them in the export_vnvs.txt file. When I try to run M2TW it crashes before getting to the menu.

    Any ideas on what needs fixing?



    I'll post the changes I have made if somebody can show me how in include a spoiler in a post

    *edit* I think I've got it worked out
    Last edited by Pengo; April 26, 2009 at 02:01 AM.

  2. #2
    Presbiter's Avatar Biarchus
    Join Date
    Apr 2008
    Location
    Germany
    Posts
    672

    Default Re: New Traits Help Needed

    lets have a look at your .log-file in the log directory in your m2tw-folder. post it pls, this would help

  3. #3

    Default Re: New Traits Help Needed

    I can't get one. I added the:
    [log]
    to = logs/system.log.txt
    level = * trace

    to the Stainless_steel_kingdoms.cfg but I don't get log files. I use No CD .exe, changed back to the needing CD .exe and nothing still, so I don't know. I found my problem was too many "levels" under a trait. Deleted some and it worked, I'm so happy.

  4. #4
    Caesar Clivus's Avatar SS Forum Moderator
    Join Date
    May 2007
    Location
    Australia
    Posts
    12,693

    Default Re: New Traits Help Needed

    Quote Originally Posted by Pengo View Post
    I can't get one. I added the:
    [log]
    to = logs/system.log.txt
    level = * trace

    to the Stainless_steel_kingdoms.cfg but I don't get log files. I use No CD .exe, changed back to the needing CD .exe and nothing still, so I don't know. I found my problem was too many "levels" under a trait. Deleted some and it worked, I'm so happy.
    If you're running vista, it can store the log file as a compatibility file elsewhere on your hard disk. Try turning off UAC.

    BftB2 UPDATED 22nd DECEMBER. Member of the Complete Byzantine Unit Roster team

  5. #5

    Default Re: New Traits Help Needed

    I'm using XP. The game didn't even get past the SS6.2 RR1.3 screen to the first screen with loading bar and quote. Maybe it needs to go further to make an error log.

    Anyway until the next unexplained error I'm working things out and it works so I'm happy.

  6. #6

    Default Re: New Traits Help Needed

    I've written this to turn the GoodTaxman trait linked to the town_hall buildings with increases based on chance each turn:

    Spoiler Alert, click show to read: 


    ;Pengo Trigger Tax
    ;-----------------------------------------------
    Trigger TaxSkillIncrease
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and Trait Military_Minded = 1
    and EndedInSettlement
    and SettlementBuildingExists = town_hall
    and Trait GoodTaxman < 2

    Affects GoodTaxman 1 Chance 4

    ;-----------------------------------------------
    Trigger TaxSkillIncrease2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and Trait Military_Minded = 1
    and EndedInSettlement
    and SettlementBuildingExists = council_chambers
    and Trait GoodTaxman < 3

    Affects GoodTaxman 1 Chance 4

    ;-----------------------------------------------
    Trigger TaxSkillIncrease3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and Trait Military_Minded = 1
    and EndedInSettlement
    and SettlementBuildingExists = city_hall
    and Trait GoodTaxman < 4

    Affects GoodTaxman 1 Chance 4

    ;-----------------------------------------------
    Trigger TaxSkillIncrease4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and Trait Military_Minded = 1
    and EndedInSettlement
    and SettlementBuildingExists = mayors_palace
    and Trait GoodTaxman < 5

    Affects GoodTaxman 1 Chance 4

    ;-----------------------------------------------
    Trigger TaxSkillIncrease5
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and Trait Govenor_Minded = 1
    and EndedInSettlement
    and SettlementBuildingExists = town_hall
    and Trait GoodTaxman < 2

    Affects GoodTaxman 1 Chance 8

    ;-----------------------------------------------
    Trigger TaxSkillIncrease6
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and Trait Govenor_Minded = 1
    and EndedInSettlement
    and SettlementBuildingExists = council_chambers
    and Trait GoodTaxman < 3

    Affects GoodTaxman 1 Chance 8

    ;-----------------------------------------------
    Trigger TaxSkillIncrease7
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and Trait Govenor_Minded = 1
    and EndedInSettlement
    and SettlementBuildingExists = city_hall
    and Trait GoodTaxman < 4

    Affects GoodTaxman 1 Chance 8

    ;-----------------------------------------------
    Trigger TaxSkillIncrease8
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and Trait Govenor_Minded = 1
    and EndedInSettlement
    and SettlementBuildingExists = mayors_palace
    and Trait GoodTaxman < 5

    Affects GoodTaxman 1 Chance 8



    Sorry don't know how to do spoilers. I have removed any other relevant triggers for GoodTaxman (only marriage proposals/adoptions have a GoodTaxman trigger apart from above).

    Issue I'm having is that the chance rate in game is way too high compared with what I set. Within 4 turns my military minded king has reached threshold 1. Then while he is in a city with only a town_hall he gets to threshold 2 in another 4 turns, which shouldn't happen.

    I've tried to link the level of advancement with the level of the relevant structure (town_hall line of buildings in this case), but may remove this to save on EndCharacterTurn triggers. Even if I change it the rate of increase is ridiculous, I've done a few tests and while I set an increase on average 25 turns for Military_Inclined types they get lucky in 4-8 turns.

    I'm a beginner at this, I don't know any programming languages, but from what I have done it escapes me what I have done wrong.

    *edit* thinking about it is the random number generator not so random?
    Last edited by Squid; April 27, 2009 at 10:09 AM.

  7. #7
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: New Traits Help Needed

    Chances in triggers seem to work cumulative. That is, when you set up a trigger that only fires once, for example OfferForMarriage, with a "chance 25", you would hardly ever see this being fired.

    When you use a trigger that fires every turn, for example EndedInSettlement, with chance 25 you will have it fired after two or three turns by guarantee:

    => turn #1 25%
    => turn #2 50%
    => turn #3 75%
    => turn #4 100%

    So, when you use "chance 5" the character will usualy latest after the 20th turn sitting in a settlement acquire this trigger, with a more than 50% chance already after the 10th turn. That way, "sitting around" triggers should not have chances above 1 or 2, when they are not intended to fire very fast.

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

  8. #8

    Default Re: New Traits Help Needed

    Quote Originally Posted by konny View Post
    Chances in triggers seem to work cumulative. That is, when you set up a trigger that only fires once, for example OfferForMarriage, with a "chance 25", you would hardly ever see this being fired.

    When you use a trigger that fires every turn, for example EndedInSettlement, with chance 25 you will have it fired after two or three turns by guarantee:

    => turn #1 25%
    => turn #2 50%
    => turn #3 75%
    => turn #4 100%

    So, when you use "chance 5" the character will usualy latest after the 20th turn sitting in a settlement acquire this trigger, with a more than 50% chance already after the 10th turn. That way, "sitting around" triggers should not have chances above 1 or 2, when they are not intended to fire very fast.


    Mate you are a genius!

  9. #9
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: New Traits Help Needed

    Can you post the complete entries for the trait and the export_VnV entries as well I believe that enums files needs to be updated as well as you haven't mentioned changing that file.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  10. #10

    Default Re: New Traits Help Needed

    The trait levels:

    ;------------------------------------------
    Trait GoodTaxman
    Characters family
    AntiTraits BadTaxman

    Level Good_with_Taxes
    Description Good_with_Taxes_desc
    EffectsDescription Good_with_Taxes_effects_desc
    Threshold 1

    Effect TaxCollection 7

    Level Thorough_Taxman
    Description Thorough_Taxman_desc
    EffectsDescription Thorough_Taxman_effects_desc
    Threshold 2

    Effect TaxCollection 15
    Effect Unrest 1

    Level Cruelly_Exacting_Taxman
    Description Cruelly_Exacting_Taxman_desc
    EffectsDescription Cruelly_Exacting_Taxman_effects_desc
    Threshold 3

    Effect TaxCollection 22
    Effect Unrest 2
    Effect Piety -1

    Level Brutally_Savage_Taxman
    Description Brutally_Savage_Taxman_desc
    EffectsDescription Brutally_Savage_Taxman_effects_desc
    Threshold 4

    Effect TaxCollection 30
    Effect Unrest 3
    Effect Piety -2

    I updated the export_vnvs file like this:

    {Brutally_Savage_Taxman} Brutally Savage Taxman
    {Brutally_Savage_Taxman_desc} No transaction is safe from his taxes.
    {Brutally_Savage_Taxman_effects_desc} 30% bonus on tax income, -2 to Piety, +3 to unrest

    The other levels already existed so I just changed their descriptions if needed.

  11. #11
    Caesar Clivus's Avatar SS Forum Moderator
    Join Date
    May 2007
    Location
    Australia
    Posts
    12,693

    Default Re: New Traits Help Needed

    Cant be certain unless you post the triggers but from what you said here:

    I've tried to link the level of advancement with the level of the relevant structure (town_hall line of buildings in this case), but may remove this to save on EndCharacterTurn triggers. Even if I change it the rate of increase is ridiculous, I've done a few tests and while I set an increase on average 25 turns for Military_Inclined types they get lucky in 4-8 turns.
    If you have the chance set at 25, that is going to be a 25% chance of getting the trait which would explain why your guy gets it in 4-8 turns. The chance figure is the percentage chance of getting the trait, not the turns it takes to get the trait. Of course this is all speculation until you post the triggers. If you haven't done what I just described, I apologise. Can you post the triggers also Pengo.
    Last edited by Caesar Clivus; April 27, 2009 at 07:00 PM.

    BftB2 UPDATED 22nd DECEMBER. Member of the Complete Byzantine Unit Roster team

  12. #12

    Default Re: New Traits Help Needed

    Triggers are in the "spoilers", in the post above the post with the trait levels list.

  13. #13
    Caesar Clivus's Avatar SS Forum Moderator
    Join Date
    May 2007
    Location
    Australia
    Posts
    12,693

    Default Re: New Traits Help Needed

    Doh! So they are! Serves me right for posting before my morning coffee

    Ok not sure if this is the case at all but I'm wondering if even though each trigger specifies a certain level of the town hall building tree, whether the game still "sees" the lower levels as still being there? So say that you have the Mayor's Palace built which sets off the fourth level trigger. But because the Mayor's Palace is the fourth building in that tree, the game is also firing the other 3 triggers as well because you have already built the lower level buildings to get to the Mayor's Palace. Of course I am just speculating here but I cant think what else would be increasing the trigger rates
    Last edited by Caesar Clivus; April 27, 2009 at 07:10 PM.

    BftB2 UPDATED 22nd DECEMBER. Member of the Complete Byzantine Unit Roster team

  14. #14

    Default Re: New Traits Help Needed

    Quick 10cc's of caffeine stat!

  15. #15
    Caesar Clivus's Avatar SS Forum Moderator
    Join Date
    May 2007
    Location
    Australia
    Posts
    12,693

    Default Re: New Traits Help Needed

    Updated my last post

    BftB2 UPDATED 22nd DECEMBER. Member of the Complete Byzantine Unit Roster team

  16. #16

    Default Re: New Traits Help Needed

    This may happen but this is not the case in my testing. In my testing it happens from turn 1, ie at turn 10 the king has gained threshold 2 in Goodtaxman when 1 as a military minded commander he should not have gained stats so quickly, and 2 the town he is in only has a town_tall, so he shouldn't get to threshold 2 as towns with a town_hall should not test for gains if the......

    Oops! Actually if the commanders level for GoodTaxman is 1 then the town_hall trigger will still fire as it stipulates "and Trait GoodTaxman <2"!

    So I need to change it to "and Trait GoodTaxman <1"

    It still doesn't explain the rapid increase in GoodTaxman trait, as for a military minded commander should get an increase every 25 turns on average, given the combo of "and Trait Military_Minded = 1" with "Affects GoodTaxman 1 chance 4".

    Cheers for the help CC

  17. #17
    Pnutmaster's Avatar Dominus Qualitatium
    Join Date
    Jan 2006
    Location
    Brooklyn, NY
    Posts
    1,572

    Default Re: New Traits Help Needed

    Triggers have a habit of firing more often than they should. I observed this when writing disease traits for BBB. You can assign a chance of "5" to a trigger and see it go off three times in 20 turns.

    For the sake of experimentation, you could use the condition "RandomPercent" as an extra buffer. Written as, say:

    Trigger TaxSkillIncrease
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and RandomPercent = 50
    and Trait Military_Minded = 1
    and EndedInSettlement
    and SettlementBuildingExists = town_hall
    and Trait GoodTaxman < 1

    Affects GoodTaxman 1 Chance 8
    Additionally, I would try removing the condition "IsGeneral". If your King is the only family member in a settlement, he is its Governor and may no longer be recognized as a general. That could somehow be causing you problems.
    Under the patronage and bound to the service of the
    artist formerly known as Squeakus Maximus
    Stoic Pantheist of S.I.N

  18. #18

    Default Re: New Traits Help Needed

    Cheers for the advice. I will experiment with the randomchance bit and see what happens. Its weird but I'm actually enjoying doing the modification more than playing the game. I'm actually not looking forward to testing because I want to mod more stuff!

  19. #19
    Caesar Clivus's Avatar SS Forum Moderator
    Join Date
    May 2007
    Location
    Australia
    Posts
    12,693

    Default Re: New Traits Help Needed

    Quote Originally Posted by Pengo View Post
    Cheers for the advice. I will experiment with the randomchance bit and see what happens. Its weird but I'm actually enjoying doing the modification more than playing the game.
    Welcome to the dark side!
    Remember: modding leads to anger. Anger leads to hate. Hate leads to your computer being thrown out the window

    Seriously though modding is very addictive. I cant even remember the last time I actually played a game, rather than mod it

    BftB2 UPDATED 22nd DECEMBER. Member of the Complete Byzantine Unit Roster team

  20. #20
    Pnutmaster's Avatar Dominus Qualitatium
    Join Date
    Jan 2006
    Location
    Brooklyn, NY
    Posts
    1,572

    Default Re: New Traits Help Needed

    It's a curse. 'Tis.
    Under the patronage and bound to the service of the
    artist formerly known as Squeakus Maximus
    Stoic Pantheist of S.I.N

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •